u-boot/drivers/usb/host
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
..
dwc2.c usb: dwc2: Rename CONFIG_DWC2 namespace to DWC2 2021-08-30 14:10:05 -04:00
dwc2.h usb: dwc2: Rename CONFIG_DWC2 namespace to DWC2 2021-08-30 14:10:05 -04:00
dwc3-octeon-glue.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
dwc3-of-simple.c dm: treewide: Rename dev_get_platdata() to dev_get_plat() 2020-12-13 16:51:09 -07:00
dwc3-sti-glue.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
ehci-armada100.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ehci-atmel.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
ehci-exynos.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
ehci-faraday.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-fsl.c usb: Remove non-DM code in ehci-fsl and xhci 2022-06-28 17:11:48 -04:00
ehci-generic.c usb: ehci: Make usage of generic_{setup,shutdown}_phy() helpers 2022-10-10 18:08:18 +02:00
ehci-hcd.c usb: ehci: Remove unused ehci_{setup,shutdown}_phy() helpers 2022-10-10 18:08:18 +02:00
ehci-marvell.c usb: ehci: ehci-marvell: Support for marvell,ac5-ehci 2022-11-07 07:46:28 +01:00
ehci-msm.c usb: ehci: Make usage of generic_{setup,shutdown}_phy() helpers 2022-10-10 18:08:18 +02:00
ehci-mx5.c global: Migrate CONFIG_MXC_USB_FLAGS et al to CFG 2022-12-23 10:14:51 -05:00
ehci-mx6.c global: Migrate CONFIG_MXC_USB_FLAGS et al to CFG 2022-12-23 10:14:51 -05:00
ehci-mxs.c ehci-mxs: Remove non-DM code 2022-06-28 17:03:30 -04:00
ehci-npcm.c usb: host: nuvoton: Add nuvoton NPCM7xx ehci/ohci driver 2022-09-26 01:49:36 +02:00
ehci-omap.c usb: ehci-omap: Use PHY system to manage phy resets 2022-02-23 05:25:17 +01:00
ehci-pci.c usb: ehci: Make usage of generic_{setup,shutdown}_phy() helpers 2022-10-10 18:08:18 +02:00
ehci-rmobile.c global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_* 2022-12-05 16:06:07 -05:00
ehci-tegra.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
ehci-vct.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ehci-vf.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
ehci-zynq.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
ehci.h usb: ehci: Remove unused ehci_{setup,shutdown}_phy() helpers 2022-10-10 18:08:18 +02:00
Kconfig usb: ehci: ehci-marvell: Support for marvell,ac5-ehci 2022-11-07 07:46:28 +01:00
Makefile usb: host: nuvoton: Add nuvoton NPCM7xx ehci/ohci driver 2022-09-26 01:49:36 +02:00
ohci-at91.c Convert CONFIG_USB_OHCI_NEW et al to Kconfig 2022-07-07 09:29:08 -04:00
ohci-da8xx.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
ohci-generic.c usb: ohci: Make usage of generic_{setup,shutdown}_phy() helpers 2022-10-10 18:08:18 +02:00
ohci-hcd.c global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
ohci-lpc32xx.c global: Migrate CONFIG_USB_ISP1301_I2C_ADDR to CFG 2022-12-23 10:15:12 -05:00
ohci-npcm.c usb: host: nuvoton: Add nuvoton NPCM7xx ehci/ohci driver 2022-09-26 01:49:36 +02:00
ohci-pci.c pci: Add mask parameter to dm_pci_map_bar() 2022-05-03 18:33:29 -04:00
ohci.h usb: ohci: Use a flexible array member for portstatus 2022-11-03 23:24:09 +01:00
r8a66597-hcd.c usb: common: move urb code to common 2022-07-12 21:59:54 +02:00
r8a66597.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
sl811-hcd.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
sl811.h
usb-sandbox.c usb: sandbox: Add gadget callbacks 2021-10-12 14:20:04 +02:00
usb-uclass.c usb: onboard-hub: add driver to manage onboard hub supplies 2023-01-12 16:19:53 +01:00
usb_bootdev.c bootstd: usb: Add a bootdev driver 2022-04-25 10:00:04 -04:00
utmi-armada100.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
xhci-brcm.c usb: xhci-brcm: Include header file needed for dev_err 2021-10-30 22:54:57 +02:00
xhci-dwc3.c usb: xhci-dwc3: Support role switch default role 2022-05-20 09:41:33 +02:00
xhci-exynos5.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
xhci-fsl.c usb: xhci-fsl: Remove non-DM code 2022-06-28 17:03:31 -04:00
xhci-mem.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
xhci-mtk.c usb: xhci-mtk: disable all ports when disable host controller 2022-06-07 09:55:57 +02:00
xhci-mvebu.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
xhci-omap.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
xhci-pci.c pci: Add mask parameter to dm_pci_map_bar() 2022-05-03 18:33:29 -04:00
xhci-rcar-r8a779x_usb3_v3.h WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
xhci-rcar.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
xhci-ring.c usb: xhci: reset endpoint on USB stall 2022-02-16 17:11:31 +01:00
xhci.c usb: Remove non-DM code in ehci-fsl and xhci 2022-06-28 17:11:48 -04:00