xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/meson,pinctrl.txt (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
1c66ec88fSEmmanuel Vadot== Amlogic Meson pinmux controller ==
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotRequired properties for the root node:
4c66ec88fSEmmanuel Vadot - compatible: one of "amlogic,meson8-cbus-pinctrl"
5c66ec88fSEmmanuel Vadot		      "amlogic,meson8b-cbus-pinctrl"
6c66ec88fSEmmanuel Vadot		      "amlogic,meson8m2-cbus-pinctrl"
7c66ec88fSEmmanuel Vadot		      "amlogic,meson8-aobus-pinctrl"
8c66ec88fSEmmanuel Vadot		      "amlogic,meson8b-aobus-pinctrl"
9c66ec88fSEmmanuel Vadot		      "amlogic,meson8m2-aobus-pinctrl"
10c66ec88fSEmmanuel Vadot		      "amlogic,meson-gxbb-periphs-pinctrl"
11c66ec88fSEmmanuel Vadot		      "amlogic,meson-gxbb-aobus-pinctrl"
12c66ec88fSEmmanuel Vadot		      "amlogic,meson-gxl-periphs-pinctrl"
13c66ec88fSEmmanuel Vadot		      "amlogic,meson-gxl-aobus-pinctrl"
14c66ec88fSEmmanuel Vadot		      "amlogic,meson-axg-periphs-pinctrl"
15c66ec88fSEmmanuel Vadot		      "amlogic,meson-axg-aobus-pinctrl"
16c66ec88fSEmmanuel Vadot		      "amlogic,meson-g12a-periphs-pinctrl"
17c66ec88fSEmmanuel Vadot		      "amlogic,meson-g12a-aobus-pinctrl"
18c66ec88fSEmmanuel Vadot		      "amlogic,meson-a1-periphs-pinctrl"
19*c9ccf3a3SEmmanuel Vadot		      "amlogic,meson-s4-periphs-pinctrl"
20c66ec88fSEmmanuel Vadot - reg: address and size of registers controlling irq functionality
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel Vadot=== GPIO sub-nodes ===
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel VadotThe GPIO bank for the controller is represented as a sub-node and it acts as a
25c66ec88fSEmmanuel VadotGPIO controller.
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel VadotRequired properties for sub-nodes are:
28c66ec88fSEmmanuel Vadot - reg: should contain a list of address and size, one tuple for each entry
29c66ec88fSEmmanuel Vadot   in reg-names.
30c66ec88fSEmmanuel Vadot - reg-names: an array of strings describing the "reg" entries.
31c66ec88fSEmmanuel Vadot   Must contain "mux" and "gpio".
32c66ec88fSEmmanuel Vadot   May contain "pull", "pull-enable" and "ds" when appropriate.
33c66ec88fSEmmanuel Vadot - gpio-controller: identifies the node as a gpio controller
34c66ec88fSEmmanuel Vadot - #gpio-cells: must be 2
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot=== Other sub-nodes ===
37c66ec88fSEmmanuel Vadot
38c66ec88fSEmmanuel VadotChild nodes without the "gpio-controller" represent some desired
39c66ec88fSEmmanuel Vadotconfiguration for a pin or a group. Those nodes can be pinmux nodes or
40c66ec88fSEmmanuel Vadotconfiguration nodes.
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel VadotRequired properties for pinmux nodes are:
43c66ec88fSEmmanuel Vadot - groups: a list of pinmux groups. The list of all available groups
44c66ec88fSEmmanuel Vadot   depends on the SoC and can be found in driver sources.
45c66ec88fSEmmanuel Vadot - function: the name of a function to activate for the specified set
46c66ec88fSEmmanuel Vadot   of groups. The list of all available functions depends on the SoC
47c66ec88fSEmmanuel Vadot   and can be found in driver sources.
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel VadotRequired properties for configuration nodes:
50c66ec88fSEmmanuel Vadot - pins: a list of pin names
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel VadotConfiguration nodes support the following generic properties, as
53c66ec88fSEmmanuel Vadotdescribed in file pinctrl-bindings.txt:
54c66ec88fSEmmanuel Vadot - "bias-disable"
55c66ec88fSEmmanuel Vadot - "bias-pull-up"
56c66ec88fSEmmanuel Vadot - "bias-pull-down"
57c66ec88fSEmmanuel Vadot - "output-enable"
58c66ec88fSEmmanuel Vadot - "output-disable"
59c66ec88fSEmmanuel Vadot - "output-low"
60c66ec88fSEmmanuel Vadot - "output-high"
61c66ec88fSEmmanuel Vadot
62c66ec88fSEmmanuel VadotOptional properties :
63c66ec88fSEmmanuel Vadot - drive-strength-microamp: Drive strength for the specified pins in uA.
64c66ec88fSEmmanuel Vadot			    This property is only valid for G12A and newer.
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel Vadot=== Example ===
67c66ec88fSEmmanuel Vadot
68c66ec88fSEmmanuel Vadot	pinctrl: pinctrl@c1109880 {
69c66ec88fSEmmanuel Vadot		compatible = "amlogic,meson8-cbus-pinctrl";
70c66ec88fSEmmanuel Vadot		reg = <0xc1109880 0x10>;
71c66ec88fSEmmanuel Vadot		#address-cells = <1>;
72c66ec88fSEmmanuel Vadot		#size-cells = <1>;
73c66ec88fSEmmanuel Vadot		ranges;
74c66ec88fSEmmanuel Vadot
75c66ec88fSEmmanuel Vadot		gpio: banks@c11080b0 {
76c66ec88fSEmmanuel Vadot			reg = <0xc11080b0 0x28>,
77c66ec88fSEmmanuel Vadot			      <0xc11080e8 0x18>,
78c66ec88fSEmmanuel Vadot			      <0xc1108120 0x18>,
79c66ec88fSEmmanuel Vadot			      <0xc1108030 0x30>;
80c66ec88fSEmmanuel Vadot			reg-names = "mux", "pull", "pull-enable", "gpio";
81c66ec88fSEmmanuel Vadot			gpio-controller;
82c66ec88fSEmmanuel Vadot			#gpio-cells = <2>;
83c66ec88fSEmmanuel Vadot               };
84c66ec88fSEmmanuel Vadot
85c66ec88fSEmmanuel Vadot		nand {
86c66ec88fSEmmanuel Vadot			mux {
87c66ec88fSEmmanuel Vadot				groups = "nand_io", "nand_io_ce0", "nand_io_ce1",
88c66ec88fSEmmanuel Vadot					 "nand_io_rb0", "nand_ale", "nand_cle",
89c66ec88fSEmmanuel Vadot					 "nand_wen_clk", "nand_ren_clk", "nand_dqs",
90c66ec88fSEmmanuel Vadot					 "nand_ce2", "nand_ce3";
91c66ec88fSEmmanuel Vadot				function = "nand";
92c66ec88fSEmmanuel Vadot			};
93c66ec88fSEmmanuel Vadot		};
94c66ec88fSEmmanuel Vadot	};
95