cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to use the B-LCDAD-HDMI adapter (bridge chip ADV7533) instead of the default panel DSI on the STM32MP157a-ev1 board?

LOrci.1
Associate

Hi,

I tried to update the DTS to make use of the adapter but unfortunately without success. These are the change I made:

hdmi-out {
    compatible = "hdmi-connector";
    type = "a";
 
    port {
        hdmi_con: endpoint {
                remote-endpoint = <&adv7533_out>;
            };
        };
};
 
&dsi { 
 
    phy-dsi-supply = <&reg18>;
 
    #address-cells = <1>;
    #size-cells = <0>;
    status = "okay";
 
    ports {
        #address-cells = <1>;
        #size-cells = <0>;
 
        port@0 {
            reg = <0>;
            dsi_in: endpoint {
                remote-endpoint = <&ltdc_ep0_out>;	
            };
        };
 
        port@1 {
            reg = <1>;
            dsi_out: endpoint {
                remote-endpoint = <&adv7533_in>;
            };
        };
    };
};
 
&i2c2 {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&i2c2_pins_a>;
    pinctrl-1 = <&i2c2_pins_sleep_a>;
    i2c-scl-rising-time-ns = <185>;
    i2c-scl-falling-time-ns = <20>;
    status = "okay";
    /delete-property/dmas;
    /delete-property/dma-names;
 
    hdmi-transmitter@3d {
        compatible = "adi,adv7533";
        reg = <0x3d>;  // (3d = 7A>>1)
        
        a2vdd-supply =  <&v1v8>;
        v3p3-supply = <&v3v3>;
        v1p2-supply =  <&v1v8>;
 
        avdd-supply = <&v1v8>;
        dvdd-supply = <&v1v8>;
        pvdd-supply = <&v1v8>;
        dvdd-3v-supply = <&v3v3>;
 
        adi,dsi-lanes = <2>;
        adi,disable-timing-generator = <1>;
 
        status = "okay";
 
        ports {
            #address-cells = <1>;
            #size-cells = <0>;
 
            port@0 {
                reg = <0>;
                adv7533_in: endpoint {
                    remote-endpoint = <&dsi_out>;
                };
            };
 
            port@1 {
                reg = <1>;
                adv7533_out: endpoint {
                    remote-endpoint = <&hdmi_con>;
                };
            };
        };
   };

thanks in advance for your help.

Luca.

22 REPLIES 22
Raggio
Associate III

I just add the i2c2 traffic we get between the mp1 and the adv7533:

write to 0x3D ack data: 0x00

read to 0x3D ack data: 0x14

write to 0x3D ack data: 0x16 0x20

write to 0x3D ack data: 0x9A 0xE0

write to 0x3D ack data: 0xBA 0x70

write to 0x3D ack data: 0xDE 0x82

write to 0x3D ack data: 0xE4 0x40

write to 0x3D ack data: 0xE5 0x80

write to 0x3D ack data: 0x44 0x00

write to 0x3D ack data: 0x43 0x7E

write to 0x3D ack data: 0x45 0x70

write to 0x3C ack data: 0x15 0xD0

write to 0x3C ack data: 0x17 0xD0

write to 0x3C ack data: 0x24 0x20

write to 0x3C ack data: 0x57 0x11

write to 0x3C ack data: 0x05 0xC8

write to 0x3D ack data: 0xE1 0x78

write to 0x3C ack data: 0x03 0x0B

write to 0x3C ack data: 0x27 0x0B

Unfortunately, after this, the communication stops (and from my understanding also the AD7533 is put in sleep mode).

Thank in advance for your help.

Davide

I don't have the linux stuff figured, but I have had assorted video modes running on the F769 via HDMI

I can perhaps capture the ADV7533 interactions that work here.

What's your notional display, resolution, timing, etc?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you for the reply!

We hope to use this adaptor the same way the embed sil9022a works for the stm32mp157a-dk1 (but sourced from dsi, instead of ltdc parallel rgb). I think that timing and resolution is arbitrated by the linux drivers, as it scales with the connected hdmi display. At least this is my current understanding, but I can be wrong.

If you could do the capture with ease, it can be of great help! With the mcu implementation you have to explicitly declare the hdmi display characteristics?

The LTDC on the MCU side needs colour depth and geometry. The DSI is driven by the pixel clocks and the PLL's for the DSI and LTDC need to be coherent and under the bandwidth ceilings. The MCU also only has 2-lanes, limiting the overall screen geometry at various colour depths.

Seem to recall the ADV might need colour depth, power and audio settings.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thanks Tesla!

We are in a very similar configuration: also our setup uses two lines and, at boot, the color depth, power and audio settings are loaded into the adv by the kernel.

By more research I found that all the other informations (geometry, pixel clock etcetc) to configure the ltdc and the dsi subsystems are recovered from the display edid interface (the i2c line).

The adv should read the edid bus and pass the informations to the mpu, so it can perform internal initializations and finally output video data.

Unfortunately we do not see any of that, as our adv7533 is put into sleep right after the init and so it stays.

We’ve looked a little deeper, following the ST guide:

https://wiki.st.com/stm32mpu/wiki/How_to_display_on_HDMI

“$ modetest -M stm�? fails, as no display is connected or the module isn’t loaded. Do we miss anything in the device three or in the kernel configuration?

Thanks in advance for the help

MKonz.1
Associate II

Just curious if you managed to get B-LCDAD-HDMI adapter working with you board. I'm trying on my custom board but I can't get a stable test image from modetest. Everything is recognized but the ltdc timings don't seem to be setting. When I enable debug, i see

drm:drm_mode_debug_printmodeline] Modeline "800x480": 68 33000 800 837 885 925 480 493 496 525 0x48 0xa

but that info doesn't seem to set the ltdc timings properly.

MKonz.1
Associate II

I managed to get B-LCDAD-HDMI adapter working with my custom board stm32mp157c board. I had to modify some source files in the linux kernel driver. The base version I'm using is 5.13.5-armv7-lpae-x13. I modified the file KERNEL/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c. In the routine dw_mipi_dsi_line_timer_config I changed the first timing parameter from htotal to hactive. For some reason the ADV7533 would not sync otherwise. This works for my system since I only have the ADV7533 on the dsi bus. If you are running other dsi peripherals you probably have to worry about virtual channels. Hope this helps.

Regards

Dear MKonz.1,

thank you so much for sharing your workaroud. Your setup is the same as ours, no other dsi device other than the B-LCDAD-HDMI adapter.

We will try your solution as soon as we come back to office and let you know!

We had to stop testing with the hdmi adapter to focus on other development for out product.

In pevious tests we didn’t get anything with modetest, we only were able to trace i2c comm from low level driver.

In your board the INT line from the hdmi adapter is routed to the MPU? Maybe other than the software problem we had also an hardware issue.

Many thanks again,

Regards

MKonz.1
Associate II

If modetest can't find your display you may have a problem with ADV7533 detect race condition. In the adv7511_drv.c file, I had to move the adv7533_attach_dsi(adv) call from adv7511_bridge_attach(...) routine to the end of adv7511_probe(..) routine. The kernel could then detect the ADV7533 and read the display EDID .

in /sys/class/drm you should see your cardx-HDMI-x-x. In my case : card1-HDMI-A-1

In the device tree, the interrupt is enabled:

interrupt-parent = <&gpiof>;

interrupts = <2 IRQ_TYPE_EDGE_FALLING>;

as well as the powerdown..

pd-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>;

Hope this helps.

Regards