meson,pinctrl.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. == Amlogic Meson pinmux controller ==
  2. Required properties for the root node:
  3. - compatible: "amlogic,meson8-pinctrl" or "amlogic,meson8b-pinctrl"
  4. - reg: address and size of registers controlling irq functionality
  5. === GPIO sub-nodes ===
  6. The 2 power domains of the controller (regular and always-on) are
  7. represented as sub-nodes and each of them acts as a GPIO controller.
  8. Required properties for sub-nodes are:
  9. - reg: should contain address and size for mux, pull-enable, pull and
  10. gpio register sets
  11. - reg-names: an array of strings describing the "reg" entries. Must
  12. contain "mux", "pull" and "gpio". "pull-enable" is optional and
  13. when it is missing the "pull" registers are used instead
  14. - gpio-controller: identifies the node as a gpio controller
  15. - #gpio-cells: must be 2
  16. Valid sub-node names are:
  17. - "banks" for the regular domain
  18. - "ao-bank" for the always-on domain
  19. === Other sub-nodes ===
  20. Child nodes without the "gpio-controller" represent some desired
  21. configuration for a pin or a group. Those nodes can be pinmux nodes or
  22. configuration nodes.
  23. Required properties for pinmux nodes are:
  24. - groups: a list of pinmux groups. The list of all available groups
  25. depends on the SoC and can be found in driver sources.
  26. - function: the name of a function to activate for the specified set
  27. of groups. The list of all available functions depends on the SoC
  28. and can be found in driver sources.
  29. Required properties for configuration nodes:
  30. - pins: a list of pin names
  31. Configuration nodes support the generic properties "bias-disable",
  32. "bias-pull-up" and "bias-pull-down", described in file
  33. pinctrl-bindings.txt
  34. === Example ===
  35. pinctrl: pinctrl@c1109880 {
  36. compatible = "amlogic,meson8-pinctrl";
  37. reg = <0xc1109880 0x10>;
  38. #address-cells = <1>;
  39. #size-cells = <1>;
  40. ranges;
  41. gpio: banks@c11080b0 {
  42. reg = <0xc11080b0 0x28>,
  43. <0xc11080e8 0x18>,
  44. <0xc1108120 0x18>,
  45. <0xc1108030 0x30>;
  46. reg-names = "mux", "pull", "pull-enable", "gpio";
  47. gpio-controller;
  48. #gpio-cells = <2>;
  49. };
  50. gpio_ao: ao-bank@c1108030 {
  51. reg = <0xc8100014 0x4>,
  52. <0xc810002c 0x4>,
  53. <0xc8100024 0x8>;
  54. reg-names = "mux", "pull", "gpio";
  55. gpio-controller;
  56. #gpio-cells = <2>;
  57. };
  58. nand {
  59. mux {
  60. groups = "nand_io", "nand_io_ce0", "nand_io_ce1",
  61. "nand_io_rb0", "nand_ale", "nand_cle",
  62. "nand_wen_clk", "nand_ren_clk", "nand_dqs",
  63. "nand_ce2", "nand_ce3";
  64. function = "nand";
  65. };
  66. };
  67. uart_ao_a {
  68. mux {
  69. groups = "uart_tx_ao_a", "uart_rx_ao_a",
  70. "uart_cts_ao_a", "uart_rts_ao_a";
  71. function = "uart_ao";
  72. };
  73. conf {
  74. pins = "GPIOAO_0", "GPIOAO_1",
  75. "GPIOAO_2", "GPIOAO_3";
  76. bias-disable;
  77. };
  78. };
  79. };