gpio: Add APM X-Gene standy platform GPIO driver
v3 cover gpio: Add APM X-Gene standy platform GPIO driver
This patch add the GPIO standby controller in the APM X-Gene platform.
v3 Change:
1. Using GPIO_GENERIC.
v2 Change:
1. Do not access GIC register from driver.
2. Duplicate gpio probe funtion.
3. Function gpiochip_remove doesn't return value.
Y Vo (3):
gpio: Add APM X-Gene standby GPIO controller driver
Documentation: gpio: Add APM X-Gene standby GPIO controller DTS
binding
arm64: dts: Add APM X-Gene standby GPIO controller DTS entries
.../devicetree/bindings/gpio/gpio-xgene-sb.txt | 31 ++++ arch/arm64/boot/dts/apm/apm-storm.dtsi | 13 ++ drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-xgene-sb.c | 163 ++++++++++++++++++++ 5 files changed, 215 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt create mode 100644 drivers/gpio/gpio-xgene-sb.c
PATCH v3 1/3 gpio: Add APM X-Gene standby GPIO controller driver
Driver for standby GPIO controller of APM X-Gene SoCs on arm64.
--- drivers/gpio/Kconfig | 8 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-xgene-sb.c | 162 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+), 0 deletions(-) create mode 100644 drivers/gpio/gpio-xgene-sb.c
drivers/gpio/Kconfig +8 -0
@@ -366,6 +366,14 @@ config GPIO_XGENE the generic flash controller's address and data pins. Say yes here to enable the GFC GPIO functionality. +config GPIO_XGENE_SB + tristate "APM X-Gene GPIO standby controller support" + depends on ARCH_XGENE && OF_GPIO + select GPIO_GENERIC + help + This driver supports the GPIO block within the APM X-Gene + Standby Domain. Say yes here to enable the GPIO functionality. + config GPIO_XILINX tristate "Xilinx GPIO support" depends on OF_GPIO && (PPC_OF || MICROBLAZE || ARCH_ZYNQ || ARCH_X86)
drivers/gpio/Makefile +1 -0
@@ -105,6 +105,7 @@ 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_XGENE_SB) += gpio-xgene-sb.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-sb.c new file +162 -0
162 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v3 1/3 gpio: Add APM X-Gene standby GPIO controller driver
Quoted 3 lines · Y Vo
Driver for standby GPIO controller of APM X-Gene SoCs on arm64.
Signed-off-by Y Vo <[email protected]>
Compact, beautiful, and precisely to the point.
Patch applied, excellent work.
Yours,
Linus Walleij
PATCH v3 2/3 Documentation: gpio: Add APM X-Gene standby GPIO controller DTS binding
In reply to Y VoDocumentation for APM X-Gene standby GPIO controller DTS binding.
--- .../devicetree/bindings/gpio/gpio-xgene-sb.txt | 31 ++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt
Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt new file +31 -0
@@ -0,0 +1,31 @@ +APM X-Gene Standby GPIO controller bindings + +This is a gpio controller in standby domain. + +There are 20 GPIO pins from 0..21. There is no GPIO_DS14 and GPIO_DS15. +Only GPIO_DS8..GPIO_DS13 support interrupt. IRQ mapping 0x28..0x2d. + +Required properties: +- compatible: "apm,xgene-gpio-sb" for X-Gene Standby 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. +- interrupts: Shall contains the interrupts. + +Example: + sbgpio: sbgpio at 17001000 { + compatible = "apm,xgene-gpio-sb"; + reg = <0x0 0x17001000 0x0 0x400>; + #gpio-cells = <2>; + gpio-controller; + interrupts = <0x0 0x28 0x1>, + <0x0 0x29 0x1>, + <0x0 0x2a 0x1>, + <0x0 0x2b 0x1>, + <0x0 0x2c 0x1>, + <0x0 0x2d 0x1>; + };
Signature · 1 line
1.7.1
PATCH v3 2/3 Documentation: gpio: Add APM X-Gene standby GPIO controller DTS binding
Quoted 3 lines · Y Vo
Documentation for APM X-Gene standby GPIO controller DTS binding.
Signed-off-by Y Vo <[email protected]>
Patch applied after some tweaks.
Yours,
Linus Walleij
PATCH v3 3/3 arm64: dts: Add APM X-Gene standby GPIO controller DTS entries
In reply to Y VoAdd standby domain gpio controller for APM X-Gene SoC platform.
--- arch/arm64/boot/dts/apm/apm-storm.dtsi | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
arch/arm64/boot/dts/apm/apm-storm.dtsi +13 -0
@@ -587,6 +587,19 @@ phy-names = "sata-phy"; }; + sbgpio: sbgpio at 17001000{ + compatible = "apm,xgene-gpio-sb"; + reg = <0x0 0x17001000 0x0 0x400>; + #gpio-cells = <2>; + gpio-controller; + interrupts = <0x0 0x28 0x1>, + <0x0 0x29 0x1>, + <0x0 0x2a 0x1>, + <0x0 0x2b 0x1>, + <0x0 0x2c 0x1>, + <0x0 0x2d 0x1>; + }; + rtc: rtc at 10510000 { compatible = "apm,xgene-rtc"; reg = <0x0 0x10510000 0x0 0x400>;
Signature · 1 line
1.7.1
PATCH v3 3/3 arm64: dts: Add APM X-Gene standby GPIO controller DTS entries
Quoted 3 lines · Y Vo
Add standby domain gpio controller for APM X-Gene SoC platform.
Signed-off-by Y Vo <[email protected]>
Please funnel this through the ARM64 tree.
Yours,
Linus Walleij