xref: /linux/Documentation/devicetree/bindings/gpio/nxp,lpc1850-gpio.txt (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1NXP LPC18xx/43xx GPIO controller Device Tree Bindings
2-----------------------------------------------------
3
4Required 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
13Optional properties:
14- gpio-ranges		: Mapping between GPIO and pinctrl
15
16Example:
17#define LPC_GPIO(port, pin)	(port * 32 + pin)
18#define LPC_PIN(port, pin)	(0x##port * 32 + pin)
19
20gpio: 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
31gpio_joystick {
32	compatible = "gpio-keys-polled";
33	...
34
35	button@0 {
36		...
37		gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
38	};
39};
40