Device tree settings (USB)

Hi

I want to do some modifications in the deice tree settings in my Jetson Nano and I have read the adaption guide document provided by Nvidia and some other documents and this part is still vague for me. I was wondering if you could give me more simple and understandable explanations and some guidance on the USB part of the device tree settings.

  xusb_padctl@7009f000 {
            compatible = "nvidia,tegra210-xusb-padctl";
            reg = <0x0 0x7009f000 0x0 0x1000>;
            reg-names = "padctl";
            resets = <0x21 0x8e>;
            reset-names = "padctl";
            status = "okay";
            vddio-hsic-supply = <0x3d>;
            avdd_pll_uerefe-supply = <0x3e>;
            hvdd_pex_pll_e-supply = <0x36>;
            dvdd_pex_pll-supply = <0x3f>;
            hvddio_pex-supply = <0x36>;
            dvddio_pex-supply = <0x3f>;
            hvdd_sata-supply = <0x36>;
            dvdd_sata_pll-supply = <0x40>;
            hvddio_sata-supply = <0x36>;
            dvddio_sata-supply = <0x40>;
            linux,phandle = <0x44>;
            phandle = <0x44>;

            pads {

                    usb2 {
                            clocks = <0x21 0xd2>;
                            clock-names = "trk";
                            status = "okay";

                            lanes {


                                    usb2-0 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "xusb";
                                            linux,phandle = <0x45>;
                                            phandle = <0x45>;
                                    };

                                    usb2-1 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "xusb";
                                            linux,phandle = <0x49>;
                                            phandle = <0x49>;
                                    };

                                    usb2-2 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "xusb";
                                            linux,phandle = <0x4a>;
                                            phandle = <0x4a>;
                                    };

                                    usb2-3 {
                                            status = "disabled";
                                            #phy-cells = <0x0>;
                                    };
                            };


     pcie {
                            clocks = <0x21 0x107>;
                            clock-names = "pll";
                            resets = <0x21 0xcd>;
                            reset-names = "phy";
                            status = "okay";

                            lanes {

                                    pcie-0 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "pcie-x1";
                                            linux,phandle = <0x85>;
                                            phandle = <0x85>;
                                    };

                                    pcie-1 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "pcie-x4";
                                            linux,phandle = <0x81>;
                                            phandle = <0x81>;
                                    };

                                    pcie-2 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "pcie-x4";
                                            linux,phandle = <0x82>;
                                            phandle = <0x82>;
                                    };

                                    pcie-3 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "pcie-x4";
                                            linux,phandle = <0x83>;
                                            phandle = <0x83>;
                                    };

                                    pcie-4 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "pcie-x4";
                                            linux,phandle = <0x84>;
                                            phandle = <0x84>;
                                    };

                                    pcie-5 {
                                            status = "okay";
                                            #phy-cells = <0x0>;
                                            nvidia,function = "xusb";
                                    };


            ports {

                    usb2-0 {
                            status = "okay";
                            vbus-supply = <0x41>;
                            mode = "otg";
                            nvidia,usb3-port-fake = <0x3>;
                    };

                    usb2-1 {
                            status = "okay";
                            vbus-supply = <0x42>;
                            mode = "host";
                            linux,phandle = <0xb4>;
                            phandle = <0xb4>;
                    };

                    usb2-2 {
                            status = "okay";
                            vbus-supply = <0x43>;
                            mode = "host";
                    };

                    usb2-3 {
                            status = "disabled";
                    };

                    usb3-0 {
                            status = "okay";
                            nvidia,usb2-companion = <0x1>;
                    };

                    usb3-1 {
                            status = "disabled";
                    };

                    hsic-0 {
                            status = "disabled";
                    };
            };

In case I want to modify this to use one usb what should I do? So I modify it in a way that one usb is connected directly to Jetson Nano not to the hub ( Because I have my own custom board).

You should follow the schematic to modify the device tree.

To other people, your description is more vague than the document.

" I want to modify this to use one usb" provides almost like zero information. How is this get connected? USB2 or USB3? Which pin is in use?

There are lots of usb2-0,2-1,2-2,2-3,3-0, why not you check what are they representing in the adaptation guide first?

Hi

Thanks for your reply. I understand what you have explained. Sorry if my question is vague. I try to be more specific and give you a more detailed question.

About the question, I understand that each USB port has one usb2 and one usb3 and as the default carrier has 4 USB ports so we usb2-0,… and usb3-0, … and so on.

I explain our design again. In the default carrier board these 4 ports are connected to a hub and then to Jetson Nano. But in our design we have one USB port which has both usb2 and usb3 but instead directly connected to Jetson Nano. In our design DN_0 and DP_0 of usb2 are directly connected to USB1_AP_N and USB1_AP_P of Jetson Nano. And RX_N0 and RX_P0 connected to USBSS_RX6_N and USBSS_RX6_P respectively and TX_N0 and TX_P0 connected to USBSS_TX6_N and USBSS_TX6_P respectively, in usb3.

I hope this explanation was clear enough. Let me know in case you have more doubts. Looking forward to hearing from you.