1 // SPDX-License-Identifier: GPL-2.0-only
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/leds/common.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/interrupt-controller/irq.h>
13 * Note: This device tree cannot be booted directly with the Samsung bootloader.
14 * You need an intermediate, device-tree compatible bootloader
15 * that locks the L2 cache. Otherwise the kernel will crash after decompression.
17 * There is a port of (mainline) U-Boot, see
18 * https://wiki.postmarketos.org/wiki/ST-Ericsson_NovaThor_U8500#U-Boot
21 model = "Samsung Galaxy S III mini (GT-I8190)";
22 compatible = "samsung,golden", "st-ericsson,u8500";
25 stdout-path = &serial2;
29 compatible = "i2c-gpio";
30 sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
31 scl-gpios = <&gpio2 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
33 pinctrl-names = "default";
34 pinctrl-0 = <&i2c_gpio_0_default>;
40 compatible = "coreriver,tc360-touchkey";
42 vdd-supply = <&ab8500_ldo_aux4_reg>;
43 vcc-supply = <&ab8500_ldo_aux6_reg>;
45 interrupt-parent = <&gpio2>;
46 interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
48 pinctrl-names = "default";
49 pinctrl-0 = <&touchkey_default>;
50 linux,keycodes = <KEY_MENU KEY_BACK>;
55 compatible = "i2c-gpio";
56 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
57 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
59 pinctrl-names = "default";
60 pinctrl-0 = <&i2c_gpio_1_default>;
66 compatible = "alps,hscdtd008a";
69 avdd-supply = <&ab8500_ldo_aux1_reg>;
70 dvdd-supply = <&ab8500_ldo_aux8_reg>;
75 /* External Micro SD card slot */
79 arm,primecell-periphid = <0x10480180>;
80 max-frequency = <100000000>;
85 * Unfortunately, there is no way to enable the UHS
86 * modes due to a limitation of the SD level translator:
87 * It will either translate to 2.9V or disconnect the
88 * DATA lines, so switching to 1.8V signal voltage fails.
95 vmmc-supply = <&ab8500_ldo_aux3_reg>;
96 vqmmc-supply = <&sd_level_translator>;
98 pinctrl-names = "default", "sleep";
99 pinctrl-0 = <&mc0_a_2_default>;
100 pinctrl-1 = <&mc0_a_2_sleep>;
107 arm,primecell-periphid = <0x10480180>;
108 max-frequency = <50000000>;
114 vmmc-supply = <&wl_reg_on>;
116 pinctrl-names = "default", "sleep";
117 pinctrl-0 = <&mc1_a_2_default>;
118 pinctrl-1 = <&mc1_a_2_sleep>;
120 #address-cells = <1>;
124 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
127 /* GPIO216 (WLAN_HOST_WAKE) */
128 interrupt-parent = <&gpio6>;
129 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
130 interrupt-names = "host-wake";
132 pinctrl-names = "default";
133 pinctrl-0 = <&wlan_default>;
141 arm,primecell-periphid = <0x10480180>;
142 max-frequency = <100000000>;
149 vmmc-supply = <&vmem_3v3>;
151 pinctrl-names = "default", "sleep";
152 pinctrl-0 = <&mc2_a_1_default>;
153 pinctrl-1 = <&mc2_a_1_sleep>;
160 pinctrl-names = "default", "sleep";
161 pinctrl-0 = <&u0_a_1_default>;
162 pinctrl-1 = <&u0_a_1_sleep>;
165 /* BCM4334B0 actually */
166 compatible = "brcm,bcm4330-bt";
167 /* GPIO222 (BT_VREG_ON) */
168 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
169 /* GPIO199 (BT_WAKE) */
170 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
171 /* GPIO97 (BT_HOST_WAKE) */
172 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
174 pinctrl-names = "default";
175 pinctrl-0 = <&bluetooth_default>;
183 pinctrl-names = "default", "sleep";
184 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
185 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
188 /* Debugging console UART */
192 pinctrl-names = "default", "sleep";
193 pinctrl-0 = <&u2rxtx_c_1_default>;
194 pinctrl-1 = <&u2rxtx_c_1_sleep>;
200 pinctrl-names = "default", "sleep";
201 pinctrl-0 = <&i2c0_a_1_default>;
202 pinctrl-1 = <&i2c0_a_1_sleep>;
205 compatible = "sharp,gp2ap002s00f";
208 /* GPIO146 (PS_INT) */
209 interrupt-parent = <&gpio4>;
210 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
212 vdd-supply = <&ab8500_ldo_aux1_reg>;
213 vio-supply = <&ab8500_ldo_aux8_reg>;
215 pinctrl-names = "default";
216 pinctrl-0 = <&proximity_default>;
218 sharp,proximity-far-hysteresis = <0x40>;
219 sharp,proximity-close-hysteresis = <0x0f>;
226 pinctrl-names = "default", "sleep";
227 pinctrl-0 = <&i2c2_b_2_default>;
228 pinctrl-1 = <&i2c2_b_2_sleep>;
231 compatible = "invensense,mpu6050";
234 /* GPIO206 (ACC_INT) */
235 interrupt-parent = <&gpio6>;
236 interrupts = <14 IRQ_TYPE_EDGE_RISING>;
238 mount-matrix = "0", "1", "0",
242 vdd-supply = <&ab8500_ldo_aux1_reg>;
243 vddio-supply = <&ab8500_ldo_aux8_reg>;
245 pinctrl-names = "default";
246 pinctrl-0 = <&imu_default>;
253 pinctrl-names = "default", "sleep";
254 pinctrl-0 = <&i2c3_c_2_default>;
255 pinctrl-1 = <&i2c3_c_2_sleep>;
258 compatible = "atmel,maxtouch";
261 /* GPIO218 (TSP_INT_1V8) */
262 interrupt-parent = <&gpio6>;
263 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
265 /* VDDA is "analog supply", 2.57-3.47 V */
266 vdda-supply = <&ab8500_ldo_aux2_reg>;
267 /* VDD is "digital supply" 1.71-3.47V */
268 vdd-supply = <&ab8500_ldo_aux5_reg>;
270 pinctrl-names = "default";
271 pinctrl-0 = <&tsp_default>;
278 pinctrl-names = "default", "sleep";
279 pinctrl-0 = <&usb_a_1_default>;
280 pinctrl-1 = <&usb_a_1_sleep>;
285 regulator-name = "sensor_3v";
286 regulator-min-microvolt = <3000000>;
287 regulator-max-microvolt = <3000000>;
291 regulator-name = "vreg_tsp_a3v3";
292 regulator-min-microvolt = <3300000>;
293 regulator-max-microvolt = <3300000>;
297 regulator-name = "vdd_tf_2v91";
301 regulator-name = "key_led_3.3v";
302 regulator-min-microvolt = <3300000>;
303 regulator-max-microvolt = <3300000>;
307 regulator-name = "vreg_tsp_1v8";
308 regulator-min-microvolt = <1800000>;
309 regulator-max-microvolt = <1800000>;
313 regulator-name = "touch_key_2.2v";
314 regulator-min-microvolt = <2200000>;
315 regulator-max-microvolt = <2200000>;
319 regulator-name = "sensor_1v8";
327 pinctrl-names = "default";
328 pinctrl-0 = <&dsi_default_mode>;
332 compatible = "samsung,s6e63m0";
334 max-brightness = <15>;
335 vdd3-supply = <&panel_reg_3v0>;
336 vci-supply = <&panel_reg_1v8>;
337 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
338 /* ESD (electrostatic discharge) detection interrupt */
339 interrupt-parent = <&gpio2>;
340 interrupts = <18 IRQ_TYPE_EDGE_RISING>;
341 interrupt-names = "esd";
342 pinctrl-names = "default";
343 pinctrl-0 = <&display_default_mode>;
350 compatible = "gpio-keys";
352 pinctrl-names = "default";
353 pinctrl-0 = <&gpio_keys_default>;
355 label = "GPIO Buttons";
359 /* GPIO67 (VOL_UP) */
360 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
361 linux,code = <KEY_VOLUMEUP>;
365 label = "Volume Down";
366 /* GPIO92 (VOL_DOWN) */
367 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
368 linux,code = <KEY_VOLUMEDOWN>;
373 /* GPIO91 (HOME_KEY) */
374 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
375 linux,code = <KEY_HOMEPAGE>;
379 /* Richtek RT8515GQW Flash LED Driver IC */
381 compatible = "richtek,rt8515";
383 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
385 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
387 * RFS is 16 kOhm and RTS is 100 kOhm giving
388 * the flash max current 343mA and torch max
391 richtek,rfs-ohms = <16000>;
392 richtek,rts-ohms = <100000>;
393 pinctrl-names = "default";
394 pinctrl-0 = <&gpio_flash_default_mode>;
397 function = LED_FUNCTION_FLASH;
398 color = <LED_COLOR_ID_WHITE>;
399 flash-max-timeout-us = <250000>;
400 flash-max-microamp = <343750>;
401 led-max-microamp = <55000>;
406 compatible = "gpio-vibrator";
407 /* GPIO195 (MOT_EN) */
408 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
410 pinctrl-names = "default";
411 pinctrl-0 = <&vibrator_default>;
414 /* External LDO for eMMC */
415 vmem_3v3: regulator-vmem {
416 compatible = "regulator-fixed";
418 regulator-name = "vmem_3v3";
419 regulator-min-microvolt = <3300000>;
420 regulator-max-microvolt = <3300000>;
423 startup-delay-us = <200>;
425 /* GPIO223 (MEM_LDO_EN) */
426 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
429 pinctrl-names = "default";
430 pinctrl-0 = <&mem_ldo_default>;
433 /* TI TXS0206-29 level translator for 2.9 V */
434 sd_level_translator: regulator-sd-level-translator {
435 compatible = "regulator-fixed";
437 regulator-name = "sd-level-translator";
438 regulator-min-microvolt = <2900000>;
439 regulator-max-microvolt = <2900000>;
441 startup-delay-us = <200>;
443 /* GPIO87 (TXS0206-29_EN) */
444 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
447 pinctrl-names = "default";
448 pinctrl-0 = <&sd_level_translator_default>;
452 * WL_REG_ON takes WLAN out of reset and enables the internal regulators.
453 * The voltage specified here is only used to determine the OCR mask,
454 * the BCM chip is actually connected directly to VBAT.
456 wl_reg_on: regulator-wl-reg-on {
457 compatible = "regulator-fixed";
459 regulator-name = "wl-reg-on";
460 regulator-min-microvolt = <3000000>;
461 regulator-max-microvolt = <3000000>;
463 startup-delay-us = <100000>;
465 /* GPIO215 (WLAN_EN) */
466 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
469 pinctrl-names = "default";
470 pinctrl-0 = <&wlan_en_default>;
473 /* MIC5366 GPIO-controlled regulator */
474 panel_reg_1v8: regulator-panel-1v8 {
475 compatible = "regulator-fixed";
477 regulator-name = "panel-fixed-supply";
478 regulator-min-microvolt = <1800000>;
479 regulator-max-microvolt = <1800000>;
481 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
483 startup-delay-us = <200>;
486 pinctrl-names = "default";
487 pinctrl-0 = <&panel_reg_default_mode>;
490 /* MIC5366 GPIO-controlled regulator */
491 panel_reg_3v0: regulator-panel-3v0 {
492 compatible = "regulator-fixed";
494 regulator-name = "panel-fixed-supply";
495 regulator-min-microvolt = <3000000>;
496 regulator-max-microvolt = <3000000>;
498 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
500 startup-delay-us = <200>;
503 pinctrl-names = "default";
504 pinctrl-0 = <&panel_reg_default_mode>;
510 gpio_keys_default: gpio_keys_default {
512 pins = "GPIO67", /* VOL_UP */
513 "GPIO91", /* HOME_KEY */
514 "GPIO92"; /* VOL_DOWN */
515 ste,config = <&gpio_in_pu>;
521 i2c_gpio_0_default: i2c_gpio_0 {
523 pins = "GPIO77", /* TOUCHKEY_SCL */
524 "GPIO78"; /* TOUCHKEY_SDA */
525 ste,config = <&gpio_in_nopull>;
531 gpio_flash_default_mode: flash_default {
533 pins = "GPIO140_B11", "GPIO141_C12";
534 ste,config = <&gpio_out_lo>;
540 i2c_gpio_1_default: i2c_gpio_1 {
542 pins = "GPIO151", /* COMP_SCL */
543 "GPIO152"; /* COMP_SDA */
544 ste,config = <&gpio_in_nopull>;
550 touchkey_default: touchkey_default {
552 pins = "GPIO79"; /* TOUCHKEY_INT */
553 ste,config = <&gpio_in_nopull>;
559 sd_level_translator_default: sd_level_translator_default {
561 pins = "GPIO87_B3"; /* TXS0206-29_EN */
562 ste,config = <&gpio_out_lo>;
568 mem_ldo_default: mem_ldo_default {
570 pins = "GPIO223_AH9"; /* MEM_LDO_EN */
571 ste,config = <&gpio_out_hi>;
577 dsi_default_mode: dsi_default {
579 /* Mux in VSI0 used for DSI TE */
582 "lcdvsi0_a_1"; /* VSI0 for LCD */
586 "GPIO68_E1"; /* VSI0 */
587 ste,config = <&in_nopull>;
593 display_default_mode: display_default {
595 pins = "GPIO139_C9"; /* MIPI_DSI0_RESET_N */
596 ste,config = <&gpio_out_lo>;
599 pins = "GPIO82_C1"; /* LDI_ESD_DET */
600 ste,config = <&gpio_in_pu>;
603 panel_reg_default_mode: panel_reg_default {
605 pins = "GPIO219_AG10"; /* LCD_PWR_EN */
606 ste,config = <&gpio_out_lo>;
612 proximity_default: proximity_default {
614 pins = "GPIO146_D13"; /* PS_INT */
615 ste,config = <&gpio_in_nopull>;
621 imu_default: imu_default {
623 pins = "GPIO206_AG24"; /* ACC_INT */
624 ste,config = <&gpio_in_pd>;
630 tsp_default: tsp_default {
632 pins = "GPIO218_AH11"; /* TSP_INT_1V8 */
633 ste,config = <&gpio_in_nopull>;
639 wlan_default: wlan_default {
641 pins = "GPIO216_AG12"; /* WLAN_HOST_WAKE */
642 ste,config = <&gpio_in_pd>;
646 wlan_en_default: wlan_en_default {
648 pins = "GPIO215_AH13"; /* WLAN_EN */
649 ste,config = <&gpio_out_lo>;
655 bluetooth_default: bluetooth_default {
657 pins = "GPIO199_AH23", /* BT_WAKE */
658 "GPIO222_AJ9"; /* BT_VREG_ON */
659 ste,config = <&gpio_out_lo>;
662 pins = "GPIO97_D9"; /* BT_HOST_WAKE */
663 ste,config = <&gpio_in_nopull>;
669 vibrator_default: vibrator_default {
671 pins = "GPIO195_AG28"; /* MOT_EN */
672 ste,config = <&gpio_out_lo>;
679 /* Hog a few default settings */
680 pinctrl-names = "default";
681 pinctrl-0 = <&gpio_default>;
684 gpio_default: gpio_default {
686 /* Change unused pins to GPIO mode */
688 groups = "gpio3_a_1", /* default: SysClkReq4 */
689 "gpio14_a_1"; /* default: PWMOut1 */
692 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";