
While working on some USB bugs on the VIM3L board, we stumbled upon the fact that mach-meson still uses legacy board_usb_*() functions instead of using DM [1]
This series aim to switch the g12a based boards to use CONFIG_DM_USB_GADGET and removes the board_usb_*() logic.
* The first patch adds mode switching in the dwc3-meson-g12a glue driver whenever the dwc2 otg driver is probed()/removed().
* The second patch enables the config option and cleans up all board_usb_*().
This has been mainly tested with khadas-vim3l_android_defconfig using fastboot:
=> fastboot usb 0
=> # hit Ctrl-c
Other tests: * ums 0 mmc 2 # can list / mount partitions from host * usb start; usb storage # list usb thumb drive * all defconfigs have been build tested
[1] https://lore.kernel.org/u-boot/938b9439-9014-5ee8-1627-16af508bface@linaro.o... Signed-off-by: Mattijs Korpershoek mkorpershoek@baylibre.com
--- Mattijs Korpershoek (2): usb: dwc3-meson-g12a: force mode on child add/removal ARM: meson: g12a: switch dwc2 otg to DM
arch/arm/mach-meson/board-g12a.c | 127 ------------------------------ configs/bananapi-m5_defconfig | 1 + configs/beelink-gsking-x_defconfig | 1 + configs/beelink-gtking_defconfig | 1 + configs/beelink-gtkingpro_defconfig | 1 + configs/khadas-vim3_android_ab_defconfig | 1 + configs/khadas-vim3_android_defconfig | 1 + configs/khadas-vim3_defconfig | 1 + configs/khadas-vim3l_android_ab_defconfig | 1 + configs/khadas-vim3l_android_defconfig | 1 + configs/khadas-vim3l_defconfig | 1 + configs/odroid-c4_defconfig | 1 + configs/odroid-hc4_defconfig | 1 + configs/odroid-n2_defconfig | 1 + configs/radxa-zero_defconfig | 1 + configs/sei510_defconfig | 1 + configs/sei610_defconfig | 1 + configs/u200_defconfig | 1 + drivers/usb/dwc3/dwc3-meson-g12a.c | 18 +++++ 19 files changed, 35 insertions(+), 127 deletions(-) --- base-commit: 7b70f68977578360d9c47bb25d6d1937075153b4 change-id: 20221024-meson-dm-usb-60e413696519
Best regards,