| .. | .. |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | Required properties: |
|---|
| 5 | 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 |
|---|
| 6 | +- reg : List of addresses and lengths of the GPIO controller |
|---|
| 7 | + register sets |
|---|
| 8 | +- reg-names : Should be "gpio", "gpio-pin-ic", "gpio-group0-ic" and |
|---|
| 9 | + "gpio-gpoup1-ic" |
|---|
| 10 | +- clocks : Phandle and clock specifier pair for GPIO controller |
|---|
| 11 | +- resets : Phandle and reset specifier pair for GPIO controller |
|---|
| 12 | +- gpio-controller : Marks the device node as a GPIO controller |
|---|
| 13 | +- #gpio-cells : Should be two: |
|---|
| 14 | + - The first cell is the GPIO line number |
|---|
| 15 | + - The second cell is used to specify polarity |
|---|
| 16 | +- interrupt-controller : Marks the device node as an interrupt controller |
|---|
| 17 | +- #interrupt-cells : Should be two: |
|---|
| 18 | + - The first cell is an interrupt number within |
|---|
| 19 | + 0..9 range, for GPIO pin interrupts it is equal |
|---|
| 20 | + to 'nxp,gpio-pin-interrupt' property value of |
|---|
| 21 | + GPIO pin configuration, 8 is for GPIO GROUP0 |
|---|
| 22 | + interrupt, 9 is for GPIO GROUP1 interrupt |
|---|
| 23 | + - The second cell is used to specify interrupt type |
|---|
| 12 | 24 | |
|---|
| 13 | 25 | Optional properties: |
|---|
| 14 | 26 | - gpio-ranges : Mapping between GPIO and pinctrl |
|---|
| .. | .. |
|---|
| 19 | 31 | |
|---|
| 20 | 32 | gpio: gpio@400f4000 { |
|---|
| 21 | 33 | compatible = "nxp,lpc1850-gpio"; |
|---|
| 22 | | - reg = <0x400f4000 0x4000>; |
|---|
| 34 | + reg = <0x400f4000 0x4000>, <0x40087000 0x1000>, |
|---|
| 35 | + <0x40088000 0x1000>, <0x40089000 0x1000>; |
|---|
| 36 | + reg-names = "gpio", "gpio-pin-ic", |
|---|
| 37 | + "gpio-group0-ic", "gpio-gpoup1-ic"; |
|---|
| 23 | 38 | clocks = <&ccu1 CLK_CPU_GPIO>; |
|---|
| 39 | + resets = <&rgu 28>; |
|---|
| 24 | 40 | gpio-controller; |
|---|
| 25 | 41 | #gpio-cells = <2>; |
|---|
| 42 | + interrupt-controller; |
|---|
| 43 | + #interrupt-cells = <2>; |
|---|
| 26 | 44 | gpio-ranges = <&pinctrl LPC_GPIO(0,0) LPC_PIN(0,0) 2>, |
|---|
| 27 | 45 | ... |
|---|
| 28 | 46 | <&pinctrl LPC_GPIO(7,19) LPC_PIN(f,5) 7>; |
|---|
| 29 | 47 | }; |
|---|
| 30 | 48 | |
|---|
| 31 | 49 | gpio_joystick { |
|---|
| 32 | | - compatible = "gpio-keys-polled"; |
|---|
| 50 | + compatible = "gpio-keys"; |
|---|
| 33 | 51 | ... |
|---|
| 34 | 52 | |
|---|
| 35 | | - button@0 { |
|---|
| 53 | + button0 { |
|---|
| 36 | 54 | ... |
|---|
| 55 | + interrupt-parent = <&gpio>; |
|---|
| 56 | + interrupts = <1 IRQ_TYPE_EDGE_BOTH>; |
|---|
| 37 | 57 | gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>; |
|---|
| 38 | 58 | }; |
|---|
| 39 | 59 | }; |
|---|