allwinner,sunxi-pinctrl.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. * Allwinner A1X Pin Controller
  2. The pins controlled by sunXi pin controller are organized in banks,
  3. each bank has 32 pins. Each pin has 7 multiplexing functions, with
  4. the first two functions being GPIO in and out. The configuration on
  5. the pins includes drive strength and pull-up.
  6. Required properties:
  7. - compatible: Should be one of the followings (depending on you SoC):
  8. "allwinner,sun4i-a10-pinctrl"
  9. "allwinner,sun5i-a10s-pinctrl"
  10. "allwinner,sun5i-a13-pinctrl"
  11. "allwinner,sun6i-a31-pinctrl"
  12. "allwinner,sun6i-a31s-pinctrl"
  13. "allwinner,sun6i-a31-r-pinctrl"
  14. "allwinner,sun7i-a20-pinctrl"
  15. "allwinner,sun8i-a23-pinctrl"
  16. "allwinner,sun8i-a23-r-pinctrl"
  17. "allwinner,sun8i-a33-pinctrl"
  18. "allwinner,sun9i-a80-pinctrl"
  19. "allwinner,sun9i-a80-r-pinctrl"
  20. "allwinner,sun8i-a83t-pinctrl"
  21. "allwinner,sun8i-h3-pinctrl"
  22. "allwinner,sun8i-h3-r-pinctrl"
  23. "allwinner,sun50i-a64-pinctrl"
  24. "nextthing,gr8-pinctrl"
  25. - reg: Should contain the register physical address and length for the
  26. pin controller.
  27. Please refer to pinctrl-bindings.txt in this directory for details of the
  28. common pinctrl bindings used by client devices.
  29. A pinctrl node should contain at least one subnodes representing the
  30. pinctrl groups available on the machine. Each subnode will list the
  31. pins it needs, and how they should be configured, with regard to muxer
  32. configuration, drive strength and pullups. If one of these options is
  33. not set, its actual value will be unspecified.
  34. Required subnode-properties:
  35. - allwinner,pins: List of strings containing the pin name.
  36. - allwinner,function: Function to mux the pins listed above to.
  37. Optional subnode-properties:
  38. - allwinner,drive: Integer. Represents the current sent to the pin
  39. 0: 10 mA
  40. 1: 20 mA
  41. 2: 30 mA
  42. 3: 40 mA
  43. - allwinner,pull: Integer.
  44. 0: No resistor
  45. 1: Pull-up resistor
  46. 2: Pull-down resistor
  47. Examples:
  48. pio: pinctrl@01c20800 {
  49. compatible = "allwinner,sun5i-a13-pinctrl";
  50. reg = <0x01c20800 0x400>;
  51. #address-cells = <1>;
  52. #size-cells = <0>;
  53. uart1_pins_a: uart1@0 {
  54. allwinner,pins = "PE10", "PE11";
  55. allwinner,function = "uart1";
  56. allwinner,drive = <0>;
  57. allwinner,pull = <0>;
  58. };
  59. uart1_pins_b: uart1@1 {
  60. allwinner,pins = "PG3", "PG4";
  61. allwinner,function = "uart1";
  62. allwinner,drive = <0>;
  63. allwinner,pull = <0>;
  64. };
  65. };
  66. GPIO and interrupt controller
  67. -----------------------------
  68. This hardware also acts as a GPIO controller and an interrupt
  69. controller.
  70. Consumers that would want to refer to one or the other (or both)
  71. should provide through the usual *-gpios and interrupts properties a
  72. cell with 3 arguments, first the number of the bank, then the pin
  73. inside that bank, and finally the flags for the GPIO/interrupts.
  74. Example:
  75. xio: gpio@38 {
  76. compatible = "nxp,pcf8574a";
  77. reg = <0x38>;
  78. gpio-controller;
  79. #gpio-cells = <2>;
  80. interrupt-parent = <&pio>;
  81. interrupts = <6 0 IRQ_TYPE_EDGE_FALLING>;
  82. interrupt-controller;
  83. #interrupt-cells = <2>;
  84. };
  85. reg_usb1_vbus: usb1-vbus {
  86. compatible = "regulator-fixed";
  87. regulator-name = "usb1-vbus";
  88. regulator-min-microvolt = <5000000>;
  89. regulator-max-microvolt = <5000000>;
  90. gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>;
  91. };