]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - src/arm/s5pv210-galaxys.dts
Import DTS from Linux 5.8
[FreeBSD/FreeBSD.git] / src / arm / s5pv210-galaxys.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 S1 (GT-I9000) based on S5PV210";
10         compatible = "samsung,galaxys", "samsung,aries", "samsung,s5pv210";
11
12         chosen {
13                 stdout-path = &uart2;
14         };
15
16         nand_pwrseq: nand-pwrseq {
17                 compatible = "mmc-pwrseq-simple";
18                 reset-gpios = <&gpj2 7 GPIO_ACTIVE_LOW>;
19                 pinctrl-names = "default";
20                 pinctrl-0 = <&massmemory_en>;
21         };
22
23         gpio-keys {
24                 compatible = "gpio-keys";
25
26                 power {
27                         label = "power";
28                         gpios = <&gph2 6 GPIO_ACTIVE_LOW>;
29                         linux,code = <KEY_POWER>;
30                         wakeup-source;
31                 };
32
33                 vol-down {
34                         label = "volume_down";
35                         gpios = <&gph3 1 GPIO_ACTIVE_LOW>;
36                         linux,code = <KEY_VOLUMEDOWN>;
37                 };
38
39                 vol-up {
40                         label = "volume_up";
41                         gpios = <&gph3 2 GPIO_ACTIVE_LOW>;
42                         linux,code = <KEY_VOLUMEUP>;
43                 };
44
45                 home {
46                         label = "home";
47                         gpios = <&gph3 5 GPIO_ACTIVE_LOW>;
48                         linux,code = <KEY_HOME>;
49                         wakeup-source;
50                 };
51         };
52
53         i2c_fmradio: i2c-gpio-8 {
54                 compatible = "i2c-gpio";
55                 sda-gpios = <&gpd1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
56                 scl-gpios = <&gpd1 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
57                 i2c-gpio,delay-us = <2>;
58                 #address-cells = <1>;
59                 #size-cells = <0>;
60
61                 pinctrl-names = "default";
62                 pinctrl-0 = <&fm_i2c_pins>;
63
64                 fmradio@10 {
65                         compatible = "silabs,si470x";
66                         reg = <0x10>;
67                         interrupt-parent = <&gpj2>;
68                         interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
69                         reset-gpios = <&gpj2 5 GPIO_ACTIVE_HIGH>;
70
71                         pinctrl-names = "default";
72                         pinctrl-0 = <&fm_irq &fm_rst>;
73                 };
74         };
75 };
76
77 &aliases {
78         i2c8 = &i2c_fmradio;
79 };
80
81 &pinctrl0 {
82         pinctrl-names = "default";
83         pinctrl-0 = <&sleep_cfg>;
84
85         fm_i2c_pins: fm-i2c-pins {
86                 samsung,pins = "gpd1-2", "gpd1-3";
87                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
88                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
89         };
90
91         fm_irq: fm-irq {
92                 samsung,pins = "gpj2-4";
93                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
94                 samsung,pin-pud = <S3C64XX_PIN_PULL_UP>;
95                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
96         };
97
98         fm_rst: fm-rst {
99                 samsung,pins = "gpj2-5";
100                 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
101                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
102                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
103         };
104
105         massmemory_en: massmemory-en {
106                 samsung,pins = "gpj2-7";
107                 samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
108                 samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
109                 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
110         };
111
112         /* Based on CyanogenMod 3.0.101 kernel */
113         sleep_cfg: sleep-cfg {
114                 PIN_SLP(gpa0-0, PREV, NONE);
115                 PIN_SLP(gpa0-1, PREV, NONE);
116                 PIN_SLP(gpa0-2, PREV, NONE);
117                 PIN_SLP(gpa0-3, OUT1, NONE);
118                 PIN_SLP(gpa0-4, INPUT, DOWN);
119                 PIN_SLP(gpa0-5, OUT0, NONE);
120                 PIN_SLP(gpa0-6, INPUT, DOWN);
121                 PIN_SLP(gpa0-7, OUT1, NONE);
122
123                 PIN_SLP(gpa1-0, INPUT, DOWN);
124                 PIN_SLP(gpa1-1, OUT0, NONE);
125                 PIN_SLP(gpa1-2, INPUT, NONE);
126                 PIN_SLP(gpa1-3, OUT0, NONE);
127
128                 PIN_SLP(gpb-0, OUT0, NONE);
129                 PIN_SLP(gpb-1, OUT1, NONE);
130                 PIN_SLP(gpb-2, OUT0, NONE);
131                 PIN_SLP(gpb-3, PREV, NONE);
132                 PIN_SLP(gpb-4, INPUT, NONE);
133                 PIN_SLP(gpb-5, PREV, NONE);
134                 PIN_SLP(gpb-6, INPUT, DOWN);
135                 PIN_SLP(gpb-7, OUT0, NONE);
136
137                 PIN_SLP(gpc0-0, OUT0, NONE);
138                 PIN_SLP(gpc0-1, INPUT, DOWN);
139                 PIN_SLP(gpc0-2, OUT0, NONE);
140                 PIN_SLP(gpc0-3, INPUT, NONE);
141                 PIN_SLP(gpc0-4, OUT0, NONE);
142
143                 PIN_SLP(gpc1-0, INPUT, DOWN);
144                 PIN_SLP(gpc1-1, INPUT, DOWN);
145                 PIN_SLP(gpc1-2, INPUT, DOWN);
146                 PIN_SLP(gpc1-3, INPUT, DOWN);
147                 PIN_SLP(gpc1-4, INPUT, DOWN);
148
149                 PIN_SLP(gpd0-0, INPUT, DOWN);
150                 PIN_SLP(gpd0-1, OUT0, NONE);
151                 PIN_SLP(gpd0-2, INPUT, DOWN);
152                 PIN_SLP(gpd0-3, INPUT, DOWN);
153
154                 PIN_SLP(gpd1-0, INPUT, NONE);
155                 PIN_SLP(gpd1-1, INPUT, NONE);
156                 PIN_SLP(gpd1-2, INPUT, NONE);
157                 PIN_SLP(gpd1-3, INPUT, NONE);
158                 PIN_SLP(gpd1-4, INPUT, DOWN);
159                 PIN_SLP(gpd1-5, INPUT, DOWN);
160
161                 PIN_SLP(gpe0-0, INPUT, DOWN);
162                 PIN_SLP(gpe0-1, INPUT, DOWN);
163                 PIN_SLP(gpe0-2, INPUT, DOWN);
164                 PIN_SLP(gpe0-3, INPUT, DOWN);
165                 PIN_SLP(gpe0-4, INPUT, DOWN);
166                 PIN_SLP(gpe0-5, INPUT, DOWN);
167                 PIN_SLP(gpe0-6, INPUT, DOWN);
168                 PIN_SLP(gpe0-7, INPUT, DOWN);
169
170                 PIN_SLP(gpe1-0, INPUT, DOWN);
171                 PIN_SLP(gpe1-1, INPUT, DOWN);
172                 PIN_SLP(gpe1-2, INPUT, DOWN);
173                 PIN_SLP(gpe1-3, OUT0, NONE);
174                 PIN_SLP(gpe1-4, INPUT, DOWN);
175
176                 PIN_SLP(gpf0-0, OUT0, NONE);
177                 PIN_SLP(gpf0-1, OUT0, NONE);
178                 PIN_SLP(gpf0-2, OUT0, NONE);
179                 PIN_SLP(gpf0-3, OUT0, NONE);
180                 PIN_SLP(gpf0-4, OUT0, NONE);
181                 PIN_SLP(gpf0-5, OUT0, NONE);
182                 PIN_SLP(gpf0-6, OUT0, NONE);
183                 PIN_SLP(gpf0-7, OUT0, NONE);
184
185                 PIN_SLP(gpf1-0, OUT0, NONE);
186                 PIN_SLP(gpf1-1, OUT0, NONE);
187                 PIN_SLP(gpf1-2, OUT0, NONE);
188                 PIN_SLP(gpf1-3, OUT0, NONE);
189                 PIN_SLP(gpf1-4, OUT0, NONE);
190                 PIN_SLP(gpf1-5, OUT0, NONE);
191                 PIN_SLP(gpf1-6, OUT0, NONE);
192                 PIN_SLP(gpf1-7, OUT0, NONE);
193
194                 PIN_SLP(gpf2-0, OUT0, NONE);
195                 PIN_SLP(gpf2-1, OUT0, NONE);
196                 PIN_SLP(gpf2-2, OUT0, NONE);
197                 PIN_SLP(gpf2-3, OUT0, NONE);
198                 PIN_SLP(gpf2-4, OUT0, NONE);
199                 PIN_SLP(gpf2-5, OUT0, NONE);
200                 PIN_SLP(gpf2-6, OUT0, NONE);
201                 PIN_SLP(gpf2-7, OUT0, NONE);
202
203                 PIN_SLP(gpf3-0, OUT0, NONE);
204                 PIN_SLP(gpf3-1, OUT0, NONE);
205                 PIN_SLP(gpf3-2, OUT0, NONE);
206                 PIN_SLP(gpf3-3, OUT0, NONE);
207                 PIN_SLP(gpf3-4, PREV, NONE);
208                 PIN_SLP(gpf3-5, INPUT, DOWN);
209
210                 PIN_SLP(gpg0-0, OUT0, NONE);
211                 PIN_SLP(gpg0-1, INPUT, NONE);
212                 PIN_SLP(gpg0-2, INPUT, NONE);
213                 PIN_SLP(gpg0-3, INPUT, NONE);
214                 PIN_SLP(gpg0-4, INPUT, NONE);
215                 PIN_SLP(gpg0-5, INPUT, NONE);
216                 PIN_SLP(gpg0-6, INPUT, NONE);
217
218                 PIN_SLP(gpg1-0, OUT0, NONE);
219                 PIN_SLP(gpg1-1, OUT1, NONE);
220                 PIN_SLP(gpg1-2, PREV, NONE);
221                 PIN_SLP(gpg1-3, OUT1, NONE);
222                 PIN_SLP(gpg1-4, OUT1, NONE);
223                 PIN_SLP(gpg1-5, OUT1, NONE);
224                 PIN_SLP(gpg1-6, OUT1, NONE);
225
226                 PIN_SLP(gpg2-0, OUT0, NONE);
227                 PIN_SLP(gpg2-1, OUT0, NONE);
228                 PIN_SLP(gpg2-2, INPUT, NONE);
229                 PIN_SLP(gpg2-3, OUT0, NONE);
230                 PIN_SLP(gpg2-4, OUT0, NONE);
231                 PIN_SLP(gpg2-5, OUT0, NONE);
232                 PIN_SLP(gpg2-6, OUT0, NONE);
233
234                 PIN_SLP(gpg3-0, OUT1, NONE);
235                 PIN_SLP(gpg3-1, OUT0, NONE);
236                 PIN_SLP(gpg3-2, INPUT, NONE);
237                 PIN_SLP(gpg3-3, INPUT, DOWN);
238                 PIN_SLP(gpg3-4, OUT0, NONE);
239                 PIN_SLP(gpg3-5, OUT0, NONE);
240                 PIN_SLP(gpg3-6, INPUT, DOWN);
241
242                 PIN_SLP(gpi-0, PREV, NONE);
243                 PIN_SLP(gpi-1, INPUT, DOWN);
244                 PIN_SLP(gpi-2, PREV, NONE);
245                 PIN_SLP(gpi-3, PREV, NONE);
246                 PIN_SLP(gpi-4, PREV, NONE);
247                 PIN_SLP(gpi-5, INPUT, DOWN);
248                 PIN_SLP(gpi-6, INPUT, DOWN);
249
250                 PIN_SLP(gpj0-0, INPUT, NONE);
251                 PIN_SLP(gpj0-1, INPUT, NONE);
252                 PIN_SLP(gpj0-2, INPUT, NONE);
253                 PIN_SLP(gpj0-3, INPUT, NONE);
254                 PIN_SLP(gpj0-4, INPUT, NONE);
255                 PIN_SLP(gpj0-5, INPUT, DOWN);
256                 PIN_SLP(gpj0-6, OUT0, NONE);
257                 PIN_SLP(gpj0-7, INPUT, NONE);
258
259                 PIN_SLP(gpj1-0, INPUT, DOWN);
260                 PIN_SLP(gpj1-1, OUT0, NONE);
261                 PIN_SLP(gpj1-2, INPUT, DOWN);
262                 PIN_SLP(gpj1-3, PREV, NONE);
263                 PIN_SLP(gpj1-4, PREV, NONE);
264                 PIN_SLP(gpj1-5, OUT0, NONE);
265
266                 PIN_SLP(gpj2-0, INPUT, DOWN);
267                 PIN_SLP(gpj2-1, INPUT, DOWN);
268                 PIN_SLP(gpj2-2, OUT0, NONE);
269                 PIN_SLP(gpj2-3, INPUT, DOWN);
270                 PIN_SLP(gpj2-4, INPUT, UP);
271                 PIN_SLP(gpj2-5, PREV, NONE);
272                 PIN_SLP(gpj2-6, PREV, NONE);
273                 PIN_SLP(gpj2-7, OUT1, NONE);
274
275                 PIN_SLP(gpj3-0, INPUT, NONE);
276                 PIN_SLP(gpj3-1, INPUT, NONE);
277                 PIN_SLP(gpj3-2, OUT0, NONE);
278                 PIN_SLP(gpj3-3, INPUT, DOWN);
279                 PIN_SLP(gpj3-4, INPUT, NONE);
280                 PIN_SLP(gpj3-5, INPUT, NONE);
281                 PIN_SLP(gpj3-6, INPUT, NONE);
282                 PIN_SLP(gpj3-7, INPUT, NONE);
283
284                 PIN_SLP(gpj4-0, INPUT, NONE);
285                 PIN_SLP(gpj4-1, INPUT, DOWN);
286                 PIN_SLP(gpj4-2, PREV, NONE);
287                 PIN_SLP(gpj4-3, INPUT, NONE);
288                 PIN_SLP(gpj4-4, INPUT, DOWN);
289
290                 PIN_SLP(mp01-0, INPUT, DOWN);
291                 PIN_SLP(mp01-1, OUT0, NONE);
292                 PIN_SLP(mp01-2, INPUT, DOWN);
293                 PIN_SLP(mp01-3, INPUT, DOWN);
294                 PIN_SLP(mp01-4, OUT1, NONE);
295                 PIN_SLP(mp01-5, INPUT, DOWN);
296                 PIN_SLP(mp01-6, INPUT, DOWN);
297                 PIN_SLP(mp01-7, INPUT, DOWN);
298
299                 PIN_SLP(mp02-0, INPUT, DOWN);
300                 PIN_SLP(mp02-1, INPUT, DOWN);
301                 PIN_SLP(mp02-2, INPUT, NONE);
302                 PIN_SLP(mp02-3, INPUT, DOWN);
303
304                 PIN_SLP(mp03-0, INPUT, DOWN);
305                 PIN_SLP(mp03-1, INPUT, DOWN);
306                 PIN_SLP(mp03-2, OUT1, NONE);
307                 PIN_SLP(mp03-3, OUT0, NONE);
308                 PIN_SLP(mp03-4, INPUT, NONE);
309                 PIN_SLP(mp03-5, OUT1, NONE);
310                 PIN_SLP(mp03-6, INPUT, DOWN);
311                 PIN_SLP(mp03-7, INPUT, DOWN);
312
313                 PIN_SLP(mp04-0, INPUT, DOWN);
314                 PIN_SLP(mp04-1, OUT0, NONE);
315                 PIN_SLP(mp04-2, INPUT, DOWN);
316                 PIN_SLP(mp04-3, OUT0, NONE);
317                 PIN_SLP(mp04-4, INPUT, DOWN);
318                 PIN_SLP(mp04-5, INPUT, DOWN);
319                 PIN_SLP(mp04-6, OUT0, NONE);
320                 PIN_SLP(mp04-7, INPUT, DOWN);
321
322                 PIN_SLP(mp05-0, INPUT, NONE);
323                 PIN_SLP(mp05-1, INPUT, NONE);
324                 PIN_SLP(mp05-2, INPUT, NONE);
325                 PIN_SLP(mp05-3, INPUT, NONE);
326                 PIN_SLP(mp05-4, INPUT, DOWN);
327                 PIN_SLP(mp05-5, OUT0, NONE);
328                 PIN_SLP(mp05-6, INPUT, DOWN);
329                 PIN_SLP(mp05-7, PREV, NONE);
330
331                 PIN_SLP(mp06-0, INPUT, DOWN);
332                 PIN_SLP(mp06-1, INPUT, DOWN);
333                 PIN_SLP(mp06-2, INPUT, DOWN);
334                 PIN_SLP(mp06-3, INPUT, DOWN);
335                 PIN_SLP(mp06-4, INPUT, DOWN);
336                 PIN_SLP(mp06-5, INPUT, DOWN);
337                 PIN_SLP(mp06-6, INPUT, DOWN);
338                 PIN_SLP(mp06-7, INPUT, DOWN);
339
340                 PIN_SLP(mp07-0, INPUT, DOWN);
341                 PIN_SLP(mp07-1, INPUT, DOWN);
342                 PIN_SLP(mp07-2, INPUT, DOWN);
343                 PIN_SLP(mp07-3, INPUT, DOWN);
344                 PIN_SLP(mp07-4, INPUT, DOWN);
345                 PIN_SLP(mp07-5, INPUT, DOWN);
346                 PIN_SLP(mp07-6, INPUT, DOWN);
347                 PIN_SLP(mp07-7, INPUT, DOWN);
348         };
349 };
350
351 &sdhci0 {
352         bus-width = <4>;
353         non-removable;
354         mmc-pwrseq = <&nand_pwrseq>;
355         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4>;
356         pinctrl-names = "default";
357         status = "okay";
358
359         assigned-clocks = <&clocks MOUT_MMC0>, <&clocks SCLK_MMC0>;
360         assigned-clock-rates = <0>, <52000000>;
361         assigned-clock-parents = <&clocks MOUT_MPLL>;
362 };