GPIO: Add driver for ThunderX and OCTEON-TX SoCs
Subsystems (3)
cover GPIO: Add driver for ThunderX and OCTEON-TX SoCs
From: David Daney <[email protected]>
The subject says it all. The Cavium ThunderX and OCTEON-TX family of SoCs have on-chip GPIO lines. This patch set adds a driver for these.
David Daney (3):
dt-bindings: gpio: Add binding documentation for gpio-thunderx
gpio: Add gpio driver support for ThunderX and OCTEON-TX
MAINTAINERS: Add entry for THUNDERX GPIO Driver.
.../devicetree/bindings/gpio/gpio-thunderx.txt | 33 ++ MAINTAINERS | 5 + drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-thunderx.c | 467 +++++++++++++++++++++ 5 files changed, 513 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txt create mode 100644 drivers/gpio/gpio-thunderx.c
Signature · 1 line
1.8.3.1
PATCH 1/3 dt-bindings: gpio: Add binding documentation for gpio-thunderx
From: David Daney <david.daney-YGCgFSpz5w/[email protected]>
--- .../devicetree/bindings/gpio/gpio-thunderx.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txt
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +33 -0
@@ -0,0 +1,33 @@ +Cavium ThunderX/OCTEON-TX GPIO controller bindings + +Required Properties: +- reg: The controller bus address. +- gpio-controller: Marks the device node as a GPIO controller. +- #gpio-cells: Must be 2. + - First cell is the GPIO pin number relative to the controller. + - Second cell is standard of_gpio_flags: + 1 - Active Low. + 2 - Single Ended. + +Optional Properties: +- compatible: "cavium,thunder-8890-gpio", unused as PCI driver binding is used. +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Must be present and have value of 2 if + "interrupt-controller" is present. + - First cell is the GPIO pin number relative to the controller. + - Second cell is triggering flags, one of: + 1 - Edge Rising + 2 - Edge Falling + 4 - Level High + 8 - Level Low + +Example: + +gpio_6_0: gpio0@6,0 { + compatible = "cavium,thunder-8890-gpio"; + reg = <0x3000 0 0 0 0>; /* DEVFN = 0x30 (6:0) */ + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; +};
Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/3 gpio: Add gpio driver support for ThunderX and OCTEON-TX
In reply to David DaneyFrom: David Daney <[email protected]>
Cavium ThunderX and OCTEON-TX are arm64 based SoCs. Add driver for the on-chip GPIO pins.
--- drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-thunderx.c | 467 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 475 insertions(+) create mode 100644 drivers/gpio/gpio-thunderx.c
drivers/gpio/Kconfig +7 -0
@@ -421,6 +421,13 @@ config GPIO_TS4800 help This driver support TS-4800 FPGA GPIO controllers. +config GPIO_THUNDERX + tristate "Cavium ThunderX/OCTEON-TX GPIO" + depends on ARCH_THUNDER || (64BIT && COMPILE_TEST) + help + Say yes here to support the on-chip GPIO lines on the ThunderX + and OCTEON-TX families of SoCs. + config GPIO_TZ1090 bool "Toumaz Xenif TZ1090 GPIO support" depends on SOC_TZ1090
drivers/gpio/Makefile +1 -0
@@ -107,6 +107,7 @@ obj-$(CONFIG_GPIO_SYSCON) += gpio-syscon.o obj-$(CONFIG_GPIO_TB10X) += gpio-tb10x.o obj-$(CONFIG_GPIO_TC3589X) += gpio-tc3589x.o obj-$(CONFIG_GPIO_TEGRA) += gpio-tegra.o +obj-$(CONFIG_GPIO_THUNDERX) += gpio-thunderx.o obj-$(CONFIG_GPIO_TIMBERDALE) += gpio-timberdale.o obj-$(CONFIG_GPIO_PALMAS) += gpio-palmas.o obj-$(CONFIG_GPIO_TPIC2810) += gpio-tpic2810.o
drivers/gpio/gpio-thunderx.c new file +467 -0
467 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 3/3 MAINTAINERS: Add entry for THUNDERX GPIO Driver.
In reply to David DaneyFrom: David Daney <[email protected]>
--- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+)
MAINTAINERS +5 -0
@@ -10660,6 +10660,11 @@ M: Andreas Noever <[email protected]> S: Maintained F: drivers/thunderbolt/ +THUNDERX GPIO DRIVER +M: David Daney <[email protected]> +S: Maintained +F: drivers/gpio/gpio-thunderx.c + TI BQ27XXX POWER SUPPLY DRIVER R: Andrew F. Davis <[email protected]> F: include/linux/power/bq27xxx_battery.h
Signature · 1 line
1.8.3.1
Rob Herring
maintainerRe: [PATCH 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
In reply to David DaneyQuoted 14 lines · David Daney
From: David Daney <[email protected]>
Signed-off-by David Daney <[email protected]>--- .../devicetree/bindings/gpio/gpio-thunderx.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txtDocumentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +0
-0
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt line 10
Quoted 10 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +10
-0@@ -0,0 +1,33 @@ +Cavium ThunderX/OCTEON-TX GPIO controller bindings + +Required Properties: +- reg: The controller bus address. +- gpio-controller: Marks the device node as a GPIO controller. +- #gpio-cells: Must be 2. + - First cell is the GPIO pin number relative to the controller. + - Second cell is standard of_gpio_flags: + 1 - Active Low. + 2 - Single Ended.
Just reference where these are defined.
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt line 22
Quoted 12 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +12
-0+ +Optional Properties: +- compatible: "cavium,thunder-8890-gpio", unused as PCI driver binding is used. +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Must be present and have value of 2 if + "interrupt-controller" is present. + - First cell is the GPIO pin number relative to the controller. + - Second cell is triggering flags, one of: + 1 - Edge Rising + 2 - Edge Falling + 4 - Level High + 8 - Level Low
Just reference interrupt-controller/interrupts.txt or the header defining these.
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt line 26
Quoted 4 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +4
-0+ +Example: + +gpio_6_0: gpio0@6,0 {
gpio@6,0
Quoted 10 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +7
-0+ compatible = "cavium,thunder-8890-gpio"; + reg = <0x3000 0 0 0 0>; /* DEVFN = 0x30 (6:0) */ + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; +};Signature · 1 line
1.8.3.1
This version is obsolete. v2 has been sent.
Thanks,
David Daney
Quoted 10 lines · David Daney
From: David Daney <david.daney-YGCgFSpz5w/[email protected]>
The subject says it all. The Cavium ThunderX and OCTEON-TX family of SoCs have on-chip GPIO lines. This patch set adds a driver for these.
David Daney (3):
dt-bindings: gpio: Add binding documentation for gpio-thunderx
gpio: Add gpio driver support for ThunderX and OCTEON-TX
MAINTAINERS: Add entry for THUNDERX GPIO Driver.
Quoted 9 lines
.../devicetree/bindings/gpio/gpio-thunderx.txt | 33 ++ MAINTAINERS | 5 + drivers/gpio/Kconfig | 7 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-thunderx.c | 467 +++++++++++++++++++++ 5 files changed, 513 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txt create mode 100644 drivers/gpio/gpio-thunderx.c
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
In reply to Rob HerringQuoted 19 lines · Rob Herring
Quoted 18 lines · David Daney
From: David Daney <david.daney-YGCgFSpz5w/[email protected]>
Signed-off-by David Daney <david.daney-YGCgFSpz5w/[email protected]>--- .../devicetree/bindings/gpio/gpio-thunderx.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txtDocumentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +4
-0@@ -0,0 +1,33 @@ +Cavium ThunderX/OCTEON-TX GPIO controller bindings + +Required Properties: +- reg: The controller bus address.
Quoted 8 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt line 10
Quoted 6 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +6
-0+- gpio-controller: Marks the device node as a GPIO controller. +- #gpio-cells: Must be 2. + - First cell is the GPIO pin number relative to the controller. + - Second cell is standard of_gpio_flags: + 1 - Active Low. + 2 - Single Ended.Just reference where these are defined.
Thanks for the review. This and the two changes below have been addressed in v2 of the patch set.
David.
Quoted 24 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt line 22
Quoted 13 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +12
-0+ +Optional Properties: +- compatible: "cavium,thunder-8890-gpio", unused as PCI driver binding is used. +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Must be present and have value of 2 if + "interrupt-controller" is present. + - First cell is the GPIO pin number relative to the controller. + - Second cell is triggering flags, one of: + 1 - Edge Rising + 2 - Edge Falling + 4 - Level High + 8 - Level LowJust reference
interrupt-controller/interrupts.txtor the header defining these.Documentation/devicetree/bindings/gpio/gpio-thunderx.txt line 26
Quoted 4 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +4
-0+ +Example: + +gpio_6_0: gpio0@6,0 {gpio@6,0
Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/gpio/gpio-thunderx.txt new file +7
-1+ compatible = "cavium,thunder-8890-gpio"; + reg = <0x3000 0 0 0 0>; /* DEVFN = 0x30 (6:0) */ + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; +}; --1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html