blob: e4277921f3e30a6dd8e883434eb733d59d4e34dc [file] [log] [blame]
Pramod Kumar604b2572015-11-19 09:22:18 +05301Broadcom iProc GPIO/PINCONF Controller
Ray Jui2dffad82015-03-09 13:44:59 -07002
3Required properties:
4
5- compatible:
Pramod Kumare0548002015-10-19 11:13:11 +05306 Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio",
7 "brcm,cygnus-crmu-gpio" or "brcm,iproc-gpio"
Ray Jui2dffad82015-03-09 13:44:59 -07008
9- reg:
Pramod Kumar604b2572015-11-19 09:22:18 +053010 Define the base and range of the I/O address space that contains SoC
Ray Jui2dffad82015-03-09 13:44:59 -070011GPIO/PINCONF controller registers
12
Pramod Kumar2652df62015-11-19 09:22:13 +053013- ngpios:
14 Total number of in-use slots in GPIO controller
15
Ray Jui2dffad82015-03-09 13:44:59 -070016- #gpio-cells:
17 Must be two. The first cell is the GPIO pin number (within the
18controller'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)
20
21- gpio-controller:
22 Specifies that the node is a GPIO controller
23
24Optional properties:
25
26- interrupts:
27 Interrupt ID
28
29- interrupt-controller:
30 Specifies that the node is an interrupt controller
31
Pramod Kumar03e09bc2015-10-19 11:13:08 +053032- 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.
Ray Jui2dffad82015-03-09 13:44:59 -070039
40Supported generic PINCONF properties in child nodes:
41
42- pins:
43 The list of pins (within the controller's own pin space) that properties
44in the node apply to. Pin names are "gpio-<pin>"
45
46- bias-disable:
47 Disable pin bias
48
49- bias-pull-up:
50 Enable internal pull up resistor
51
52- bias-pull-down:
53 Enable internal pull down resistor
54
55- drive-strength:
56 Valid drive strength values include 2, 4, 6, 8, 10, 12, 14, 16 (mA)
57
58Example:
59 gpio_ccm: gpio@1800a000 {
60 compatible = "brcm,cygnus-ccm-gpio";
61 reg = <0x1800a000 0x50>,
62 <0x0301d164 0x20>;
Pramod Kumar2652df62015-11-19 09:22:13 +053063 ngpios = <24>;
Ray Jui2dffad82015-03-09 13:44:59 -070064 #gpio-cells = <2>;
65 gpio-controller;
66 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
67 interrupt-controller;
68
69 touch_pins: touch_pins {
70 pwr: pwr {
71 pins = "gpio-0";
72 drive-strength = <16>;
73 };
74
75 event: event {
76 pins = "gpio-1";
77 bias-pull-up;
78 };
79 };
80 };
81
82 gpio_asiu: gpio@180a5000 {
83 compatible = "brcm,cygnus-asiu-gpio";
84 reg = <0x180a5000 0x668>;
Pramod Kumar2652df62015-11-19 09:22:13 +053085 ngpios = <146>;
Ray Jui2dffad82015-03-09 13:44:59 -070086 #gpio-cells = <2>;
87 gpio-controller;
88 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
89 interrupt-controller;
Pramod Kumar03e09bc2015-10-19 11:13:08 +053090 gpio-ranges = <&pinctrl 0 42 1>,
91 <&pinctrl 1 44 3>;
Ray Jui2dffad82015-03-09 13:44:59 -070092 };
93
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 };
103
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 }