gpio-axp209.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. AXP209 GPIO & pinctrl controller
  2. This driver follows the usual GPIO bindings found in
  3. Documentation/devicetree/bindings/gpio/gpio.txt
  4. This driver follows the usual pinctrl bindings found in
  5. Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
  6. This driver employs the per-pin muxing pattern.
  7. Required properties:
  8. - compatible: Should be one of:
  9. - "x-powers,axp209-gpio"
  10. - "x-powers,axp813-gpio"
  11. - #gpio-cells: Should be two. The first cell is the pin number and the
  12. second is the GPIO flags.
  13. - gpio-controller: Marks the device node as a GPIO controller.
  14. This node must be a subnode of the axp20x PMIC, documented in
  15. Documentation/devicetree/bindings/mfd/axp20x.txt
  16. Example:
  17. axp209: pmic@34 {
  18. compatible = "x-powers,axp209";
  19. reg = <0x34>;
  20. interrupt-parent = <&nmi_intc>;
  21. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  22. interrupt-controller;
  23. #interrupt-cells = <1>;
  24. axp_gpio: gpio {
  25. compatible = "x-powers,axp209-gpio";
  26. gpio-controller;
  27. #gpio-cells = <2>;
  28. };
  29. };
  30. The GPIOs can be muxed to other functions and therefore, must be a subnode of
  31. axp_gpio.
  32. Example:
  33. &axp_gpio {
  34. gpio0_adc: gpio0-adc {
  35. pins = "GPIO0";
  36. function = "adc";
  37. };
  38. };
  39. &example_node {
  40. pinctrl-names = "default";
  41. pinctrl-0 = <&gpio0_adc>;
  42. };
  43. GPIOs and their functions
  44. -------------------------
  45. Each GPIO is independent from the other (i.e. GPIO0 in gpio_in function does
  46. not force GPIO1 and GPIO2 to be in gpio_in function as well).
  47. axp209
  48. ------
  49. GPIO | Functions
  50. ------------------------
  51. GPIO0 | gpio_in, gpio_out, ldo, adc
  52. GPIO1 | gpio_in, gpio_out, ldo, adc
  53. GPIO2 | gpio_in, gpio_out
  54. axp813
  55. ------
  56. GPIO | Functions
  57. ------------------------
  58. GPIO0 | gpio_in, gpio_out, ldo, adc
  59. GPIO1 | gpio_in, gpio_out, ldo