Skip to content

Commit e96fd5c

Browse files
vzapolskiylinusw
authored andcommitted
dt-bindings: gpio: lpc18xx: describe interrupt controllers of GPIO controller
From LPC18xx and LPC43xx User Manuals the GPIO controller consists of the following weakly connected blocks: * GPIO pin interrupt block at 0x40087000, * GPIO GROUP0 interrupt block at 0x40088000, * GPIO GROUP1 interrupt block at 0x40089000, * GPIO port block at 0x400F4000. While all 4 sub-controller blocks have their own I/O addresses, moreover all 3 interrupt blocks are APB0 peripherals and high-speed GPIO block is an AHB slave, according to the hardware manual interrupt controllers and GPIO controller block are seen as a single device, all 4 sub-controllers have the shared reset signal RGU #28 and the same shared clock to access registers CLK_Mx_GPIO on CCU1. The change adds descriptions of the currently missing interrupt controller blocks found on GPIO controller, new added properties are 'reg-names', 'resets', 'interrupt-controller' and '#interrupt-cells', also the example is updated to reflect the changes in device tree binding description. Signed-off-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 5ddabfe commit e96fd5c

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

Documentation/devicetree/bindings/gpio/nxp,lpc1850-gpio.txt

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,24 @@ NXP LPC18xx/43xx GPIO controller Device Tree Bindings
33

44
Required properties:
55
- 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
1224

1325
Optional properties:
1426
- gpio-ranges : Mapping between GPIO and pinctrl
@@ -19,21 +31,29 @@ Example:
1931

2032
gpio: gpio@400f4000 {
2133
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";
2338
clocks = <&ccu1 CLK_CPU_GPIO>;
39+
resets = <&rgu 28>;
2440
gpio-controller;
2541
#gpio-cells = <2>;
42+
interrupt-controller;
43+
#interrupt-cells = <2>;
2644
gpio-ranges = <&pinctrl LPC_GPIO(0,0) LPC_PIN(0,0) 2>,
2745
...
2846
<&pinctrl LPC_GPIO(7,19) LPC_PIN(f,5) 7>;
2947
};
3048

3149
gpio_joystick {
32-
compatible = "gpio-keys-polled";
50+
compatible = "gpio-keys";
3351
...
3452

35-
button@0 {
53+
button0 {
3654
...
55+
interrupt-parent = <&gpio>;
56+
interrupts = <1 IRQ_TYPE_EDGE_BOTH>;
3757
gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
3858
};
3959
};

0 commit comments

Comments
 (0)