Merge tag 'for-linus-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw...
[linux-2.6-microblaze.git] / arch / arm / boot / dts / s5pv210-fascinate4g.dts
1 // SPDX-License-Identifier: GPL-2.0
2
3 /dts-v1/;
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include "s5pv210-aries.dtsi"
7
8 / {
9         model = "Samsung Galaxy S Fascinate 4G (SGH-T959P) based on S5PV210";
10         compatible = "samsung,fascinate4g", "samsung,aries", "samsung,s5pv210";
11
12         chosen {
13                 stdout-path = &uart2;
14         };
15
16         gpio-keys {
17                 compatible = "gpio-keys";
18
19                 power {
20                         label = "power";
21                         gpios = <&gph2 6 GPIO_ACTIVE_LOW>;
22                         linux,code = <KEY_POWER>;
23                         wakeup-source;
24                 };
25
26                 vol-down {
27                         label = "volume_down";
28                         gpios = <&gph3 2 GPIO_ACTIVE_LOW>;
29                         linux,code = <KEY_VOLUMEDOWN>;
30                 };
31
32                 vol-up {
33                         label = "volume_up";
34                         gpios = <&gph3 1 GPIO_ACTIVE_LOW>;
35                         linux,code = <KEY_VOLUMEUP>;
36                 };
37         };
38 };
39
40 &fg {
41         compatible = "maxim,max77836-battery";
42
43         interrupt-parent = <&gph3>;
44         interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
45
46         pinctrl-names = "default";
47         pinctrl-0 = <&fg_irq>;
48 };
49
50 &pinctrl0 {
51         pinctrl-names = "default";
52         pinctrl-0 = <&sleep_cfg>;
53
54         fg_irq: fg-irq {
55                 samsung,pins = "gph3-3";
56                 samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
57                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
58                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
59         };
60
61         /* Based on vendor kernel v2.6.35.7 */
62         sleep_cfg: sleep-cfg {
63                 PIN_SLP(gpa0-0, PREV, NONE);
64                 PIN_SLP(gpa0-1, PREV, NONE);
65                 PIN_SLP(gpa0-2, PREV, NONE);
66                 PIN_SLP(gpa0-3, OUT1, NONE);
67                 PIN_SLP(gpa0-4, PREV, NONE);
68                 PIN_SLP(gpa0-5, PREV, NONE);
69                 PIN_SLP(gpa0-6, PREV, NONE);
70                 PIN_SLP(gpa0-7, PREV, NONE);
71
72                 PIN_SLP(gpa1-0, INPUT, DOWN);
73                 PIN_SLP(gpa1-1, OUT0, NONE);
74                 PIN_SLP(gpa1-2, INPUT, DOWN);
75                 PIN_SLP(gpa1-3, OUT0, NONE);
76
77                 PIN_SLP(gpb-0, OUT0, NONE);
78                 PIN_SLP(gpb-1, OUT1, NONE);
79                 PIN_SLP(gpb-2, OUT0, NONE);
80                 PIN_SLP(gpb-3, PREV, NONE);
81                 PIN_SLP(gpb-4, INPUT, NONE);
82                 PIN_SLP(gpb-5, PREV, NONE);
83                 PIN_SLP(gpb-6, INPUT, DOWN);
84                 PIN_SLP(gpb-7, OUT0, NONE);
85
86                 PIN_SLP(gpc0-0, OUT0, NONE);
87                 PIN_SLP(gpc0-1, INPUT, DOWN);
88                 PIN_SLP(gpc0-2, OUT0, NONE);
89                 PIN_SLP(gpc0-3, INPUT, DOWN);
90                 PIN_SLP(gpc0-4, OUT0, NONE);
91
92                 PIN_SLP(gpc1-0, INPUT, DOWN);
93                 PIN_SLP(gpc1-1, INPUT, DOWN);
94                 PIN_SLP(gpc1-2, INPUT, DOWN);
95                 PIN_SLP(gpc1-3, INPUT, DOWN);
96                 PIN_SLP(gpc1-4, INPUT, DOWN);
97
98                 PIN_SLP(gpd0-0, INPUT, DOWN);
99                 PIN_SLP(gpd0-1, OUT0, NONE);
100                 PIN_SLP(gpd0-2, INPUT, DOWN);
101                 PIN_SLP(gpd0-3, INPUT, DOWN);
102
103                 PIN_SLP(gpd1-0, INPUT, NONE);
104                 PIN_SLP(gpd1-1, INPUT, NONE);
105                 PIN_SLP(gpd1-2, INPUT, DOWN);
106                 PIN_SLP(gpd1-3, INPUT, DOWN);
107                 PIN_SLP(gpd1-4, INPUT, DOWN);
108                 PIN_SLP(gpd1-5, INPUT, DOWN);
109
110                 PIN_SLP(gpe0-0, INPUT, DOWN);
111                 PIN_SLP(gpe0-1, INPUT, DOWN);
112                 PIN_SLP(gpe0-2, INPUT, DOWN);
113                 PIN_SLP(gpe0-3, INPUT, DOWN);
114                 PIN_SLP(gpe0-4, INPUT, DOWN);
115                 PIN_SLP(gpe0-5, INPUT, DOWN);
116                 PIN_SLP(gpe0-6, INPUT, DOWN);
117                 PIN_SLP(gpe0-7, INPUT, DOWN);
118
119                 PIN_SLP(gpe1-0, INPUT, DOWN);
120                 PIN_SLP(gpe1-1, INPUT, DOWN);
121                 PIN_SLP(gpe1-2, INPUT, DOWN);
122                 PIN_SLP(gpe1-3, OUT0, NONE);
123                 PIN_SLP(gpe1-4, INPUT, DOWN);
124
125                 PIN_SLP(gpf0-0, OUT0, NONE);
126                 PIN_SLP(gpf0-1, OUT0, NONE);
127                 PIN_SLP(gpf0-2, OUT0, NONE);
128                 PIN_SLP(gpf0-3, OUT0, NONE);
129                 PIN_SLP(gpf0-4, OUT0, NONE);
130                 PIN_SLP(gpf0-5, OUT0, NONE);
131                 PIN_SLP(gpf0-6, OUT0, NONE);
132                 PIN_SLP(gpf0-7, OUT0, NONE);
133
134                 PIN_SLP(gpf1-0, OUT0, NONE);
135                 PIN_SLP(gpf1-1, OUT0, NONE);
136                 PIN_SLP(gpf1-2, OUT0, NONE);
137                 PIN_SLP(gpf1-3, OUT0, NONE);
138                 PIN_SLP(gpf1-4, OUT0, NONE);
139                 PIN_SLP(gpf1-5, OUT0, NONE);
140                 PIN_SLP(gpf1-6, OUT0, NONE);
141                 PIN_SLP(gpf1-7, OUT0, NONE);
142
143                 PIN_SLP(gpf2-0, OUT0, NONE);
144                 PIN_SLP(gpf2-1, OUT0, NONE);
145                 PIN_SLP(gpf2-2, OUT0, NONE);
146                 PIN_SLP(gpf2-3, OUT0, NONE);
147                 PIN_SLP(gpf2-4, OUT0, NONE);
148                 PIN_SLP(gpf2-5, OUT0, NONE);
149                 PIN_SLP(gpf2-6, OUT0, NONE);
150                 PIN_SLP(gpf2-7, OUT0, NONE);
151
152                 PIN_SLP(gpf3-0, OUT0, NONE);
153                 PIN_SLP(gpf3-1, OUT0, NONE);
154                 PIN_SLP(gpf3-2, OUT0, NONE);
155                 PIN_SLP(gpf3-3, OUT0, NONE);
156                 PIN_SLP(gpf3-4, PREV, NONE);
157                 PIN_SLP(gpf3-5, INPUT, DOWN);
158
159                 PIN_SLP(gpg0-0, INPUT, DOWN);
160                 PIN_SLP(gpg0-1, INPUT, DOWN);
161                 PIN_SLP(gpg0-2, INPUT, NONE);
162                 PIN_SLP(gpg0-3, INPUT, DOWN);
163                 PIN_SLP(gpg0-4, INPUT, DOWN);
164                 PIN_SLP(gpg0-5, INPUT, DOWN);
165                 PIN_SLP(gpg0-6, INPUT, DOWN);
166
167                 PIN_SLP(gpg1-0, OUT0, NONE);
168                 PIN_SLP(gpg1-1, OUT1, NONE);
169                 PIN_SLP(gpg1-2, PREV, NONE);
170                 PIN_SLP(gpg1-3, OUT1, NONE);
171                 PIN_SLP(gpg1-4, OUT1, NONE);
172                 PIN_SLP(gpg1-5, OUT1, NONE);
173                 PIN_SLP(gpg1-6, OUT1, NONE);
174
175                 PIN_SLP(gpg2-0, OUT0, NONE);
176                 PIN_SLP(gpg2-1, OUT0, NONE);
177                 PIN_SLP(gpg2-2, INPUT, NONE);
178                 PIN_SLP(gpg2-3, OUT0, NONE);
179                 PIN_SLP(gpg2-4, OUT0, NONE);
180                 PIN_SLP(gpg2-5, OUT0, NONE);
181                 PIN_SLP(gpg2-6, OUT0, NONE);
182
183                 PIN_SLP(gpg3-0, PREV, UP);
184                 PIN_SLP(gpg3-1, PREV, UP);
185                 PIN_SLP(gpg3-2, INPUT, NONE);
186                 PIN_SLP(gpg3-3, INPUT, DOWN);
187                 PIN_SLP(gpg3-4, OUT0, NONE);
188                 PIN_SLP(gpg3-5, OUT0, NONE);
189                 PIN_SLP(gpg3-6, INPUT, DOWN);
190
191                 PIN_SLP(gpi-0, PREV, NONE);
192                 PIN_SLP(gpi-1, INPUT, DOWN);
193                 PIN_SLP(gpi-2, PREV, NONE);
194                 PIN_SLP(gpi-3, PREV, NONE);
195                 PIN_SLP(gpi-4, PREV, NONE);
196                 PIN_SLP(gpi-5, INPUT, DOWN);
197                 PIN_SLP(gpi-6, INPUT, DOWN);
198
199                 PIN_SLP(gpj0-0, INPUT, NONE);
200                 PIN_SLP(gpj0-1, INPUT, NONE);
201                 PIN_SLP(gpj0-2, INPUT, NONE);
202                 PIN_SLP(gpj0-3, INPUT, NONE);
203                 PIN_SLP(gpj0-4, INPUT, NONE);
204                 PIN_SLP(gpj0-5, INPUT, DOWN);
205                 PIN_SLP(gpj0-6, OUT0, NONE);
206                 PIN_SLP(gpj0-7, INPUT, NONE);
207
208                 PIN_SLP(gpj1-0, OUT1, NONE);
209                 PIN_SLP(gpj1-1, OUT0, NONE);
210                 PIN_SLP(gpj1-2, INPUT, DOWN);
211                 PIN_SLP(gpj1-3, PREV, NONE);
212                 PIN_SLP(gpj1-4, PREV, NONE);
213                 PIN_SLP(gpj1-5, OUT0, NONE);
214
215                 PIN_SLP(gpj2-0, INPUT, DOWN);
216                 PIN_SLP(gpj2-1, INPUT, DOWN);
217                 PIN_SLP(gpj2-2, OUT0, NONE);
218                 PIN_SLP(gpj2-3, INPUT, DOWN);
219                 PIN_SLP(gpj2-4, INPUT, DOWN);
220                 PIN_SLP(gpj2-5, PREV, NONE);
221                 PIN_SLP(gpj2-6, PREV, NONE);
222                 PIN_SLP(gpj2-7, INPUT, DOWN);
223
224                 PIN_SLP(gpj3-0, INPUT, NONE);
225                 PIN_SLP(gpj3-1, INPUT, NONE);
226                 PIN_SLP(gpj3-2, OUT0, NONE);
227                 PIN_SLP(gpj3-3, INPUT, DOWN);
228                 PIN_SLP(gpj3-4, INPUT, NONE);
229                 PIN_SLP(gpj3-5, INPUT, NONE);
230                 PIN_SLP(gpj3-6, INPUT, NONE);
231                 PIN_SLP(gpj3-7, INPUT, NONE);
232
233                 PIN_SLP(gpj4-0, INPUT, NONE);
234                 PIN_SLP(gpj4-1, INPUT, DOWN);
235                 PIN_SLP(gpj4-2, PREV, NONE);
236                 PIN_SLP(gpj4-3, INPUT, NONE);
237                 PIN_SLP(gpj4-4, INPUT, DOWN);
238
239                 PIN_SLP(mp01-0, OUT1, NONE);
240                 PIN_SLP(mp01-1, OUT0, NONE);
241                 PIN_SLP(mp01-2, INPUT, DOWN);
242                 PIN_SLP(mp01-3, INPUT, DOWN);
243                 PIN_SLP(mp01-4, OUT1, NONE);
244                 PIN_SLP(mp01-5, INPUT, DOWN);
245                 PIN_SLP(mp01-6, INPUT, DOWN);
246                 PIN_SLP(mp01-7, INPUT, DOWN);
247
248                 PIN_SLP(mp02-0, INPUT, DOWN);
249                 PIN_SLP(mp02-1, INPUT, DOWN);
250                 PIN_SLP(mp02-2, INPUT, NONE);
251                 PIN_SLP(mp02-3, INPUT, DOWN);
252
253                 PIN_SLP(mp03-0, INPUT, DOWN);
254                 PIN_SLP(mp03-1, INPUT, DOWN);
255                 PIN_SLP(mp03-2, OUT1, NONE);
256                 PIN_SLP(mp03-3, OUT0, NONE);
257                 PIN_SLP(mp03-4, INPUT, NONE);
258                 PIN_SLP(mp03-5, OUT0, NONE);
259                 PIN_SLP(mp03-6, INPUT, DOWN);
260                 PIN_SLP(mp03-7, INPUT, DOWN);
261
262                 PIN_SLP(mp04-0, INPUT, DOWN);
263                 PIN_SLP(mp04-1, OUT0, NONE);
264                 PIN_SLP(mp04-2, INPUT, DOWN);
265                 PIN_SLP(mp04-3, OUT0, NONE);
266                 PIN_SLP(mp04-4, INPUT, DOWN);
267                 PIN_SLP(mp04-5, INPUT, DOWN);
268                 PIN_SLP(mp04-6, OUT0, NONE);
269                 PIN_SLP(mp04-7, INPUT, DOWN);
270
271                 PIN_SLP(mp05-0, INPUT, NONE);
272                 PIN_SLP(mp05-1, INPUT, NONE);
273                 PIN_SLP(mp05-2, INPUT, NONE);
274                 PIN_SLP(mp05-3, INPUT, NONE);
275                 PIN_SLP(mp05-4, INPUT, DOWN);
276                 PIN_SLP(mp05-5, OUT0, NONE);
277                 PIN_SLP(mp05-6, INPUT, DOWN);
278                 PIN_SLP(mp05-7, PREV, NONE);
279
280                 PIN_SLP(mp06-0, INPUT, DOWN);
281                 PIN_SLP(mp06-1, INPUT, DOWN);
282                 PIN_SLP(mp06-2, INPUT, DOWN);
283                 PIN_SLP(mp06-3, INPUT, DOWN);
284                 PIN_SLP(mp06-4, INPUT, DOWN);
285                 PIN_SLP(mp06-5, INPUT, DOWN);
286                 PIN_SLP(mp06-6, INPUT, DOWN);
287                 PIN_SLP(mp06-7, INPUT, DOWN);
288
289                 PIN_SLP(mp07-0, INPUT, DOWN);
290                 PIN_SLP(mp07-1, INPUT, DOWN);
291                 PIN_SLP(mp07-2, INPUT, DOWN);
292                 PIN_SLP(mp07-3, INPUT, DOWN);
293                 PIN_SLP(mp07-4, INPUT, DOWN);
294                 PIN_SLP(mp07-5, INPUT, DOWN);
295                 PIN_SLP(mp07-6, INPUT, DOWN);
296                 PIN_SLP(mp07-7, INPUT, DOWN);
297         };
298 };
299
300 &wm8994 {
301         /* GPIO3 (BCLK2) and GPIO4 (LRCLK2) as outputs */
302         wlf,gpio-cfg = <0xa101 0x8100 0x8100 0x8100 0x8100 0xa101
303                         0x0100 0x8100 0x0100 0x0100 0x0100>;
304 };