18c2ecf20Sopenharmony_ciST Ericsson Nomadik pinmux controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible: "stericsson,db8500-pinctrl", "stericsson,db8540-pinctrl",
58c2ecf20Sopenharmony_ci              "stericsson,stn8815-pinctrl"
68c2ecf20Sopenharmony_ci- nomadik-gpio-chips: array of phandles to the corresponding GPIO chips
78c2ecf20Sopenharmony_ci              (these have the register ranges used by the pin controller).
88c2ecf20Sopenharmony_ci- prcm: phandle to the PRCMU managing the back end of this pin controller
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciPlease refer to pinctrl-bindings.txt in this directory for details of the
118c2ecf20Sopenharmony_cicommon pinctrl bindings used by client devices, including the meaning of the
128c2ecf20Sopenharmony_ciphrase "pin configuration node".
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciST Ericsson's pin configuration nodes act as a container for an arbitrary number of
158c2ecf20Sopenharmony_cisubnodes. Each of these subnodes represents some desired configuration for a
168c2ecf20Sopenharmony_cipin, a group, or a list of pins or groups. This configuration can include the
178c2ecf20Sopenharmony_cimux function to select on those pin(s)/group(s), and various pin configuration
188c2ecf20Sopenharmony_ciparameters, such as input, output, pull up, pull down...
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciThe name of each subnode is not important; all subnodes should be enumerated
218c2ecf20Sopenharmony_ciand processed purely based on their content. The subnodes use the generic
228c2ecf20Sopenharmony_cipin multiplexing node layout from the standard pin control bindings
238c2ecf20Sopenharmony_ci(see pinctrl-bindings.txt):
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciRequired pin multiplexing subnode properties:
268c2ecf20Sopenharmony_ci- function: A string containing the name of the function to mux to the
278c2ecf20Sopenharmony_ci  pin or group.
288c2ecf20Sopenharmony_ci- groups : An array of strings. Each string contains the name of a pin
298c2ecf20Sopenharmony_ci  group that will be combined with the function to form a multiplexing
308c2ecf20Sopenharmony_ci  set-up.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciRequired pin configuration subnode properties:
338c2ecf20Sopenharmony_ci- pins: A string array describing the pins affected by the configuration
348c2ecf20Sopenharmony_ci  in the node.
358c2ecf20Sopenharmony_ci- ste,config: Handle of pin configuration node
368c2ecf20Sopenharmony_ci  (e.g. ste,config = <&slpm_in_wkup_pdis>)
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci- ste,input : <0/1/2>
398c2ecf20Sopenharmony_ci	0: input with no pull
408c2ecf20Sopenharmony_ci	1: input with pull up,
418c2ecf20Sopenharmony_ci	2: input with pull down,
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci- ste,output: <0/1/2>
448c2ecf20Sopenharmony_ci	0: output low,
458c2ecf20Sopenharmony_ci	1: output high,
468c2ecf20Sopenharmony_ci	2: output (value is not specified).
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci- ste,sleep: <0/1>
498c2ecf20Sopenharmony_ci	0: sleep mode disable,
508c2ecf20Sopenharmony_ci	1: sleep mode enable.
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci- ste,sleep-input: <0/1/2/3>
538c2ecf20Sopenharmony_ci	0: sleep input with no pull,
548c2ecf20Sopenharmony_ci	1: sleep input with pull up,
558c2ecf20Sopenharmony_ci	2: sleep input with pull down.
568c2ecf20Sopenharmony_ci	3: sleep input and keep last input configuration (no pull, pull up or pull down).
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci- ste,sleep-output: <0/1/2>
598c2ecf20Sopenharmony_ci	0: sleep output low,
608c2ecf20Sopenharmony_ci	1: sleep output high,
618c2ecf20Sopenharmony_ci	2: sleep output (value is not specified).
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci- ste,sleep-gpio: <0/1>
648c2ecf20Sopenharmony_ci	0: disable sleep gpio mode,
658c2ecf20Sopenharmony_ci	1: enable sleep gpio mode.
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci- ste,sleep-wakeup: <0/1>
688c2ecf20Sopenharmony_ci	0: wake-up detection enabled,
698c2ecf20Sopenharmony_ci	1: wake-up detection disabled.
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci- ste,sleep-pull-disable: <0/1>
728c2ecf20Sopenharmony_ci	0: GPIO pull-up or pull-down resistor is enabled, when pin is an input,
738c2ecf20Sopenharmony_ci	1: GPIO pull-up and pull-down resistor are disabled.
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ciExample board file extract:
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci	pinctrl@80157000 {
788c2ecf20Sopenharmony_ci		compatible = "stericsson,db8500-pinctrl";
798c2ecf20Sopenharmony_ci		nomadik-gpio-chips = <&gpio0>, <&gpio1>, <&gpio2>, <&gpio3>;
808c2ecf20Sopenharmony_ci		prcm = <&prcmu>;
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ci		pinctrl-names = "default";
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ci		slpm_in_wkup_pdis: slpm_in_wkup_pdis {
858c2ecf20Sopenharmony_ci			ste,sleep = <1>;
868c2ecf20Sopenharmony_ci			ste,sleep-input = <3>;
878c2ecf20Sopenharmony_ci			ste,sleep-wakeup = <1>;
888c2ecf20Sopenharmony_ci			ste,sleep-pull-disable = <0>;
898c2ecf20Sopenharmony_ci		};
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci		slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis {
928c2ecf20Sopenharmony_ci			ste,sleep = <1>;
938c2ecf20Sopenharmony_ci			ste,sleep-output = <1>;
948c2ecf20Sopenharmony_ci			ste,sleep-wakeup = <1>;
958c2ecf20Sopenharmony_ci			ste,sleep-pull-disable = <0>;
968c2ecf20Sopenharmony_ci		};
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci		slpm_out_wkup_pdis: slpm_out_wkup_pdis {
998c2ecf20Sopenharmony_ci			ste,sleep = <1>;
1008c2ecf20Sopenharmony_ci			ste,sleep-output = <2>;
1018c2ecf20Sopenharmony_ci			ste,sleep-wakeup = <1>;
1028c2ecf20Sopenharmony_ci			ste,sleep-pull-disable = <0>;
1038c2ecf20Sopenharmony_ci		};
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci		uart0 {
1068c2ecf20Sopenharmony_ci			uart0_default_mux: uart0_mux {
1078c2ecf20Sopenharmony_ci				u0_default_mux {
1088c2ecf20Sopenharmony_ci					function = "u0";
1098c2ecf20Sopenharmony_ci					pins = "u0_a_1";
1108c2ecf20Sopenharmony_ci				};
1118c2ecf20Sopenharmony_ci			};
1128c2ecf20Sopenharmony_ci			uart0_default_mode: uart0_default {
1138c2ecf20Sopenharmony_ci				uart0_default_cfg1 {
1148c2ecf20Sopenharmony_ci					pins = "GPIO0", "GPIO2";
1158c2ecf20Sopenharmony_ci					ste,input = <1>;
1168c2ecf20Sopenharmony_ci				};
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci				uart0_default_cfg2 {
1198c2ecf20Sopenharmony_ci					pins = "GPIO1", "GPIO3";
1208c2ecf20Sopenharmony_ci					ste,output = <1>;
1218c2ecf20Sopenharmony_ci				};
1228c2ecf20Sopenharmony_ci			};
1238c2ecf20Sopenharmony_ci			uart0_sleep_mode: uart0_sleep {
1248c2ecf20Sopenharmony_ci				uart0_sleep_cfg1 {
1258c2ecf20Sopenharmony_ci					pins = "GPIO0", "GPIO2";
1268c2ecf20Sopenharmony_ci					ste,config = <&slpm_in_wkup_pdis>;
1278c2ecf20Sopenharmony_ci				};
1288c2ecf20Sopenharmony_ci				uart0_sleep_cfg2 {
1298c2ecf20Sopenharmony_ci					pins = "GPIO1";
1308c2ecf20Sopenharmony_ci					ste,config = <&slpm_out_hi_wkup_pdis>;
1318c2ecf20Sopenharmony_ci				};
1328c2ecf20Sopenharmony_ci				uart0_sleep_cfg3 {
1338c2ecf20Sopenharmony_ci					pins = "GPIO3";
1348c2ecf20Sopenharmony_ci					ste,config = <&slpm_out_wkup_pdis>;
1358c2ecf20Sopenharmony_ci				};
1368c2ecf20Sopenharmony_ci			};
1378c2ecf20Sopenharmony_ci		};
1388c2ecf20Sopenharmony_ci	};
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ci	uart@80120000 {
1418c2ecf20Sopenharmony_ci		compatible = "arm,pl011", "arm,primecell";
1428c2ecf20Sopenharmony_ci		reg = <0x80120000 0x1000>;
1438c2ecf20Sopenharmony_ci		interrupts = <0 11 0x4>;
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ci		pinctrl-names = "default","sleep";
1468c2ecf20Sopenharmony_ci		pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>;
1478c2ecf20Sopenharmony_ci		pinctrl-1 = <&uart0_sleep_mode>;
1488c2ecf20Sopenharmony_ci	};
149