ramips: update v3.10 patches
[openwrt.git] / target / linux / ramips / patches-3.10 / 0005-DT-Add-documentation-for-gpio-ralink.patch
1 From ad68c2865b360f1b637432b4cbcaaf101d2687b9 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Sun, 28 Jul 2013 19:45:30 +0200
4 Subject: [PATCH 05/25] DT: Add documentation for gpio-ralink
5
6 Describe gpio-ralink binding.
7
8 Signed-off-by: John Crispin <blogic@openwrt.org>
9 Cc: linux-mips@linux-mips.org
10 Cc: devicetree@vger.kernel.org
11 Cc: linux-gpio@vger.kernel.org
12 ---
13  .../devicetree/bindings/gpio/gpio-ralink.txt       |   40 ++++++++++++++++++++
14  1 file changed, 40 insertions(+)
15  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ralink.txt
16
17 --- /dev/null
18 +++ b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
19 @@ -0,0 +1,40 @@
20 +Ralink SoC GPIO controller bindings
21 +
22 +Required properties:
23 +- compatible:
24 +  - "ralink,rt2880-gpio" for Ralink controllers
25 +- #gpio-cells : Should be two.
26 +  - first cell is the pin number
27 +  - second cell is used to specify optional parameters (unused)
28 +- gpio-controller : Marks the device node as a GPIO controller
29 +- reg : Physical base address and length of the controller's registers
30 +- interrupt-parent: phandle to the INTC device node
31 +- interrupts : Specify the INTC interrupt number
32 +- ralink,num-gpios : Specify the number of GPIOs
33 +- ralink,register-map : The register layout depends on the GPIO bank and actual
34 +               SoC type. Register offsets need to be in this order.
35 +               [ INT, EDGE, RENA, FENA, DATA, DIR, POL, SET, RESET, TOGGLE ]
36 +
37 +Optional properties:
38 +- ralink,gpio-base : Specify the GPIO chips base number
39 +
40 +Example:
41 +
42 +       gpio0: gpio@600 {
43 +               compatible = "ralink,rt5350-gpio", "ralink,rt2880-gpio";
44 +
45 +               #gpio-cells = <2>;
46 +               gpio-controller;
47 +
48 +               reg = <0x600 0x34>;
49 +
50 +               interrupt-parent = <&intc>;
51 +               interrupts = <6>;
52 +
53 +               ralink,gpio-base = <0>;
54 +               ralink,num-gpios = <24>;
55 +               ralink,register-map = [ 00 04 08 0c
56 +                               20 24 28 2c
57 +                               30 34 ];
58 +
59 +       };