USB detection on i.MX8MM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

USB detection on i.MX8MM

跳至解决方案
10,481 次查看
dpog
Contributor V

I'm having problems configuring the USB-Port, assumingly the problem lies within the device tree. The USB is used as a host, but when I state dr_mode="host", the Port is only powered for a short time in the kernel boot, when I set it to "peripheral" or "otg", the power stays on. 

In all cases I'm unable to see the device (USB Mass Storage) from the userspace with lsblk. Any suggestions?

reg_usb_b_vbus: regulator-usbotg2 {
        compatible = "regulator-fixed";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_reg_usb_b_vbus>;
        regulator-name = "USB_B_VBUS";
        regulator-min-microvolt = <5000000>;
        regulator-max-microvolt = <5000000>;
        gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
        enable-active-high;
    };
 
&usbotg2 { /* USB B - Type A */
    dr_mode = "host";
    vbus-supply = <&reg_usb_b_vbus>;
    over-current-active-high;
    status = "okay";
};
 
pinctrl_reg_usb_b_vbus: reg_usbb_vbus {
        fsl,pins = <
            MX8MM_IOMUXC_GPIO1_IO14_USB2_OTG_PWR    0x41
        >;
    };
标签 (1)
0 项奖励
回复
1 解答
10,427 次查看
dpog
Contributor V

The problem was resolved by moving the pinctrl section to the usbotg node and configuring the regulator-gpio as a gpio in the pin config

在原帖中查看解决方案

5 回复数
10,428 次查看
dpog
Contributor V

The problem was resolved by moving the pinctrl section to the usbotg node and configuring the regulator-gpio as a gpio in the pin config

10,469 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport

How is your USB2 design, used as host ( Type A )? Can the usb2 can work well on the host?

 

0 项奖励
回复
10,466 次查看
dpog
Contributor V
I'm not sure if I understand your question correctly. The Datalines are connected to the iMX8MM without a Phy, the OC and PWR_EN go to a AP22615AWU-7 for current protection.
0 项奖励
回复
10,453 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport

Can you share the section schematic to us?

0 项奖励
回复
10,445 次查看
dpog
Contributor V

Of course, to clarify: the iMX8 is part of a SoM, the USB-Connector resides on the BaseBoard, so USB-2 corresponds to USB-B

0 项奖励
回复