2020-01-14 08:39 PM
A particular STM32MP1 based board uses the USB OTG interface configured to the cortex A7. Is there any guidance how to configure the kernel so that it will use the USB device port with a gadget driver, so that the host sees it as keyboard, serial port, mouse, audio interface ? For example, as pictured, a snippet of usb otg in the .dts ( high speed). It uses dwc2 as driver for OTG function, How to assign the device descriptor to the otg/usb interface ? Full speed would be fine as well. In the kernel sources there is "legacy" and "function" code.
Solved! Go to Solution.
2020-01-15 02:01 AM
This is currently the case on STM32MP157C-DK2 board with latest starter package, you could put a keyboard or a mouse on the Type-C port which is connected to USB OTG in high-speed.
e.g. console log on mouse plug
[ ...] usb 1-1: new low-speed USB device number 4 using dwc2
[ ...] input: HP HP USB 1000dpi Laser Mouse as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.0/0003:03F0:1198.0003/input/input4
[ ...] hid-generic 0003:03F0:1198.0003: input: USB HID v2.00 Mouse [HP HP USB 1000dpi Laser Mouse] on usb-49000000.usb-otg-1/input0
[ ...] hid-generic 0003:03F0:1198.0004: device has no listeners, quitting
please have a look to https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration for DT configuration.
2020-01-15 02:01 AM
This is currently the case on STM32MP157C-DK2 board with latest starter package, you could put a keyboard or a mouse on the Type-C port which is connected to USB OTG in high-speed.
e.g. console log on mouse plug
[ ...] usb 1-1: new low-speed USB device number 4 using dwc2
[ ...] input: HP HP USB 1000dpi Laser Mouse as /devices/platform/soc/49000000.usb-otg/usb1/1-1/1-1:1.0/0003:03F0:1198.0003/input/input4
[ ...] hid-generic 0003:03F0:1198.0003: input: USB HID v2.00 Mouse [HP HP USB 1000dpi Laser Mouse] on usb-49000000.usb-otg-1/input0
[ ...] hid-generic 0003:03F0:1198.0004: device has no listeners, quitting
please have a look to https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration for DT configuration.
2023-08-29 04:12 AM
To close this: fixed this by adding support in the custom kernel configuration.