diff mbox series

[13/17,v1] gpio: ixp4xx: Add DT bindings

Message ID 20190203214205.13594-14-linus.walleij@linaro.org
State Superseded
Headers show
Series None | expand

Commit Message

Linus Walleij Feb. 3, 2019, 9:42 p.m. UTC
This adds DT bindings for the IXP4xx GPIO controller.

Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
Bartosz: looking for your ACK on this, it'd be good if
the other GPIO maintainer is aligned with my ideas here.
I intend to merge this through the ARM SoC tree.
---
 .../bindings/gpio/intel,ixp4xx-gpio.txt       | 38 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt

-- 
2.20.1

Comments

Bartosz Golaszewski Feb. 6, 2019, 4:05 p.m. UTC | #1
niedz., 3 lut 2019 o 22:42 Linus Walleij <linus.walleij@linaro.org> napisaƂ(a):
>

> This adds DT bindings for the IXP4xx GPIO controller.

>

> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

> Bartosz: looking for your ACK on this, it'd be good if

> the other GPIO maintainer is aligned with my ideas here.

> I intend to merge this through the ARM SoC tree.

> ---

>  .../bindings/gpio/intel,ixp4xx-gpio.txt       | 38 +++++++++++++++++++

>  MAINTAINERS                                   |  1 +

>  2 files changed, 39 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt

>

> diff --git a/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt b/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt

> new file mode 100644

> index 000000000000..8dc41ed99685

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt

> @@ -0,0 +1,38 @@

> +Intel IXP4xx XScale Networking Processors GPIO

> +

> +This GPIO controller is found in the Intel IXP4xx processors.

> +It supports 16 GPIO lines.

> +

> +The interrupt portions of the GPIO controller is hierarchical:

> +the synchronous edge detector is part of the GPIO block, but the

> +actual enabling/disabling of the interrupt line is done in the

> +main IXP4xx interrupt controller which has a 1:1 mapping for

> +the first 12 GPIO lines to 12 system interrupts.

> +

> +The remaining 4 GPIO lines can not be used for receiving

> +interrupts.

> +

> +The interrupt parent of this GPIO controller must be the

> +IXP4xx interrupt controller.

> +

> +Required properties:

> +

> +- compatible : Should be

> +  "intel,ixp4xx-gpio"

> +- reg : Should contain registers location and length

> +- gpio-controller : marks this as a GPIO controller

> +- #gpio-cells : Should be 2, see gpio/gpio.txt

> +- interrupt-controller : marks this as an interrupt controller

> +- #interrupt-cells : a standard two-cell interrupt, see

> +  interrupt-controller/interrupts.txt

> +

> +Example:

> +

> +gpio0: gpio@c8004000 {

> +       compatible = "intel,ixp4xx-gpio";

> +       reg = <0xc8004000 0x1000>;

> +       gpio-controller;

> +       #gpio-cells = <2>;

> +       interrupt-controller;

> +       #interrupt-cells = <2>;

> +};

> diff --git a/MAINTAINERS b/MAINTAINERS

> index 775a623dc91d..57d098b85523 100644

> --- a/MAINTAINERS

> +++ b/MAINTAINERS

> @@ -1650,6 +1650,7 @@ M:        Imre Kaloz <kaloz@openwrt.org>

>  M:     Krzysztof Halasa <khalasa@piap.pl>

>  L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)

>  S:     Maintained

> +F:     Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt

>  F:     Documentation/devicetree/bindings/interrupt-controller/intel,ixp4xx-interrupt.txt

>  F:     Documentation/devicetree/bindings/timer/intel,ixp4xx-timer.txt

>  F:     arch/arm/mach-ixp4xx/

> --

> 2.20.1

>


Looks good to me.

Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Rob Herring (Arm) Feb. 18, 2019, 9:27 p.m. UTC | #2
On Sun, Feb 3, 2019 at 3:42 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>

> This adds DT bindings for the IXP4xx GPIO controller.

>

> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

> Bartosz: looking for your ACK on this, it'd be good if

> the other GPIO maintainer is aligned with my ideas here.

> I intend to merge this through the ARM SoC tree.

> ---

>  .../bindings/gpio/intel,ixp4xx-gpio.txt       | 38 +++++++++++++++++++

>  MAINTAINERS                                   |  1 +

>  2 files changed, 39 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt


Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt b/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt
new file mode 100644
index 000000000000..8dc41ed99685
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt
@@ -0,0 +1,38 @@ 
+Intel IXP4xx XScale Networking Processors GPIO
+
+This GPIO controller is found in the Intel IXP4xx processors.
+It supports 16 GPIO lines.
+
+The interrupt portions of the GPIO controller is hierarchical:
+the synchronous edge detector is part of the GPIO block, but the
+actual enabling/disabling of the interrupt line is done in the
+main IXP4xx interrupt controller which has a 1:1 mapping for
+the first 12 GPIO lines to 12 system interrupts.
+
+The remaining 4 GPIO lines can not be used for receiving
+interrupts.
+
+The interrupt parent of this GPIO controller must be the
+IXP4xx interrupt controller.
+
+Required properties:
+
+- compatible : Should be
+  "intel,ixp4xx-gpio"
+- reg : Should contain registers location and length
+- gpio-controller : marks this as a GPIO controller
+- #gpio-cells : Should be 2, see gpio/gpio.txt
+- interrupt-controller : marks this as an interrupt controller
+- #interrupt-cells : a standard two-cell interrupt, see
+  interrupt-controller/interrupts.txt
+
+Example:
+
+gpio0: gpio@c8004000 {
+	compatible = "intel,ixp4xx-gpio";
+	reg = <0xc8004000 0x1000>;
+	gpio-controller;
+	#gpio-cells = <2>;
+	interrupt-controller;
+	#interrupt-cells = <2>;
+};
diff --git a/MAINTAINERS b/MAINTAINERS
index 775a623dc91d..57d098b85523 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1650,6 +1650,7 @@  M:	Imre Kaloz <kaloz@openwrt.org>
 M:	Krzysztof Halasa <khalasa@piap.pl>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:	Maintained
+F:	Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt
 F:	Documentation/devicetree/bindings/interrupt-controller/intel,ixp4xx-interrupt.txt
 F:	Documentation/devicetree/bindings/timer/intel,ixp4xx-timer.txt
 F:	arch/arm/mach-ixp4xx/