Custom board HDMI hotplug detect(HPD) did't work

Hi community:
I have a custom board using hdmi, and HPD did not work which mesns when I pull down HPD, there is nothing happened, the ubuntu GUI still work fine.
I used a DP to HDMI cable for Orin devkit, and when I pull down HPD, the monitor has no GUI. When I pull up HPD, GUI get back.
My L4T is R34.1.1, and I have done some steps below:

  1. followed https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/Kernel/DisplayConfigurationAndBringUp.html#for-jetson-agx-orin-enabling-hdmi-on-custom-carrier-boards to enable HDMI
  2. add os_gpio_hotplug_a in tegra234-p3701-0000-p3737-0000.dts:
display@13800000 {
                os_gpio_hotplug_a = <&tegra_main_gpio TEGRA234_MAIN_GPIO(M, 0) GPIO_ACTIVE_HIGH>;
                status = "okay";
        };

And below is my hardware design:

image

image

I use Maxim Integrated MAX96751 as HDMI connector, and HPD is output by MAX96751.A_VDDIO_751 is 1.8v.
image

Your software is already deprecated. Suggest to upgrade to rel-35.1 first and then tested again.

If it still fails, please come back and tell us.

Hi WayneWWW:
Thanks for your reply. I have updgraded to R35.1. And I test two DCB:

  1. the dcb I used for R34.1.1 which download from https://developer.nvidia.com/embedded/l4t/r34_release_v1.1/tegra234-dcb-p3701-0000-a02-p3737-0000-a01_hdmi.dtsi
  2. I got a patch from our Purchasing Engineer last Friday which has below files:
    0001-orin-hdmi-hotplug-support-kernel-dts.patch (1.4 KB)
    README.txt (363 Bytes)
    tegra234-dcb-p3701-0000-a02-p3737-0000-a01-hdmi-4-ga5.0.2.dtsi (26.8 KB)

But both could not enable HPD, it is the same like R34.1.1

Did you remember to change the pinmux of this GPIO pin?

I did not change the setting of TEGRA234_MAIN_GPIO(M, 0) in pinmux, it is default like:

dp_aux_ch0_hpd_pm0 {
				nvidia,pins = "dp_aux_ch0_hpd_pm0";
				nvidia,function = "dp";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
				nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
				nvidia,lpdr = <TEGRA_PIN_DISABLE>;
			};

Then you know what is needed now. Please change it.

diff --git a/bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi b/bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi
index df735b4..66c62d9 100644
--- a/bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi
+++ b/bootloader/t186ref/BCT/tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi
@@ -362,7 +362,7 @@
 
 			dp_aux_ch0_hpd_pm0 {
 				nvidia,pins = "dp_aux_ch0_hpd_pm0";
-				nvidia,function = "dp";
+				nvidia,function = "rsvd1";
 				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
 				nvidia,tristate = <TEGRA_PIN_ENABLE>;
 				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
diff --git a/bootloader/tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi b/bootloader/tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi
index 8afec26..307cfba 100644
--- a/bootloader/tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi
+++ b/bootloader/tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi
@@ -39,6 +39,7 @@
 				TEGRA234_MAIN_GPIO(Q, 6)
 				TEGRA234_MAIN_GPIO(Q, 7)
 				TEGRA234_MAIN_GPIO(R, 1)
+				TEGRA234_MAIN_GPIO(M, 0)
 				TEGRA234_MAIN_GPIO(N, 4)
 				TEGRA234_MAIN_GPIO(N, 1)
 				TEGRA234_MAIN_GPIO(G, 0)

Hi WayneWWW:
Thanks for your advice.
I have changed the pinmux, and files are in attach:
tegra234-mb1-bct-gpio-p3701-0000.dtsi (3.9 KB)
tegra234-mb1-bct-pinmux-p3701-0000.dtsi (64.6 KB)
I tested in R34.1.1 and R35.1, both could detect gpio status like below:

root@tegra-ubuntu:/sys/class/gpio/PM.00# cat value 
0
root@tegra-ubuntu:/sys/class/gpio/PM.00# cat value 
1

But HPD still not work.

What is your method to flash the board after you add things to the device tree?

Have you checked if the runtime device tree really has the change you added?

After modify pinmux or devicetree, I run flash.sh like below:

sudo ./flash.sh -r jetson-agx-orin-devkit mmcblk0p1

I have checked the devicetree change by check if there is os_gpio_hotplug_a or not.
The pinmux and devicetree changes should really done.

Hi,

Also want to clarify, is this issue only “HDMI hotplug failure” or even no hotplug case has problem (boot up with monitor connected)?

Hi,

Please try with this dcb dtsi file. I just had internal check and it looks like the one from rel-34.1 does not support hotplug. Sorry about this.
tegra234-dcb-p3701-0000-a02-p3737-0000-a01-hdmi-4-ga5.0.2.dtsi (26.8 KB)

Hi WayneWWW:
I have tested the dtsi file you send, but HPD still not worked, neither R34.1.1 or R35.1 .

請問你插拔hdmi的時候dmesg或uart log有沒有跳出類似這種log? 另外, 你沒有回覆我前面的問題. 請問你是hdmi完全不能用, 還是只是hotplug有問題?

Could you check if your dmesg or uart gives out below log when you hotplug the hdmi cable?
Also, you didn’t reply my previous question. Is your issue “HDMI totally not working” or just “hotplug fails to work”?

 804.323624] WARNING: CPU: 0 PID: 0 at drivers/gpio/gpio-tegra186.c:937 tegra186_gpio_irq+0x1ac/0x1f0
[  804.333736] ---[ end trace d40210c2e73c52c0 ]---
[  804.919793] WARNING: CPU: 0 PID: 0 at drivers/gpio/gpio-tegra186.c:937 tegra186_gpio_irq+0x1ac/0x1f0
[  804.929432] ---[ end trace d40210c2e73c52c1 ]---
[  805.119763] WARNING: CPU: 0 PID: 0 at drivers/gpio/gpio-tegra186.c:937 tegra186_gpio_irq+0x1ac/0x1f0
[  805.129374] ---[ end trace d40210c2e73c52c2 ]---
[  805.134173] WARNING: CPU: 0 PID: 0 at drivers/gpio/gpio-tegra186.c:937 tegra186_gpio_irq+0x1ac/0x1f0
[  805.143714] ---[ end trace d40210c2e73c52c3 ]---
[  805.148491] WARNING: CPU: 0 PID: 0 at drivers/gpio/gpio-tegra186.c:937 tegra186_gpio_irq+0x1ac/0x1f0
[  805.158017] ---[ end trace d40210c2e73c52c4 ]---

Hi WayneWWW:
My HDMI could display, just hotplug fails to work.
HDMI pins linked to MAX96751 directly on my PCB. So there is not a cable in fact. I just pull down or pull up the GPIO TEGRA234_MAIN_GPIO(M, 0). This works fine when I use orin devkit with a DP to HDMI cable, but not with my custom board which use really HDMI output.
When I pull down or pull up TEGRA234_MAIN_GPIO(M, 0), did not see the log you send.

Hi,

  1. 請問你的"pull down or pull up the GPIO" 是指說從pin腳上控制還是你從軟體控制?

  2. 可以分享一下你如何判斷 device tree跟pinmux有沒有被正確燒進去? 可以試試把/proc/device-tree dump出來檢查到底有沒有對應的patch被加入

dtc -O dts -o dump.dts -I fs /proc/device-tree

  1. 請問你目前從/sys/kernel/debug/gpio 上有沒有看到 gpio M,0 後面有顯示 “os_gpio_hotplug_a” 或是類似的名稱 (hpd)?

  1. Does your “pull down or pull up the GPIO” mean “control from the pin hardware” or do you control from the software?
  2. Can you share how you tell if the device tree and pinmux are being flashed correctly? You could dump the /proc/device-tree and check if the patch is really applied.
  3. Could you see gpio M,0 from /sys/kernel/debug/gpio, with “os_gpio_hotplug_a” or a similar name (hpd) as usecase?

Hi

  1. control from the pin hardware, I have confirmed it using oscilloscope.

  2. Generally I would run cd to some directory at /proc/device-tree like display@13800000, then run ls to check what I change in device tree is flashed or not.
    I have dump the /proc/device-tree and saw the os_gpio_hotplug_a I add.
    dump.dts (420.4 KB)

  3. There is no os_gpio_hotplug_a or similar name at GPIO M,0

root@tegra-ubuntu:/home/# cat /sys/kernel/debug/gpio |grep PM
 gpio-424 (PM.00               )
 gpio-425 (PM.01               )
 gpio-426 (PM.02               )
 gpio-427 (PM.03               )
 gpio-428 (PM.04               )
 gpio-429 (PM.05               )
 gpio-430 (PM.06               )
 gpio-431 (PM.07               )

Could you check if “tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi” and “tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi” got flashed to your board? The flash log shall tell.

I have checked the flash log, but I found the dtsi files of pinmux and gpio that I flashed is tegra234-mb1-bct-pinmux-p3701-0000.dtsi and tegra234-mb1-bct-gpioint-p3701-0000.dts.
flash-log (78.6 KB)

The gpio dtsi file output from pinmux spreadsheet is renamed to tegra234-mb1-bct-gpio-p3701-0000.dtsi which is included in both tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi and tegra234-mb1-bct-pinmux-p3701-0000.dtsi. And those two pinmux dtsi files’ content are same, both from a dtsi file output by pinmux spreadsheet, I just rename it twice.
I also change EQOS settings in pinmux, and now RGMII works fine, so the pinmux should flash correctly.

@WayneWWW 我检查了flash脚本输出的日志,里面显示我烧写的pinmux配置和gpio配置是 tegra234-mb1-bct-pinmux-p3701-0000.dtsitegra234-mb1-bct-gpioint-p3701-0000.dts .并没有烧写你提到的“tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi”
flash-log (78.6 KB)

pinmux表格输出的文件gpio配置文件被我重新名为 tegra234-mb1-bct-gpio-p3701-0000.dtsi。pingmux表格输出的pinmux配置文件被我重命名为 tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsitegra234-mb1-bct-pinmux-p3701-0000.dtsi ,这两个文件内部都包含了tegra234-mb1-bct-gpio-p3701-0000.dtsi
tegra234-mb1-bct-gpio-p3701-0000.dtsi (3.9 KB)
tegra234-mb1-bct-pinmux-p3701-0000.dtsi (64.6 KB)
tegra234-mb1-bct-pinmux-p3701-0000.dtsi (64.6 KB)
我在pinmux配置中还设置了EQOS相关的引脚用于使能RGMII连接switch器件,目前RGMII工作正常,因此我认为pinmux表格生成的bct配置文件已经成功烧写了。

Hi YasirHu,
tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi is one of default dts in BCT, just as Wayne mentioned ,do you edit this file according to #7 comment? why you rename 0000.dtsi to a04.dts, they are two dts files