USB DT modification for customized carrier board

Hi Sir,
I am using r36.4.3.

And I am trying to modify USB DT to fit our carrier board, and according to the default config:

		ports {
			usb2-0 {
				mode = "otg";
				usb-role-switch;
				status = "okay";
				port {
					hs_typec_p1: endpoint {
						remote-endpoint = <&hs_ucsi_ccg_p1>;
					};
				};
			};

			usb2-1 {
				mode = "host";
				status = "okay";
				port {
					hs_typec_p0: endpoint {
						remote-endpoint = <&hs_ucsi_ccg_p0>;
					};
				};
			};

			usb2-2 {
				mode = "host";
				status = "okay";
			};

			usb2-3 {
				mode = "host";
				status = "okay";
			};

			usb3-0 {
				nvidia,usb2-companion = <1>;
				status = "okay";
				port {
					ss_typec_p0: endpoint {
						remote-endpoint = <&ss_ucsi_ccg_p0>;
					};
				};
			};

			usb3-1 {
				nvidia,usb2-companion = <0>;
				status = "okay";
				port {
					ss_typec_p1: endpoint {
						remote-endpoint = <&ss_ucsi_ccg_p1>;
					};
				};
			};

			usb3-2 {
				nvidia,usb2-companion = <3>;
				status = "okay";
			};
		};
	};

Could you tell me , what is the difference between
hs_typec_p1
hs_typec_p0
ss_typec_p0
ss_typec_p1
hs_ucsi_ccg_p0
hs_ucsi_ccg_p1
ss_ucsi_ccg_p0
ss_ucsi_ccg_p1
?

And I found the definition is from below:
i2c@c240000 {
status = “okay”;

		typec@8 {
			compatible = "cypress,cypd4226";
			reg = <0x08>;
			interrupt-parent = <&gpio>;
			interrupts = <TEGRA234_MAIN_GPIO(Y, 4) IRQ_TYPE_LEVEL_LOW>;
			firmware-name = "nvidia,jetson-agx-xavier";
			status = "okay";

			#address-cells = <1>;
			#size-cells = <0>;

			ccg_typec_con0: connector@0 {
				compatible = "usb-c-connector";
				reg = <0>;
				label = "USB-C";
				data-role = "host";

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						hs_ucsi_ccg_p0: endpoint {
							remote-endpoint = <&hs_typec_p0>;
						};
					};

					port@1 {
						reg = <1>;
						ss_ucsi_ccg_p0: endpoint {
							remote-endpoint = <&ss_typec_p0>;
						};
					};
				};
			};

			ccg_typec_con1: connector@1 {
				compatible = "usb-c-connector";
				reg = <1>;
				label = "USB-C";
				data-role = "dual";

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						hs_ucsi_ccg_p1: endpoint {
							remote-endpoint = <&hs_typec_p1>;
						};
					};

					port@1 {
						reg = <1>;
						ss_ucsi_ccg_p1: endpoint {
							remote-endpoint = <&ss_typec_p1>;
						};
					};
				};
			};
		};
	};

For USB type c, I guess that the prefix “hs” might refer to “high speed” for USB 2.0, and “ss” might refer to “super speed” for USB 3.2. But suffix “p0” or “p1” seems not to go with usb2-0, usb3-0, usb2-1 or usb3-1.

And how about USB type A ? Could you provide an example ?
And my config is as below,

Please advise. Thanks.

Jimmy

Hi,

I think one question here is, does this thing really affect anything on your carrier board? How the cypd4226 DT looks like is more like a guidance from the vendor.

@WayneWWW
I will mark the cypress PD stuff , and type c endpoint first @ DT, and get back to you soon

Jimmy

@WayneWWW
I can see kernel booting now, but, unfortunately, the login prompt doesn’t show up.
And the attached is my log.

I only mark cypress stuff at i2c@c240000 in DT, , re-arrange USB 3.2 to USB 2.0 mapping & remove remote-endpoint nodes for type c port.

And there seems to be a message indicating that something is gating the login prompt:

24.012662] Please complete system configuration setup on the serial port provided by Jetson’s USB device mode connection. e.g. /dev/ttyACMx where x can 0, 1, 2 etc.

After searching it at NV forum, I found that the missing console might have some thing to do with display setting (HDMI or DP).

Could you help me to get console work first ? Since USB is our priority now.
I am using r36.4.3.

Thanks.

Jimmy
kernel.log (36.8 KB)

@WayneWWW
Now I can enter system config menu .

But the question is, I don’t know which item to enable or disable, to let console work properly without HDMI.

Please advise. Thanks.

J1immy

Is the USB issue fixed?

@WayneWWW
The kernel booting log seems ok without USB errors. But I am not able to login to issue commands like “lsusb” or testing it by plugging something like ethernet dongle, as my last reply.

Could you tell me what to config at system config menu ?
Many thanks.

Jimmy

Hi,

Latest dmesg and how the device tree looks like might still be needed.

@WayneWWW
There you go.
BTW, I can login now.

We have 3 USB ports:
type A x2: USB 3.2 + USB 2.0
type C x1: USB 2.0

type A can detect flash disk (USB 2.0) & be mounted
But it can’t detect ethernet USB dongle (Realtek solution), and there is no message at all.

type C only works for flashing.

Any idea ?

Thanks.

Jimmy
tegra234-p3737-0000+p3701-0000.zip (2.5 KB)
dmesg.log (63.5 KB)
38.3 KB)

What is the usb solution you adopted here for type C? I mean a full function of USB would need a type C controller and that might be from the 3rd party vendor.

What is the usb solution you adopted here for type C? I mean a full function of USB would need a type C controller and that might be from the 3rd party vendor.
=>Are you referring to type C port not working ? We will get back to you soon

Regarding type A not working as USB 3.0, the piece of DT description below is from the original NV design:

Since we don’t need cypress PD chip, we remove it from DT.
Therefore, we also remove the remote-endpoint description above as well, or DT compilation will fails.

I means, does it have any thing to do with USB 3.0 failure ? Should I put the endpoint description back?

Thanks.

Jimmy

DT compilation failure only means you have something else that is wrong. Need to check what is that compilation.

@WayneWWW
Are you saying that even though we choose type A(instead of type c) and there is no need to have cypress PD for type C at the original design(for power supply), we still need the endpoint description ???

Thanks.

Jimmy

Sorry, I didn’t read your comment carefully. I thought you are talking about removing those lines causing compilation failure. Please just ignore my comment.

I am actually confused by what does usb3-3 mean in your screenshot. There is no such port on Orin AGX at all.

Only usb3-0 ,3-1 and 3-2. Maybe you should share the schematic too.

@WayneWWW
Our USB enumeration is as below:

Our issues are:

  1. type A port can detect USB 2.0 storage & USB 3.0 storage, but will treat USB 3.0 as USB 2.0 ( Please check the end of normal.log)
  2. type C port doesn’t work at all under Linux
  3. type A can’t detect ethernet dongle

The attached are dtsi file, USB schematics, kernel booting log & dmesg log.
Many thanks!

ipcn-303_0506_SOM and USB.pdf (1.2 MB)
normal.log (76.9 KB)
dmesg.log (59.7 KB)
tegra234-p3737-0000+p3701-0000.zip (2.4 KB)

If there is no usb3 lane in use for that OTG port, then you should remove usb3 lanes from usb@3550000.

Also, if some USB3 lanes are not in use at all, please set status to disabled.

I think you should provide some vbus-supply info in the DT too.

And I don’t think that type C hardware design really can work.

@WayneWWW
Thanks for your reply.
I already did what you suggested, but it still doesn’t work:
And the attached is the update DT.
tegra234-p3737-0000+p3701-0000.zip (2.5 KB)

Any idea ?

Thanks.

Jimmy

@WayneWWW
Any update ?
We check the type A connection diagram from design guide as below:

In fact, we have the same connection way as the design guide does.
If USB 2.0 storage dongle works, USB 3.0 or USB3is supposed to work, too.
And The DT description seems ok.

Is there any thing that we missed ?

Please advise. Thanks.

Jimmy

Capturing usb bus trace would clarify that. But I wonder if you have such tool on your side or not.

@WayneWWW
I had a conversion with our hardware guy, and he said he didn’t connect GPIO 23 for USB 3.2 port, since he thought there is no need for over-current, as below:

Does it matter ? That’s why USB 3.0 (USB3.2) always fall back to USB 2.0 ?

Please advise. Thanks.

Jimmy