Skip to contentSkip to conversation

gpio: add driver for SAMA5D2 PIOBU pins

PATCH Applied Alexander Shiyan 2 participants 2 messages Jan 22, 2025 – Jan 28, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: add driver for SAMA5D2 PIOBU pins

PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them and a maintainer for the driver.
This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage.

---
 drivers/gpio/Kconfig              |  11 ++
 drivers/gpio/Makefile             |   1 +
 drivers/gpio/gpio-sama5d2-piobu.c | 238 ++++++++++++++++++++++++++++++
 3 files changed, 250 insertions(+)
 create mode 100644 drivers/gpio/gpio-sama5d2-piobu.c
drivers/gpio/Kconfig +11 -0
index 76b11d93aa..dd95e8906b 100644
@@ -177,6 +177,17 @@ config GPIO_ROCKCHIP
 	  Say yes here to include the driver for the GPIO controller found on
 	  Rockchip SoCs.
 
+config GPIO_SAMA5D2_PIOBU
+	bool "SAMA5D2 PIOBU GPIO support"
+	depends on MFD_SYSCON
+	depends on OF_GPIO
+	depends on ARCH_AT91 || COMPILE_TEST
+	help
+	  Say yes here to use the PIOBU pins as GPIOs.
+	  PIOBU pins on the SAMA5D2 can be used as GPIOs.
+	  The difference from regular GPIOs is that they
+	  maintain their value during backup/self-refresh.
+
 config GPIO_STMPE
 	depends on MFD_STMPE
 	bool "STMPE GPIO Expander"
drivers/gpio/Makefile +1 -0
index b0575ccf8c..8560e1f059 100644
@@ -19,6 +19,7 @@ obj-$(CONFIG_GPIO_OMAP)		+= gpio-omap.o
 obj-$(CONFIG_GPIO_PCA953X)	+= gpio-pca953x.o
 obj-$(CONFIG_GPIO_PCF857X)	+= gpio-pcf857x.o
 obj-$(CONFIG_GPIO_PL061)	+= gpio-pl061.o
+obj-$(CONFIG_GPIO_SAMA5D2_PIOBU) += gpio-sama5d2-piobu.o
 obj-$(CONFIG_GPIO_STMPE)	+= gpio-stmpe.o
 obj-$(CONFIG_GPIO_ROCKCHIP)	+= gpio-rockchip.o
 obj-$(CONFIG_GPIO_TEGRA)	+= gpio-tegra.o
drivers/gpio/gpio-sama5d2-piobu.c new file +238 -0

238 lines not on this page · raw message

Signature · 1 line
2.39.1
Applied
#1 lore raw
Quoted 8 lines · Alexander Shiyan

PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them and a maintainer for the driver.
This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage.

[...]

Applied, thanks!

[1/1] gpio: add driver for SAMA5D2 PIOBU pins
https://git.pengutronix.de/cgit/barebox/commit/?id=80d57fd2d3df (link may not be stable)

Best regards,

Signature · 1 line
Sascha Hauer <[email protected]>