gpio: Add APM X-Gene SoC platform GPIO driver
Subsystems (2)
v6 cover gpio: Add APM X-Gene SoC platform GPIO driver
This patch add the GPIO controller in the APM X-Gene platform. The GPIO controller pins are muxed with the generic flash controller pins on the system.
V6 Change:
1. change attribute description of second cell in gpio dts node under documentation.
V5 Change:
1. Remove gpio->dev
2. Remove not needed headers.
3. Change to use latest driver.h for gpio.
4. Set chip base to -1
5. Put back label as it is needed sys interface.
V4 Change:
1. Add remove function for module
2. Add set function to dir out function.
3. remove sets to np and label in probe.
V3 Change:
1. Change code to use single entry to describe gpio node, hardcode to use bank stride to target gpios.
2. Fix up dts and doc accordingly
V2 Change:
1. Address concerns from maintainer, split to multiple device node
2. Add pm code to restore set register.
3. fix up dts and documentation accordingly.
Feng Kan (3):
gpio: Add APM X-Gene SoC GPIO controller support
Documentation: gpio: Add APM X-Gene SoC GPIO controller DTS binding arm64:dts: Add APM X-Gene SoC GPIO controller DTS entries
.../devicetree/bindings/gpio/gpio-xgene.txt | 22 ++ arch/arm64/boot/dts/apm-storm.dtsi | 7 + drivers/gpio/Kconfig | 9 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-xgene.c | 250 +++++++++++++++++++++ 5 files changed, 289 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-xgene.txt create mode 100644 drivers/gpio/gpio-xgene.c
Signature · 1 line
1.9.1
PATCH v6 1/3 gpio: Add APM X-Gene SoC GPIO controller support
Add APM X-Gene SoC gpio controller driver.
--- drivers/gpio/Kconfig | 9 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-xgene.c | 250 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 260 insertions(+) create mode 100644 drivers/gpio/gpio-xgene.c
drivers/gpio/Kconfig +9 -0
@@ -334,6 +334,15 @@ config GPIO_TZ1090_PDC help Say yes here to support Toumaz Xenif TZ1090 PDC GPIOs. +config GPIO_XGENE + bool "APM X-Gene GPIO controller support" + depends on ARM64 && OF_GPIO + help + This driver is to support the GPIO block within the APM X-Gene SoC + platform's generic flash controller. The GPIO pins are muxed with + the generic flash controller's address and data pins. Say yes + here to enable the GFC GPIO functionality. + config GPIO_XILINX bool "Xilinx GPIO support" depends on PPC_OF || MICROBLAZE || ARCH_ZYNQ
drivers/gpio/Makefile +1 -0
@@ -98,6 +98,7 @@ obj-$(CONFIG_GPIO_VX855) += gpio-vx855.o obj-$(CONFIG_GPIO_WM831X) += gpio-wm831x.o obj-$(CONFIG_GPIO_WM8350) += gpio-wm8350.o obj-$(CONFIG_GPIO_WM8994) += gpio-wm8994.o +obj-$(CONFIG_GPIO_XGENE) += gpio-xgene.o obj-$(CONFIG_GPIO_XILINX) += gpio-xilinx.o obj-$(CONFIG_GPIO_XTENSA) += gpio-xtensa.o obj-$(CONFIG_GPIO_ZEVIO) += gpio-zevio.o
drivers/gpio/gpio-xgene.c new file +250 -0
250 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v6 3/3 arm64:dts: Add APM X-Gene SoC GPIO controller DTS entries
In reply to Feng KanAdd gpio dts node for APM X-Gene SoC platform.
--- arch/arm64/boot/dts/apm-storm.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/apm-storm.dtsi +7 -0
@@ -397,5 +397,12 @@ #clock-cells = <1>; clocks = <&rtcclk 0>; }; + + gfcgpio: gpio0@1701c000 { + compatible = "apm,xgene-gpio"; + reg = <0x0 0x1701c000 0x0 0x40>; + gpio-controller; + #gpio-cells = <2>; + }; }; };
Signature · 1 line
1.9.1
PATCH v6 2/3 Documentation: gpio: Add APM X-Gene SoC GPIO controller DTS binding
In reply to Feng KanDocumentation for APM X-Gene SoC GPIO controller DTS binding.
--- .../devicetree/bindings/gpio/gpio-xgene.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-xgene.txt
Documentation/devicetree/bindings/gpio/gpio-xgene.txt new file +22 -0
@@ -0,0 +1,22 @@ +APM X-Gene SoC GPIO controller bindings + +This is a gpio controller that is part of the flash controller. +This gpio controller controls a total of 48 gpios. + +Required properties: +- compatible: "apm,xgene-gpio" for X-Gene GPIO controller +- reg: Physical base address and size of the controller's registers +- #gpio-cells: Should be two. + - first cell is the pin number + - second cell is used to specify the gpio polarity: + 0 = active high + 1 = active low +- gpio-controller: Marks the device node as a GPIO controller. + +Example: + gpio0: gpio0@1701c000 { + compatible = "apm,xgene-gpio"; + reg = <0x0 0x1701c000 0x0 0x40>; + gpio-controller; + #gpio-cells = <2>; + };
Signature · 1 line
1.9.1
v6 cover gpio: Add APM X-Gene SoC platform GPIO driver
In reply to Feng KanQuoted 7 lines · Feng Kan
This patch add the GPIO controller in the APM X-Gene platform. The GPIO controller pins are muxed with the generic flash controller pins on the system.
V6 Change:
1. change attribute description of second cell in gpio dts node under documentation.
Patches 1+2 applied to the GPIO tree.
Patch 3 need to go through whatever tree handles this platform, but you can add my ACK.
Yours,
Linus Walleij
PATCH v6 3/3 arm64:dts: Add APM X-Gene SoC GPIO controller DTS entries
In reply to Feng KanQuoted 3 lines · Feng Kan
Add gpio dts node for APM X-Gene SoC platform.
Signed-off-by Feng Kan <[email protected]>
Yours,
Linus Walleij