Skip to main content
Graduate
May 25, 2023
Solved

DRM/KMS framework on STM32MP157f without the ltdc peripheral

  • May 25, 2023
  • 2 replies
  • 2943 views

Hey there,

I am working with a custom board based on an OSD32MP157F SoM. The pinout is very similar with the DK2 board with some minor differences, mainly the DSI_RESET pin. I have done several tests on STM32MP157f-dk2 boards with an eDP display that connects through a MIPI/eDP bridge to the DSI port of the DK. This works fine for a while now.

In the custom board I do not have included any ltdc peripheral as I thought that it is not needed for driving the DSI bridge. I made a new image with the corresponding pinout and the bridge i2c driver initializes normally as seen in the bootlog.

[ 1.735336] lt8911exb 0-0029: Success request pwr-gpio
[ 1.740362] lt8911exb 0-0029: Success request rst-gpio
[ 1.747446] lt8911exb 0-0029: LT8911EXB i2c test success chipid: 0xe0517
[ 1.785822] lt8911exb 0-0029: LT8911 tx pll locked
[ 1.833083] lt8911exb 0-0029: video check: Vtotal = 0
[ 1.838486] lt8911exb 0-0029: video check: Hact(word counter) = 0
[ 1.844158] lt8911exb 0-0029: video check: Vact = 0
[ 2.143622] lt8911exb 0-0029: LT8911EXB setup finish.

But when I try "modtest -M stm" I get a

failed to open device 'stm': No such file or directory

I investigated the entries in /dev and there is no drm entry either.

During troubleshooting I found this post from a few years ago that shows great similarities with my current issue. Looking at the LTDC wiki I can see that the LTDC binds to the DRM/KMS framework. My main hypothesis at the moment is that the DRM framework never initializes since there is no LTDC entry or peripheral. I was wondering if this hypothesis is correct and if yes if there are any ways of using the DRM framework only for DSI.

I attach some parts of the device tree here in case they are helpful. Any ideas or suggestions are highly appreciated

    This topic has been closed for replies.
    Best answer by PatrickF

    Hi @KChar.1​ ,

    DSI get their pixel internally from LTDC, so LTDC is mandatory (without any pins if used with DSI).


    _legacyfs_online_stmicro_images_0693W00000bks85QAA.pngI'n not DT expert, but you might have a look to https://wiki.st.com/stm32mpu/wiki/LTDC_device_tree_configuration with examples used for DK2 boards

    Note that on our boards, we usually define the LTDC pins as we have the options to use // display (e.g. for RGB->HDMI bridge)

    Regards

    2 replies

    PatrickFAnswer
    Technical Moderator
    May 25, 2023

    Hi @KChar.1​ ,

    DSI get their pixel internally from LTDC, so LTDC is mandatory (without any pins if used with DSI).


    _legacyfs_online_stmicro_images_0693W00000bks85QAA.pngI'n not DT expert, but you might have a look to https://wiki.st.com/stm32mpu/wiki/LTDC_device_tree_configuration with examples used for DK2 boards

    Note that on our boards, we usually define the LTDC pins as we have the options to use // display (e.g. for RGB->HDMI bridge)

    Regards

    KChar.1Author
    Graduate
    May 25, 2023

    Hey @PatrickF​ , thank you so much for this! Indeed I was confusing the hdmi_transmitter with the LTDC. I declared the ltdc without any pins on my DT and I can see that modetest -M works but it can not find any panels:

    Encoders:
    id crtc type possible crtcs possible clones
     
    Connectors:
    id encoder status name size (mm) modes encoders
     
    CRTCs:
    id fb pos size
    35 0 (0,0) (0x0)
     #0 nan 0 0 0 0 0 0 0 0 0 flags: ; type: 
     props:
     24 VRR_ENABLED:
     flags: range
     values: 0 1
     value: 0
     28 GAMMA_LUT:
     flags: blob
     blobs:
     
     value:
     29 GAMMA_LUT_SIZE:
     flags: immutable range
     values: 0 4294967295
     value: 256
     
    Planes:
    id crtc fb CRTC x,y x,y gamma size possible crtcs
    31 0 0 0,0 0,0 0 0x00000001
     formats: AR24 XR24 RG24 RG16 AR15 XR15 AR12 XR12 C8 
     props:
     8 type:
     flags: immutable enum
     enums: Overlay=0 Primary=1 Cursor=2
     value: 1
     30 IN_FORMATS:
     flags: immutable blob
     blobs:
     
     value:
     01000000000000000900000018000000
     01000000400000004152323458523234
     52473234524731364152313558523135
     41523132585231324338202000000000
     ff010000000000000000000000000000
     0000000000000000
     in_formats blob decoded:
     AR24: LINEAR
     XR24: LINEAR
     RG24: LINEAR
     RG16: LINEAR
     AR15: LINEAR
     XR15: LINEAR
     AR12: LINEAR
     XR12: LINEAR
     C8 : LINEAR
     33 alpha:
     flags: range
     values: 0 65535
     value: 65535
     34 zpos:
     flags: immutable range
     values: 0 0
     value: 0
    36 0 0 0,0 0,0 0 0x00000001
     formats: AR24 RG24 RG16 AR15 AR12 C8 
     props:
     8 type:
     flags: immutable enum
     enums: Overlay=0 Primary=1 Cursor=2
     value: 0
     30 IN_FORMATS:
     flags: immutable blob
     blobs:
     
     value:
     01000000000000000600000018000000
     01000000300000004152323452473234
     52473136415231354152313243382020
     3f000000000000000000000000000000
     0000000000000000
     in_formats blob decoded:
     AR24: LINEAR
     RG24: LINEAR
     RG16: LINEAR
     AR15: LINEAR
     AR12: LINEAR
     C8 : LINEAR
     38 alpha:
     flags: range
     values: 0 65535
     value: 65535
     39 zpos:
     flags: immutable range
     values: 1 1
     value: 1
     
    Frame buffers:
    id size pitch

    When I try to load the panel manually with

    # modprobe panel-orisetech-otm8009a

    I get no errors.

    I can see that there are no connectors on the modetest which makes me think that the dsi is not recognised. I leave my dsi dt entry below:

    &dsi {
    	 status = "okay";
     
    	 ports {
    		 port@0 {
    			 reg = <0>;
    			 dsi_in: endpoint {
    				remote-endpoint = <&ltdc_ep1_out>;
    				//remote-endpoint = <&dsi_in>;
    			 };
    		 };
     
    		 port@1 {
    			 reg = <1>;
    			 dsi_out: endpoint {
    				 remote-endpoint = <&panel_in>;
    			 };
    		 };
    	 };
     
     
     
    	 panel_otm8009a: panel-otm8009a@0 {
    		 compatible = "orisetech,otm8009a";
    		 reg = <0>;
    		 reset-gpios = <&gpioe 9 GPIO_ACTIVE_LOW>;
    		 power-supply = <&v3v3>;
    		 status = "okay";
    		 
    		 port {
    			 panel_in: endpoint {
    				 remote-endpoint = <&dsi_out>;
    			 };
    			 
    		 };
    	 };
     };

    Any ideas on how to continue troubleshooting the issue?

    KChar.1Author
    Graduate
    May 25, 2023

    I looked a bit closer to this and I realized that after changing the ldtc entry I forgot to change the DSI_RST entry to the correct config. Works fine now! Thank you so much @PatrickF​