]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - Documentation/devicetree/bindings/gpio/nxp,lpc1850-gpio.txt
Merge remote-tracking branch 'kgdb/kgdb-next'
[karo-tx-linux.git] / Documentation / devicetree / bindings / gpio / nxp,lpc1850-gpio.txt
1 NXP LPC18xx/43xx GPIO controller Device Tree Bindings
2 -----------------------------------------------------
3
4 Required properties:
5 - compatible            : Should be "nxp,lpc1850-gpio"
6 - reg                   : Address and length of the register set for the device
7 - clocks                : Clock specifier (see clock bindings for details)
8 - gpio-controller       : Marks the device node as a GPIO controller.
9 - #gpio-cells           : Should be two
10                           - First cell is the GPIO line number
11                           - Second cell is used to specify polarity
12
13 Optional properties:
14 - gpio-ranges           : Mapping between GPIO and pinctrl
15
16 Example:
17 #define LPC_GPIO(port, pin)     (port * 32 + pin)
18 #define LPC_PIN(port, pin)      (0x##port * 32 + pin)
19
20 gpio: gpio@400f4000 {
21         compatible = "nxp,lpc1850-gpio";
22         reg = <0x400f4000 0x4000>;
23         clocks = <&ccu1 CLK_CPU_GPIO>;
24         gpio-controller;
25         #gpio-cells = <2>;
26         gpio-ranges =   <&pinctrl LPC_GPIO(0,0)  LPC_PIN(0,0)  2>,
27                         ...
28                         <&pinctrl LPC_GPIO(7,19) LPC_PIN(f,5)  7>;
29 };
30
31 gpio_joystick {
32         compatible = "gpio-keys-polled";
33         ...
34
35         button@0 {
36                 ...
37                 gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
38         };
39 };