Adding custom entry to i2c@c240000 in device tree source

Hello

I am trying to add support for an ADV748x IC to my application using a TX2 NX,

I tried creating my own dtsi file which contains the following block of code:

i2c@c240000 {
			video-receiver@71 {
				compatible = "adi,adv7481";
				reg = <0x70 0x71 0x72 0x73 0x74 0x75
		   			   0x60 0x61 0x62 0x63 0x64 0x65>;
			
				reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
					    "infoframe", "cbus", "cec", "sdp", "txa", "txb";

				#address-cells = <1>;
				#size-cells = <0>;
								
				port@7 {
				reg = <7>;

					adv7482_ain7: endpoint {
				
					};
				};

				port@8 {
					reg = <8>;

					adv7481_hdmi: endpoint {
						remote-endpoint = <&hdmi_in_con>;
					};	
				};

				port@a {
					reg = <10>;
					adv7481_out0: endpoint {
						bus-width = <4>;
						clock-lanes = <0>;
						data-lanes = <1 2 3 4>;
						remote-endpoint = <&adv_csi_in2>;
					};
				};

				port@b {
					reg = <11>;

					adv7482_txb: endpoint {
						clock-lanes = <0>;
						data-lanes = <1>;
						//remote-endpoint = <&csi20_in>;
					};
				};
			};
		};

When I loaded the driver, I noted that no device nodes, and endpoints were created.

I decompiled the resultant device tree and noted the my entry for video-receiver@71 in i2c@c240000 was missing. I added my entry for video-receiver@71, and recompiled the device tree, and after rebooting and then loading the driver noted that the device driver was creating endpoints.

My question is what to I need to do with the device tree source for the TX2 NX to make sure that it includes my entry for video-receiver@71? If I add spurious charactors to my code, the device tree fails with an error as expected, so I know it’s including my dtsi file and parsing it.

Thanks in advance

Andrew

It’s could be didn’t include your dts to correct file.

Thanks for your reply.

I have delibrately put some spurious characters inside my dtsi file in the i2c@c240000, and as expected the build failed. This proves that my dtsi file is being included, but it is then being overridden later on.

I have uploaded my dtsi file for reference.

my_adv_7481.dtsi (2.5 KB)

Which file to include your dts?

1 Like

My dts file is included in:

hardware/nvidia/platform/t18x/lanai/kernel-dts/tegra186-p3636-0001-p3509-0000-a01.dts

Could you check the dmesg | grep -i kernel to check which dts should be

[ 0.181283] DTS File Name: arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t18x/lanai/kernel-dts/tegra186-p3636-0001-p3509-0000-a01.dts

You may need to remove nvcsi/vi in others dts file it also the in the plugin manager dts file to avoid it been overrides.

To provide an update, and hopefully to benefit anyone else who may come across this post, I have resolved the issue.

There were a couple of problems. The first one was the line in
tegra186-p3636-0001-p3509-0000-a01.dts:

include “common/tegra186-super-module-e2614-p3509-0000-a00.dtsi”

The above dtsi was overwrinting my dtsi file.

The second problem was inside my dtsi file. My entry for i2c@c240000 was inside host1x so it was not being spliced into i2c@c240000 and therefore not being parsed by the driver.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.