Skip to contentSkip to conversation

gpio: Add G7 Aspeed gpio controller driver

PATCH In review Billy Tsai 2 participants 2 messages Aug 20, 2024 – Aug 28, 2024

Subsystems (2)
lore
Share & tools
lore

Billy Tsai

author reviewer
#0 lore raw

PATCH 1/1 gpio: Add G7 Aspeed gpio controller driver

In the 7th generation of the SoC from Aspeed, the control logic of the GPIO controller has been updated to support per-pin control. Each pin now has its own 32-bit register, allowing for individual control of the pin’s value, direction, interrupt type, and other settings.

Change-Id Ide3fa64f46e23baef6dc0c6d06704465dd60b047
---
 drivers/gpio/Kconfig          |   7 ++
 drivers/gpio/Makefile         |   1 +
 drivers/gpio/gpio-aspeed-g7.c | 151 ++++++++++++++++++++++++++++++++++
 3 files changed, 159 insertions(+)
 create mode 100644 drivers/gpio/gpio-aspeed-g7.c
drivers/gpio/Kconfig +7 -0
index fcca6941ebf..c2a29c4758b 100644
@@ -157,6 +157,13 @@ config ASPEED_GPIO
 	  is found in the AST2400, AST2500 and AST2600 BMC SoCs and
 	  provides access to over 200 GPIOs on each chip.
 
+config ASPEED_G7_GPIO
+	bool "Aspeed G7 GPIO Driver"
+	help
+	  Say yes here to support the Aspeed G7 GPIO driver. The controller
+	  is found in the AST2700 BMC SoCs and provides access to over 200
+	  GPIOs on each chip.
+
 config DA8XX_GPIO
 	bool "DA8xx GPIO Driver"
 	help
drivers/gpio/Makefile +1 -0
index 4a293154350..50c949bd2e3 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_$(SPL_TPL_)DM_GPIO) += gpio-uclass.o
 obj-$(CONFIG_$(SPL_)DM_PCA953X)	+= pca953x_gpio.o
 
 obj-$(CONFIG_ASPEED_GPIO)	+= gpio-aspeed.o
+obj-$(CONFIG_ASPEED_G7_GPIO)	+= gpio-aspeed-g7.o
 obj-$(CONFIG_AT91_GPIO)	+= at91_gpio.o
 obj-$(CONFIG_ATMEL_PIO4)	+= atmel_pio4.o
 obj-$(CONFIG_BCM6345_GPIO)	+= bcm6345_gpio.o
drivers/gpio/gpio-aspeed-g7.c new file +151 -0

151 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 6 lines · Billy Tsai

In the 7th generation of the SoC from Aspeed, the control logic of the GPIO controller has been updated to support per-pin control. Each pin now has its own 32-bit register, allowing for individual control of the pin’s value, direction, interrupt type, and other settings.

Applied to u-boot/next, thanks!

Signature · 1 line
Tom