Merge tag 'powerpc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux/fpc-iii.git] / Documentation / devicetree / bindings / pinctrl / brcm,iproc-gpio.txt
blobe4277921f3e30a6dd8e883434eb733d59d4e34dc
1 Broadcom iProc GPIO/PINCONF Controller
3 Required properties:
5 - compatible:
6     Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio",
7     "brcm,cygnus-crmu-gpio" or "brcm,iproc-gpio"
9 - reg:
10     Define the base and range of the I/O address space that contains SoC
11 GPIO/PINCONF controller registers
13 - ngpios:
14     Total number of in-use slots in GPIO controller
16 - #gpio-cells:
17     Must be two. The first cell is the GPIO pin number (within the
18 controller's pin space) and the second cell is used for the following:
19     bit[0]: polarity (0 for active high and 1 for active low)
21 - gpio-controller:
22     Specifies that the node is a GPIO controller
24 Optional properties:
26 - interrupts:
27     Interrupt ID
29 - interrupt-controller:
30     Specifies that the node is an interrupt controller
32 - gpio-ranges:
33     Specifies the mapping between gpio controller and pin-controllers pins.
34     This requires 4 fields in cells defined as -
35     1. Phandle of pin-controller.
36     2. GPIO base pin offset.
37     3  Pin-control base pin offset.
38     4. number of gpio pins which are linearly mapped from pin base.
40 Supported generic PINCONF properties in child nodes:
42 - pins:
43     The list of pins (within the controller's own pin space) that properties
44 in the node apply to. Pin names are "gpio-<pin>"
46 - bias-disable:
47     Disable pin bias
49 - bias-pull-up:
50     Enable internal pull up resistor
52 - bias-pull-down:
53     Enable internal pull down resistor
55 - drive-strength:
56     Valid drive strength values include 2, 4, 6, 8, 10, 12, 14, 16 (mA)
58 Example:
59         gpio_ccm: gpio@1800a000 {
60                 compatible = "brcm,cygnus-ccm-gpio";
61                 reg = <0x1800a000 0x50>,
62                       <0x0301d164 0x20>;
63                 ngpios = <24>;
64                 #gpio-cells = <2>;
65                 gpio-controller;
66                 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
67                 interrupt-controller;
69                 touch_pins: touch_pins {
70                         pwr: pwr {
71                                 pins = "gpio-0";
72                                 drive-strength = <16>;
73                         };
75                         event: event {
76                                 pins = "gpio-1";
77                                 bias-pull-up;
78                         };
79                 };
80         };
82         gpio_asiu: gpio@180a5000 {
83                 compatible = "brcm,cygnus-asiu-gpio";
84                 reg = <0x180a5000 0x668>;
85                 ngpios = <146>;
86                 #gpio-cells = <2>;
87                 gpio-controller;
88                 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
89                 interrupt-controller;
90                 gpio-ranges = <&pinctrl 0 42 1>,
91                                 <&pinctrl 1 44 3>;
92         };
94         /*
95          * Touchscreen that uses the CCM GPIO 0 and 1
96          */
97         tsc {
98                 ...
99                 ...
100                 gpio-pwr = <&gpio_ccm 0 0>;
101                 gpio-event = <&gpio_ccm 1 0>;
102         };
104         /* Bluetooth that uses the ASIU GPIO 5, with polarity inverted */
105         bluetooth {
106                 ...
107                 ...
108                 bcm,rfkill-bank-sel = <&gpio_asiu 5 1>
109         }