Dear support team,
using Yocto images for the Odyssey STM32MP157C board built exactly according to the meta-st-odyssey instructions, I have problems to get USB OTG (for using the board as an USB client/peripheral) to run properly.
In order to enable USB OTG on the USB C port in addition to the two USB host ports, I tried to activate OTG in full-speed mode by changing the usbotg_hs-override in stm32mp157c-odyssey.dts to:
&usbotg_hs {
compatible = "st,stm32mp15-fsotg", "snps,dwc2";
pinctrl-names = "default";
/* configure OTG ID and full-speed data pins */
pinctrl-0 = <&usbotg_hs_pins_a &usbotg_fs_dp_dm_pins_a>;
dr_mode = "peripheral";
// vbus-supply = <&vbus_otg>;
status = "okay";
};
This is according to the instructions in the STM32 wiki.
vbus-supply shouldn’t be necessary since dr_mode = "peripheral"
, but I also tried to enable it without any luck.
The kernel log contains the following:
# uname -a
Linux stm32mp1 5.10.10 #1 SMP PREEMPT Sat Jan 23 15:04:06 UTC 2021 armv7l armv7l armv7l GNU/Linux
# dmesg | grep -i 'usb\|otg'
[ 0.116607] usbcore: registered new interface driver usbfs
[ 0.116698] usbcore: registered new interface driver hub
[ 0.116775] usbcore: registered new device driver usb
[ 1.597671] usb33: supplied by regulator-dummy
[ 1.651070] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[ 1.651170] usbcore: registered new interface driver pegasus
[ 1.651256] usbcore: registered new interface driver asix
[ 1.651322] usbcore: registered new interface driver ax88179_178a
[ 1.651404] usbcore: registered new interface driver cdc_ether
[ 1.651489] usbcore: registered new interface driver smsc75xx
[ 1.651572] usbcore: registered new interface driver smsc95xx
[ 1.651638] usbcore: registered new interface driver net1080
[ 1.651702] usbcore: registered new interface driver cdc_subset
[ 1.651764] usbcore: registered new interface driver zaurus
[ 1.652034] usbcore: registered new interface driver cdc_ncm
[ 1.653206] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.653742] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.654665] usbcore: registered new interface driver usb-storage
[ 1.666519] usbcore: registered new interface driver usbhid
[ 1.666537] usbhid: USB HID core driver
[ 3.033713] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator
[ 3.040039] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator
[ 3.059805] dwc2 49000000.usb-otg: dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST
[ 3.067320] dwc2: probe of 49000000.usb-otg failed with error -16
[ 3.215653] vdd_usb: supplied by vin
[ 3.241790] vbus_otg: supplied by bst_out
[ 3.367847] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0
[ 3.382950] ehci-platform 5800d000.usbh-ehci: EHCI Host Controller
[ 3.391177] ehci-platform 5800d000.usbh-ehci: new USB bus registered, assigned bus number 1
[ 3.406750] ehci-platform 5800d000.usbh-ehci: irq 59, io mem 0x5800d000
[ 3.442739] ehci-platform 5800d000.usbh-ehci: USB 2.0 started, EHCI 1.00
[ 3.451542] hub 1-0:1.0: USB hub found
[ 3.465121] ohci-platform 5800c000.usbh-ohci: Generic Platform OHCI controller
[ 3.470949] ohci-platform 5800c000.usbh-ohci: new USB bus registered, assigned bus number 2
[ 3.496722] ohci-platform 5800c000.usbh-ohci: irq 52, io mem 0x5800c000
[ 3.577692] hub 2-0:1.0: USB hub found
Unfortunately, there is not even an UDC controller in /sys/class/udc. As far as I understand this is because the dwc2 driver fails (“probe of 49000000.usb-otg failed with error -16”).
Creating USB gadgets via configfs subsequently cannot work.
Anybody knows how to fix this?
PS: Perhaps in a related matter, I cannot get both USB host ports to work even with an unmodified device tree. See also this ticket, which I created in meta-st-odyssey.