xref: /linux/Documentation/devicetree/bindings/pinctrl/ste,nomadik.txt (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
1e32af889SGabriel FernandezST Ericsson Nomadik pinmux controller
2e32af889SGabriel Fernandez
3e32af889SGabriel FernandezRequired properties:
45dc26af1SLee Jones- compatible: "stericsson,db8500-pinctrl", "stericsson,db8540-pinctrl",
55dc26af1SLee Jones              "stericsson,stn8815-pinctrl"
6*ab4a9362SLinus Walleij- nomadik-gpio-chips: array of phandles to the corresponding GPIO chips
7*ab4a9362SLinus Walleij              (these have the register ranges used by the pin controller).
8*ab4a9362SLinus Walleij- prcm: phandle to the PRCMU managing the back end of this pin controller
9e32af889SGabriel Fernandez
10e32af889SGabriel FernandezPlease refer to pinctrl-bindings.txt in this directory for details of the
11e32af889SGabriel Fernandezcommon pinctrl bindings used by client devices, including the meaning of the
12e32af889SGabriel Fernandezphrase "pin configuration node".
13e32af889SGabriel Fernandez
14e32af889SGabriel FernandezST Ericsson's pin configuration nodes act as a container for an arbitrary number of
15e32af889SGabriel Fernandezsubnodes. Each of these subnodes represents some desired configuration for a
16e32af889SGabriel Fernandezpin, a group, or a list of pins or groups. This configuration can include the
17e32af889SGabriel Fernandezmux function to select on those pin(s)/group(s), and various pin configuration
18e32af889SGabriel Fernandezparameters, such as input, output, pull up, pull down...
19e32af889SGabriel Fernandez
20e32af889SGabriel FernandezThe name of each subnode is not important; all subnodes should be enumerated
212ef2a489SLinus Walleijand processed purely based on their content. The subnodes use the generic
222ef2a489SLinus Walleijpin multiplexing node layout from the standard pin control bindings
232ef2a489SLinus Walleij(see pinctrl-bindings.txt):
24e32af889SGabriel Fernandez
252ef2a489SLinus WalleijRequired pin multiplexing subnode properties:
262ef2a489SLinus Walleij- function: A string containing the name of the function to mux to the
27e32af889SGabriel Fernandez  pin or group.
282ef2a489SLinus Walleij- groups : An array of strings. Each string contains the name of a pin
292ef2a489SLinus Walleij  group that will be combined with the function to form a multiplexing
302ef2a489SLinus Walleij  set-up.
31e32af889SGabriel Fernandez
322ef2a489SLinus WalleijRequired pin configuration subnode properties:
332ef2a489SLinus Walleij- pins: A string array describing the pins affected by the configuration
342ef2a489SLinus Walleij  in the node.
352ef2a489SLinus Walleij- ste,config: Handle of pin configuration node
362ef2a489SLinus Walleij  (e.g. ste,config = <&slpm_in_wkup_pdis>)
37e32af889SGabriel Fernandez
38e32af889SGabriel Fernandez- ste,input : <0/1/2>
39e32af889SGabriel Fernandez	0: input with no pull
40e32af889SGabriel Fernandez	1: input with pull up,
41e32af889SGabriel Fernandez	2: input with pull down,
42e32af889SGabriel Fernandez
43e32af889SGabriel Fernandez- ste,output: <0/1/2>
44e32af889SGabriel Fernandez	0: output low,
45e32af889SGabriel Fernandez	1: output high,
46e32af889SGabriel Fernandez	2: output (value is not specified).
47e32af889SGabriel Fernandez
48e32af889SGabriel Fernandez- ste,sleep: <0/1>
49e32af889SGabriel Fernandez	0: sleep mode disable,
50e32af889SGabriel Fernandez	1: sleep mode enable.
51e32af889SGabriel Fernandez
52e32af889SGabriel Fernandez- ste,sleep-input: <0/1/2/3>
53e32af889SGabriel Fernandez	0: sleep input with no pull,
54e32af889SGabriel Fernandez	1: sleep input with pull up,
55e32af889SGabriel Fernandez	2: sleep input with pull down.
56e32af889SGabriel Fernandez	3: sleep input and keep last input configuration (no pull, pull up or pull down).
57e32af889SGabriel Fernandez
58e32af889SGabriel Fernandez- ste,sleep-output: <0/1/2>
59e32af889SGabriel Fernandez	0: sleep output low,
60e32af889SGabriel Fernandez	1: sleep output high,
61e32af889SGabriel Fernandez	2: sleep output (value is not specified).
62e32af889SGabriel Fernandez
63e32af889SGabriel Fernandez- ste,sleep-gpio: <0/1>
64e32af889SGabriel Fernandez	0: disable sleep gpio mode,
65e32af889SGabriel Fernandez	1: enable sleep gpio mode.
66e32af889SGabriel Fernandez
67e32af889SGabriel Fernandez- ste,sleep-wakeup: <0/1>
68e32af889SGabriel Fernandez	0: wake-up detection enabled,
69e32af889SGabriel Fernandez	1: wake-up detection disabled.
70e32af889SGabriel Fernandez
71e32af889SGabriel Fernandez- ste,sleep-pull-disable: <0/1>
72e32af889SGabriel Fernandez	0: GPIO pull-up or pull-down resistor is enabled, when pin is an input,
73e32af889SGabriel Fernandez	1: GPIO pull-up and pull-down resistor are disabled.
74e32af889SGabriel Fernandez
75e32af889SGabriel FernandezExample board file extract:
76e32af889SGabriel Fernandez
77e32af889SGabriel Fernandez	pinctrl@80157000 {
785dc26af1SLee Jones		compatible = "stericsson,db8500-pinctrl";
79*ab4a9362SLinus Walleij		nomadik-gpio-chips = <&gpio0>, <&gpio1>, <&gpio2>, <&gpio3>;
80*ab4a9362SLinus Walleij		prcm = <&prcmu>;
81e32af889SGabriel Fernandez
82e32af889SGabriel Fernandez		pinctrl-names = "default";
83e32af889SGabriel Fernandez
84e32af889SGabriel Fernandez		slpm_in_wkup_pdis: slpm_in_wkup_pdis {
85e32af889SGabriel Fernandez			ste,sleep = <1>;
86e32af889SGabriel Fernandez			ste,sleep-input = <3>;
87e32af889SGabriel Fernandez			ste,sleep-wakeup = <1>;
88e32af889SGabriel Fernandez			ste,sleep-pull-disable = <0>;
89e32af889SGabriel Fernandez		};
90e32af889SGabriel Fernandez
91e32af889SGabriel Fernandez		slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis {
92e32af889SGabriel Fernandez			ste,sleep = <1>;
93e32af889SGabriel Fernandez			ste,sleep-output = <1>;
94e32af889SGabriel Fernandez			ste,sleep-wakeup = <1>;
95e32af889SGabriel Fernandez			ste,sleep-pull-disable = <0>;
96e32af889SGabriel Fernandez		};
97e32af889SGabriel Fernandez
98e32af889SGabriel Fernandez		slpm_out_wkup_pdis: slpm_out_wkup_pdis {
99e32af889SGabriel Fernandez			ste,sleep = <1>;
100e32af889SGabriel Fernandez			ste,sleep-output = <2>;
101e32af889SGabriel Fernandez			ste,sleep-wakeup = <1>;
102e32af889SGabriel Fernandez			ste,sleep-pull-disable = <0>;
103e32af889SGabriel Fernandez		};
104e32af889SGabriel Fernandez
105e32af889SGabriel Fernandez		uart0 {
106e32af889SGabriel Fernandez			uart0_default_mux: uart0_mux {
107e32af889SGabriel Fernandez				u0_default_mux {
1082ef2a489SLinus Walleij					function = "u0";
1092ef2a489SLinus Walleij					pins = "u0_a_1";
110e32af889SGabriel Fernandez				};
111e32af889SGabriel Fernandez			};
112e32af889SGabriel Fernandez			uart0_default_mode: uart0_default {
113e32af889SGabriel Fernandez				uart0_default_cfg1 {
1142ef2a489SLinus Walleij					pins = "GPIO0", "GPIO2";
115e32af889SGabriel Fernandez					ste,input = <1>;
116e32af889SGabriel Fernandez				};
117e32af889SGabriel Fernandez
118e32af889SGabriel Fernandez				uart0_default_cfg2 {
1192ef2a489SLinus Walleij					pins = "GPIO1", "GPIO3";
120e32af889SGabriel Fernandez					ste,output = <1>;
121e32af889SGabriel Fernandez				};
122e32af889SGabriel Fernandez			};
123e32af889SGabriel Fernandez			uart0_sleep_mode: uart0_sleep {
124e32af889SGabriel Fernandez				uart0_sleep_cfg1 {
1252ef2a489SLinus Walleij					pins = "GPIO0", "GPIO2";
126e32af889SGabriel Fernandez					ste,config = <&slpm_in_wkup_pdis>;
127e32af889SGabriel Fernandez				};
128e32af889SGabriel Fernandez				uart0_sleep_cfg2 {
1292ef2a489SLinus Walleij					pins = "GPIO1";
130e32af889SGabriel Fernandez					ste,config = <&slpm_out_hi_wkup_pdis>;
131e32af889SGabriel Fernandez				};
132e32af889SGabriel Fernandez				uart0_sleep_cfg3 {
1332ef2a489SLinus Walleij					pins = "GPIO3";
134e32af889SGabriel Fernandez					ste,config = <&slpm_out_wkup_pdis>;
135e32af889SGabriel Fernandez				};
136e32af889SGabriel Fernandez			};
137e32af889SGabriel Fernandez		};
138e32af889SGabriel Fernandez	};
139e32af889SGabriel Fernandez
140e32af889SGabriel Fernandez	uart@80120000 {
141e32af889SGabriel Fernandez		compatible = "arm,pl011", "arm,primecell";
142e32af889SGabriel Fernandez		reg = <0x80120000 0x1000>;
143e32af889SGabriel Fernandez		interrupts = <0 11 0x4>;
144e32af889SGabriel Fernandez
145e32af889SGabriel Fernandez		pinctrl-names = "default","sleep";
146e32af889SGabriel Fernandez		pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>;
147e32af889SGabriel Fernandez		pinctrl-1 = <&uart0_sleep_mode>;
148e32af889SGabriel Fernandez	};
149