Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Quan Nguyen and committed by
Linus Walleij
8cae5f97 1013fc41

+40 -7
+40 -7
Documentation/devicetree/bindings/gpio/gpio-xgene-sb.txt
··· 1 1 APM X-Gene Standby GPIO controller bindings 2 2 3 - This is a gpio controller in the standby domain. 4 - 5 - There are 20 GPIO pins from 0..21. There is no GPIO_DS14 or GPIO_DS15, 6 - only GPIO_DS8..GPIO_DS13 support interrupts. The IRQ mapping 7 - is currently 1-to-1 on interrupts 0x28 thru 0x2d. 3 + This is a gpio controller in the standby domain. It also supports interrupt in 4 + some particular pins which are sourced to its parent interrupt controller 5 + as diagram below: 6 + +-----------------+ 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 19 Required properties: 10 20 - compatible: "apm,xgene-gpio-sb" for the X-Gene Standby GPIO controller ··· 25 15 0 = active high 26 16 1 = active low 27 17 - gpio-controller: Marks the device node as a GPIO controller. 28 - - interrupts: Shall contain exactly 6 interrupts. 18 + - interrupts: The EXT_INT_0 parent interrupt resource must be listed first. 19 + - interrupt-parent: Phandle of the parent interrupt controller. 20 + - interrupt-cells: Should be two. 21 + - first cell is 0-N coresponding for EXT_INT_0 to EXT_INT_N. 22 + - second cell is used to specify flags. 23 + - interrupt-controller: Marks the device node as an interrupt controller. 24 + - apm,nr-gpios: Optional, specify number of gpios pin. 25 + - apm,nr-irqs: Optional, specify number of interrupt pins. 26 + - apm,irq-start: Optional, specify lowest gpio pin support interrupt. 29 27 30 28 Example: 31 - sbgpio: sbgpio@17001000 { 29 + sbgpio: gpio@17001000{ 32 30 compatible = "apm,xgene-gpio-sb"; 33 31 reg = <0x0 0x17001000 0x0 0x400>; 34 32 #gpio-cells = <2>; ··· 47 29 <0x0 0x2b 0x1>, 48 30 <0x0 0x2c 0x1>, 49 31 <0x0 0x2d 0x1>; 32 + interrupt-parent = <&gic>; 33 + #interrupt-cells = <2>; 34 + interrupt-controller; 35 + apm,nr-gpios = <22>; 36 + apm,nr-irqs = <6>; 37 + apm,irq-start = <8>; 38 + }; 39 + 40 + testuser { 41 + compatible = "example,testuser"; 42 + /* Use the GPIO_13/EXT_INT_5 line as an active high triggered 43 + * level interrupt 44 + */ 45 + interrupts = <5 4>; 46 + interrupt-parent = <&sbgpio>; 50 47 };