Skip to contentSkip to conversation

USB preparation for "allyesconfig"

PATCH New Tom Rini 2 participants 9 messages Sep 11, 2025 – Sep 13, 2025

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

v2 cover USB preparation for "allyesconfig"

Hey all,

In order for "allyesconfig" to work we need to start out by either declaring some drivers as invalid for the target (as they have non-trivial problems to solve such as architecture headers being required), remove drivers because no one is using them anymore, or do the easy fixes required.

This series takes care of drivers/usb/ for allyesconfig by adding dependencies in a number of places and removing some unused drivers.

Changes in v2:
- Pickup Marek's tag when applicable.
- Drop the musb portion as Peter Robinson had an existing series for it
- Reword the commit message on the two gadget driver removals.
- Add this cover letter.

Signature · 1 line
Tom
author
#1 lore raw

PATCH v2 1/6 usb: dwc3: Tighten driver glue dependencies

A few of the platform specific DWC3 host glue drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
Changes in v2:
- Add Marek's tag

---
 drivers/usb/dwc3/Kconfig | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/usb/dwc3/Kconfig +6 -3
index 682a69106556..744dfa90463c 100644
@@ -17,6 +17,7 @@ comment "Platform Glue Driver Support"
 
 config USB_DWC3_OMAP
 	bool "Texas Instruments OMAP5 and similar Platforms"
+	depends on ARCH_OMAP2PLUS
 	help
 	  Some platforms from Texas Instruments like OMAP5, DRA7xxx and
 	  AM437x use this IP for USB2/3 functionality.
@@ -39,14 +40,14 @@ config SPL_USB_DWC3_GENERIC
 
 config SPL_USB_DWC3_AM62
 	bool "TI AM62 USB wrapper"
-	depends on SPL_DM_USB && SPL_USB_DWC3_GENERIC && SPL_SYSCON
+	depends on SPL_DM_USB && SPL_USB_DWC3_GENERIC && SPL_SYSCON && ARCH_K3
 	help
 	  Select this for TI AM62 Platforms.
 	  This wrapper supports Host and Peripheral operation modes.
 
 config USB_DWC3_AM62
 	bool "TI AM62 USB wrapper"
-	depends on DM_USB && USB_DWC3_GENERIC && SYSCON
+	depends on DM_USB && USB_DWC3_GENERIC && SYSCON && ARCH_K3
 	help
 	  Select this for TI AM62 Platforms.
 	  This wrapper supports Host and Peripheral operation modes.
@@ -80,7 +81,7 @@ config USB_DWC3_UNIPHIER
 config USB_DWC3_LAYERSCAPE
 	bool "Freescale Layerscape platform support"
 	depends on DM_USB && USB_DWC3
-	depends on !USB_XHCI_FSL
+	depends on !USB_XHCI_FSL && ARM
 	help
 	  Select this for Freescale Layerscape Platforms.
 
@@ -99,12 +100,14 @@ menu "PHY Subsystem"
 
 config USB_DWC3_PHY_OMAP
 	bool "TI OMAP SoC series USB DRD PHY driver"
+	depends on ARCH_OMAP2PLUS
 	help
 	  Enable single driver for both USB2 PHY programming and USB3 PHY
 	  programming for TI SoCs.
 
 config USB_DWC3_PHY_SAMSUNG
 	bool "Exynos5 SoC series USB DRD PHY driver"
+	depends on ARCH_EXYNOS
 	help
 	  Enable USB DRD PHY support for Exynos 5 SoC series.
 	  This driver provides PHY interface for USB 3.0 DRD controller
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH v2 2/6 usb: gadget: Tighten requirements on USB_GADGET_ATMEL_USBA

In reply to Tom Rini

This driver requires some mach-at91 specific header files in order to build. Express that requirement in Kconfig as well.

---
Changes in v2:
- Add Marek's tag

---
 drivers/usb/gadget/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/Kconfig +1 -0
index 0121f9872ae6..29c2f27fa05f 100644
@@ -93,6 +93,7 @@ config USB_GADGET_PRODUCT_NUM
 
 config USB_GADGET_ATMEL_USBA
 	bool "Atmel USBA"
+	depends on ARCH_AT91
 	select USB_GADGET_DUALSPEED
 	help
 	  USBA is the integrated high-speed USB Device controller on
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH v2 3/6 usb: gadget: bcm_udc_otg: Remove unused driver

In reply to Tom Rini

This driver is unused since the removal of the bcm28155_ap board in commit 0f6807e77b07 ("arm: Remove bcm28155_ap board"). Remove it.

Fixes 0f6807e77b07 ("arm: Remove bcm28155_ap board")

---
Changes in v2:
- Reword commit message per Marek, and add Fixes tag (as this should have been deleted then).

---
 drivers/usb/gadget/Kconfig           |  5 ---
 drivers/usb/gadget/Makefile          |  1 -
 drivers/usb/gadget/bcm_udc_otg.h     | 19 ----------
 drivers/usb/gadget/bcm_udc_otg_phy.c | 54 ----------------------------
 4 files changed, 79 deletions(-)
 delete mode 100644 drivers/usb/gadget/bcm_udc_otg.h
 delete mode 100644 drivers/usb/gadget/bcm_udc_otg_phy.c
drivers/usb/gadget/Kconfig +0 -5
index 29c2f27fa05f..c59d1d6252c3 100644
@@ -99,11 +99,6 @@ config USB_GADGET_ATMEL_USBA
 	  USBA is the integrated high-speed USB Device controller on
 	  the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel.
 
-config USB_GADGET_BCM_UDC_OTG_PHY
-	bool "Broadcom UDC OTG PHY"
-	help
-	  Enable the Broadcom UDC OTG physical device interface.
-
 config USB_GADGET_AT91
 	bool "Atmel AT91 USB Gadget Controller"
 	depends on ARCH_AT91
drivers/usb/gadget/Makefile +0 -1
index db5f8895a33a..7af5f6e6d634 100644
@@ -17,7 +17,6 @@ endif
 ifdef CONFIG_USB_GADGET
 obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
-obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
 obj-$(CONFIG_USB_GADGET_DWC2_OTG) += dwc2_udc_otg.o
 obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o
 obj-$(CONFIG_USB_GADGET_MAX3420) += max3420_udc.o
drivers/usb/gadget/bcm_udc_otg.h deleted +0 -19
deleted file mode 100644
index 48370f37d8a2..000000000000
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright 2015 Broadcom Corporation.
- */
-
-#ifndef __BCM_UDC_OTG_H
-#define __BCM_UDC_OTG_H
-
-static inline void wfld_set(uintptr_t addr, uint32_t fld_val, uint32_t fld_mask)
-{
-	writel(((readl(addr) & ~(fld_mask)) | (fld_val)), (addr));
-}
-
-static inline void wfld_clear(uintptr_t addr, uint32_t fld_mask)
-{
-	writel((readl(addr) & ~(fld_mask)), (addr));
-}
-
-#endif
drivers/usb/gadget/bcm_udc_otg_phy.c deleted +0 -54

54 lines not on this page · raw message

Signature · 1 line
2.43.0
Reviewed-by on v2 3/6
#4 lore raw

Re: [PATCH v2 3/6] usb: gadget: bcm_udc_otg: Remove unused driver

Quoted 5 lines · Tom Rini

This driver is unused since the removal of the bcm28155_ap board in commit 0f6807e77b07 ("arm: Remove bcm28155_ap board"). Remove it.

Fixes 0f6807e77b07 ("arm: Remove bcm28155_ap board")
author
#5 lore raw

PATCH v2 4/6 usb: gadget: max3420_udc: Remove unused driver

In reply to Tom Rini

This driver was never enabled by any platforms after being added to the tree over 5 years ago. Remove it.

---
Changes in v2:
- Reword the commit message to be clear that no platform has ever enabled it upstream.

---
 drivers/usb/gadget/Kconfig       |   6 -
 drivers/usb/gadget/Makefile      |   1 -
 drivers/usb/gadget/max3420_udc.c | 879 -------------------------------
 3 files changed, 886 deletions(-)
 delete mode 100644 drivers/usb/gadget/max3420_udc.c
drivers/usb/gadget/Kconfig +0 -6
index c59d1d6252c3..e845e46e0b7f 100644
@@ -152,12 +152,6 @@ config CI_UDC
 	  Say Y here to enable device controller functionality of the
 	  ChipIdea driver.
 
-config USB_GADGET_MAX3420
-	bool "MAX3420 USB Over SPI"
-	depends on DM_SPI
-	help
-	  MAX3420, from MAXIM, implements USB-over-SPI Full-Speed device controller.
-
 config USB_GADGET_VBUS_DRAW
 	int "Maximum VBUS Power usage (2-500 mA)"
 	range 2 500
drivers/usb/gadget/Makefile +0 -1
index 7af5f6e6d634..f2aebf4e4806 100644
@@ -19,7 +19,6 @@ obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
 obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
 obj-$(CONFIG_USB_GADGET_DWC2_OTG) += dwc2_udc_otg.o
 obj-$(CONFIG_USB_GADGET_DWC2_OTG_PHY) += dwc2_udc_otg_phy.o
-obj-$(CONFIG_USB_GADGET_MAX3420) += max3420_udc.o
 obj-$(CONFIG_USB_RENESAS_USBHS) += rcar/
 ifndef CONFIG_XPL_BUILD
 obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
drivers/usb/gadget/max3420_udc.c deleted +0 -879

879 lines not on this page · raw message

Signature · 1 line
2.43.0
author
#7 lore raw

PATCH v2 5/6 usb: host: Tighten USB host driver dependencies

In reply to Tom Rini

A few of the USB host drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
Changes in v2:
- Add Marek's tag

---
 drivers/usb/host/Kconfig | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/usb/host/Kconfig +6 -2
index 5c9e8fc9d15e..2cf687fc4f3b 100644
@@ -121,8 +121,9 @@ config USB_XHCI_DRA7XX_INDEX
 
 config USB_XHCI_FSL
 	bool "Support for NXP Layerscape on-chip xHCI USB controller"
-	default y if ARCH_LS1021A || FSL_LSCH3 || FSL_LSCH2
+	depends on ARCH_LS1021A || FSL_LSCH3 || FSL_LSCH2
 	depends on !SPL_NO_USB
+	default y
 	help
 	  Enables support for the on-chip xHCI controller on NXP Layerscape SoCs.
 
@@ -286,7 +287,8 @@ config USB_EHCI_TEGRA
 
 config USB_EHCI_ZYNQ
 	bool "Support for Xilinx Zynq on-chip EHCI USB controller"
-	default y if ARCH_ZYNQ
+	depends on ARCH_ZYNQ
+	default y
 	select USB_EHCI_IS_TDI
 	---help---
 	  Enable support for Zynq on-chip EHCI USB controller
@@ -303,6 +305,7 @@ config EHCI_HCD_INIT_AFTER_RESET
 
 config USB_EHCI_FSL
 	bool  "Support for FSL on-chip EHCI USB controller"
+	depends on PPC
 	select EHCI_HCD_INIT_AFTER_RESET
 	select SYS_FSL_USB_INTERNAL_UTMI_PHY if MPC85xx && \
 		!(ARCH_B4860 || ARCH_B4420 || ARCH_P4080 || ARCH_P1020 || ARCH_P2020)
@@ -362,6 +365,7 @@ config USB_OHCI_GENERIC
 
 config USB_OHCI_DA8XX
 	bool "Support for da850 OHCI USB controller"
+	depends on ARCH_DAVINCI
 	help
 	  Enable support for the da850 USB controller.
 
Signature · 1 line
2.43.0
author
#8 lore raw

PATCH v2 6/6 usb: host: Tighten USB musb-new host glue driver dependencies

In reply to Tom Rini

A few of the USB musb-new host glue drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
Changes in v2:
- Add Marek's tag

---
 drivers/usb/musb-new/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/musb-new/Kconfig +2 -0
index ad9072a53276..0e2b2b5fb857 100644
@@ -52,9 +52,11 @@ config USB_MUSB_OMAP2PLUS
 
 config USB_MUSB_AM35X
 	bool "AM35x"
+	depends on ARCH_OMAP2PLUS
 
 config USB_MUSB_DSPS
 	bool "TI DSPS platforms"
+	depends on ARCH_OMAP2PLUS
 
 config USB_MUSB_MT85XX
 	bool "Enable Mediatek MT85XX DRC USB controller"
Signature · 1 line
2.43.0