100 lines · plain
1Broadcom BCM2835 GPIO (and pinmux) controller2 3The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt4controller, and pinmux/control device.5 6Required properties:7- compatible: "brcm,bcm2835-gpio"8- compatible: should be one of:9 "brcm,bcm2835-gpio" - BCM2835 compatible pinctrl10 "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl11 "brcm,bcm2711-gpio" - BCM2711 compatible pinctrl12 "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl13- reg: Should contain the physical address of the GPIO module's registers.14- gpio-controller: Marks the device node as a GPIO controller.15- #gpio-cells : Should be two. The first cell is the pin number and the16 second cell is used to specify optional parameters:17 - bit 0 specifies polarity (0 for normal, 1 for inverted)18- interrupts : The interrupt outputs from the controller. One interrupt per19 individual bank followed by the "all banks" interrupt. For BCM7211, an20 additional set of per-bank interrupt line and an "all banks" wake-up21 interrupt may be specified.22- interrupt-controller: Marks the device node as an interrupt controller.23- #interrupt-cells : Should be 2.24 The first cell is the GPIO number.25 The second cell is used to specify flags:26 bits[3:0] trigger type and level flags:27 1 = low-to-high edge triggered.28 2 = high-to-low edge triggered.29 4 = active high level-sensitive.30 8 = active low level-sensitive.31 Valid combinations are 1, 2, 3, 4, 8.32 33Please refer to ../gpio/gpio.txt for a general description of GPIO bindings.34 35Please refer to pinctrl-bindings.txt in this directory for details of the36common pinctrl bindings used by client devices, including the meaning of the37phrase "pin configuration node".38 39Each pin configuration node lists the pin(s) to which it applies, and one or40more of the mux function to select on those pin(s), and pull-up/down41configuration. Each subnode only affects those parameters that are explicitly42listed. In other words, a subnode that lists only a mux function implies no43information about any pull configuration. Similarly, a subnode that lists only44a pul parameter implies no information about the mux function.45 46The BCM2835 pin configuration and multiplexing supports the generic bindings.47For details on each properties, you can refer to ./pinctrl-bindings.txt.48 49Required sub-node properties:50 - pins51 - function52 53Optional sub-node properties:54 - bias-disable55 - bias-pull-up56 - bias-pull-down57 - output-high58 - output-low59 60Legacy pin configuration and multiplexing binding:61*** (Its use is deprecated, use generic multiplexing and configuration62bindings instead)63 64Required subnode-properties:65- brcm,pins: An array of cells. Each cell contains the ID of a pin. Valid IDs66 are the integer GPIO IDs; 0==GPIO0, 1==GPIO1, ... 53==GPIO53.67 68Optional subnode-properties:69- brcm,function: Integer, containing the function to mux to the pin(s):70 0: GPIO in71 1: GPIO out72 2: alt573 3: alt474 4: alt075 5: alt176 6: alt277 7: alt378- brcm,pull: Integer, representing the pull-down/up to apply to the pin(s):79 0: none80 1: down81 2: up82 83Each of brcm,function and brcm,pull may contain either a single value which84will be applied to all pins in brcm,pins, or 1 value for each entry in85brcm,pins.86 87Example:88 89 gpio: gpio {90 compatible = "brcm,bcm2835-gpio";91 reg = <0x2200000 0xb4>;92 interrupts = <2 17>, <2 19>, <2 18>, <2 20>;93 94 gpio-controller;95 #gpio-cells = <2>;96 97 interrupt-controller;98 #interrupt-cells = <2>;99 };100