]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/gnu/dts/arm/ste-ux500-samsung-golden.dts
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / sys / gnu / dts / arm / ste-ux500-samsung-golden.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2 /dts-v1/;
3
4 #include "ste-db8500.dtsi"
5 #include "ste-ab8505.dtsi"
6 #include "ste-dbx5x0-pinctrl.dtsi"
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/interrupt-controller/irq.h>
10
11 /*
12  * Note: This device tree cannot be booted directly with the Samsung bootloader.
13  * You need an intermediate, device-tree compatible bootloader
14  * that locks the L2 cache. Otherwise the kernel will crash after decompression.
15  *
16  * There is a port of (mainline) U-Boot, see
17  * https://wiki.postmarketos.org/wiki/ST-Ericsson_NovaThor_U8500#U-Boot
18  */
19 / {
20         model = "Samsung Galaxy S III mini (GT-I8190)";
21         compatible = "samsung,golden", "st-ericsson,u8500";
22
23         chosen {
24                 stdout-path = &serial2;
25         };
26
27         soc {
28                 /* External Micro SD card slot */
29                 sdi0_per1@80126000 {
30                         status = "okay";
31
32                         arm,primecell-periphid = <0x10480180>;
33                         max-frequency = <100000000>;
34                         bus-width = <4>;
35
36                         non-removable;
37                         /*
38                          * Unfortunately, there is no way to enable the UHS
39                          * modes due to a limitation of the SD level translator:
40                          * It will either translate to 2.9V or disconnect the
41                          * DATA lines, so switching to 1.8V signal voltage fails.
42                          */
43                         cap-sd-highspeed;
44                         cap-mmc-highspeed;
45                         st,sig-pin-fbclk;
46                         full-pwr-cycle;
47
48                         vmmc-supply = <&ab8500_ldo_aux3_reg>;
49                         vqmmc-supply = <&sd_level_translator>;
50
51                         pinctrl-names = "default", "sleep";
52                         pinctrl-0 = <&mc0_a_2_default>;
53                         pinctrl-1 = <&mc0_a_2_sleep>;
54                 };
55
56                 /* WLAN SDIO */
57                 sdi1_per2@80118000 {
58                         status = "okay";
59
60                         arm,primecell-periphid = <0x10480180>;
61                         max-frequency = <50000000>;
62                         bus-width = <4>;
63
64                         non-removable;
65                         cap-sd-highspeed;
66
67                         vmmc-supply = <&wl_reg_on>;
68
69                         pinctrl-names = "default", "sleep";
70                         pinctrl-0 = <&mc1_a_2_default>;
71                         pinctrl-1 = <&mc1_a_2_sleep>;
72
73                         #address-cells = <1>;
74                         #size-cells = <0>;
75
76                         wifi@1 {
77                                 compatible = "brcm,bcm4329-fmac";
78                                 reg = <1>;
79
80                                 /* GPIO216 (WLAN_HOST_WAKE) */
81                                 interrupt-parent = <&gpio6>;
82                                 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
83                                 interrupt-names = "host-wake";
84
85                                 pinctrl-names = "default";
86                                 pinctrl-0 = <&wlan_default>;
87                         };
88                 };
89
90                 /* eMMC */
91                 sdi2_per3@80005000 {
92                         status = "okay";
93
94                         arm,primecell-periphid = <0x10480180>;
95                         max-frequency = <100000000>;
96                         bus-width = <8>;
97
98                         non-removable;
99                         cap-mmc-highspeed;
100                         mmc-ddr-1_8v;
101
102                         vmmc-supply = <&vmem_3v3>;
103
104                         pinctrl-names = "default", "sleep";
105                         pinctrl-0 = <&mc2_a_1_default>;
106                         pinctrl-1 = <&mc2_a_1_sleep>;
107                 };
108
109                 /* BT UART */
110                 uart@80120000 {
111                         status = "okay";
112
113                         pinctrl-names = "default", "sleep";
114                         pinctrl-0 = <&u0_a_1_default>;
115                         pinctrl-1 = <&u0_a_1_sleep>;
116
117                         bluetooth {
118                                 compatible = "brcm,bcm4330-bt";
119                                 /* GPIO222 (BT_VREG_ON) */
120                                 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
121                                 /* GPIO199 (BT_WAKE) */
122                                 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
123                                 /* GPIO97 (BT_HOST_WAKE) */
124                                 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
125
126                                 pinctrl-names = "default";
127                                 pinctrl-0 = <&bluetooth_default>;
128                         };
129                 };
130
131                 /* GPF UART */
132                 uart@80121000 {
133                         status = "okay";
134
135                         pinctrl-names = "default", "sleep";
136                         pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
137                         pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
138                 };
139
140                 /* Debugging console UART */
141                 uart@80007000 {
142                         status = "okay";
143
144                         pinctrl-names = "default", "sleep";
145                         pinctrl-0 = <&u2rxtx_c_1_default>;
146                         pinctrl-1 = <&u2rxtx_c_1_sleep>;
147                 };
148
149                 i2c@80128000 {
150                         status = "okay";
151
152                         pinctrl-names = "default", "sleep";
153                         pinctrl-0 = <&i2c2_b_2_default>;
154                         pinctrl-1 = <&i2c2_b_2_sleep>;
155
156                         imu@68 {
157                                 compatible = "invensense,mpu6050";
158                                 reg = <0x68>;
159
160                                 /* GPIO206 (ACC_INT) */
161                                 interrupt-parent = <&gpio6>;
162                                 interrupts = <14 IRQ_TYPE_EDGE_RISING>;
163
164                                 mount-matrix = "0", "1", "0",
165                                               "-1", "0", "0",
166                                                "0", "0", "1";
167
168                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
169                                 vddio-supply = <&ab8500_ldo_aux8_reg>;
170
171                                 pinctrl-names = "default";
172                                 pinctrl-0 = <&imu_default>;
173                         };
174                 };
175
176                 i2c@80110000 {
177                         status = "okay";
178
179                         pinctrl-names = "default", "sleep";
180                         pinctrl-0 = <&i2c3_c_2_default>;
181                         pinctrl-1 = <&i2c3_c_2_sleep>;
182
183                         touchscreen@4a {
184                                 compatible = "atmel,maxtouch";
185                                 reg = <0x4a>;
186
187                                 /* GPIO218 (TSP_INT_1V8) */
188                                 interrupt-parent = <&gpio6>;
189                                 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
190
191                                 pinctrl-names = "default";
192                                 pinctrl-0 = <&tsp_default>;
193                         };
194                 };
195
196                 prcmu@80157000 {
197                         ab8505 {
198                                 ab8500_usb {
199                                         pinctrl-names = "default", "sleep";
200                                         pinctrl-0 = <&usb_a_1_default>;
201                                         pinctrl-1 = <&usb_a_1_sleep>;
202                                 };
203
204                                 ab8505-regulators {
205                                         ab8500_ldo_aux1 {
206                                                 regulator-name = "sensor_3v";
207                                                 regulator-min-microvolt = <3000000>;
208                                                 regulator-max-microvolt = <3000000>;
209                                         };
210
211                                         ab8500_ldo_aux2 {
212                                                 regulator-name = "vreg_tsp_a3v3";
213                                                 regulator-min-microvolt = <3300000>;
214                                                 regulator-max-microvolt = <3300000>;
215                                                 regulator-always-on; /* FIXME */
216                                         };
217
218                                         ab8500_ldo_aux3 {
219                                                 regulator-name = "vdd_tf_2v91";
220                                         };
221
222                                         ab8500_ldo_aux4 {
223                                                 regulator-name = "key_led_3.3v";
224                                                 regulator-min-microvolt = <3300000>;
225                                                 regulator-max-microvolt = <3300000>;
226                                         };
227
228                                         ab8500_ldo_aux5 {
229                                                 regulator-name = "vreg_tsp_1v8";
230                                                 regulator-min-microvolt = <1800000>;
231                                                 regulator-max-microvolt = <1800000>;
232                                                 regulator-always-on; /* FIXME */
233                                         };
234
235                                         ab8500_ldo_aux6 {
236                                                 regulator-name = "touch_key_2.2v";
237                                                 regulator-min-microvolt = <2200000>;
238                                                 regulator-max-microvolt = <2200000>;
239                                         };
240
241                                         ab8500_ldo_aux8 {
242                                                 regulator-name = "sensor_1v8";
243                                         };
244                                 };
245                         };
246                 };
247         };
248
249         gpio-keys {
250                 compatible = "gpio-keys";
251
252                 pinctrl-names = "default";
253                 pinctrl-0 = <&gpio_keys_default>;
254
255                 label = "GPIO Buttons";
256
257                 volume-up {
258                         label = "Volume Up";
259                         /* GPIO67 (VOL_UP) */
260                         gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
261                         linux,code = <KEY_VOLUMEUP>;
262                 };
263
264                 volume-down {
265                         label = "Volume Down";
266                         /* GPIO92 (VOL_DOWN) */
267                         gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
268                         linux,code = <KEY_VOLUMEDOWN>;
269                 };
270
271                 home {
272                         label = "Home";
273                         /* GPIO91 (HOME_KEY) */
274                         gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
275                         linux,code = <KEY_HOMEPAGE>;
276                 };
277         };
278
279         vibrator {
280                 compatible = "gpio-vibrator";
281                 /* GPIO195 (MOT_EN) */
282                 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
283
284                 pinctrl-names = "default";
285                 pinctrl-0 = <&vibrator_default>;
286         };
287
288         /* External LDO for eMMC */
289         vmem_3v3: regulator-vmem {
290                 compatible = "regulator-fixed";
291
292                 regulator-name = "vmem_3v3";
293                 regulator-min-microvolt = <3300000>;
294                 regulator-max-microvolt = <3300000>;
295                 regulator-boot-on;
296
297                 startup-delay-us = <200>;
298
299                 /* GPIO223 (MEM_LDO_EN) */
300                 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
301                 enable-active-high;
302
303                 pinctrl-names = "default";
304                 pinctrl-0 = <&mem_ldo_default>;
305         };
306
307         /* TI TXS0206-29 level translator for 2.9 V */
308         sd_level_translator: regulator-sd-level-translator {
309                 compatible = "regulator-fixed";
310
311                 regulator-name = "sd-level-translator";
312                 regulator-min-microvolt = <2900000>;
313                 regulator-max-microvolt = <2900000>;
314
315                 startup-delay-us = <200>;
316
317                 /* GPIO87 (TXS0206-29_EN) */
318                 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
319                 enable-active-high;
320
321                 pinctrl-names = "default";
322                 pinctrl-0 = <&sd_level_translator_default>;
323         };
324
325         /*
326          * WL_REG_ON takes WLAN out of reset and enables the internal regulators.
327          * The voltage specified here is only used to determine the OCR mask,
328          * the BCM chip is actually connected directly to VBAT.
329          */
330         wl_reg_on: regulator-wl-reg-on {
331                 compatible = "regulator-fixed";
332
333                 regulator-name = "wl-reg-on";
334                 regulator-min-microvolt = <3000000>;
335                 regulator-max-microvolt = <3000000>;
336
337                 startup-delay-us = <100000>;
338
339                 /* GPIO215 (WLAN_EN) */
340                 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
341                 enable-active-high;
342
343                 pinctrl-names = "default";
344                 pinctrl-0 = <&wlan_en_default>;
345         };
346 };
347
348 &pinctrl {
349         gpio-keys {
350                 gpio_keys_default: gpio_keys_default {
351                         golden_cfg1 {
352                                 pins = "GPIO67",        /* VOL_UP */
353                                        "GPIO91",        /* HOME_KEY */
354                                        "GPIO92";        /* VOL_DOWN */
355                                 ste,config = <&gpio_in_pu>;
356                         };
357                 };
358         };
359
360         sdi0 {
361                 sd_level_translator_default: sd_level_translator_default {
362                         golden_cfg1 {
363                                 pins = "GPIO87_B3";     /* TXS0206-29_EN */
364                                 ste,config = <&gpio_out_lo>;
365                         };
366                 };
367         };
368
369         sdi2 {
370                 mem_ldo_default: mem_ldo_default {
371                         golden_cfg1 {
372                                 pins = "GPIO223_AH9";   /* MEM_LDO_EN */
373                                 ste,config = <&gpio_out_hi>;
374                         };
375                 };
376         };
377
378         imu {
379                 imu_default: imu_default {
380                         golden_cfg1 {
381                                 pins = "GPIO206_AG24";  /* ACC_INT */
382                                 ste,config = <&gpio_in_pd>;
383                         };
384                 };
385         };
386
387         tsp {
388                 tsp_default: tsp_default {
389                         golden_cfg1 {
390                                 pins = "GPIO218_AH11";  /* TSP_INT_1V8 */
391                                 ste,config = <&gpio_in_nopull>;
392                         };
393                 };
394         };
395
396         wlan {
397                 wlan_default: wlan_default {
398                         golden_cfg1 {
399                                 pins = "GPIO216_AG12";  /* WLAN_HOST_WAKE */
400                                 ste,config = <&gpio_in_pd>;
401                         };
402                 };
403
404                 wlan_en_default: wlan_en_default {
405                         golden_cfg1 {
406                                 pins = "GPIO215_AH13";  /* WLAN_EN */
407                                 ste,config = <&gpio_out_lo>;
408                         };
409                 };
410         };
411
412         bluetooth {
413                 bluetooth_default: bluetooth_default {
414                         golden_cfg1 {
415                                 pins = "GPIO199_AH23",  /* BT_WAKE */
416                                        "GPIO222_AJ9";   /* BT_VREG_ON */
417                                 ste,config = <&gpio_out_lo>;
418                         };
419                         golden_cfg2 {
420                                 pins = "GPIO97_D9";     /* BT_HOST_WAKE */
421                                 ste,config = <&gpio_in_nopull>;
422                         };
423                 };
424         };
425
426         vibrator {
427                 vibrator_default: vibrator_default {
428                         golden_cfg1 {
429                                 pins = "GPIO195_AG28";  /* MOT_EN */
430                                 ste,config = <&gpio_out_lo>;
431                         };
432                 };
433         };
434 };
435
436 &ab8505_gpio {
437         /* Hog a few default settings */
438         pinctrl-names = "default";
439         pinctrl-0 = <&gpio_default>;
440
441         gpio {
442                 gpio_default: gpio_default {
443                         golden_mux {
444                                 /* Change unused pins to GPIO mode */
445                                 function = "gpio";
446                                 groups = "gpio3_a_1",   /* default: SysClkReq4 */
447                                          "gpio14_a_1";  /* default: PWMOut1 */
448                         };
449                         golden_cfg1 {
450                                 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";
451                                 bias-disable;
452                         };
453                 };
454         };
455 };