This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5718: HDMI I2C error

Part Number: AM5718
Other Parts Discussed in Thread: TPD12S015, TPD12S016

Tool/software: Linux

Hello Everyone,

We have developed our custom board which have  same HDMI configurations as per idk except one more control gpio for CT_HPD and LS_OE instead of direct 3.3 volt.

I have also add this pin in dtsi setting and measured using DMM and this pin have 3.3 volt proper.

We have used same dtsi settings as Am5718 idk dtsi for HDMI. But still we have below error...

oot@am57xx-evm:/boot# dmesg | grep HDMi

root@am57xx-evm:/boot# dmesg | grep HDMI

[    3.584540] omapdss error: HDMI I2C timeout reading EDID

[    5.779030] omapdss error: HDMI I2C timeout reading EDID

So please help us to solve this issue...

Thanks and best regards

Nikunj Patel

  • gentle reminder,

    Thanks & Best Regards;
    Nikunj Patel
  • gentle reminder,

    Thanks & Best Regards;
    Nikunj Patel
  • Hi Nikunj,

    Are you complaining that your HDMI display is not coming up or just that you see this EDID read errors?

    Regarding the EDID read errors, I will suggest you to check your i2c connections, check the data pins and clock pins are toggling and are pin muxed properly.

    Regards,
    Manisha
  • Hello Manisha;
    We are note getting the HDMI display.

    We configured C25 and F17 pins in normal i2c mode as below then we got signal as per attched images on CRO and i think it is fine.

    {I2C2_SDA, (M0| PIN_INPUT)}, /* i2c2_sda.i2c2_sda */
    {I2C2_SCL, (M0| PIN_INPUT)}, /* i2c2_scl.i2c2_scl */


    But when we configured those both pins for hdmi_ddc as per below we didnot get any signal on those pins.
    {I2C2_SDA, (M1| PIN_INPUT)}, /* i2c2_sda.hdmi1_ddc_scl */
    {I2C2_SCL, (M1| PIN_INPUT)}, /* i2c2_scl.hdmi1_ddc_sda */


    Also, find the below our test result:

    root@am57xx-evm:/mnt/bin# ./modetest
    trying to open device 'i915'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    [ 52.228310] omapdss error: HDMI I2C timeout reading EDID
    Encoders:
    id crtc type possible crtcs possible clones
    30 34 TMDS 0x00000001 0x00000000

    Connectors:
    id encoder status name size (mm) modes encoders
    31 30 connected HDMI-A-1 0x0 5 30
    modes:
    name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
    1024x768 60 1024 1048 1184 1344 768 771 777 806 flags: nhsync, nvsync; type: driver
    800x600 60 800 840 968 1056 600 601 605 628 flags: phsync, pvsync; type: driver
    800x600 56 800 824 896 1024 600 601 603 625 flags: phsync, pvsync; type: driver
    848x480 60 848 864 976 1088 480 486 494 517 flags: phsync, pvsync; type: driver
    640x480 60 640 656 752 800 480 490 492 525 flags: nhsync, nvsync; type: driver
    props:

    root@am57xx-evm:~# dmesg | grep hdmi
    [ 1.929503] HDMI: hdmi_runtime_get
    [ 1.929530] HDMI: hdmi_runtime_put
    [ 1.929647] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops)
    [ 2.540960] HDMI: ENTER omapdss_hdmi_core_enable
    [ 2.540964] HDMI: hdmi_runtime_get
    [ 2.541007] HDMI: hdmi_runtime_get
    [ 3.590947] HDMI: hdmi_runtime_put
    [ 3.590951] HDMI: Enter omapdss_hdmi_core_disable
    [ 3.590955] HDMI: hdmi_runtime_put
    [ 3.600432] HDMI: ENTER hdmi_display_enable
    [ 3.600435] HDMI: hdmi_runtime_get
    [ 3.600464] HDMI: hdmi_power_on hactive= 1024 vactive = 768
    [ 3.600611] hdmi_core_init
    [ 3.600613] HDMIWP: Enter hdmi_wp_video_init_format
    [ 3.600615] HDMIWP: Enter hdmi_wp_video_config_timing
    [ 3.600618] HDMIWP: Enter hdmi_wp_video_config_interface
    [ 3.600638] hdmi_core_enable_video_path
    [ 4.721004] HDMI: hdmi_runtime_get
    [ 5.782957] HDMI: hdmi_runtime_put
    [ 9.732570] omap-hdmi-audio omap-hdmi-audio.0.auto: snd-soc-dummy-dai <-> 58040000.encoder mapping ok
    root@am57xx-evm:~#

    root@am57xx-evm:~# dmesg | grep HDMI
    [ 1.929503] HDMI: hdmi_runtime_get
    [ 1.929530] HDMI: hdmi_runtime_put
    [ 2.540960] HDMI: ENTER omapdss_hdmi_core_enable
    [ 2.540964] HDMI: hdmi_runtime_get
    [ 2.541007] HDMI: hdmi_runtime_get
    [ 3.585592] omapdss error: HDMI I2C timeout reading EDID
    [ 3.590947] HDMI: hdmi_runtime_put
    [ 3.590951] HDMI: Enter omapdss_hdmi_core_disable
    [ 3.590955] HDMI: hdmi_runtime_put
    [ 3.600432] HDMI: ENTER hdmi_display_enable
    [ 3.600435] HDMI: hdmi_runtime_get
    [ 3.600464] HDMI: hdmi_power_on hactive= 1024 vactive = 768
    [ 3.600613] HDMIWP: Enter hdmi_wp_video_init_format
    [ 3.600615] HDMIWP: Enter hdmi_wp_video_config_timing
    [ 3.600618] HDMIWP: Enter hdmi_wp_video_config_interface
    [ 4.721004] HDMI: hdmi_runtime_get
    [ 5.777580] omapdss error: HDMI I2C timeout reading EDID
    [ 5.782957] HDMI: hdmi_runtime_put


    root@am57xx-evm:/mnt/bin# kmscube

    trying to load module omapdrm...success.
    [ 1178.292778] omapdss error: HDMI I2C timeout reading EDID
    ### Display [0]: CRTC = 34, Connector = 31, format = 0x34325258
    Mode chosen [1024x768] : Clock => 65000, Vertical refresh => 60, Type => 64
    Horizontal => 1024, 1048, 1184, 1344, 0
    Vertical => 768, 771, 777, 806, 0
    ### Primary display => ConnectorId = 31, Resolution = 1024x768
    failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
    failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
    loaded module : gbm_pvr.so
    found valid GBM backend : gbm_pvr.so
    PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]
    PVR:(Error): PVRSRVConnect: Unable to open connection. [0, ]
    PVR:(Error): Couldn't connect to services [0, ]
    failed to initialize
    failed to initialize EGL


    Please help us to solve our issue as soon as possible.


    Thanks & Best Regards;
    Nikunj Patel



  • Hi Nikunj,

    HDMI EDID read error will prevent  the right negotiations on the display resolution etc. In absence of EDID read, display will come with default resolution of 1024x768. You can test this by using modetest application.

    #modetest -s connector_id@crtc_id:1024x768

    You can know the connector_id and crtc_id by running modetest application without any arguments. I am guessing, it is 31 and 35 on your board.

    I see the configuration for  hdmi_ddc pins are reverse, SDA is configured for scl and SCL for sda. Is it intentional or typos??

    {I2C2_SDA, (M1| PIN_INPUT)}, /* i2c2_sda.hdmi1_ddc_scl */

    {I2C2_SCL, (M1| PIN_INPUT)}, /* i2c2_scl.hdmi1_ddc_sda */

    Regarding no display with kmscube application,  it seems the PVR is not up. Typical reason for PVR is not up is that kernel is been rebuilt but the SGX kernel module is not loaded.

    I suggest to check following -

    1. check PVR kernel module.

    root@am57xx-evm:~# lsmod | grep pvr

    2. If not found, install and load the pvrsrvkm.ko module

    To install the kernel module, follow the documentation here -

    To load the kernel module -

    #insmod /lib/modules/4.14.40-g4796173fc5/extra/pvrsrvkm.ko

    3. Restart PVR

    root@am57xx-evm:~# /etc/init.d/rc.pvr start

    [ 1310.816253] [drm] Initialized pvr 1.14.3699939 20110701 for 56000000.gpu on minor 1

    [ 1310.847536] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]

    Loaded PowerVR consumer services.

    3. Check PVR again

    root@am57xx-evm:~# lsmod | grep pvr

    pvrsrvkm              417792  1 bc_example

  • Hi manisha;
    Thanks for your quick reply.

    1) We have same configure of i2c2 in spl-uboot as per am5718-idk as below. This is not the typo mistake.

    pad_conf_entry core_padconf_array_essential_am571x_idk[]
    {
    {I2C2_SDA, (M1 | PIN_INPUT)}, /* i2c2_sda.hdmi1_ddc_scl */
    {I2C2_SCL, (M1 | PIN_INPUT)}, /* i2c2_scl.hdmi1_ddc_sda */
    }

    2) Please check the below command for your reference.

    root@am57xx-evm:/mnt/bin# ./modetest -s 31@34:1024x768
    trying to open device 'i915'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    [ 773.590288] omapdss error: HDMI I2C timeout reading EDID
    setting mode 1024x768-60Hz@XR24 on connectors 31, crtc 34

    3) we are using "ti-processor-sdk-linux-rt-am57xx-evm-04.01.00.06" for our development so we did not found "pvrsrvkm.ko" so can do more help to get this driver.



    Thanks & Best Regards;
    Nikunj Patel

  • Hi Manisha;

    Now we ported the "ti-processor-sdk-linux-am57xx-evm-05.00.00.15" on our board. and it has 4.14.40 kernel support. which already have support of  "pvrsrvkm" driver.

    root@am57xx-evm:~# uname -a
    Linux am57xx-evm 4.14.40-g4796173fc5 #1 SMP PREEMPT Wed Jul 25 17:05:51 UTC 2018 armv7l GNU/Linux

    root@am57xx-evm:~# lsmod | grep pvr
    pvrsrvkm              417792  1 bc_example

    Then we started "kmscube" application by below command but still we didn't get any disaply on HDMI.

    root@am57xx-evm:~# modetest -s 35@39:1024x768
    trying to open device 'i915'...failed
    trying to open device 'amdgpu'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    [  333.812059] omapdss error: HDMI I2C timeout reading EDID
    setting mode 1024x768-60Hz@XR24 on connectors 35, crtc 39

    root@am57xx-evm:~# kmscube                                                                                                                                                                                                       
    trying to load module omapdrm...success.
    [  568.290128] omapdss error: HDMI I2C timeout reading EDID
    ### Display [0]: CRTC = 39, Connector = 35, format = 0x34325258
            Mode chosen [1024x768] : Clock => 65000, Vertical refresh => 60, Type => 64
            Horizontal => 1024, 1048, 1184, 1344, 0
            Vertical => 768, 771, 777, 806, 0
    ### Primary display => ConnectorId = 35, Resolution = 1024x768
    failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
    failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
    loaded module : gbm_pvr.so
    found valid GBM backend : gbm_pvr.so
    Using display 0x1 with EGL version 1.4
    EGL Version "1.4 build 1.14@3699939 (MAIN)"
    EGL Vendor "Imagination Technologies"
    EGL Extensions "EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IM"

    Please provide us support to solve this issue.

    Thanks & Best Regards;

    Nikunj Patel

  • Hi Nikunj,

    Since EDID read isn't working, the display setting is defaulting to 1024x768. It looks like your display monitor doesn't support 1024x768 resolution.

    You need to get your hardware board fixed for i2c read for EDID signals. I am software engineer so can't comment well what you can try here but I remember in one of the case, certain resistors were needed to be removed to get the i2c read for EDID signals working.

    Regards,
    Manisha
  • Hi manisha;
    Thanks for your help;

    Can you please check the below dtsi changes are ok for HDMI? or still we missing something?

    aliases {
    rtc0 = &tps659038_rtc;
    rtc1 = &rtc;
    display0 = &hdmi0;
    };
    hdmi0: connector@0 {
    compatible = "hdmi-connector";
    label = "hdmi";

    type = "a";

    port {
    hdmi_connector_in: endpoint {
    remote-endpoint = <&tpd12s015_out>;
    };
    };
    };

    tpd12s015: encoder@0 {
    compatible = "ti,tpd12s016", "ti,tpd12s015";

    gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>;, /* optional CT_CP_HPD */
    <0>, /* optional LS_OE */
    <&gpio7 12 GPIO_ACTIVE_HIGH>; /* HPD */

    ports {
    #address-cells = <1>;
    #size-cells = <0>;

    port@0 {
    reg = <0>;

    tpd12s015_in: endpoint@0 {
    remote-endpoint = <&hdmi_out>;
    };
    };

    port@1 {
    reg = <1>;

    tpd12s015_out: endpoint@0 {
    remote-endpoint = <&hdmi_connector_in>;
    };
    };
    };
    };

    &hdmi {
    status = "okay";
    /*
    * XXX: Support AM572x-Rev 1.2a. this is wrong for AM571x-rev 1.3a,
    * AM572x-Rev1.3a - but thanks to always-on, they work.
    * TODO: SWITCH TO LDO4 once rev 1.2a is deprecated
    * (on rev 1.3a availability)
    */
    vdda-supply = <&ldo4_reg>;

    port {
    hdmi_out: endpoint {
    remote-endpoint = <&tpd12s015_in>;
    };
    };
    };


    &dss {
    status = "okay";

    vdda_video-supply = <&ldoln_reg>;

    ports {
    #address-cells = <1>;
    #size-cells = <0>;

    port@0 {
    reg = <0>;

    dpi_out: endpoint {
    remote-endpoint = <&tc358778_in>;
    data-lines = <24>;
    };
    };
    };
    };

    Also check the Pin muxing of spl-uboot for HDMI


    {I2C2_SDA, (M1| PIN_INPUT)}, /* i2c2_sda.hdmi1_ddc_scl */
    {I2C2_SCL, (M1| PIN_INPUT)}, /* i2c2_scl.hdmi1_ddc_sda */
    {MCASP2_AXR2, (M14 | PIN_INPUT)}, /* mcasp2_axr2.gpio6_9 */
    {SPI1_CS2, (M14 | PIN_INPUT_SLEW)}, /* spi1_cs2.gpio7_12 */



    Thanks & Best Regards;
    Nikunj Patel

  • Hi Manisha;
    It will be good for us if you just confirm the above dtsi setting are correct or still we miss something?

    Thanks & Best regards;
    Nikunj Patel
  • Hi Nikunj,

    The dts entries looks okay. Seems same as AM57xx-idk-common.dtsi with two differences -

    1. CT_CP_HPD signal is used:
    <&gpio6 9 GPIO_ACTIVE_HIGH>;, /* optional CT_CP_HPD */

    2. Different vdda-supply is used:
    vdda-supply = <&ldo4_reg>
  • Hi manisha;
    Thanks for your reply...

    Best regards;
    Nikunj Patel