Device Tree Node Definitions/Documentation (Orin NX)

Hello,

I was wondering if someone could point me to where the official device tree module documentation is located?

I’m doing some dts modifications, and I can find some of the node documentation within other forum posts as well as within the kernel sources. Unfortunately though there are some nodes that I am unable to find good / explicit documentation on, currently “terga_usb_cd”. I was hoping there would be an inclusion file with implementation details under .../nvidia-jetson-l4t/Linux_for_Tegra/sources/kernel/kernel-5.10/Documentation/devicetree/bindings/ something similar to “usb/nvidia,tegra-xudc.yaml” with a description of what the node is for and then a list of applicable properties. Am I looking in the wrong place? Does a complete set of documentation for the available Device Tree nodes exist?

Thank you for your time.

Hi VenomousWyvern241,

Are you using the devkit or custom board for Orin NX?
What’s your Jetpack version in use?

I can’t find this in our code base. Which node/driver would you like to configure?
What’s your use case?

Good Mornin KevinFFF,

Q: Are you using the devkit or custom board for Orin NX?

A custom board, but based on the P3509-0000 carrier.

Q: What’s your Jetpack version in use?

JetPack 5.1.2

Q: Which node/driver would you like to configure?

The tegra_usb_cd node, but its not something that I added.

This is the dtsi I am using as a ‘base’:

./nvidia-jetson-l4t/Linux_for_Tegra/sources/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3509-a02.dtsi

Somehow (I have not traced the inclusions out) this file is being included:

./nvidia-jetson-l4t/Linux_for_Tegra/sources/hardware/nvidia/soc/t23x/kernel-dts/tegra234-soc/tegra234-soc-base.dtsi

(^^^ There were only two instances of tegra_usb_cd in the source, this one and one on the same path but for tegra194.)

Specifically:

  tegra_usb_cd: usb_cd {
    compatible = "nvidia,tegra234-usb-cd";
    nvidia,xusb-padctl = <&xusb_padctl>;
    phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
    phy-names = "otg-phy";
    status = "okay";
  };

But I can not find any other documentation on tegra_usb_cd or usb_cd.

Q: What’s your use case?

Right now I’m just trying to understand what all the usb related nodes do / what they mean and how they interact, but eventually I will be trying to put the USB2-0 port (with companion) permanently into host mode via overlay once the base image is flashed and configured.

Thank you for your time.

Hi,

What you are modifying is wrong item. There is dedicated document to explain what device tree needs to be updated.

usb_cd is not mandatory thing and our driver does not use it.

https://docs.nvidia.com/jetson/archives/r35.5.0/DeveloperGuide/HR/JetsonModuleAdaptationAndBringUp/JetsonAgxOrinSeries.html?highlight=universal%20serial%20bus#porting-the-universal-serial-bus

1 Like

Hi WayneWWW,

That document was actually one of the reasons I was asking, because that “usb_cd” node is the phandle specified for charger-detector in xudc. (Jetson AGX Orin Platform Adaptation and Bring-Up — Jetson Linux Developer Guide documentation)

$ vi ./nvidia-jetson-l4t/Linux_for_Tegra/sources/hardware/nvidia/soc/t23x/kernel-dts/tegra234-soc/tegra234-soc-base.dtsi
...
  tegra_usb_cd: usb_cd {
    compatible = "nvidia,tegra234-usb-cd";
    nvidia,xusb-padctl = <&xusb_padctl>;
    phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>;
    phy-names = "otg-phy";
    status = "okay";
  };

  tegra_xudc: xudc@3550000 {
    compatible = "nvidia,tegra234-xudc";
    reg = <0x0 0x03550000 0x0 0x8000>,
      <0x0 0x03558000 0x0 0x8000>;
    reg-names = "base", "fpci";
    interrupts = <0 166 0x4>;
    clocks = <&bpmp_clks TEGRA234_CLK_XUSB_CORE_DEV>,
      <&bpmp_clks TEGRA234_CLK_XUSB_SS_SUPERSPEED>,
      <&bpmp_clks TEGRA234_CLK_XUSB_SS>,
      <&bpmp_clks TEGRA234_CLK_XUSB_FS>;
    clock-names = "dev", "ss", "ss_src", "fs_src";

#if defined(LINUX_VERSION) && LINUX_VERSION > 414
                power-domains =  <&bpmp TEGRA234_POWER_DOMAIN_XUSBB>,
                        <&bpmp TEGRA234_POWER_DOMAIN_XUSBA>,
                        <&bpmp TEGRA234_POWER_DOMAIN_XUSBC>;
                power-domain-names = "dev", "ss", "host";
#endif

    nvidia,xusb-padctl = <&xusb_padctl>;

    iommus = <&smmu_niso1 TEGRA_SID_NISO1_XUSB_DEV>;
    dma-coherent;

    status = "disabled";
    charger-detector = <&tegra_usb_cd>;   // < - - - - HERE
  };

But that is I guess a moot point, because while the usb_cd node is present in my case (due to the inclusion of the above file within my ‘base’ dtsi) it is not actually used within Nvidia’s Orin NX device-tree.

  1. So is the “charger-detector” property of the xudc node just ignored, or would I need to set it to something else?
  2. If the the “charger-detector” property of the xudc node is just ignored - is this a constant ‘always ignored’ or are there cases where I might need it set for using the Orin NX? To put it another way, is it safe to remove the “charger-detector” property from xudc and subsequently remove the usb_cd node?

Generally speaking - for future reference:

  1. I was under the impression that the file mentioned above was part of NVIDIA’s codebase because it is under the NVIDIA specific directory “sources/hardware/nvidia” - is that an invalid assumption?
  2. Is there a publicly available resource you could point me to that has documentation for all of the NVIDIA supported device tree nodes (and their properties), or is the node/property documentation just sprinkled around in the Developer Guide if it is common/relevant?

edit to fix the link

What is the exact point to focus on “charger-detector” here? Does this represent anything special to you?
This does not matter to functionality unless you have some special requirement.

  1. I was under the impression that the file mentioned above was part of NVIDIA’s codebase because it is under the NVIDIA specific directory “sources/hardware/nvidia” - is that an invalid assumption?

Which jetpack release are you trying to use here? The rule is not correct. If some code could go into upstream kernel, then it will be in upstream one but not nvidia repo.

  1. Is there a publicly available resource you could point me to that has documentation for all of the NVIDIA supported device tree nodes (and their properties), or is the node/property documentation just sprinkled around in the Developer Guide if it is common/relevant?

No such thing because there are too many drivers. Most of them are listed inside the kernel documentation. However, you need to know whether you are reading the correct files. That depends on experience. For example, check the device tree and driver code to make sure it is really something matches your driver.

It represents an unanswered/ignored set of questions.

I can see based on this latest outright ignoring of my questions (#1 and #2) and the cagey mildly defensive response that this line of inquiry is effectively dead. So I shall renew my efforts to find both (a) details for tegra_usb_cd and (b) what exactly the “charger-detector” property of xudcis/does elsewhere.

Thank you for all for your time and for answering some of my questions.

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