Configuring Device Tree to use Display Port 0 on a Jetson TX2

Hello,

I have reviewed these posts:

  • https://devtalk.nvidia.com/default/topic/1032382/how-to-enable-displayport-
  • https://devtalk.nvidia.com/default/topic/1024140/jetson-tx2/displayport-output-on-tx2
  • https://devtalk.nvidia.com/default/topic/937880/jetson-tx1/displayport-output-on-x1

I also posted this : https://devtalk.nvidia.com/default/topic/1035687/jetson-tx2/configuring-power-in-device-tree-for-display-port-on-tx2/ but now I don’t think this is a power tree problem.

I have a custom carrier card configured to use a single display port monitor connected to DP0. I’m having trouble understanding and configuring the device tree.

We are using the Jetson TX2.
Looking at the Parker TRM, I believe DP0 is mapped to address 0x15200000. p30
The display port connector is connected to the “DP0_” pins on the Jetson TX2 and
the DP0_HDP.

In the Jetson-TX2-Generic-Customer-Pinmux-Template.xlsm file, “HDMI_DP1” on line
284 appears to map to “DP0_” and “HDMI_DP0” appears to map to “DP1_”. Is this a
typo?

I tried to configure the device tree to use the display port by selecting the display port in the
./JetPack-3.2/64_TX2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common.dtsi
(see “changed this” annotation)

...
	host1x {
		nvdisplay@15200000 {
            status = "okay";
            nvidia,dc-flags = <TEGRA_DC_FLAG_ENABLED>;
            nvidia,emc-rate = <300000000>;
            nvidia,fb-bpp = <32>;
            nvidia,fb-flags = <TEGRA_FB_FLIP_ON_PROBE>;
			nvidia,fb-win = <0>;
			win-mask = <0x7>;
			// nvidia,dc-or-node = "/host1x/dsi";
			nvidia,dc-or-node = "/host1x/sor";  // changed this
			nvidia,cmu-enable = <1>;
        };

		nvdisplay@15210000 {
			status = "okay";
			nvidia,dc-flags = <TEGRA_DC_FLAG_ENABLED>;
			nvidia,emc-clk-rate = <300000000>;
			nvidia,fb-bpp = <32>; /* bits per pixel */
			nvidia,fb-flags = <TEGRA_FB_FLIP_ON_PROBE>;
			nvidia,fb-win = <3>;
			win-mask = <0x18>;
			nvidia,dc-or-node = "/host1x/sor1";
			nvidia,cmu-enable = <1>;
		};


		nvdisplay@15220000 {
			status = "okay";
			nvidia,dc-flags = <TEGRA_DC_FLAG_ENABLED>;
			nvidia,emc-clk-rate = <300000000>;
			nvidia,fb-bpp = <32>; /* bits per pixel */
			nvidia,fb-flags = <TEGRA_FB_FLIP_ON_PROBE>;
			nvidia,fb-win = <5>;
			win-mask = <0x20>;
			// nvidia,dc-or-node = "/host1x/sor";
			nvidia,dc-or-node = "/host1x/dsi"; // changed this
			nvidia,cmu-enable = <1>;
		};
...


		sor{
			status = "okay";
			nvidia,xbar-ctrl = <0 1 2 3 4>;
			nvidia,hpd-gpio = <&tegra_main_gpio TEGRA_MAIN_GPIO(P, 0) GPIO_ACTIVE_LOW>;
			panel-s-edp-uhdtv-15-6 {
				nvidia,panel-bl-pwm-gpio = <&tegra_aon_gpio TEGRA_AON_GPIO(U, 5) 0>;
			};
			hdmi-display {
				status = "disabled";
			};
			dp-display {
				status = "okay"; // changed this
				disp-default-out {
					nvidia,out-parent-clk = "plld3";
				};
			};
		};
		sor1 {
			status = "okay";
			nvidia,xbar-ctrl = <0 1 2 3 4>;
			nvidia,hpd-gpio = <&tegra_main_gpio TEGRA_MAIN_GPIO(P, 1) GPIO_ACTIVE_LOW>;
			hdmi-display {
				status = "disabled"; // changed this
			};
			dp-display {
				status = "disabled";
			};
		};

Why was nvdisplay@15200000 originally connected to “dsi”, which is an input?

In the system logs, It appears that DP1 is still being configured. I know I’m
burning the DTS properly because other custom devices are being configured
properly. To put the device tree in the Jetson I’m using

L4T=~/nvidia/JetPack-3.2/64_TX2/Linux_for_Tegra/
cd $L4T/sources/kernel/kernel-4.4/output/arch/arm64/boot/dts
cp tegra186-quill-p3310-1000-c03-00-base.dtb $L4T/kernel/dtb/
cd $L4T
sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1
$ grep nvdisplay sys.log
[    0.246269] iommu: Adding device 15210000.nvdisplay to group 36
[    0.449106] tegradc 15210000.nvdisplay: DT parsed successfully
[    0.449162] tegradc 15210000.nvdisplay: Display dc.ffffff8002320000 registered with id=0
[    0.457806] tegradc 15210000.nvdisplay: vblank syncpt # 7 for dc 1
[    0.457822] tegradc 15210000.nvdisplay: vpulse3 syncpt # 8 for dc 1
[    0.460252] tegradc 15210000.nvdisplay: hdmi: no prod_list_hdmi_board, use default range
[    2.462747] tegradc 15210000.nvdisplay: probed
[    4.817622] tegradc 15210000.nvdisplay: fb registered
[    4.854530] tegradc 15210000.nvdisplay: hdmi: pclk:25200K, set prod-setting:prod_c_54M
[    8.673827] tegradc 15210000.nvdisplay: blank - powerdown
[    8.763988] tegradc 15210000.nvdisplay: unblank
[    8.768680] tegradc 15210000.nvdisplay: hdmi: pclk:25200K, set prod-setting:prod_c_54M
[    9.905024] tegradc 15210000.nvdisplay: unblank
[   12.466279] tegradc 15210000.nvdisplay: blank - powerdown
[   12.548989] tegradc 15210000.nvdisplay: unblank
[   12.554444] tegradc 15210000.nvdisplay: hdmi: pclk:25200K, set prod-setting:prod_c_54M
[   12.620812] tegradc 15210000.nvdisplay: unblank
[   41.751098] tegradc 15210000.nvdisplay: blank - powerdown
[   41.835070] tegradc 15210000.nvdisplay: unblank
[   41.841314] tegradc 15210000.nvdisplay: hdmi: pclk:25200K, set prod-setting:prod_c_54M

Why is the kernel configuring 15210000.nvdisplay? I thought it was disabled.

I’m also now getting I2C errors in the system log. For example

[   15.208717] tegra-i2c 3190000.i2c: rx dma timeout txlen:28 rxlen:128
[   15.208719] tegra-i2c 3190000.i2c: --- register dump for debugging ----
[   15.208723] tegra-i2c 3190000.i2c: I2C_CNFG - 0x22c00
[   15.208726] tegra-i2c 3190000.i2c: I2C_PACKET_TRANSFER_STATUS - 0x10001
[   15.208729] tegra-i2c 3190000.i2c: I2C_FIFO_CONTROL - 0x1c
[   15.208732] tegra-i2c 3190000.i2c: I2C_FIFO_STATUS - 0x800040
[   15.208734] tegra-i2c 3190000.i2c: I2C_INT_MASK - 0x6c
[   15.208736] tegra-i2c 3190000.i2c: I2C_INT_STATUS - 0x2
[   15.208769] tegra-i2c 3190000.i2c: i2c transfer timed out addr: 0x50

When I plug in and unplug the display I’m getting :

[   12.466279] tegradc 15210000.nvdisplay: blank - powerdown
[   12.532957] PD DISP2 index4 DOWN
[   12.533051] PD DISP1 index3 DOWN
[   12.533128] PD DISP0 index2 DOWN
[   12.548989] tegradc 15210000.nvdisplay: unblank
[   12.549002] PD DISP0 index2 UP
[   12.549825] PD DISP1 index3 UP
[   12.549904] PD DISP2 index4 UP
[   12.551490] Parent Clock set for DC plld2
[   12.553336] edid invalid
[   12.554411] edid invalid
[   12.554414] edid invalid
[   12.554444] tegradc 15210000.nvdisplay: hdmi: pclk:25200K, set prod-setting:prod_c_54M
[   12.620812] tegradc 15210000.nvdisplay: unblank

I have also tried different types of displays with the same results.

Thanks for you help.

Visionear,

I guess plugin-manager has overwritten your device tree and you didn’t notice.
You could try to read final dtb loaded by tx2 by following method.

sudo -s
cd /proc/device-tree
xxd or cat the node you would like to check

Another way is directly build below dts file into dtb.

tegra186-quill-p3310-1000-c03-00-dp-primary.dts

This file should be in the release kernel file package.

I checked the device tree, and DP0 is indeed disabled:

$ cat /proc/device-tree/host1x/nvdisplay@15200000/status 
disabled
$ cat /proc/device-tree/host1x/nvdisplay@15210000/status 
okay
$ cat /proc/device-tree/host1x/nvdisplay@15220000/status 
disabled

I then took a look at tegra186-quill-p3310-1000-c03-00-dp-primary.dts. I didn’t
understand what you meant by directly building this dtb. So I tried merging that
file with tegra186-quill-common.dtsi so that it looks like this:

host1x {
		nvdisplay@15200000 {
            status = "okay";
            nvidia,dc-flags = <TEGRA_DC_FLAG_ENABLED>;
            nvidia,emc-rate = <300000000>;
            nvidia,fb-bpp = <32>;
            nvidia,fb-flags = <TEGRA_FB_FLIP_ON_PROBE>;
			nvidia,fb-win = <0>;
			win-mask = <0x7>;
			// nvidia,dc-or-node = "/host1x/dsi";
			nvidia,dc-or-node = "/host1x/sor";
			nvidia,cmu-enable = <1>;
        };

		nvdisplay@15210000 {
			status = "disabled";
			nvidia,dc-flags = <TEGRA_DC_FLAG_ENABLED>;
			nvidia,emc-clk-rate = <300000000>;
			nvidia,fb-bpp = <32>; /* bits per pixel */
			nvidia,fb-flags = <TEGRA_FB_FLIP_ON_PROBE>;
			nvidia,fb-win = <3>;
			win-mask = <0x18>;
			nvidia,dc-or-node = "/host1x/sor1";
			nvidia,cmu-enable = <1>;
		};


		nvdisplay@15220000 {
			status = "disabled";
			nvidia,dc-flags = <TEGRA_DC_FLAG_ENABLED>;
			nvidia,emc-clk-rate = <300000000>;
			nvidia,fb-bpp = <32>; /* bits per pixel */
			nvidia,fb-flags = <TEGRA_FB_FLIP_ON_PROBE>;
			nvidia,fb-win = <5>;
			win-mask = <0x20>;
			nvidia,dc-or-node = "/host1x/dsi";
			nvidia,cmu-enable = <1>;
		};
...


		sor{
            bootloader-status = "okay";
            status = "okay";
			nvidia,xbar-ctrl = <0 1 2 3 4>;
			nvidia,hpd-gpio = <&tegra_main_gpio TEGRA_MAIN_GPIO(P, 0) GPIO_ACTIVE_LOW>;
			panel-s-edp-uhdtv-15-6 {
				nvidia,panel-bl-pwm-gpio = <&tegra_aon_gpio TEGRA_AON_GPIO(U, 5) 0>;
			};
			/*hdmi-display {
				status = "disabled";
			};*/
			dp-display {
                bootloader-status = "okay";
				status = "okay";
				disp-default-out {
					nvidia,out-parent-clk = "plld3";
				};
			};
		};
		sor1 {
            bootloader-status = "disabled";
			status = "disabled";
			nvidia,xbar-ctrl = <0 1 2 3 4>;
			nvidia,hpd-gpio = <&tegra_main_gpio TEGRA_MAIN_GPIO(P, 1) GPIO_ACTIVE_LOW>;
			hdmi-display {
				status = "disabled";
			};
			dp-display {
				status = "disabled";
			};
		};
		dpaux@155c0000 {
            bootloader-status = "okay";
 			status = "okay";
		};
		dpaux@15040000 {
            bootloader-status = "disabled";
			status = "disabled";
//			status = "okay";
		};

Now after I boot, all of the display ports are disabled.

$ cat /proc/device-tree/host1x/nvdisplay@15200000/status 
disabled
$ cat /proc/device-tree/host1x/nvdisplay@15210000/status 
disabled
$ cat /proc/device-tree/host1x/nvdisplay@15220000/status 
disabled

How/why is the plugin manager overwriting my device tree, and how do I prevent
it from doing this? Would you point me to some documentation on the plugin-manager and nvdisplay driver? How am I suppose to install the tegra186-quill-p3310-1000-c03-00-dp-primary.dts. I’ve been compiling and installing the device tree with:

L4T=~/JetPack-3.2/64_TX2/Linux_for_Tegra/
cd $L4T/sources/kernel/kernel-4.4/
make O=$TEGRA_KERNEL_OUT dtbs
cd $L4T/sources/kernel/kernel-4.4/output/arch/arm64/boot/dts
cp tegra186-quill-p3310-1000-c03-00-base.dtb $L4T/kernel/dtb/
cd $L4T
sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

Not directly what you are asking, but here are some tips on device tree compiling by example…the kernel build does something similar after combining several source files. sudo is not needed for all of this, but if you run into issues use sudo.

To create a source device tree from a running system (“fs” is file system input type, “dts” is source format output type…actual file output is “extracted.dts”, the content determined via “/proc/device-tree/”):

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

To take a source format and compile to binary format:

dtc -I dts -O dtb -o extracted.dtb extracted.dts

To take a binary format and put it back in source form:

dtc -I dtb -O dts -o recreated_extracted.dts extracted.dtb

“dtc” does not care if you run it from PC or Jetson, it is interchangeable. “dtc” is available either from building the scripts target of the kernel or via a normal package install, e.g., I think “sudo apt-get install device-tree-compiler”.

Visionear,

Because that dts deletes the node in plugin-manager so that it would not overwrite your device tree.

plugin-manager {
          /delete-node/ fragment-e3320-dp;
          /delete-node/ fragment-e3320-a00@1;
          /delete-node/ fragment-e3320-a01@1;
      };

In fact, plugin-manager was for nv internal development so there is no document that clearly explains what is it doing. Camera bring up guide in L4T developer document has something about it, though it is not directly related to display bring up.

I was able to get the display port up and running by flashing the dp-primary dtb.

$ sudo ./flash.sh -r -d kernel/dtb/tegra186-quill-p3310-1000-c03-00-dsi-dp.dtb -k kernel-dtb jetson-tx2 mmcblk0p1

But it only works if the display is connected before power on. Also, I’m seeing these errors in the syslog:

[   21.487492] regulator_get() failed for (15210000.nvdisplay,vdd-dp-pwr), -19
[   21.487496] tegradc 15210000.nvdisplay: dp: couldn't get regulator vdd-dp-pwr
[   21.487501] regulator_get() failed for (15210000.nvdisplay,avdd-dp-pll), -19
[   21.487503] tegradc 15210000.nvdisplay: dp: couldn't get regulator avdd-dp-pll
[   21.487507] regulator_get() failed for (15210000.nvdisplay,vdd-edp-sec-mode), -19
[   21.487509] tegradc 15210000.nvdisplay: dp: couldn't get regulator vdd-edp-sec-mode
[   21.487514] regulator_get() failed for (15210000.nvdisplay,vdd-dp-pad), -19
[   21.487515] tegradc 15210000.nvdisplay: dp: couldn't get regulator vdd-dp-pad

Could this be related to my question posted here?
https://devtalk.nvidia.com/default/topic/1035687/jetson-tx2/configuring-power-in-device-tree-for-display-port-on-tx2/

Device tree should already fill those regulator for power configuration. However, if you don’t use regulator for powering up your board, you need to comment out those code in driver.

kernel/display/drivers/video/tegra/dc/of_dc.c

WayneWWW,

Please provide the device tree “regulator for power configuration”.

How do I check if it is my device tree?

When you boot the device tree actually running can be check by following the “/proc/device-tree/” content. The directories and files exactly match the various blocks of code and files match values in those blocks. You can create a dts source file from this and attach to the forum:

dtc -I fs -o dts -o extracted_tree.dts /proc/device-tree

What section of the device tree contains the “regulator for power configuration”.

Please tell me about the device tree and how to check if the “regulator for power configuration” is set up correctly.

Maybe you could post dmesg clips showing correct power configuration to look for on my TX2.

You could of posted a clip of the file that contain the device tree for “regulator for power configuration”

Hi terrysu50z,

Thanks for the comments, please continue following up those topics you opened, don’t spend time on those none-related.

So you are refusing to answer my question, great customer support!

Hi,

It is in below file. If you track the dts file, you should be able to find it.

hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-power-tree-p3310-1000-a00-00.dtsi