imx8mp nothing detects on usb host

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

imx8mp nothing detects on usb host

117 Views
osipovvo
Contributor II

After starting using kernel6.6 we are unable to detect anything connected to the usb1 pins. Our board based on i.MX8MP has 2 hosts. One on usb1 and other on usb2.

usb connections.jpg

Short description about attached scheme:
- usb1 pins directly connected to the usb "A" female connector (x13)
- usb2 pins connected to the hub ic (u10 usb2512) and then to the 2 more usb "a" female connectors (x6, x7)
- usb1_vbus comes from the power regulator (ap2151), the enable signal of the regulator drives by SAI1_RXD2__GPIO4_IO04 pin
- usb2_vbus always connected to the 3.3v

The device tree uses imx8mp.dtsi include. Bindings for the usb0(1) are:

reg_usb_vbus: regulator-vbus {
  compatible = "regulator-fixed";
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_usb0_vbus>;
  regulator-name = "USB_VBUS";
  regulator-min-microvolt = <5000000>;
  regulator-max-microvolt = <5000000>;
  gpio = <&gpio4 04 GPIO_ACTIVE_HIGH>;
  enable-active-high;
};

&usb3_phy0 {
  status = "okay";
};

&usb3_0 {
  status = "okay";
};

&usb_dwc3_0 {
  vbus-supply = <&reg_usb_vbus>;
  dr_mode = "host";
  status = "okay";
};

pinctrl_usb0_vbus: usb0grp {
  fsl,pins = <
    MX8MP_IOMUXC_SAI1_RXD2__GPIO4_IO04 0x19
  >;
};

Bindings for the usb1(2) are:

&usb3_phy1 {
  fsl,phy-tx-preemp-amp-tune = <3>;
  fsl,phy-tx-vref-tune = <0xb>;
  status = "okay";
};

&usb3_1 {
  fsl,permanently-attached;
  fsl,disable-port-power-control;
  status = "okay";
};

&usb_dwc3_1 {
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_usb1_vbus>;
  dr_mode = "host";
  status = "okay";
};

pinctrl_usb1_vbus: usb1grp {
  fsl,pins = <
    MX8MP_IOMUXC_GPIO1_IO14__USB2_PWR 0x19
  >;
};

The gpio pin GPIO1_IO14 physically is not connected, is not used.

Kernel configuration is default, coming from yocto build.

CONFIG_USB_OTG=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_DUAL_ROLE=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC2_DUAL_ROLE=y
CONFIG_USB_STORAGE=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_DUAL_ROLE=y

...and others CONFIG_USB_xxx from default imx8 config from kernel lf-6.6.y

The main problem:
Nothing detects on X13 (usb1), but the any devices (usb flashes, mouses, keyboards, touchscreens) connected to the X6 or X7 detects well and always.

Dmesg output (after kernel boot) is:

root@TFT:~# dmesg | grep usb
[ 0.085599] usbcore: registered new interface driver usbfs
[ 0.085625] usbcore: registered new interface driver hub
[ 0.085653] usbcore: registered new device driver usb
[ 1.678933] usbcore: registered new device driver r8152-cfgselector
[ 1.685237] usbcore: registered new interface driver r8152
[ 1.703256] usbcore: registered new interface driver uas
[ 1.708617] usbcore: registered new interface driver usb-storage
[ 1.714697] usbcore: registered new interface driver usbserial_generic
[ 1.721255] usbserial: USB Serial support registered for generic
[ 1.727292] usbcore: registered new interface driver ftdi_sio
[ 1.733068] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 1.740405] usbcore: registered new interface driver usb_serial_simple
[ 1.746961] usbserial: USB Serial support registered for carelink
[ 1.753080] usbserial: USB Serial support registered for flashloader
[ 1.759461] usbserial: USB Serial support registered for funsoft
[ 1.765493] usbserial: USB Serial support registered for google
[ 1.771438] usbserial: USB Serial support registered for hp4x
[ 1.777210] usbserial: USB Serial support registered for kaufmann
[ 1.783328] usbserial: USB Serial support registered for libtransistor
[ 1.789880] usbserial: USB Serial support registered for moto_modem
[ 1.796177] usbserial: USB Serial support registered for motorola_tetra
[ 1.802818] usbserial: USB Serial support registered for nokia
[ 1.808679] usbserial: USB Serial support registered for novatel_gps
[ 1.815066] usbserial: USB Serial support registered for siemens_mpi
[ 1.821453] usbserial: USB Serial support registered for suunto
[ 1.827402] usbserial: USB Serial support registered for vivopay
[ 1.833437] usbserial: USB Serial support registered for zio
[ 1.839134] usbcore: registered new interface driver usb_ehset_test
[ 1.980707] usbcore: registered new interface driver usbhid
[ 1.986291] usbhid: USB HID core driver
[ 3.422531] imx8mq-usb-phy 382f0040.usb-phy: supply vbus not found, using dummy regulator
[ 3.847365] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 3.927856] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 4.185756] usb 3-1: new high-speed USB device number 2 using xhci-hcd


The same things works well with kernel 5.15.


What i have to change to get the host on usb1 up and running and able to detect connected usb mass storage device/usb flash?

Labels (1)
Tags (1)
0 Kudos
2 Replies

81 Views
osipovvo
Contributor II

Adding "regulator-always-on;" to the regulator section and using default kernel config without modification solves the issue. Like a crutch/trick/workaround.

0 Kudos

59 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Glad to hear that it is now working, thank you for sharing.

Best regards/Saludos,
Aldo.

0 Kudos