Forums › Devices › OSD32MP15x › USB only works for RNDIS
Tagged: usb
Hi,
I have a problem with our BRK-based custom board.
Using USB for RNDIS as configured by usbotg-config with the standard Debian image is working fine.
However, I want to use the USB Port for a USB Wi-Fi dongle now. This should be possible as described here for example:
https://community.st.com/t5/stm32-mpus/how-to-use-edimax-ew-7811un-v2-wifi-dongle-on-stm32mp157a-dk1/ta-p/49790
So I disabled the usbotg-config.service in systemd. With that, the USB is not doing anything anymore. It does not recognize any device attached to the board. If the service is enabled the device is recognized. For example, when I connect the wifi dongle I get “new device is full speed”. However, the device is not usable by the system. When I use “lsusb” I don’t see anything but the 3 standard hub entrances and no device information.
I use the standard Octavo device tree from here:
OSD32MP1-BRK device tree sources
https://github.com/octavosystems/OSD32MP1-BRK-device-tree
4 forks.
13 stars.
1 open issues.
I already tried modifying it as described here but with no success:
https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration
All drivers for the wifi dongle are installed and I also managed to build and install the necessary kernel modules.
Thanks for your help!
Best Julius
Julius,
The BRK appears as a USB “peripheral” for RNDIS networking support. You confirmed that this works.
Now you want to switch roles and have the OTG work as a “host”. In “host” mode, the OTG can be configured to provide power to the device such as a WIFI dongle. I assume that you are using an OTG cable since the Edimax is a USB Type-A peripheral and the BRK board is a USB Type-B micro. The cable has circuitry to inform the OTG that a peripheral is attached.
It is not clear if the role switch is occurring and I don’t recall off the top of my head if the BRK has circuitry for VBUS and ID (and, of course, power supply pins other than USB). For testing your custom design, I would suggest you set in the device tree under the usbotg_hs node dr_mode = “peripheral”, usb-role-switch, and role-switch-default_mode = “peripheral”.
ST has a page on configuring OTG: https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration. Take a look at the example in section 3.3.5.
Carlos
The Micro-USB port for the BRK is designed to function as a peripheral port with added RNDIS function. It is probably not detecting the dongle because the ID pin(PA10) is not connected to the Micro-USB connector of BRK board. You will notice all device tree examples shown in https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration use the ID pin. As Carlos suggested, you can try assigning the OTG port as a “host” by following the example shown here: https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration#DT_configuration_example_as_high-speed_OTG_in_Host_or_Peripheral_mode-2C_with_micro-B_or_Type-C_connector-2C_and_with_VBUS_and_ID_left_unconnected replacing “peripheral” with “host”.
Please also note that BRK exposes the USB Host port data pins on header pins PB29 and PB30(https://octavosystems.com/docs/osd32mp1-brk-schematics/). You should be able to use a USB Type A Female breakout board such as https://www.sparkfun.com/products/12700 to connect your WiFi dongle to USB1 peripheral of MP1.
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields