I’ve found a number of good references for how to make these changes and test them. When looking in the device tree in /proc everything I am checking appears to be correct. But when I plug in a USB3 memory stick it shows up as USB2. I’ve tried many small variations on the code below but everything I am trying give approximatly the same result.
Any suggestions to fix this would be greatly appreciated.
Our carrier board connects USB2-1 and USB3-1 to a USB 3 hub.
My version of tegra186-quill-p3489-1000-a00-00-base.dts
has been modified for config5 as follows:
(Sorry folks, I know it is bad style but I am still just editing the nvidia files to move toward config#5. I promise I will set it up with a board name soon!)
#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xusb_padctl@3520000 {
status = "okay";
pinctrl-0 = <&vbus_en0_default_state>;
pinctrl-1 = <&vbus_en1_default_state>;
pinctrl-2 = <&vbus_en0_sfio_tristate_state>;
pinctrl-3 = <&vbus_en1_sfio_tristate_state>;
pinctrl-4 = <&vbus_en0_sfio_passthrough_state>;
pinctrl-5 = <&vbus_en1_sfio_passthrough_state>;
pinctrl-names = "vbus_en0_default", "vbus_en1_default",
"vbus_en0_sfio_tristate", "vbus_en1_sfio_tristate",
"vbus_en0_sfio_passthrough", "vbus_en1_sfio_passthrough";
pads {
usb2 {
lanes {
usb2-0 {
nvidia,function = "xusb";
status = "okay";
};
usb2-1 {
nvidia,function = "xusb";
status = "okay";
};
usb2-2 {
nvidia,function = "xusb";
status = "okay";
};
};
};
usb3 {
lanes {
/* usb3-0 { tried this both commented and uncommented
nvidia,function = "xusb";
status = "okay";
}; */
usb3-1 {
nvidia,function = "xusb";
status = "okay";
};
/* usb3-2 {
nvidia,function = "xusb";
status = "okay";
};*/
};
};
};
ports {
usb2-0 {
status = "okay";
mode = "otg";
vbus-supply = <&vdd_usb0_5v>;
nvidia,oc-pin = <0>; /* I've tried this both commented and not as it appears below as well */
};
usb2-1 {
status = "okay";
mode = "host";
vbus-supply = <&vdd_usb1_5v>;
nvidia,oc-pin = <1>; /* same as above */
};
usb3-1 {
nvidia,usb2-companion = <1>;
status = "okay";
};
};
};
#endif
pinctrl@3520000 {
status = "okay";
pinctrl-0 = <&tegra_xusb_padctl_pinmux_default>;
pinctrl-1 = <&vbus_en0_sfio_tristate_state>;
pinctrl-2 = <&vbus_en1_sfio_tristate_state>;
pinctrl-3 = <&vbus_en0_sfio_passthrough_state>;
pinctrl-4 = <&vbus_en1_sfio_passthrough_state>;
pinctrl-5 = <&vbus_en0_default_state>;
pinctrl-6 = <&vbus_en1_default_state>;
pinctrl-names = "default",
"vbus_en0_sfio_tristate", "vbus_en1_sfio_tristate",
"vbus_en0_sfio_passthrough", "vbus_en1_sfio_passthrough",
"vbus_en0_default", "vbus_en1_default";
tegra_xusb_padctl_pinmux_default: pinmux {
/* Quill does not support usb3-micro AB */
usb2-micro-AB {
nvidia,lanes = "otg-0";
nvidia,function = "xusb";
nvidia,port-cap = <TEGRA_PADCTL_PORT_OTG_CAP>;
nvidia,oc-pin = <0>;
};
usb3.0hub_HS {
nvidia,lanes = "otg-1";
nvidia,function = "xusb";
nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
nvidia,oc-pin = <1>;
};
usb2-2 {
nvidia,lanes = "otg-2";
nvidia,function = "xusb";
nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
nvidia,oc-pin = <2>;
};
usb3.0hub_SS {
nvidia,lanes = "usb3-1";
nvidia,function = "xusb";
nvidia,port-cap = <TEGRA_PADCTL_PORT_HOST_ONLY>;
nvidia,oc-pin = <1>; This was in nvidia version but not in version in USB debug notes found on internet at https://www.jianshu.com/p/7e9385d0e538 */
status = "okay";
};
};
};
#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xhci@3530000 {
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-1}>;
phy-names = "usb2-0", "usb2-1", "usb3-1";
status = "okay";
};
#else
xhci@3530000 {
status = "okay";
phys = <&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(0)>,
<&tegra_xusb_padctl TEGRA_PADCTL_PHY_UTMI_P(1)>,
<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>;
phy-names = "utmi-0", "utmi-1", "usb3-1";
nvidia,boost_cpu_freq = <800>;
};
#endif
There are some minor supporting changes elsewhere here is a diff for those
--- ../R32.2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-cvb-prod-p2597-b00-p3489-1000-a00-00.dtsi 2019-08-19 13:45:50.573592321 -0600
+++ Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-cvb-prod-p2597-b00-p3489-1000-a00-00.dtsi 2019-08-07 17:49:19.375751239 -0600
@@ -77,12 +77,31 @@
#gpio-cells = <2>;
vcc-supply = <&battery_reg>;
};
- gpio@74 {
- touch-rails {
+
+ gpio@74 {
+ touch-rails {
+ gpio-hog;
+ gpios = <1 0 2 0>;
+ output-high;
+ label = "touch-rail-1", "touch-rail-2";
+ };
+ };
+
+ gpio_i2c_0_75: gpio@75 {
+ compatible = "ti,tca9539";
+ reg = <0x75>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ vcc-supply = <&battery_reg>;
+ };
+
+
+ gpio@75 {
+ c312-gpio {
gpio-hog;
- gpios = <1 0 2 0>;
+ gpios = <0 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0>;
output-high;
- label = "touch-rail-1", "touch-rail-2";
+ label = "c312-gpio-0", "c312-gpio-1", "c312-gpio-2", "c312-gpio-3", "c312-gpio-4", "c312-gpio-5", "c312-gpio-6", "c312-gpio-7";
};
};
diff -ru ../R32.2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3489-1000-a00.dtsi Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3489-1000-a00.dtsi
--- ../R32.2/Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3489-1000-a00.dtsi 2019-08-19 13:45:50.573592321 -0600
+++ Linux_for_Tegra/sources/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-common-p3489-1000-a00.dtsi 2019-08-07 17:50:46.029984036 -0600
@@ -60,9 +60,9 @@
pcie0_lane2_mux {
gpio-hog;
gpios = <TEGRA_MAIN_GPIO(R, 3) 0>;
- output-low;
+ output-high;
label = "pcie-lane2-mux";
- status = "disabled";
+ status = "okay";
};
e3325_sdio_rst {
gpio-hog;
When I look into the running device tree I get the following results which I believe look correct:
dmesg > L4T_L4T_pre03_dmesg.log
dtc -I fs -O dts -o L4T_L4T_pre03_dump.dts /proc/device-tree 2>&1 | tee L4T_L4T_pre03_dump.log
ls -l /sys/firmware/devicetree/base/chosen/plugin-manager/odm-data/
total 0
-r--r--r-- 1 root root 4 Aug 21 13:48 android-build
-r--r--r-- 1 root root 4 Aug 21 13:48 disable-pmic-wdt
-r--r--r-- 1 root root 4 Aug 21 13:48 disable-sdmmc-hwcq
-r--r--r-- 1 root root 4 Aug 21 13:48 disable-tegra-wdt
-r--r--r-- 1 root root 4 Aug 21 13:48 enable-debug-console
-r--r--r-- 1 root root 4 Aug 21 13:48 enable-denver-wdt
-r--r--r-- 1 root root 4 Aug 21 13:48 enable-pcie-on-uphy-lane1
-r--r--r-- 1 root root 4 Aug 21 13:48 enable-pcie-on-uphy-lane2
-r--r--r-- 1 root root 4 Aug 21 13:48 enable-pcie-on-uphy-lane4
-r--r--r-- 1 root root 4 Aug 21 13:48 enable-sata-on-uphy-lane5
-r--r--r-- 1 root root 4 Aug 21 13:48 enable-xusb-on-uphy-lane0
-r--r--r-- 1 root root 9 Aug 21 13:48 name
-r--r--r-- 1 root root 4 Aug 21 13:48 no-battery
-r--r--r-- 1 root root 4 Aug 21 13:48 normal-flashed
xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7573 6232 2d30 0075 7362 322d 3100 7573 usb2-0.usb2-1.us
00000010: 6233 2d31 00 b3-1.
ls /proc/device-tree/pinctrl@3520000/pinmux
linux,phandle
name
phandle
usb2.0hub
usb2-micro-AB
usb3.0hub_HS
usb3.0hub_SS
lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/3p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 3: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 4: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/3p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 4: Dev 5, If 0, Class=Vendor Specific Class, Driver=lan78xx, 480M
attached zip contains the full dts dump and dmesg log
L4T_preE03_files.zip (88.1 KB)