0001 NXP LPC32xx SoC GPIO controller
0002
0003 Required properties:
0004 - compatible: must be "nxp,lpc3220-gpio"
0005 - reg: Physical base address and length of the controller's registers.
0006 - gpio-controller: Marks the device node as a GPIO controller.
0007 - #gpio-cells: Should be 3:
0008 1) bank:
0009 0: GPIO P0
0010 1: GPIO P1
0011 2: GPIO P2
0012 3: GPIO P3
0013 4: GPI P3
0014 5: GPO P3
0015 2) pin number
0016 3) optional parameters:
0017 - bit 0 specifies polarity (0 for normal, 1 for inverted)
0018 - reg: Index of the GPIO group
0019
0020 Example:
0021
0022 gpio: gpio@40028000 {
0023 compatible = "nxp,lpc3220-gpio";
0024 reg = <0x40028000 0x1000>;
0025 gpio-controller;
0026 #gpio-cells = <3>; /* bank, pin, flags */
0027 };
0028
0029 leds {
0030 compatible = "gpio-leds";
0031
0032 led0 {
0033 gpios = <&gpio 5 1 1>; /* GPO_P3 1, active low */
0034 linux,default-trigger = "heartbeat";
0035 default-state = "off";
0036 };
0037
0038 led1 {
0039 gpios = <&gpio 5 14 1>; /* GPO_P3 14, active low */
0040 linux,default-trigger = "timer";
0041 default-state = "off";
0042 };
0043 };