[PATCH] gpio: dwapb: Enable SPL support for DWAPB GPIO driver

Tanmay Kathpalia tanmay.kathpalia at altera.com
Sun Oct 12 20:55:58 CEST 2025


Add SPL_DWAPB_GPIO configuration option to enable the Designware APB
GPIO driver in SPL builds.

Changes:
- Add SPL_DWAPB_GPIO Kconfig option with SPL_DM_GPIO dependency
- Update Makefile to use CONFIG_$(XPL_)DWAPB_GPIO pattern for
  conditional compilation in both SPL and main U-Boot builds

Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia at altera.com>
---
 drivers/gpio/Kconfig  | 8 ++++++++
 drivers/gpio/Makefile | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index db077e472a8..00bf974c0f3 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -138,6 +138,14 @@ config DWAPB_GPIO
 	help
 	  Support for the Designware APB GPIO driver.
 
+config SPL_DWAPB_GPIO
+	bool "DWAPB GPIO driver in SPL"
+	depends on SPL_DM_GPIO
+	help
+	  Support for the Designware APB GPIO driver in SPL.
+
+	  If unsure, say N.
+
 config AT91_GPIO
 	bool "AT91 PIO GPIO driver"
 	depends on ARCH_AT91
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 73c94329e36..da2c02b32da 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -4,12 +4,12 @@
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
 ifndef CONFIG_XPL_BUILD
-obj-$(CONFIG_DWAPB_GPIO)	+= dwapb_gpio.o
 obj-$(CONFIG_AXP_GPIO)		+= axp_gpio.o
 obj-$(CONFIG_DM_74X164)		+= 74x164_gpio.o
 endif
 obj-$(CONFIG_$(PHASE_)DM_GPIO) += gpio-uclass.o
 
+obj-$(CONFIG_$(XPL_)DWAPB_GPIO)		+= dwapb_gpio.o
 obj-$(CONFIG_$(PHASE_)DM_PCA953X)	+= pca953x_gpio.o
 
 obj-$(CONFIG_ADI_GPIO)		+= gpio-adi-adsp.o
-- 
2.35.3



More information about the U-Boot mailing list