Jetson/FAQ/BSP/Remove TypeC

From eLinux.org
Jump to: navigation, search

Jetson AGX Xavier devkit uses TypeC USB ports and Cypress PD controller. If user own designed carrier board doesn't have Cypress PD controller and chooses TypeA or mini USB port, related software change is needed. There are two solutions depends on OTG support status. 1. If OTG support is not needed, user can just apply below patch. The patch is based on L4T R32.2.1 release.

--- a/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi
+++ b/hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi
@@ -96,7 +96,7 @@
 			status = "disabled";
 		};
 		ucsi_ccg: ucsi_ccg@8 {
-			status = "okay";
+			status = "disabled";
 			typec-extcon {
 				typec_port0: port-0 {
 					status = "okay";
@@ -162,7 +162,7 @@
 
 		ports {
 			usb2-0 {
-				mode = "otg";
+				mode = "host";
 				status = "okay";
 			};
 			usb2-1 {
@@ -195,9 +195,6 @@
 #endif
 
 	tegra_xudc: xudc@3550000 {
-		extcon-cables = <&typec_port0 0>;
-		extcon-cable-names = "vbus";
-		#extcon-cells = <1>;
 #if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
 		phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
 			<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-2}>;
@@ -209,9 +206,6 @@
 	};
 
 	tegra_xhci: xhci@3610000 {
-		extcon-cables = <&typec_port0 1>;
-		extcon-cable-names = "id";
-		#extcon-cells = <1>;
 #if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
 		phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
 			<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
@@ -329,32 +323,6 @@
 	};
 };
 
-&head0 {
-	extcon-cables = <&typec_port0 2 &typec_port1 2>;
-	extcon-cable-names = "typec0", "typec1";
-	#extcon-cells = <1>;
-};
-
-&head1 {
-	extcon-cables = <&typec_port0 2 &typec_port1 2>;
-	extcon-cable-names = "typec0", "typec1";
-	#extcon-cells = <1>;
-};
-
-&head2 {
-	extcon-cables = <&typec_port0 2 &typec_port1 2>;
-	extcon-cable-names = "typec0", "typec1";
-	#extcon-cells = <1>;
-};
-
-&sor0 {
-	nvidia,typec-port = /bits/ 8 <0>;
-};
-
-&sor1 {
-	nvidia,typec-port = /bits/ 8 <1>;
-};
-
 #if LINUX_VERSION >= 414
 #include <tegra194-linux-4.14.dtsi>
 #endif

2. If OTG support is needed, most of the above patch is still needed except changing usb port from "otg" to "host" part. And user needs to refer to section "For an OTG (On-The-GO) Port" under "Porting USB (Universal Serial Bus)" in Jetson AGX Xavier Platform Adaptation Guide to add GPIO External Connector information to device tree.