嵌入式爱好者

8mp-USB1总线取消OTG修改为USB的host接口

2024-1-31 08:40| 发布者: L_S_H| 查看: 185| 评论: 0

类目: i.MX8MP系列产品  >  Linux     文档编号: 1299

8MP的USB1总线是接入了CC芯片,做成Type-c的形式,默认配置为otg的一个形式,需要去掉相关电路,然后在设备树中屏蔽掉这部分芯片,才能够正常识别u盘等外设
以下是设备树的修改部分:
diff --git a/OK8MP-linux-kernel/arch/arm64/boot/dts/freescale/OK8MP-C.dts b/OK8MP-linux-kernel/arch/arm64/boot/dts/freescale/OK8MP-C.dts
index 72fcc7f37..dfc6d74db 100644
--- a/OK8MP-linux-kernel/arch/arm64/boot/dts/freescale/OK8MP-C.dts
+++ b/OK8MP-linux-kernel/arch/arm64/boot/dts/freescale/OK8MP-C.dts
@@ -143,7 +143,7 @@
        regulator-always-on;
    };
 
-   cbtl04gp {
+   /*cbtl04gp {
        compatible = "nxp,cbtl04gp";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_typec_mux>;
@@ -155,7 +155,7 @@
                remote-endpoint = <&typec_con_ss>;
            };
        };
-   };
+   };*/
 
    bt_sco_codec: bt_sco_codec {
        #sound-dai-cells = <1>;
@@ -601,7 +601,7 @@
    pinctrl-0 = <&pinctrl_i2c3>;
    status = "okay";
 
-   fusb302: typec-portc@22 {
+   /*fusb302: typec-portc@22 {
        compatible = "fcs,fusb302";
        reg = <0x22>;
        pinctrl-names = "default";
@@ -639,7 +639,7 @@
                };
            };
        };
-   };
+   };*/
 
    codec: wm8960@1a {
        compatible = "wlf,wm8960";
@@ -1007,7 +1007,8 @@
 };
 
 &usb3_phy0 {
-   vbus-power-supply = <&fusb302>;
+   vbus-power-supply = <&reg_usb1_host_vbus>; //加入供电部分
+   //vbus-power-supply = <&fusb302>;
    fsl,phy-tx-vref-tune = <6>;
    fsl,phy-tx-rise-tune = <0>;
    fsl,phy-tx-preemp-amp-tune = <3>;
@@ -1022,18 +1023,8 @@
 };
 
 &usb_dwc3_0 { //去掉无用配置
-   dr_mode = "otg";
-   hnp-disable;
-   srp-disable;
-   adp-disable;
-   usb-role-switch;
+   dr_mode = "host"; //只配置为host
    status = "okay";
-
-   port {
-       usb3_drd_sw: endpoint {
-           remote-endpoint = <&typec_dr_sw>;
-       };
-   };
 };
 
 &usb3_phy1 {

已解决

未解决

只是看看

最新评论

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2025-4-3 04:16

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部