diff mbox

[2/2] dt-bindings: gpio: Document Cadence GPIO controller bindings

Message ID 1490803459-29697-2-git-send-email-boris.brezillon@free-electrons.com
State New
Headers show

Commit Message

Boris Brezillon March 29, 2017, 4:04 p.m. UTC
Document Cadence GPIO bindings.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 .../devicetree/bindings/gpio/cdns,gpio.txt         | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/cdns,gpio.txt

Comments

Linus Walleij March 30, 2017, 8:37 a.m. UTC | #1
On Wed, Mar 29, 2017 at 6:04 PM, Boris Brezillon
<boris.brezillon@free-electrons.com> wrote:

> Document Cadence GPIO bindings.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

That is a very terse commit message.

Other than that this looks good, just cutting the DT maintainers
some slack before applying it.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/gpio/cdns,gpio.txt b/Documentation/devicetree/bindings/gpio/cdns,gpio.txt
new file mode 100644
index 000000000000..09fb2c8e5c9d
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/cdns,gpio.txt
@@ -0,0 +1,41 @@ 
+Cadence GPIO controller bindings
+
+Required properties:
+- compatible: should be "cdns,gpio-r1p02".
+- reg: the register base address and size.
+- #gpio-cells: should be 2.
+  * first cell is the GPIO number.
+  * second cell specifies the GPIO flags, as defined in
+    <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW
+    flags are supported.
+- gpio-controller: marks the device as a GPIO controller.
+- clocks: should contain one entry referencing the peripheral clock driving the
+  GPIO controller.
+
+Optional properties:
+- interrupt-parent: phandle of the parent interrupt controller.
+- interrupts: interrupt specifier for the controllers interrupt.
+- interrupt-controller: marks the device as an interrupt controller. When
+  defined, interrupts, interrupt-parent and #interrupt-cells are required.
+- interrupt-cells: should be 2.
+  * first cell is the GPIO number you want to use as an IRQ source.
+  * second cell specifies the IRQ type, as defined in
+    <dt-bindings/interrupt-controller/irq.h>.
+
+Example:
+
+	gpio-controller@d050000 {
+		compatible = "cdns,gpio";
+		reg = <0xd050000 0x10000>;
+
+		clocks = <&gpio_pclk>;
+
+		interrupt-parent = <&intc>;
+		interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};