Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[pandora-kernel.git] / Documentation / devicetree / bindings / pinctrl / ste,nomadik.txt
1 ST Ericsson Nomadik pinmux controller
2
3 Required properties:
4 - compatible: "stericsson,nmk-pinctrl", "stericsson,nmk-pinctrl-db8540",
5               "stericsson,nmk-pinctrl-stn8815"
6 - reg: Should contain the register physical address and length of the PRCMU.
7
8 Please refer to pinctrl-bindings.txt in this directory for details of the
9 common pinctrl bindings used by client devices, including the meaning of the
10 phrase "pin configuration node".
11
12 ST Ericsson's pin configuration nodes act as a container for an arbitrary number of
13 subnodes. Each of these subnodes represents some desired configuration for a
14 pin, a group, or a list of pins or groups. This configuration can include the
15 mux function to select on those pin(s)/group(s), and various pin configuration
16 parameters, such as input, output, pull up, pull down...
17
18 The name of each subnode is not important; all subnodes should be enumerated
19 and processed purely based on their content.
20
21 Required subnode-properties:
22 - ste,pins : An array of strings. Each string contains the name of a pin or
23     group.
24
25 Optional subnode-properties:
26 - ste,function: A string containing the name of the function to mux to the
27   pin or group.
28
29 - ste,config: Handle of pin configuration node (e.g. ste,config = <&slpm_in_wkup_pdis>)
30
31 - ste,input : <0/1/2>
32         0: input with no pull
33         1: input with pull up,
34         2: input with pull down,
35
36 - ste,output: <0/1/2>
37         0: output low,
38         1: output high,
39         2: output (value is not specified).
40
41 - ste,sleep: <0/1>
42         0: sleep mode disable,
43         1: sleep mode enable.
44
45 - ste,sleep-input: <0/1/2/3>
46         0: sleep input with no pull,
47         1: sleep input with pull up,
48         2: sleep input with pull down.
49         3: sleep input and keep last input configuration (no pull, pull up or pull down).
50
51 - ste,sleep-output: <0/1/2>
52         0: sleep output low,
53         1: sleep output high,
54         2: sleep output (value is not specified).
55
56 - ste,sleep-gpio: <0/1>
57         0: disable sleep gpio mode,
58         1: enable sleep gpio mode.
59
60 - ste,sleep-wakeup: <0/1>
61         0: wake-up detection enabled,
62         1: wake-up detection disabled.
63
64 - ste,sleep-pull-disable: <0/1>
65         0: GPIO pull-up or pull-down resistor is enabled, when pin is an input,
66         1: GPIO pull-up and pull-down resistor are disabled.
67
68 Example board file extract:
69
70         pinctrl@80157000 {
71                 compatible = "stericsson,nmk-pinctrl";
72                 reg = <0x80157000 0x2000>;
73
74                 pinctrl-names = "default";
75
76                 slpm_in_wkup_pdis: slpm_in_wkup_pdis {
77                         ste,sleep = <1>;
78                         ste,sleep-input = <3>;
79                         ste,sleep-wakeup = <1>;
80                         ste,sleep-pull-disable = <0>;
81                 };
82
83                 slpm_out_hi_wkup_pdis: slpm_out_hi_wkup_pdis {
84                         ste,sleep = <1>;
85                         ste,sleep-output = <1>;
86                         ste,sleep-wakeup = <1>;
87                         ste,sleep-pull-disable = <0>;
88                 };
89
90                 slpm_out_wkup_pdis: slpm_out_wkup_pdis {
91                         ste,sleep = <1>;
92                         ste,sleep-output = <2>;
93                         ste,sleep-wakeup = <1>;
94                         ste,sleep-pull-disable = <0>;
95                 };
96
97                 uart0 {
98                         uart0_default_mux: uart0_mux {
99                                 u0_default_mux {
100                                         ste,function = "u0";
101                                         ste,pins = "u0_a_1";
102                                 };
103                         };
104                         uart0_default_mode: uart0_default {
105                                 uart0_default_cfg1 {
106                                         ste,pins = "GPIO0", "GPIO2";
107                                         ste,input = <1>;
108                                 };
109
110                                 uart0_default_cfg2 {
111                                         ste,pins = "GPIO1", "GPIO3";
112                                         ste,output = <1>;
113                                 };
114                         };
115                         uart0_sleep_mode: uart0_sleep {
116                                 uart0_sleep_cfg1 {
117                                         ste,pins = "GPIO0", "GPIO2";
118                                         ste,config = <&slpm_in_wkup_pdis>;
119                                 };
120                                 uart0_sleep_cfg2 {
121                                         ste,pins = "GPIO1";
122                                         ste,config = <&slpm_out_hi_wkup_pdis>;
123                                 };
124                                 uart0_sleep_cfg3 {
125                                         ste,pins = "GPIO3";
126                                         ste,config = <&slpm_out_wkup_pdis>;
127                                 };
128                         };
129                 };
130         };
131
132         uart@80120000 {
133                 compatible = "arm,pl011", "arm,primecell";
134                 reg = <0x80120000 0x1000>;
135                 interrupts = <0 11 0x4>;
136
137                 pinctrl-names = "default","sleep";
138                 pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>;
139                 pinctrl-1 = <&uart0_sleep_mode>;
140         };