linux-mips
[Top] [All Lists]

[PATCH 1/2] DT: Add documentation for gpio-ralink

To: Grant Likely <grant.likely@linaro.org>
Subject: [PATCH 1/2] DT: Add documentation for gpio-ralink
From: John Crispin <blogic@openwrt.org>
Date: Thu, 8 Aug 2013 11:38:52 +0200
Cc: Rob Herring <rob.herring@calxeda.com>, John Crispin <blogic@openwrt.org>, linux-mips@linux-mips.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Describe gpio-ralink binding.

Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
---
 .../devicetree/bindings/gpio/gpio-ralink.txt       |   40 ++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ralink.txt

diff --git a/Documentation/devicetree/bindings/gpio/gpio-ralink.txt 
b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
new file mode 100644
index 0000000..b4acf02
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
@@ -0,0 +1,40 @@
+Ralink SoC GPIO controller bindings
+
+Required properties:
+- compatible:
+  - "ralink,rt2880-gpio" for Ralink controllers
+- #gpio-cells : Should be two.
+  - first cell is the pin number
+  - second cell is used to specify optional parameters (unused)
+- gpio-controller : Marks the device node as a GPIO controller
+- reg : Physical base address and length of the controller's registers
+- interrupt-parent: phandle to the INTC device node
+- interrupts : Specify the INTC interrupt number
+- ralink,num-gpios : Specify the number of GPIOs
+- ralink,register-map : The register layout depends on the GPIO bank and actual
+               SoC type. Register offsets need to be in this order.
+               [ INT, EDGE, RENA, FENA, DATA, DIR, POL, SET, RESET, TOGGLE ]
+
+Optional properties:
+- ralink,gpio-base : Specify the GPIO chips base number
+
+Example:
+
+       gpio0: gpio@600 {
+               compatible = "ralink,rt5350-gpio", "ralink,rt2880-gpio";
+
+               #gpio-cells = <2>;
+               gpio-controller;
+
+               reg = <0x600 0x34>;
+
+               interrupt-parent = <&intc>;
+               interrupts = <6>;
+
+               ralink,gpio-base = <0>;
+               ralink,num-gpios = <24>;
+               ralink,register-map = [ 00 04 08 0c
+                               20 24 28 2c
+                               30 34 ];
+
+       };
-- 
1.7.10.4


<Prev in Thread] Current Thread [Next in Thread>