diff options
author | Quan Nguyen <qnguyen@apm.com> | 2016-02-17 08:15:08 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-19 06:56:08 -0500 |
commit | 8cae5f9740676a46c0b5eb35e60cd13c46b99bd0 (patch) | |
tree | f8860c306e03f29cfcbc05036496d76cd69a5e3b | |
parent | 1013fc417cc15ead7c3a9091a47617f357db71a4 (diff) |
gpio: X-Gene standby GPIO controller DTS binding
Update description for X-Gene standby GPIO controller DTS binding to
support GPIO line configuration as input, output or external IRQ pin.
Signed-off-by: Y Vo <yvo@apm.com>
Signed-off-by: Quan Nguyen <qnguyen@apm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt b/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt index dae130060537..5490c1d68981 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt | |||
@@ -1,10 +1,20 @@ | |||
1 | APM X-Gene Standby GPIO controller bindings | 1 | APM X-Gene Standby GPIO controller bindings |
2 | 2 | ||
3 | This is a gpio controller in the standby domain. | 3 | This is a gpio controller in the standby domain. It also supports interrupt in |
4 | 4 | some particular pins which are sourced to its parent interrupt controller | |
5 | There are 20 GPIO pins from 0..21. There is no GPIO_DS14 or GPIO_DS15, | 5 | as diagram below: |
6 | only GPIO_DS8..GPIO_DS13 support interrupts. The IRQ mapping | 6 | +-----------------+ |
7 | is currently 1-to-1 on interrupts 0x28 thru 0x2d. | 7 | | X-Gene standby | |
8 | | GPIO controller +------ GPIO_0 | ||
9 | +------------+ | | ... | ||
10 | | Parent IRQ | EXT_INT_0 | +------ GPIO_8/EXT_INT_0 | ||
11 | | controller | (SPI40) | | ... | ||
12 | | (GICv2) +--------------+ +------ GPIO_[N+8]/EXT_INT_N | ||
13 | | | ... | | | ||
14 | | | EXT_INT_N | +------ GPIO_[N+9] | ||
15 | | | (SPI[40 + N])| | ... | ||
16 | | +--------------+ +------ GPIO_MAX | ||
17 | +------------+ +-----------------+ | ||
8 | 18 | ||
9 | Required properties: | 19 | Required properties: |
10 | - compatible: "apm,xgene-gpio-sb" for the X-Gene Standby GPIO controller | 20 | - compatible: "apm,xgene-gpio-sb" for the X-Gene Standby GPIO controller |
@@ -15,10 +25,18 @@ Required properties: | |||
15 | 0 = active high | 25 | 0 = active high |
16 | 1 = active low | 26 | 1 = active low |
17 | - gpio-controller: Marks the device node as a GPIO controller. | 27 | - gpio-controller: Marks the device node as a GPIO controller. |
18 | - interrupts: Shall contain exactly 6 interrupts. | 28 | - interrupts: The EXT_INT_0 parent interrupt resource must be listed first. |
29 | - interrupt-parent: Phandle of the parent interrupt controller. | ||
30 | - interrupt-cells: Should be two. | ||
31 | - first cell is 0-N coresponding for EXT_INT_0 to EXT_INT_N. | ||
32 | - second cell is used to specify flags. | ||
33 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
34 | - apm,nr-gpios: Optional, specify number of gpios pin. | ||
35 | - apm,nr-irqs: Optional, specify number of interrupt pins. | ||
36 | - apm,irq-start: Optional, specify lowest gpio pin support interrupt. | ||
19 | 37 | ||
20 | Example: | 38 | Example: |
21 | sbgpio: sbgpio@17001000 { | 39 | sbgpio: gpio@17001000{ |
22 | compatible = "apm,xgene-gpio-sb"; | 40 | compatible = "apm,xgene-gpio-sb"; |
23 | reg = <0x0 0x17001000 0x0 0x400>; | 41 | reg = <0x0 0x17001000 0x0 0x400>; |
24 | #gpio-cells = <2>; | 42 | #gpio-cells = <2>; |
@@ -29,4 +47,19 @@ Example: | |||
29 | <0x0 0x2b 0x1>, | 47 | <0x0 0x2b 0x1>, |
30 | <0x0 0x2c 0x1>, | 48 | <0x0 0x2c 0x1>, |
31 | <0x0 0x2d 0x1>; | 49 | <0x0 0x2d 0x1>; |
50 | interrupt-parent = <&gic>; | ||
51 | #interrupt-cells = <2>; | ||
52 | interrupt-controller; | ||
53 | apm,nr-gpios = <22>; | ||
54 | apm,nr-irqs = <6>; | ||
55 | apm,irq-start = <8>; | ||
56 | }; | ||
57 | |||
58 | testuser { | ||
59 | compatible = "example,testuser"; | ||
60 | /* Use the GPIO_13/EXT_INT_5 line as an active high triggered | ||
61 | * level interrupt | ||
62 | */ | ||
63 | interrupts = <5 4>; | ||
64 | interrupt-parent = <&sbgpio>; | ||
32 | }; | 65 | }; |