Files
u-boot/drivers
Mattijs Korpershoek fd083842d7 usb: dwc3-meson-g12a: force mode on child add/removal
arch/mach-meson has some custom usb logic, in particular:
* on board_usb_init(), we force USB_DR_MODE_PERIPHERAL
* on board_usb_cleanup(), we force USB_DR_MODE_HOST

With DM_USB_GADGET=y, board_usb_init/cleanup() are no
longer used when we call usb_gadget_initialize().
Instead, the generic (from udc-uclass) initialization/release is
called, which itself calls the controller driver's probe()/remove().

Therefore, enabling DM_USB_GADGET=y will mean that this mode
switching will break.

To prepare for enabling DM_USB_GADGET, perform the mode switching
when the "amlogic,meson-g12a-usb" (dwc2) driver is
probed()/removed() instead.

This is achieved via the glue driver, which gets notified each time one
of its children is probed()/removed.

Note: this change should be harmless without DM_USB_GADGET=y
because the amlogic-g12a-usb driver is not probed via driver model.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20221024-meson-dm-usb-v1-1-2ab077a503b9@baylibre.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-17 09:27:17 +01:00
..
2022-12-22 10:31:48 -05:00
2022-12-21 13:09:01 -05:00
2021-10-05 08:50:15 -04:00
2022-09-16 11:05:16 -04:00
2022-08-04 16:18:47 -04:00
2022-01-13 07:57:49 -05:00
2023-01-09 11:30:08 -05:00
2022-12-23 10:15:13 -05:00
2022-01-13 07:57:49 -05:00
2023-01-09 11:30:08 -05:00
2022-09-19 16:07:12 -04:00
2023-01-09 11:30:08 -05:00
2022-12-07 16:04:17 -05:00
2022-12-22 10:31:48 -05:00
2023-01-02 16:01:40 -05:00
2022-10-11 16:03:03 -04:00
2023-01-09 11:30:08 -05:00
2022-05-03 21:39:22 +02:00
2022-11-02 13:58:17 -04:00