u-boot/drivers/usb
Fabrice Gasnier ba1fa2abde usb: onboard-hub: add driver to manage onboard hub supplies
The main issue the driver addresses is that a USB hub needs to be
powered before it can be discovered. This is often solved by using
"regulator-always-on".

This driver is inspired by the Linux v6.1 driver. It only enables (or
disables) the hub vdd (3v3) supply, so it can be enumerated.
Scanning of the device tree is done in a similar manner to the sandbox,
by the usb-uclass. DT part looks like:

&usbh_ehci {
	...
	#address-cells = <1>;
	#size-cells = <0>;
	hub@1 {
		compatible = "usb424,2514";
		reg = <1>;
		vdd-supply = <&v3v3>;
	};
};

When the bus gets probed, the driver is automatically probed/removed from
the bus tree, as an example on stm32:
STM32MP> usb start
starting USB...
STM32MP> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 usb           0  [ + ]   ehci_generic          |   |-- usb@5800d000
 usb_hub       0  [ + ]   usb_onboard_hub       |   |   `-- hub@1
 usb_hub       1  [ + ]   usb_hub               |   |       `-- usb_hub

STM32MP> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller
  |
  +-2  Hub (480 Mb/s, 2mA)

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-01-12 16:19:53 +01:00
..
cdns3 usb: cdns3: cdns3-ti: Add compatible for AM64 SoC 2021-11-17 17:09:47 -05:00
common usb: add isp1760 family driver 2022-07-12 21:59:54 +02:00
dwc3 usb: dwc3: Drop support for "snps, ref-clock-period-ns" DT property 2022-11-27 15:34:56 +01:00
emul sandbox: check lseek return value in handle_ufi_command 2022-11-22 15:13:35 -07:00
eth usb: eth: Remove non-DM_ETH code 2022-12-07 16:04:17 -05:00
gadget cmd: source: Support specifying config name 2022-12-31 13:35:19 -05:00
host usb: onboard-hub: add driver to manage onboard hub supplies 2023-01-12 16:19:53 +01:00
isp1760 usb: add isp1760 family driver 2022-07-12 21:59:54 +02:00
mtu3 usb: mtu3: flush cache for the first GPD when allocate GPD ring 2021-11-03 08:47:57 +01:00
musb drivers/usb/musb/musb_udc.c: Fix spelling of "mismatch". 2022-01-13 07:57:49 -05:00
musb-new cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
phy rockchip: usb: phy: add rk3066/rk3188 support 2022-06-29 11:28:15 +08:00
ulpi common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
Kconfig usb: onboard-hub: add driver to manage onboard hub supplies 2023-01-12 16:19:53 +01:00