Merge tag 'for-linus-5.15-1' of git://github.com/cminyard/linux-ipmi
[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         headset_micbias_reg: regulator-fixed-3 {
40                 compatible = "regulator-fixed";
41                 regulator-name = "Headset_Micbias";
42                 gpio = <&gpj2 5 GPIO_ACTIVE_HIGH>;
43                 enable-active-high;
44
45                 pinctrl-names = "default";
46                 pinctrl-0 = <&headset_micbias_ena>;
47         };
48
49         main_micbias_reg: regulator-fixed-4 {
50                 compatible = "regulator-fixed";
51                 regulator-name = "Main_Micbias";
52                 gpio = <&gpj4 2 GPIO_ACTIVE_HIGH>;
53                 enable-active-high;
54
55                 pinctrl-names = "default";
56                 pinctrl-0 = <&main_micbias_ena>;
57         };
58
59         sound {
60                 compatible = "samsung,fascinate4g-wm8994";
61
62                 model = "Fascinate4G";
63
64                 extcon = <&fsa9480>;
65
66                 main-micbias-supply = <&main_micbias_reg>;
67                 headset-micbias-supply = <&headset_micbias_reg>;
68
69                 earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
70
71                 io-channels = <&adc 3>;
72                 io-channel-names = "headset-detect";
73                 headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
74                 headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
75
76                 samsung,audio-routing =
77                         "HP", "HPOUT1L",
78                         "HP", "HPOUT1R",
79
80                         "SPK", "SPKOUTLN",
81                         "SPK", "SPKOUTLP",
82
83                         "RCV", "HPOUT2N",
84                         "RCV", "HPOUT2P",
85
86                         "LINE", "LINEOUT2N",
87                         "LINE", "LINEOUT2P",
88
89                         "IN1LP", "Main Mic",
90                         "IN1LN", "Main Mic",
91
92                         "IN1RP", "Headset Mic",
93                         "IN1RN", "Headset Mic",
94
95                         "Modem Out", "Modem TX",
96                         "Modem RX", "Modem In",
97
98                         "Bluetooth SPK", "TX",
99                         "RX", "Bluetooth Mic";
100
101                 pinctrl-names = "default";
102                 pinctrl-0 = <&headset_det &earpath_sel>;
103
104                 cpu {
105                         sound-dai = <&i2s0>, <&bt_codec>;
106                 };
107
108                 codec {
109                         sound-dai = <&wm8994>;
110                 };
111         };
112 };
113
114 &fg {
115         compatible = "maxim,max77836-battery";
116
117         interrupt-parent = <&gph3>;
118         interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
119
120         pinctrl-names = "default";
121         pinctrl-0 = <&fg_irq>;
122 };
123
124 &pinctrl0 {
125         pinctrl-names = "default";
126         pinctrl-0 = <&sleep_cfg>;
127
128         headset_det: headset-det {
129                 samsung,pins = "gph0-6", "gph3-6";
130                 samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
131                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
132         };
133
134         fg_irq: fg-irq {
135                 samsung,pins = "gph3-3";
136                 samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
137                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
138                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
139         };
140
141         headset_micbias_ena: headset-micbias-ena {
142                 samsung,pins = "gpj2-5";
143                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
144                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
145         };
146
147         earpath_sel: earpath-sel {
148                 samsung,pins = "gpj2-6";
149                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
150                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
151         };
152
153         main_micbias_ena: main-micbias-ena {
154                 samsung,pins = "gpj4-2";
155                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
156                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
157         };
158
159         /* Based on vendor kernel v2.6.35.7 */
160         sleep_cfg: sleep-cfg {
161                 PIN_SLP(gpa0-0, PREV, NONE);
162                 PIN_SLP(gpa0-1, PREV, NONE);
163                 PIN_SLP(gpa0-2, PREV, NONE);
164                 PIN_SLP(gpa0-3, OUT1, NONE);
165                 PIN_SLP(gpa0-4, PREV, NONE);
166                 PIN_SLP(gpa0-5, PREV, NONE);
167                 PIN_SLP(gpa0-6, PREV, NONE);
168                 PIN_SLP(gpa0-7, PREV, NONE);
169
170                 PIN_SLP(gpa1-0, INPUT, DOWN);
171                 PIN_SLP(gpa1-1, OUT0, NONE);
172                 PIN_SLP(gpa1-2, INPUT, DOWN);
173                 PIN_SLP(gpa1-3, OUT0, NONE);
174
175                 PIN_SLP(gpb-0, OUT0, NONE);
176                 PIN_SLP(gpb-1, OUT1, NONE);
177                 PIN_SLP(gpb-2, OUT0, NONE);
178                 PIN_SLP(gpb-3, PREV, NONE);
179                 PIN_SLP(gpb-4, INPUT, NONE);
180                 PIN_SLP(gpb-5, PREV, NONE);
181                 PIN_SLP(gpb-6, INPUT, DOWN);
182                 PIN_SLP(gpb-7, OUT0, NONE);
183
184                 PIN_SLP(gpc0-0, OUT0, NONE);
185                 PIN_SLP(gpc0-1, INPUT, DOWN);
186                 PIN_SLP(gpc0-2, OUT0, NONE);
187                 PIN_SLP(gpc0-3, INPUT, DOWN);
188                 PIN_SLP(gpc0-4, OUT0, NONE);
189
190                 PIN_SLP(gpc1-0, INPUT, DOWN);
191                 PIN_SLP(gpc1-1, INPUT, DOWN);
192                 PIN_SLP(gpc1-2, INPUT, DOWN);
193                 PIN_SLP(gpc1-3, INPUT, DOWN);
194                 PIN_SLP(gpc1-4, INPUT, DOWN);
195
196                 PIN_SLP(gpd0-0, INPUT, DOWN);
197                 PIN_SLP(gpd0-1, OUT0, NONE);
198                 PIN_SLP(gpd0-2, INPUT, DOWN);
199                 PIN_SLP(gpd0-3, INPUT, DOWN);
200
201                 PIN_SLP(gpd1-0, INPUT, NONE);
202                 PIN_SLP(gpd1-1, INPUT, NONE);
203                 PIN_SLP(gpd1-2, INPUT, DOWN);
204                 PIN_SLP(gpd1-3, INPUT, DOWN);
205                 PIN_SLP(gpd1-4, INPUT, DOWN);
206                 PIN_SLP(gpd1-5, INPUT, DOWN);
207
208                 PIN_SLP(gpe0-0, INPUT, DOWN);
209                 PIN_SLP(gpe0-1, INPUT, DOWN);
210                 PIN_SLP(gpe0-2, INPUT, DOWN);
211                 PIN_SLP(gpe0-3, INPUT, DOWN);
212                 PIN_SLP(gpe0-4, INPUT, DOWN);
213                 PIN_SLP(gpe0-5, INPUT, DOWN);
214                 PIN_SLP(gpe0-6, INPUT, DOWN);
215                 PIN_SLP(gpe0-7, INPUT, DOWN);
216
217                 PIN_SLP(gpe1-0, INPUT, DOWN);
218                 PIN_SLP(gpe1-1, INPUT, DOWN);
219                 PIN_SLP(gpe1-2, INPUT, DOWN);
220                 PIN_SLP(gpe1-3, OUT0, NONE);
221                 PIN_SLP(gpe1-4, INPUT, DOWN);
222
223                 PIN_SLP(gpf0-0, OUT0, NONE);
224                 PIN_SLP(gpf0-1, OUT0, NONE);
225                 PIN_SLP(gpf0-2, OUT0, NONE);
226                 PIN_SLP(gpf0-3, OUT0, NONE);
227                 PIN_SLP(gpf0-4, OUT0, NONE);
228                 PIN_SLP(gpf0-5, OUT0, NONE);
229                 PIN_SLP(gpf0-6, OUT0, NONE);
230                 PIN_SLP(gpf0-7, OUT0, NONE);
231
232                 PIN_SLP(gpf1-0, OUT0, NONE);
233                 PIN_SLP(gpf1-1, OUT0, NONE);
234                 PIN_SLP(gpf1-2, OUT0, NONE);
235                 PIN_SLP(gpf1-3, OUT0, NONE);
236                 PIN_SLP(gpf1-4, OUT0, NONE);
237                 PIN_SLP(gpf1-5, OUT0, NONE);
238                 PIN_SLP(gpf1-6, OUT0, NONE);
239                 PIN_SLP(gpf1-7, OUT0, NONE);
240
241                 PIN_SLP(gpf2-0, OUT0, NONE);
242                 PIN_SLP(gpf2-1, OUT0, NONE);
243                 PIN_SLP(gpf2-2, OUT0, NONE);
244                 PIN_SLP(gpf2-3, OUT0, NONE);
245                 PIN_SLP(gpf2-4, OUT0, NONE);
246                 PIN_SLP(gpf2-5, OUT0, NONE);
247                 PIN_SLP(gpf2-6, OUT0, NONE);
248                 PIN_SLP(gpf2-7, OUT0, NONE);
249
250                 PIN_SLP(gpf3-0, OUT0, NONE);
251                 PIN_SLP(gpf3-1, OUT0, NONE);
252                 PIN_SLP(gpf3-2, OUT0, NONE);
253                 PIN_SLP(gpf3-3, OUT0, NONE);
254                 PIN_SLP(gpf3-4, PREV, NONE);
255                 PIN_SLP(gpf3-5, INPUT, DOWN);
256
257                 PIN_SLP(gpg0-0, INPUT, DOWN);
258                 PIN_SLP(gpg0-1, INPUT, DOWN);
259                 PIN_SLP(gpg0-2, INPUT, NONE);
260                 PIN_SLP(gpg0-3, INPUT, DOWN);
261                 PIN_SLP(gpg0-4, INPUT, DOWN);
262                 PIN_SLP(gpg0-5, INPUT, DOWN);
263                 PIN_SLP(gpg0-6, INPUT, DOWN);
264
265                 PIN_SLP(gpg1-0, OUT0, NONE);
266                 PIN_SLP(gpg1-1, OUT1, NONE);
267                 PIN_SLP(gpg1-2, PREV, NONE);
268                 PIN_SLP(gpg1-3, OUT1, NONE);
269                 PIN_SLP(gpg1-4, OUT1, NONE);
270                 PIN_SLP(gpg1-5, OUT1, NONE);
271                 PIN_SLP(gpg1-6, OUT1, NONE);
272
273                 PIN_SLP(gpg2-0, OUT0, NONE);
274                 PIN_SLP(gpg2-1, OUT0, NONE);
275                 PIN_SLP(gpg2-2, INPUT, NONE);
276                 PIN_SLP(gpg2-3, OUT0, NONE);
277                 PIN_SLP(gpg2-4, OUT0, NONE);
278                 PIN_SLP(gpg2-5, OUT0, NONE);
279                 PIN_SLP(gpg2-6, OUT0, NONE);
280
281                 PIN_SLP(gpg3-0, PREV, UP);
282                 PIN_SLP(gpg3-1, PREV, UP);
283                 PIN_SLP(gpg3-2, INPUT, NONE);
284                 PIN_SLP(gpg3-3, INPUT, DOWN);
285                 PIN_SLP(gpg3-4, OUT0, NONE);
286                 PIN_SLP(gpg3-5, OUT0, NONE);
287                 PIN_SLP(gpg3-6, INPUT, DOWN);
288
289                 PIN_SLP(gpi-0, PREV, NONE);
290                 PIN_SLP(gpi-1, INPUT, DOWN);
291                 PIN_SLP(gpi-2, PREV, NONE);
292                 PIN_SLP(gpi-3, PREV, NONE);
293                 PIN_SLP(gpi-4, PREV, NONE);
294                 PIN_SLP(gpi-5, INPUT, DOWN);
295                 PIN_SLP(gpi-6, INPUT, DOWN);
296
297                 PIN_SLP(gpj0-0, INPUT, NONE);
298                 PIN_SLP(gpj0-1, INPUT, NONE);
299                 PIN_SLP(gpj0-2, INPUT, NONE);
300                 PIN_SLP(gpj0-3, INPUT, NONE);
301                 PIN_SLP(gpj0-4, INPUT, NONE);
302                 PIN_SLP(gpj0-5, INPUT, DOWN);
303                 PIN_SLP(gpj0-6, OUT0, NONE);
304                 PIN_SLP(gpj0-7, INPUT, NONE);
305
306                 PIN_SLP(gpj1-0, OUT1, NONE);
307                 PIN_SLP(gpj1-1, OUT0, NONE);
308                 PIN_SLP(gpj1-2, INPUT, DOWN);
309                 PIN_SLP(gpj1-3, PREV, NONE);
310                 PIN_SLP(gpj1-4, PREV, NONE);
311                 PIN_SLP(gpj1-5, OUT0, NONE);
312
313                 PIN_SLP(gpj2-0, INPUT, DOWN);
314                 PIN_SLP(gpj2-1, INPUT, DOWN);
315                 PIN_SLP(gpj2-2, OUT0, NONE);
316                 PIN_SLP(gpj2-3, INPUT, DOWN);
317                 PIN_SLP(gpj2-4, INPUT, DOWN);
318                 PIN_SLP(gpj2-5, PREV, NONE);
319                 PIN_SLP(gpj2-6, PREV, NONE);
320                 PIN_SLP(gpj2-7, INPUT, DOWN);
321
322                 PIN_SLP(gpj3-0, INPUT, NONE);
323                 PIN_SLP(gpj3-1, INPUT, NONE);
324                 PIN_SLP(gpj3-2, OUT0, NONE);
325                 PIN_SLP(gpj3-3, INPUT, DOWN);
326                 PIN_SLP(gpj3-4, INPUT, NONE);
327                 PIN_SLP(gpj3-5, INPUT, NONE);
328                 PIN_SLP(gpj3-6, INPUT, NONE);
329                 PIN_SLP(gpj3-7, INPUT, NONE);
330
331                 PIN_SLP(gpj4-0, INPUT, NONE);
332                 PIN_SLP(gpj4-1, INPUT, DOWN);
333                 PIN_SLP(gpj4-2, PREV, NONE);
334                 PIN_SLP(gpj4-3, INPUT, NONE);
335                 PIN_SLP(gpj4-4, INPUT, DOWN);
336
337                 PIN_SLP(mp01-0, OUT1, NONE);
338                 PIN_SLP(mp01-1, OUT0, NONE);
339                 PIN_SLP(mp01-2, INPUT, DOWN);
340                 PIN_SLP(mp01-3, INPUT, DOWN);
341                 PIN_SLP(mp01-4, OUT1, NONE);
342                 PIN_SLP(mp01-5, INPUT, DOWN);
343                 PIN_SLP(mp01-6, INPUT, DOWN);
344                 PIN_SLP(mp01-7, INPUT, DOWN);
345
346                 PIN_SLP(mp02-0, INPUT, DOWN);
347                 PIN_SLP(mp02-1, INPUT, DOWN);
348                 PIN_SLP(mp02-2, INPUT, NONE);
349                 PIN_SLP(mp02-3, INPUT, DOWN);
350
351                 PIN_SLP(mp03-0, INPUT, DOWN);
352                 PIN_SLP(mp03-1, INPUT, DOWN);
353                 PIN_SLP(mp03-2, OUT1, NONE);
354                 PIN_SLP(mp03-3, OUT0, NONE);
355                 PIN_SLP(mp03-4, INPUT, NONE);
356                 PIN_SLP(mp03-5, OUT0, NONE);
357                 PIN_SLP(mp03-6, INPUT, DOWN);
358                 PIN_SLP(mp03-7, INPUT, DOWN);
359
360                 PIN_SLP(mp04-0, INPUT, DOWN);
361                 PIN_SLP(mp04-1, OUT0, NONE);
362                 PIN_SLP(mp04-2, INPUT, DOWN);
363                 PIN_SLP(mp04-3, OUT0, NONE);
364                 PIN_SLP(mp04-4, INPUT, DOWN);
365                 PIN_SLP(mp04-5, INPUT, DOWN);
366                 PIN_SLP(mp04-6, OUT0, NONE);
367                 PIN_SLP(mp04-7, INPUT, DOWN);
368
369                 PIN_SLP(mp05-0, INPUT, NONE);
370                 PIN_SLP(mp05-1, INPUT, NONE);
371                 PIN_SLP(mp05-2, INPUT, NONE);
372                 PIN_SLP(mp05-3, INPUT, NONE);
373                 PIN_SLP(mp05-4, INPUT, DOWN);
374                 PIN_SLP(mp05-5, OUT0, NONE);
375                 PIN_SLP(mp05-6, INPUT, DOWN);
376                 PIN_SLP(mp05-7, PREV, NONE);
377
378                 PIN_SLP(mp06-0, INPUT, DOWN);
379                 PIN_SLP(mp06-1, INPUT, DOWN);
380                 PIN_SLP(mp06-2, INPUT, DOWN);
381                 PIN_SLP(mp06-3, INPUT, DOWN);
382                 PIN_SLP(mp06-4, INPUT, DOWN);
383                 PIN_SLP(mp06-5, INPUT, DOWN);
384                 PIN_SLP(mp06-6, INPUT, DOWN);
385                 PIN_SLP(mp06-7, INPUT, DOWN);
386
387                 PIN_SLP(mp07-0, INPUT, DOWN);
388                 PIN_SLP(mp07-1, INPUT, DOWN);
389                 PIN_SLP(mp07-2, INPUT, DOWN);
390                 PIN_SLP(mp07-3, INPUT, DOWN);
391                 PIN_SLP(mp07-4, INPUT, DOWN);
392                 PIN_SLP(mp07-5, INPUT, DOWN);
393                 PIN_SLP(mp07-6, INPUT, DOWN);
394                 PIN_SLP(mp07-7, INPUT, DOWN);
395         };
396 };
397
398 &wm8994 {
399         /* GPIO3 (BCLK2) and GPIO4 (LRCLK2) as outputs */
400         wlf,gpio-cfg = <0xa101 0x8100 0x8100 0x8100 0x8100 0xa101
401                         0x0100 0x8100 0x0100 0x0100 0x0100>;
402 };