[RK3399][Android7.1] 调试笔记 --- 打开USB2.0 host1和Type-C1

Platform: RK3399
OS: Android 7.1
Kernel: v4.4.83

rk3399-mid-818-android.dts中并没有开启USB2.0 Host1以及Type-C1。

项目中Type-C1 配置为Type-A USB使⽤,配置的注意点如下:

  • 对应的fusb节点不要配置,因为Type-A USB3.0不需要fusb302芯⽚ 。
  • 对应的USB控制器⽗节点(usbdrd3)和PHY的节点(tcphy和u2phy)都要删除extcon属性 。
  • 对应的USB控制器⼦节点(usbdrd_dwc3)的dr_mode属性要配置为”host” ,因此平台默认是host,因此这一步可以不配。
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-eco.dts b/arch/arm64/boot/dts/rockchip/rk3399-eco.dts
index 68cde12..f836893 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-eco.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-eco.dts
@@ -731,6 +731,10 @@
    status = "okay";
 };

+&tcphy1 {
+   status = "okay";
+};
+
 &tsadc {
    rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
    rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
@@ -751,6 +755,20 @@
    };
 };

+&u2phy1 {
+   status = "okay";
+
+   u2phy1_otg: otg-port {
+       status = "okay";
+   };
+
+   u2phy1_host: host-port {
+       phy-supply = <&vcc5v0_host>;
+       status = "okay";
+   };
+};
+
+
 &uart0 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart0_xfer &uart0_cts>;
@@ -769,6 +787,14 @@
    status = "okay";
 };

+&usb_host1_ehci {
+   status = "okay";
+};
+
+&usb_host1_ohci {
+   status = "okay";
+};
+
 &usbdrd3_0 {
    extcon = <&fusb0>;
    status = "okay";
@@ -778,6 +804,14 @@
    status = "okay";
 };

+&usbdrd3_1 {
+   status = "okay";
+};
+
+&usbdrd_dwc3_1 {
+   status = "okay";
+};
+
 &pwm0 {
    status = "okay";
 };

参考:

RK3399 USB DTS Configuration Instruction.pdf

你可能感兴趣的:(RK3399,子类__USB)