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.

AM572x HDMI enable in Linux

Other Parts Discussed in Thread: AM5728, TPD12S015, TPD12S016

Hi,

         We are Using one custom board having Am5728 Sitara Processor. We are having on board HDMI out connector for video Display. Since I am new to This i am having following doubts.

1. How to enable HDMI port in device tree of  kernel. We are  using SDK 2.0 ?

2. Does HDMI  Display Port require any driver to link with. If yes What is the driver name and location of driver in board support ?

3. How to verify weather  HDMI port and clock for this  properly configure or not ?

4.  Does it create any node in /dev directory ?

5. If I want to sink some raw data  or some captured data to HDMI display port How can i do this ?

  • Hi Biser,
    Thanks For Quick Reply. According to above document hdmi encoder chip used is TPD12S015, and code for same encoder is registerd in device tree file as mentioned below

    tpd12s015: encoder {
    compatible = "ti,tpd12s015";

    gpios = <&gpio7 10 GPIO_ACTIVE_HIGH>, /* gpio7_10, CT CP HPD */
    <&gpio6 28 GPIO_ACTIVE_HIGH>, /* gpio6_28, LS OE */
    <&gpio7 12 GPIO_ACTIVE_HIGH>; /* gpio7_12/sp1_cs2, HPD */

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

    port@0 {
    reg = <0>;

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


    1. But in our board We are using TPD12S521DBTR hdmi encoder chip instead of tpd12s015. Will it effect our design or tpd12s015 driver is comatible for TPD12S521DBTR chip too.
    2. Git Path for libdrm libraray seems not working. Is there any alternate way to get the same.
    3. There is know way explained in above documnet to test the HDMI for Am5728 processor. Does Steps given for DRA7 will work for AM5728 too.

    Thanks & Regards
    Abhishek
  • 1. This is not an encoder, it's a level shifter. There is no software driver for this, it should work with no problems.
    2. What is this git path? Please point to the document where you refer it from.
    3. Yes, DRA7x and AM57x work the same way. You can test by connecting an HDMI display.
  • Hi Biser,

                  Please correct me if I am getting it wrong, It seems there is a driver  for TPD12S015 . As we can see from the  grep result of driver directory and source code mention below  form the "arch/arm/boot/dts/am57xx-beagle-x15.dts" file respectively. I am unable  to  /
    attach screen shot  so Writing in text form.

    /* grep result from driver directory */

    drivers/video/fbdev/omap2/modules.builtin:2:kernel/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.ko
    drivers/video/fbdev/omap2/modules.builtin:3:kernel/drivers/video/fbdev/omap2/displays-new/dra7-evm-encoder-tpd12s015.ko

    /* Code snippet form arch/arm/boot/dts/am57xx-beagle-x15.dts file */

    tpd12s015: encoder {
                    compatible = "ti,tpd12s015";

                    gpios = <&gpio7 10 GPIO_ACTIVE_HIGH>,   /* gpio7_10, CT CP HPD */
                            <&gpio6 28 GPIO_ACTIVE_HIGH>,   /* gpio6_28, LS OE */              What are these gpio pins
                            <&gpio7 12 GPIO_ACTIVE_HIGH>;   /* gpio7_12/sp1_cs2, HPD */




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

                            port@0 {
                                    reg = <0>;

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

                            port@1 {
                                    reg = <1>;

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

    And please tell me what are these three gpio pins entry.

    Regards

    Abhishek

  • Hi, 

    Yes, there are such sources in drivers/video/fbdev/omap2/displays-new/ and they are built-in the kernel.  

    Abhishek Kumar47 said:
         gpios = <&gpio7 10 GPIO_ACTIVE_HIGH>,   /* gpio7_10, CT CP HPD */ 
                            <&gpio6 28 GPIO_ACTIVE_HIGH>,   /* gpio6_28, LS OE */              What are these gpio pins
                            <&gpio7 12 GPIO_ACTIVE_HIGH>;   /* gpio7_12/sp1_cs2, HPD */

    Those are the gpios used for CT_CP_HPD, LS_OE & HPD signals of the TPD12S015. 

    If you've followed the above steps for configuring your dts, you should have your HDMI enabled. You can try it in your linux system with the following commands: 
       http://processors.wiki.ti.com/index.php/Processor_Linux_SDK_Graphics_and_Display#Wayland.2FWeston 

    Hope this helps. 


    Best Regards, 
    Yordan

  • Hi Yordan,
    Thanks for reply.
    1. Since We are not using TPD12S015 In our board We are using TPD12S521DBTR. I have gone through the data sheets of both the chips, In TPD12S521DBTR all three Signals (CT_CP_HPD, LS_OE & HPD) are not available. There are 4 input signal (DDC_CLK_IN, DDC_DAT_IN, CE_REMOTE_IN, HOTPLUG_DET_IN ) in TPD12S521DBTR. So I think i will have to remove default 3 entries of gpio in dts file and add new 4 entries for signals of our chip, Am i right ?

    2. Since We are not having any hdmi display Unit for now, Is there any way to confirm weather hdmi port is enable or not by mounting debug file system or by checking availability of any device node.
    Thanks & Regards
    Abhishek
  • Hi Yordan ,
    Any comment on it Please ?

    Thanks & Regards
    Abhishek
  • Hi Yordan,

                        I tried to test HDMI by connecting HDMI display, I got following error while i tried "modetest" and "ksmcube"

    rying 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'...failed.
    trying to open device 'exynos'...failed.
    trying to open device 'tilcdc'...failed.
    trying to open device 'msm'...failed.
    trying to open device 'sti'...failed.
    trying to open device 'tegra'...failed.
    no device found.
    root@am57xx-evm:~# kmscube
    trying to load module omapdrm...failed.
    trying to load module i915...failed.
    trying to load module radeon...failed.
    trying to load module nouveau...failed.
    trying to load module vmwgfx...failed.
    trying to load module exynos...failed.
    could not open drm device
    failed to initialize DRM

    I am building DRM driver inbuilt with the Kernel Image.


    Thanks & Regards
    Abhishek Kumar
    7801078513

  • Hi, 

    Abhishek Kumar47 said:
    1. Since We are not using TPD12S015 In our board We are using TPD12S521DBTR. I have gone through the data sheets of both the chips, In TPD12S521DBTR all three Signals (CT_CP_HPD, LS_OE & HPD) are not available. There are 4 input signal (DDC_CLK_IN, DDC_DAT_IN, CE_REMOTE_IN, HOTPLUG_DET_IN ) in TPD12S521DBTR. So I think i will have to remove default 3 entries of gpio in dts file and add new 4 entries for signals of our chip, Am i right ?

     

    Correct, but have in mind that the source encoder-tpd12s015.c is compatible with tpd12s015 and it uses those signals, have a look at the code. You will also need to customize the driver accordingly. 

    Best Regards, 

    Yordan

  • Hi Yordan,

                       Thanks For your  kind  reply,

    Yes I will take care of that. But we have to do  initial testing  ASAP,  Regarding that i am having following doubts. 

    1. Since TPD12S521DBTR is just level shifter, Can we bypass This chip, And  directly connect all the signal from processor direct to the HDMI connector ?

    2. and after successful booting when i try "modetest" command and "kmscube"  i got following error. Am i missing something in kernel building  ? Can you please explore more about this, Or if any document so i can refer that.

    trying to open device 'radeon'...failed.
    trying to open device 'nouveau'...failed.
    trying to open device 'vmwgfx'...failed.
    trying to open device 'omapdrm'...failed.
    trying to open device 'exynos'...failed.
    trying to open device 'tilcdc'...failed.
    trying to open device 'msm'...failed.
    trying to open device 'sti'...failed.
    trying to open device 'tegra'...failed.
    no device found.
    root@am57xx-evm:~# kmscube
    trying to load module omapdrm...failed.
    trying to load module i915...failed.
    trying to load module radeon...failed.
    trying to load module nouveau...failed.
    trying to load module vmwgfx...failed.
    trying to load module exynos...failed.
    could not open drm device
    failed to initialize DRM

    Regards 

    Abhishek

  • Hi,

    kishore akkala said:
    Since TPD12S521DBTR is just level shifter, Can we bypass This chip, And  directly connect all the signal from processor direct to the HDMI connector ?

    I don't think you can bypass the level shifter. Signal levels (like, CEC & HPD) on the SoC side are referenced to 3.3V and according to the HDMI spec the voltages on the cable side are 5V tolerant. This is why the TPD12S016 chip is added in the reference design. 

    As for the errors you're seeing:
     

    kishore akkala said:
    trying to open device 'radeon'...failed.
    trying to open device 'nouveau'...failed.
    trying to open device 'vmwgfx'...failed.
    trying to open device 'omapdrm'...failed.
    trying to open device 'exynos'...failed.
    trying to open device 'tilcdc'...failed.
    trying to open device 'msm'...failed.
    trying to open device 'sti'...failed.
    trying to open device 'tegra'...failed.
    no device found.
    root@am57xx-evm:~# kmscube
    trying to load module omapdrm...failed.
    trying to load module i915...failed.
    trying to load module radeon...failed.
    trying to load module nouveau...failed.
    trying to load module vmwgfx...failed.
    trying to load module exynos...failed.
    could not open drm device
    failed to initialize DRM
     

    You should enable only the TI stuff, like omapdrm, tilcdc.. You don't need nouveau, exynos or i915 archs. 

    Could you post your defconfig & dts file. For some reason the driver is not being able to initialize your panel (which is binded to the DRM) & dds parts of the SoC. 

    Best Regards, 
    Yordan

  • HI Yordan,

                      Those options were by default enable i will disable them. Well   now I am not having above problem that was the probelm with .dts file. My .dts file was not proper.

                        And Now We are not bypassing TPD12S521DBTR chip.   I have disable  hotplug related code in encoder-tp12s015.c file and   returning always true from .detect call back function of same file.By doing that i am able to see the Texas logo on the TV screen  and /dev/video10 , /dev/fb0 nodes have created. Now  When i am running "modetest" command it is showing following result.

    root@am57xx-evm:~# 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'...success.[  249.422116] omapdss error: HDMI I2C Master Error          // I am getting this error now when running kmscube also this error is coming can you please tell what could be the issue.

    Encoders:
    id      crtc    type    possible crtcs  possible clones
    25      28      TMDS    0x00000001      0x00000000

    Connectors:
    id      encoder status          type    size (mm)       modes   encoders  //Connector is connected and getting id 25
    26      25      connected       HDMI-A  0x0             5       25
      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 489 492 525 flags: nhsync, nvsync; type: driver
      props:
            1 EDID:
                    flags: immutable blob
                    blobs:

                    value:
            2 DPMS:
                    flags: enum
                    enums: On=0 Standby=1 Suspend=2 Off=3
                    value: 0

    2. And When I am trying to play a stored .yuv video file using gstreamer it is giving following error.

    dev/video10-evm:~# gst-launch-1.0 filesrc location=5sec0.yuv ! v4l2sink device=/dev/video10  //this is the node created for hdmi
    Setting pipeline to PAUSED ...
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Device '/dev/video10' is not a output device.
    Additional debug info:
    /home/gtbldadm/processor-sdk-linux-fido-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/gstreamer1.0-plugins-good/1.2.3-r0-arago1/gst-plugins-good-1.2.3/sys/v4l2/v4l2_calls.c(594): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
    Capabilities: 0x84204000

    3. Please let me know if there is any other way of testing HDMI.

  • HI Yordan,

    Those options were by default enable i will disable them. Well now I am not having above problem that was the probelm with .dts file. My .dts file was not proper.

    And Now We are not bypassing TPD12S521DBTR chip. I have disable hotplug related code in encoder-tp12s015.c file and returning always true from .detect call back function of same file.By doing that i am able to see the Texas logo on the TV screen and /dev/video10 , /dev/fb0 nodes have created. Now When i am running "modetest" command it is showing following result.

    root@am57xx-evm:~# 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'...success.[ 249.422116] omapdss error: HDMI I2C Master Error // I am getting this error now when running kmscube also this error is coming can you please tell what could be the issue.

    Encoders:
    id crtc type possible crtcs possible clones
    25 28 TMDS 0x00000001 0x00000000

    Connectors:
    id encoder status type size (mm) modes encoders //Connector is connected and getting id 25
    26 25 connected HDMI-A 0x0 5 25
    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 489 492 525 flags: nhsync, nvsync; type: driver
    props:
    1 EDID:
    flags: immutable blob
    blobs:

    value:
    2 DPMS:
    flags: enum
    enums: On=0 Standby=1 Suspend=2 Off=3
    value: 0


    2. And When I am trying to play a stored .yuv video file using gstreamer it is giving following error.

    dev/video10-evm:~# gst-launch-1.0 filesrc location=5sec0.yuv ! v4l2sink device=/dev/video10 //this is the node created for hdmi
    Setting pipeline to PAUSED ...
    ERROR: Pipeline doesn't want to pause.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Device '/dev/video10' is not a output device.
    Additional debug info:
    /home/gtbldadm/processor-sdk-linux-fido-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/gstreamer1.0-plugins-good/1.2.3-r0-arago1/gst-plugins-good-1.2.3/sys/v4l2/v4l2_calls.c(594): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
    Capabilities: 0x84204000

    3. Please let me know if there is any other way of testing HDMI.
  • HI Yordan,

                     Those options were by default enable i will disable them. Well   now I am not having above problem that was the probelm with .dts file. My .dts file was not proper.

                       And Now We are not bypassing TPD12S521DBTR chip.   I have disable  hotplug related code in encoder-tp12s015.c file and   returning always true from .detect call back function of same file.By doing that i am able to see the Texas logo on the TV screen  and /dev/video10 , /dev/fb0 nodes have created. Now  When i am running "modetest" command it is showing following result.

    root@am57xx-evm:~# 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'...success.[  249.422116] omapdss error: HDMI I2C Master Error          // I am getting this error now when running kmscube also this error is coming can you please tell what could be the issue.

    Encoders:

    id      crtc    type    possible crtcs  possible clones

    25      28      TMDS    0x00000001      0x00000000

    Connectors:

    id      encoder status          type    size (mm)       modes   encoders  //Connector is connected and getting id 25

    26      25      connected       HDMI-A  0x0             5       25

     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 489 492 525 flags: nhsync, nvsync; type: driver

     props:

           1 EDID:

                   flags: immutable blob

                   blobs:

                   value:

           2 DPMS:

                   flags: enum

                   enums: On=0 Standby=1 Suspend=2 Off=3

                   value: 0

    2. And When I am trying to play a stored .yuv video file using gstreamer it is giving following error.

    dev/video10-evm:~# gst-launch-1.0 filesrc location=5sec0.yuv ! v4l2sink device=/dev/video10  //this is the node created for hdmi

    Setting pipeline to PAUSED ...

    ERROR: Pipeline doesn't want to pause.

    ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Device '/dev/video10' is not a output device.

    Additional debug info:

    /home/gtbldadm/processor-sdk-linux-fido-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/cortexa15hf-vfp-neon-linux-gnueabi/gstreamer1.0-plugins-good/1.2.3-r0-arago1/gst-plugins-good-1.2.3/sys/v4l2/v4l2_calls.c(594): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:

    Capabilities: 0x84204000

    3. Please let me know if there is any other way of testing HDMI...

  • Hi,

    I see you've posted another thread: e2e.ti.com/.../522972, which seems to deal with similar issues, as the one listed above. I've answered that thread, so please refer to the post there.

    Also, since the original level shifter issue seems to be resolved, I propose to close this thread and continue on the other e2e discussion that you've started.

    Best Regards,
    Yordan