Skip to contentSkip to conversation

gpio: add driver for xilinx zynq and zynqmp

PATCH Applied Michael Riesch 2 participants 3 messages Oct 13, 2021 – Oct 14, 2021

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

v2 cover gpio: add driver for xilinx zynq and zynqmp

Hi all,

This patch adds a GPIO driver for the Xilinx Zynq/Zynq UltraScale+ MPSoC architecture based on the corresponding driver in the Linux kernel.

The work was mainly carried out by Thomas Haemmerle, with several format fixes and the revisions for v2 applied by me. Version 2 of this patch considers the review by Ahmad Fatoum.

Tested on the ZCU106 evaluation board as well as on a custom Zynq UltraScale+ MPSoC board.

Best regards,
Michael

Thomas Haemmerle (1):
gpio: add driver for xilinx zynq and zynqmp

 arch/arm/Kconfig                  |   2 +
 arch/arm/configs/zynq_defconfig   |   1 +
 arch/arm/configs/zynqmp_defconfig |   1 +
 drivers/gpio/Kconfig              |   7 +
 drivers/gpio/Makefile             |   1 +
 drivers/gpio/gpio-zynq.c          | 436 ++++++++++++++++++++++++++++++
 6 files changed, 448 insertions(+)
 create mode 100644 drivers/gpio/gpio-zynq.c
Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH v2 1/1 gpio: add driver for xilinx zynq and zynqmp

From: Thomas Haemmerle <[email protected]>

Port the driver for the Xilinx Zynq/Zynq UltraScale+ MPSoC architecture to barebox (based on the Linux driver).

[apply format fixes, revise probe function, revise Kconfig]

---
v2:
- add CONFIG_GPIO_ZYNQ=y to zynq{mp}_defconfig
- revise Kconfig
- revise and clean up probe function

 arch/arm/Kconfig                  |   2 +
 arch/arm/configs/zynq_defconfig   |   1 +
 arch/arm/configs/zynqmp_defconfig |   1 +
 drivers/gpio/Kconfig              |   7 +
 drivers/gpio/Makefile             |   1 +
 drivers/gpio/gpio-zynq.c          | 436 ++++++++++++++++++++++++++++++
 6 files changed, 448 insertions(+)
 create mode 100644 drivers/gpio/gpio-zynq.c
arch/arm/Kconfig +2 -0
index c7ab16688..a8b7bdeaa 100644
@@ -248,6 +248,7 @@ config ARCH_ZYNQ
 	bool "Xilinx Zynq-based boards"
 	select HAS_DEBUG_LL
 	select PBL_IMAGE
+	select GPIOLIB
 
 config ARCH_ZYNQMP
 	bool "Xilinx ZynqMP-based boards"
@@ -258,6 +259,7 @@ config ARCH_ZYNQMP
 	select COMMON_CLK
 	select COMMON_CLK_OF_PROVIDER
 	select CLKDEV_LOOKUP
+	select GPIOLIB
 	select OFDEVICE
 	select OFTREE
 	select RELOCATABLE
arch/arm/configs/zynq_defconfig +1 -0
index a16c57d5c..38662eeb5 100644
@@ -45,3 +45,4 @@ CONFIG_DRIVER_NET_MACB=y
 # CONFIG_PINCTRL is not set
 CONFIG_FS_TFTP=y
 CONFIG_DIGEST=y
+CONFIG_GPIO_ZYNQ=y
arch/arm/configs/zynqmp_defconfig +1 -0
index 2cd878133..8dd0f40b3 100644
@@ -64,3 +64,4 @@ CONFIG_FS_NFS=y
 CONFIG_FS_FAT=y
 CONFIG_FS_FAT_WRITE=y
 CONFIG_DIGEST=y
+CONFIG_GPIO_ZYNQ=y
drivers/gpio/Kconfig +7 -0
index f79c9ea67..347a719f5 100644
@@ -197,6 +197,13 @@ config GPIO_LIBFTDI1
 	bool "libftdi1 driver"
 	depends on SANDBOX
 
+config GPIO_ZYNQ
+	tristate "Xilinx Zynq GPIO support"
+	depends on ARCH_ZYNQ || ARCH_ZYNQMP || CROSS_COMPILE
+	depends on OFDEVICE
+	help
+	  Say yes here to support Xilinx Zynq GPIO controller.
+
 endmenu
 
 endif
drivers/gpio/Makefile +1 -0
index 023973cb6..d9f96e34c 100644
@@ -26,3 +26,4 @@ obj-$(CONFIG_GPIO_VF610)	+= gpio-vf610.o
 obj-$(CONFIG_GPIO_RASPBERRYPI_EXP) += gpio-raspberrypi-exp.o
 obj-$(CONFIG_GPIO_SIFIVE)	+= gpio-sifive.o
 obj-$(CONFIG_GPIO_STARFIVE)	+= gpio-starfive-vic.o
+obj-$(CONFIG_GPIO_ZYNQ)		+= gpio-zynq.o
drivers/gpio/gpio-zynq.c new file +436 -0

436 lines not on this page · raw message

Signature · 7 lines
2.17.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#2 lore raw
In reply to Michael Riesch
Quoted 11 lines · Michael Riesch

Hi all,

This patch adds a GPIO driver for the Xilinx Zynq/Zynq UltraScale+ MPSoC architecture based on the corresponding driver in the Linux kernel.

The work was mainly carried out by Thomas Haemmerle, with several format fixes and the revisions for v2 applied by me. Version 2 of this patch considers the review by Ahmad Fatoum.

Quoted 8 lines

Tested on the ZCU106 evaluation board as well as on a custom Zynq UltraScale+ MPSoC board.

Best regards,
Michael

Thomas Haemmerle (1):
gpio: add driver for xilinx zynq and zynqmp

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox