USB detection on i.MX8MM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB detection on i.MX8MM

Jump to solution
4,089 Views
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
        >;
    };
Labels (1)
0 Kudos
Reply
1 Solution
4,035 Views
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

View solution in original post

5 Replies
4,036 Views
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

4,077 Views
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 Kudos
Reply
4,074 Views
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 Kudos
Reply
4,061 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Can you share the section schematic to us?

0 Kudos
Reply
4,057 Views
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 Kudos
Reply