allwinner,sunxi-pinctrl.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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,sun8i-a83t-pinctrl"
  19. - reg: Should contain the register physical address and length for the
  20. pin controller.
  21. Please refer to pinctrl-bindings.txt in this directory for details of the
  22. common pinctrl bindings used by client devices.
  23. A pinctrl node should contain at least one subnodes representing the
  24. pinctrl groups available on the machine. Each subnode will list the
  25. pins it needs, and how they should be configured, with regard to muxer
  26. configuration, drive strength and pullups. If one of these options is
  27. not set, its actual value will be unspecified.
  28. Required subnode-properties:
  29. - allwinner,pins: List of strings containing the pin name.
  30. - allwinner,function: Function to mux the pins listed above to.
  31. Optional subnode-properties:
  32. - allwinner,drive: Integer. Represents the current sent to the pin
  33. 0: 10 mA
  34. 1: 20 mA
  35. 2: 30 mA
  36. 3: 40 mA
  37. - allwinner,pull: Integer.
  38. 0: No resistor
  39. 1: Pull-up resistor
  40. 2: Pull-down resistor
  41. Examples:
  42. pio: pinctrl@01c20800 {
  43. compatible = "allwinner,sun5i-a13-pinctrl";
  44. reg = <0x01c20800 0x400>;
  45. #address-cells = <1>;
  46. #size-cells = <0>;
  47. uart1_pins_a: uart1@0 {
  48. allwinner,pins = "PE10", "PE11";
  49. allwinner,function = "uart1";
  50. allwinner,drive = <0>;
  51. allwinner,pull = <0>;
  52. };
  53. uart1_pins_b: uart1@1 {
  54. allwinner,pins = "PG3", "PG4";
  55. allwinner,function = "uart1";
  56. allwinner,drive = <0>;
  57. allwinner,pull = <0>;
  58. };
  59. };
  60. GPIO and interrupt controller
  61. -----------------------------
  62. This hardware also acts as a GPIO controller and an interrupt
  63. controller.
  64. Consumers that would want to refer to one or the other (or both)
  65. should provide through the usual *-gpios and interrupts properties a
  66. cell with 3 arguments, first the number of the bank, then the pin
  67. inside that bank, and finally the flags for the GPIO/interrupts.
  68. Example:
  69. xio: gpio@38 {
  70. compatible = "nxp,pcf8574a";
  71. reg = <0x38>;
  72. gpio-controller;
  73. #gpio-cells = <2>;
  74. interrupt-parent = <&pio>;
  75. interrupts = <6 0 IRQ_TYPE_EDGE_FALLING>;
  76. interrupt-controller;
  77. #interrupt-cells = <2>;
  78. };
  79. reg_usb1_vbus: usb1-vbus {
  80. compatible = "regulator-fixed";
  81. regulator-name = "usb1-vbus";
  82. regulator-min-microvolt = <5000000>;
  83. regulator-max-microvolt = <5000000>;
  84. gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>;
  85. };