TX2 Carrier Board-A302 NV USB and PCIe USB Debug
一、硬件连接
W8&W9 --- PCIe-USB3.0 转接口(1xPCIe-to-4xUSB3.0,共享5.0GHz带宽)
W7 --- USBSS0(靠近PCB板侧,即下侧USB) + USBSS1
Tegra自带USB 控制器名称: tegra-xusb
PCIe-USB扩展 控制器名称: xhci_hcd
二、ODMDATA (参考Jetson TX2_OEM_Product_DesignGuide.pdf)
ODMDATA 是与PCIE&USB 配置相关
配置修改路径:Linux_for_Tegra/p2771-0000.conf.common
查看ODMDATA &USB Phy/Pinmux名称:
ls -l /sys/firmware/devicetree/base/chosen/plugin-manager/odm-data
xxd /proc/device-tree/xhci@3530000/phy-names
ls /proc/device-tree/pinctrl@3520000/pinmux/
ls /proc/device-tree/pcie-controller@10003000/
image.png
image.pngLane allocation can be performed by either ODMDATA, in p2771-0000.conf.common by default, or alloted to UPHY to each client in the bpmp-dtb file.
For example:
- ODMDATA=0x1090000 default for Jetson TX2 for Configuration #2
- ODMDATA=0x90000 for Configuration #1
- ODMDATA=0x6090000 for Configuration #3
ODMDATA = 0x609000
nvidia@tw-tx2:~$ ls -l /sys/firmware/devicetree/base/chosen/plugin-manager/odm-data
total 0
-r--r--r-- 1 root root 4 4月 18 17:22 android-build
-r--r--r-- 1 root root 4 4月 18 17:22 disable-pmic-wdt
-r--r--r-- 1 root root 4 4月 18 17:22 disable-sdmmc-hwcq
-r--r--r-- 1 root root 4 4月 18 17:22 disable-tegra-wdt
-r--r--r-- 1 root root 4 4月 18 17:22 enable-debug-console
-r--r--r-- 1 root root 4 4月 18 17:22 enable-denver-wdt
-r--r--r-- 1 root root 4 4月 18 17:22 enable-pcie-on-uphy-lane0
-r--r--r-- 1 root root 4 4月 18 17:22 enable-pcie-on-uphy-lane4
-r--r--r-- 1 root root 4 4月 18 17:22 enable-sata-on-uphy-lane5
-r--r--r-- 1 root root 4 4月 18 17:22 enable-xusb-on-uphy-lane1
-r--r--r-- 1 root root 4 4月 18 17:22 enable-xusb-on-uphy-lane2
-r--r--r-- 1 root root 9 4月 18 17:22 name
-r--r--r-- 1 root root 4 4月 18 17:22 no-battery
-r--r--r-- 1 root root 4 4月 18 17:22 normal-flashed
ODMDATA = 0x709000
nvidia@tw-tx2:~$ ls -l /sys/firmware/devicetree/base/chosen/plugin-manager/odm-data
total 0
-r--r--r-- 1 root root 4 4月 18 16:39 android-build
-r--r--r-- 1 root root 4 4月 18 16:39 disable-pmic-wdt
-r--r--r-- 1 root root 4 4月 18 16:39 disable-sdmmc-hwcq
-r--r--r-- 1 root root 4 4月 18 16:39 disable-tegra-wdt
-r--r--r-- 1 root root 4 4月 18 16:39 enable-debug-console
-r--r--r-- 1 root root 4 4月 18 16:39 enable-denver-wdt
-r--r--r-- 1 root root 4 4月 18 16:39 enable-pcie-on-uphy-lane4
-r--r--r-- 1 root root 4 4月 18 16:39 enable-sata-on-uphy-lane5
-r--r--r-- 1 root root 4 4月 18 16:39 enable-xusb-on-uphy-lane0
-r--r--r-- 1 root root 4 4月 18 16:39 enable-xusb-on-uphy-lane1
-r--r--r-- 1 root root 4 4月 18 16:39 enable-xusb-on-uphy-lane2
-r--r--r-- 1 root root 9 4月 18 16:39 name
-r--r--r-- 1 root root 4 4月 18 16:39 no-battery
-r--r--r-- 1 root root 4 4月 18 16:39 normal-flashed
三、TX2+A302+JetPack4.2
1、 ODMDATA = 0x709000 + NV DTB --- 仅识别W7 下面的一个USB,但是无法识别PCIE-USB和上面的USB
2、 ODMDATA = 0x709000 + TW DTB --- 可以识别Default USB,但是无法识别PCIE-USB
3、 ODMDATA = 0x609000 + NV DTB --- 可以识别W7 下面的一个USB和PCIE-USB (W8&W9)
3、 ODMDATA = 0x609000 + TW DTB --- 可以识别W7 两个USB和PCIE-USB (W8&W9)
验证一、(2019/04/19 14:00)
ODM-DATA = 0x709000
> pcie-controller@10003000 {
> pci@1,0 {
> nvidia,num-lanes = <4>;
> nvidia,disable-clock-request;
> };
> pci@2,0 {
> nvidia,num-lanes = <0>;
> };
> pci@3,0 {
> nvidia,num-lanes = <1>;
> };
> };
nvidia@tw-tx2:~$ xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7573 6232 2d30 0075 7362 322d 3100 7573 usb2-0.usb2-1.us
00000010: 6232 2d32 0075 7362 332d 3000 b2-2.usb3-0.
nvidia@tw-tx2:~$ xxd /proc/device-tree/pinctrl@3520000/pinmux/
e3325-usb3-std-A-HS/ e3325-usb3-std-A-SS/ linux,phandle
name phandle usb2-micro-AB/ usb2-std-A-port2/ usb3-std-A-port2/
U盘插入W7 上侧口 (插入U盘后开机状态)后lsusb --- USB2.0
nvidia@tw-tx2:~$ 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 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
U盘拔出W7 上侧口,再插入W7 下侧USB口后lsusb --- USB3.0
nvidia@tw-tx2:~$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/3p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
关机再开机(U盘默认插入W7 下侧USB口) --- USB2.0
nvidia@tw-tx2:~$ 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=Mass Storage, Driver=usb-storage, 480M
nvidia@tw-tx2:~$
U盘拔出W7下侧口,再插入W7 上侧USB口后lsusb --- USB2.0
nvidia@tw-tx2:~$ 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 3: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
nvidia@tw-tx2:~$
U盘拔出W7上侧口,再插入W7下侧USB口后lsusb --- 变为USB3.0
nvidia@tw-tx2:~$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/3p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
------------------------------------------------------------------------------------------------
验证二、(2019/04/19 14:00)
ODM-DATA = 0x709000
去除plugin 无USB控制器 可识别
nvidia@tw-tx2:~$ xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7574 6d69 2d30 0075 746d 692d 3100 7574 utmi-0.utmi-1.ut
00000010: 6d69 2d32 0075 7362 332d 3000 7573 6233 mi-2.usb3-0.usb3
00000020: 2d31 0075 7362 332d 3200 -1.usb3-2.
nvidia@tw-tx2:~$ ls /proc/device-tree/pinctrl@3520000/pinmux/
linux,phandle name phandle usb2-1 usb2-2 usb2-micro-AB usb3-a usb3-b usb3-c
上述三个USB2和三个USB3/status 均为okay
实验一和二 总结如下:
Kernel4.9 版本DTS已弃用4.4版本的tegra_xusb_padctl内容定义方式改为了新版本具体参考如下:
#if TEGRA_XUSB_PADCONTROL_VERSION >= DT_VERSION_2
xhci@3530000 {
status = "okay";
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-2}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-0}>;
phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-0";
};
#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_UTMI_P(2)>,
<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(0)>,
<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>,
<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(2)>;
phy-names = "utmi-0", "utmi-1","utmi-2", "usb3-0", "usb3-1", "usb3-2";
/*
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_UTMI_P(2)>,
<&tegra_xusb_padctl TEGRA_PADCTL_PHY_USB3_P(1)>;
phy-names = "utmi-0", "utmi-1", "utmi-2", "usb3-1";
*/
nvidia,boost_cpu_freq = <800>;
};
#endif
验证三、(2019/04/20 12:00 已解决全部问题,可发布)
ODM-DATA = 0x609000
1. NV 默认DTS 可识别PCIe-USB + USB W7下侧USB2.0,上侧不识别且无USB3.0
nvidia@tw-tx2:~$ dmesg | grep "2019"
[ 0.000000] Linux version 4.9.140-tegra (dennis@dennisJiang) (gcc version 6.4.1 20170707 (Linaro GCC 6.4-2017.08) ) #3 SMP PREEMPT Sat Apr 13 17:54:43 CST 2019
[ 0.184019] DTB Build time: Apr 19 2019 16:36:29
[ 0.437377] DTB Build time: Apr 19 2019 16:36:29
[ 5.039749] tegra_rtc c2a0000.rtc: setting system clock to 2019-04-19 08:38:12 UTC (1555663092)
[ 12.062019] wl_android_wifi_on in
nvidia@tw-tx2:~$ ls -l /sys/firmware/devicetree/base/chosen/plugin-manager/odm-data
-r--r--r-- 1 root root 4 4月 19 16:41 enable-pcie-on-uphy-lane0
-r--r--r-- 1 root root 4 4月 19 16:41 enable-pcie-on-uphy-lane4
-r--r--r-- 1 root root 4 4月 19 16:41 enable-sata-on-uphy-lane5
-r--r--r-- 1 root root 4 4月 19 16:41 enable-xusb-on-uphy-lane1
-r--r--r-- 1 root root 4 4月 19 16:41 enable-xusb-on-uphy-lane2
nvidia@tw-tx2:~$ xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7573 6232 2d30 0075 7362 322d 3100 usb2-0.usb2-1.
nvidia@tw-tx2:~$ ls /proc/device-tree/pinctrl@3520000/pinmux/
e3325-usb3-std-A-HS e3325-usb3-std-A-SS linux,phandle name phandle usb2-micro-AB usb2-std-A-port2 usb3-std-A-port2
2. 修改DTS后可识别PCIe-USB + USB W7 双USB2.0+ 单USB3.0
nvidia@tw-tx2:~$
nvidia@tw-tx2:~$ ls -l /sys/firmware/devicetree/base/chosen/plugin-manager/odm-data
total 0
-r--r--r-- 1 root root 4 4月 20 14:43 enable-pcie-on-uphy-lane0
-r--r--r-- 1 root root 4 4月 20 14:43 enable-pcie-on-uphy-lane4
-r--r--r-- 1 root root 4 4月 20 14:43 enable-sata-on-uphy-lane5
-r--r--r-- 1 root root 4 4月 20 14:43 enable-xusb-on-uphy-lane1
-r--r--r-- 1 root root 4 4月 20 14:43 enable-xusb-on-uphy-lane2
nvidia@tw-tx2:~$ xxd /proc/device-tree/xhci@3530000/phy-names
00000000: 7573 6232 2d30 0075 7362 322d 3100 7573 usb2-0.usb2-1.us
00000010: 6232 2d32 0075 7362 332d 3000 7573 6233 b2-2.usb3-0.usb3
00000020: 2d31 0075 7362 332d 3200 -1.usb3-2.
nvidia@tw-tx2:~$ ls /proc/device-tree/pinctrl@3520000/pinmux/
linux,phandle name phandle usb2-a usb2-b usb2-micro-AB usb3-a usb3-b usb3-c
修改 tegra186-quill-p3310-1000-c03-00-base.dts 删除掉如下内容padctl旧版本
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_UTMI_P(2)>;
phy-names = "utmi-0", "utmi-1","utmi-2";
};
网友评论