nxp,lpc1850-gpio.txt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. NXP LPC18xx/43xx GPIO controller Device Tree Bindings
  2. -----------------------------------------------------
  3. Required properties:
  4. - compatible : Should be "nxp,lpc1850-gpio"
  5. - reg : Address and length of the register set for the device
  6. - clocks : Clock specifier (see clock bindings for details)
  7. - gpio-controller : Marks the device node as a GPIO controller.
  8. - #gpio-cells : Should be two
  9. - First cell is the GPIO line number
  10. - Second cell is used to specify polarity
  11. Optional properties:
  12. - gpio-ranges : Mapping between GPIO and pinctrl
  13. Example:
  14. #define LPC_GPIO(port, pin) (port * 32 + pin)
  15. #define LPC_PIN(port, pin) (0x##port * 32 + pin)
  16. gpio: gpio@400f4000 {
  17. compatible = "nxp,lpc1850-gpio";
  18. reg = <0x400f4000 0x4000>;
  19. clocks = <&ccu1 CLK_CPU_GPIO>;
  20. gpio-controller;
  21. #gpio-cells = <2>;
  22. gpio-ranges = <&pinctrl LPC_GPIO(0,0) LPC_PIN(0,0) 2>,
  23. ...
  24. <&pinctrl LPC_GPIO(7,19) LPC_PIN(f,5) 7>;
  25. };
  26. gpio_joystick {
  27. compatible = "gpio-keys-polled";
  28. ...
  29. button@0 {
  30. ...
  31. gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
  32. };
  33. };