gpio_lpc32xx.txt 980 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. NXP LPC32xx SoC GPIO controller
  2. Required properties:
  3. - compatible: must be "nxp,lpc3220-gpio"
  4. - reg: Physical base address and length of the controller's registers.
  5. - gpio-controller: Marks the device node as a GPIO controller.
  6. - #gpio-cells: Should be 3:
  7. 1) bank:
  8. 0: GPIO P0
  9. 1: GPIO P1
  10. 2: GPIO P2
  11. 3: GPIO P3
  12. 4: GPI P3
  13. 5: GPO P3
  14. 2) pin number
  15. 3) optional parameters:
  16. - bit 0 specifies polarity (0 for normal, 1 for inverted)
  17. - reg: Index of the GPIO group
  18. Example:
  19. gpio: gpio@40028000 {
  20. compatible = "nxp,lpc3220-gpio";
  21. reg = <0x40028000 0x1000>;
  22. gpio-controller;
  23. #gpio-cells = <3>; /* bank, pin, flags */
  24. };
  25. leds {
  26. compatible = "gpio-leds";
  27. led0 {
  28. gpios = <&gpio 5 1 1>; /* GPO_P3 1, active low */
  29. linux,default-trigger = "heartbeat";
  30. default-state = "off";
  31. };
  32. led1 {
  33. gpios = <&gpio 5 14 1>; /* GPO_P3 14, active low */
  34. linux,default-trigger = "timer";
  35. default-state = "off";
  36. };
  37. };