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