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 = "samsung,eb-l1m7flu";
34 /* This zone will be polled by the battery temperature code */
36 polling-delay-passive = <0>;
37 thermal-sensors = <&bat_therm>;
41 temperature = <70000>;
49 bat_therm: thermistor {
50 compatible = "samsung,1404-001221";
51 io-channels = <&gpadc 0x02>; /* BatTemp */
52 pullup-uv = <1800000>;
53 pullup-ohm = <230000>;
55 #thermal-sensor-cells = <0>;
59 compatible = "i2c-gpio";
60 sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
61 scl-gpios = <&gpio2 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
63 pinctrl-names = "default";
64 pinctrl-0 = <&i2c_gpio_0_default>;
70 compatible = "coreriver,tc360-touchkey";
72 vdd-supply = <&ab8500_ldo_aux4_reg>;
73 vcc-supply = <&ab8500_ldo_aux6_reg>;
75 interrupt-parent = <&gpio2>;
76 interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
78 pinctrl-names = "default";
79 pinctrl-0 = <&touchkey_default>;
80 linux,keycodes = <KEY_MENU KEY_BACK>;
85 compatible = "i2c-gpio";
86 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
87 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
89 pinctrl-names = "default";
90 pinctrl-0 = <&i2c_gpio_1_default>;
96 compatible = "alps,hscdtd008a";
99 avdd-supply = <&ab8500_ldo_aux1_reg>;
100 dvdd-supply = <&ab8500_ldo_aux8_reg>;
105 /* External Micro SD card slot */
109 arm,primecell-periphid = <0x10480180>;
110 max-frequency = <100000000>;
115 * Unfortunately, there is no way to enable the UHS
116 * modes due to a limitation of the SD level translator:
117 * It will either translate to 2.9V or disconnect the
118 * DATA lines, so switching to 1.8V signal voltage fails.
125 vmmc-supply = <&ab8500_ldo_aux3_reg>;
126 vqmmc-supply = <&sd_level_translator>;
128 pinctrl-names = "default", "sleep";
129 pinctrl-0 = <&mc0_a_2_default>;
130 pinctrl-1 = <&mc0_a_2_sleep>;
137 arm,primecell-periphid = <0x10480180>;
138 max-frequency = <50000000>;
144 vmmc-supply = <&wl_reg_on>;
146 pinctrl-names = "default", "sleep";
147 pinctrl-0 = <&mc1_a_2_default>;
148 pinctrl-1 = <&mc1_a_2_sleep>;
150 #address-cells = <1>;
154 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
157 /* GPIO216 (WLAN_HOST_WAKE) */
158 interrupt-parent = <&gpio6>;
159 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
160 interrupt-names = "host-wake";
162 pinctrl-names = "default";
163 pinctrl-0 = <&wlan_default>;
171 arm,primecell-periphid = <0x10480180>;
172 max-frequency = <100000000>;
181 vmmc-supply = <&vmem_3v3>;
183 pinctrl-names = "default", "sleep";
184 pinctrl-0 = <&mc2_a_1_default>;
185 pinctrl-1 = <&mc2_a_1_sleep>;
192 pinctrl-names = "default", "sleep";
193 pinctrl-0 = <&u0_a_1_default>;
194 pinctrl-1 = <&u0_a_1_sleep>;
197 /* BCM4334B0 actually */
198 compatible = "brcm,bcm4330-bt";
199 /* GPIO222 (BT_VREG_ON) */
200 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
201 /* GPIO199 (BT_WAKE) */
202 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
203 /* GPIO97 (BT_HOST_WAKE) */
204 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
206 pinctrl-names = "default";
207 pinctrl-0 = <&bluetooth_default>;
215 pinctrl-names = "default", "sleep";
216 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
217 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
220 /* Debugging console UART */
224 pinctrl-names = "default", "sleep";
225 pinctrl-0 = <&u2rxtx_c_1_default>;
226 pinctrl-1 = <&u2rxtx_c_1_sleep>;
232 pinctrl-names = "default", "sleep";
233 pinctrl-0 = <&i2c0_a_1_default>;
234 pinctrl-1 = <&i2c0_a_1_sleep>;
237 compatible = "sharp,gp2ap002s00f";
240 /* GPIO146 (PS_INT) */
241 interrupt-parent = <&gpio4>;
242 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
244 vdd-supply = <&ab8500_ldo_aux1_reg>;
245 vio-supply = <&ab8500_ldo_aux8_reg>;
247 pinctrl-names = "default";
248 pinctrl-0 = <&proximity_default>;
250 sharp,proximity-far-hysteresis = <0x40>;
251 sharp,proximity-close-hysteresis = <0x0f>;
258 pinctrl-names = "default", "sleep";
259 pinctrl-0 = <&i2c2_b_2_default>;
260 pinctrl-1 = <&i2c2_b_2_sleep>;
263 compatible = "invensense,mpu6050";
266 /* GPIO206 (ACC_INT) */
267 interrupt-parent = <&gpio6>;
268 interrupts = <14 IRQ_TYPE_EDGE_RISING>;
270 mount-matrix = "0", "1", "0",
274 vdd-supply = <&ab8500_ldo_aux1_reg>;
275 vddio-supply = <&ab8500_ldo_aux8_reg>;
277 pinctrl-names = "default";
278 pinctrl-0 = <&imu_default>;
285 pinctrl-names = "default", "sleep";
286 pinctrl-0 = <&i2c3_c_2_default>;
287 pinctrl-1 = <&i2c3_c_2_sleep>;
290 compatible = "atmel,maxtouch";
293 /* GPIO218 (TSP_INT_1V8) */
294 interrupt-parent = <&gpio6>;
295 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
297 /* VDDA is "analog supply", 2.57-3.47 V */
298 vdda-supply = <&ab8500_ldo_aux2_reg>;
299 /* VDD is "digital supply" 1.71-3.47V */
300 vdd-supply = <&ab8500_ldo_aux5_reg>;
302 pinctrl-names = "default";
303 pinctrl-0 = <&tsp_default>;
310 pinctrl-names = "default", "sleep";
311 pinctrl-0 = <&usb_a_1_default>;
312 pinctrl-1 = <&usb_a_1_sleep>;
316 line-impedance-micro-ohms = <36000>;
321 regulator-name = "sensor_3v";
322 regulator-min-microvolt = <3000000>;
323 regulator-max-microvolt = <3000000>;
327 regulator-name = "vreg_tsp_a3v3";
328 regulator-min-microvolt = <3300000>;
329 regulator-max-microvolt = <3300000>;
333 regulator-name = "vdd_tf_2v91";
337 regulator-name = "key_led_3.3v";
338 regulator-min-microvolt = <3300000>;
339 regulator-max-microvolt = <3300000>;
343 regulator-name = "vreg_tsp_1v8";
344 regulator-min-microvolt = <1800000>;
345 regulator-max-microvolt = <1800000>;
349 regulator-name = "touch_key_2.2v";
350 regulator-min-microvolt = <2200000>;
351 regulator-max-microvolt = <2200000>;
355 regulator-name = "sensor_1v8";
363 pinctrl-names = "default";
364 pinctrl-0 = <&dsi_default_mode>;
368 compatible = "samsung,s6e63m0";
370 max-brightness = <15>;
371 vdd3-supply = <&panel_reg_3v0>;
372 vci-supply = <&panel_reg_1v8>;
373 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
374 /* ESD (electrostatic discharge) detection interrupt */
375 interrupt-parent = <&gpio2>;
376 interrupts = <18 IRQ_TYPE_EDGE_RISING>;
377 interrupt-names = "esd";
378 pinctrl-names = "default";
379 pinctrl-0 = <&display_default_mode>;
386 compatible = "gpio-keys";
388 pinctrl-names = "default";
389 pinctrl-0 = <&gpio_keys_default>;
391 label = "GPIO Buttons";
395 /* GPIO67 (VOL_UP) */
396 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
397 linux,code = <KEY_VOLUMEUP>;
401 label = "Volume Down";
402 /* GPIO92 (VOL_DOWN) */
403 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
404 linux,code = <KEY_VOLUMEDOWN>;
409 /* GPIO91 (HOME_KEY) */
410 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
411 linux,code = <KEY_HOMEPAGE>;
415 /* Richtek RT8515GQW Flash LED Driver IC */
417 compatible = "richtek,rt8515";
419 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
421 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
423 * RFS is 16 kOhm and RTS is 100 kOhm giving
424 * the flash max current 343mA and torch max
427 richtek,rfs-ohms = <16000>;
428 richtek,rts-ohms = <100000>;
429 pinctrl-names = "default";
430 pinctrl-0 = <&gpio_flash_default_mode>;
433 function = LED_FUNCTION_FLASH;
434 color = <LED_COLOR_ID_WHITE>;
435 flash-max-timeout-us = <250000>;
436 flash-max-microamp = <343750>;
437 led-max-microamp = <55000>;
442 compatible = "gpio-vibrator";
443 /* GPIO195 (MOT_EN) */
444 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
446 pinctrl-names = "default";
447 pinctrl-0 = <&vibrator_default>;
450 /* External LDO for eMMC */
451 vmem_3v3: regulator-vmem {
452 compatible = "regulator-fixed";
454 regulator-name = "vmem_3v3";
455 regulator-min-microvolt = <3300000>;
456 regulator-max-microvolt = <3300000>;
459 startup-delay-us = <200>;
461 /* GPIO223 (MEM_LDO_EN) */
462 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
465 pinctrl-names = "default";
466 pinctrl-0 = <&mem_ldo_default>;
469 /* TI TXS0206-29 level translator for 2.9 V */
470 sd_level_translator: regulator-sd-level-translator {
471 compatible = "regulator-fixed";
473 regulator-name = "sd-level-translator";
474 regulator-min-microvolt = <2900000>;
475 regulator-max-microvolt = <2900000>;
477 startup-delay-us = <200>;
479 /* GPIO87 (TXS0206-29_EN) */
480 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
483 pinctrl-names = "default";
484 pinctrl-0 = <&sd_level_translator_default>;
488 * WL_REG_ON takes WLAN out of reset and enables the internal regulators.
489 * The voltage specified here is only used to determine the OCR mask,
490 * the BCM chip is actually connected directly to VBAT.
492 wl_reg_on: regulator-wl-reg-on {
493 compatible = "regulator-fixed";
495 regulator-name = "wl-reg-on";
496 regulator-min-microvolt = <3000000>;
497 regulator-max-microvolt = <3000000>;
499 startup-delay-us = <100000>;
501 /* GPIO215 (WLAN_EN) */
502 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
505 pinctrl-names = "default";
506 pinctrl-0 = <&wlan_en_default>;
509 /* MIC5366 GPIO-controlled regulator */
510 panel_reg_1v8: regulator-panel-1v8 {
511 compatible = "regulator-fixed";
513 regulator-name = "panel-fixed-supply";
514 regulator-min-microvolt = <1800000>;
515 regulator-max-microvolt = <1800000>;
517 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
519 startup-delay-us = <200>;
522 pinctrl-names = "default";
523 pinctrl-0 = <&panel_reg_default_mode>;
526 /* MIC5366 GPIO-controlled regulator */
527 panel_reg_3v0: regulator-panel-3v0 {
528 compatible = "regulator-fixed";
530 regulator-name = "panel-fixed-supply";
531 regulator-min-microvolt = <3000000>;
532 regulator-max-microvolt = <3000000>;
534 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
536 startup-delay-us = <200>;
539 pinctrl-names = "default";
540 pinctrl-0 = <&panel_reg_default_mode>;
546 gpio_keys_default: gpio_keys_default {
548 pins = "GPIO67", /* VOL_UP */
549 "GPIO91", /* HOME_KEY */
550 "GPIO92"; /* VOL_DOWN */
551 ste,config = <&gpio_in_pu>;
557 i2c_gpio_0_default: i2c_gpio_0 {
559 pins = "GPIO77", /* TOUCHKEY_SCL */
560 "GPIO78"; /* TOUCHKEY_SDA */
561 ste,config = <&gpio_in_nopull>;
567 gpio_flash_default_mode: flash_default {
569 pins = "GPIO140_B11", "GPIO141_C12";
570 ste,config = <&gpio_out_lo>;
576 i2c_gpio_1_default: i2c_gpio_1 {
578 pins = "GPIO151", /* COMP_SCL */
579 "GPIO152"; /* COMP_SDA */
580 ste,config = <&gpio_in_nopull>;
586 touchkey_default: touchkey_default {
588 pins = "GPIO79"; /* TOUCHKEY_INT */
589 ste,config = <&gpio_in_nopull>;
595 sd_level_translator_default: sd_level_translator_default {
597 pins = "GPIO87_B3"; /* TXS0206-29_EN */
598 ste,config = <&gpio_out_lo>;
604 mem_ldo_default: mem_ldo_default {
606 pins = "GPIO223_AH9"; /* MEM_LDO_EN */
607 ste,config = <&gpio_out_hi>;
613 dsi_default_mode: dsi_default {
615 /* Mux in VSI0 used for DSI TE */
618 "lcdvsi0_a_1"; /* VSI0 for LCD */
622 "GPIO68_E1"; /* VSI0 */
623 ste,config = <&in_nopull>;
629 display_default_mode: display_default {
631 pins = "GPIO139_C9"; /* MIPI_DSI0_RESET_N */
632 ste,config = <&gpio_out_lo>;
635 pins = "GPIO82_C1"; /* LDI_ESD_DET */
636 ste,config = <&gpio_in_pu>;
639 panel_reg_default_mode: panel_reg_default {
641 pins = "GPIO219_AG10"; /* LCD_PWR_EN */
642 ste,config = <&gpio_out_lo>;
648 proximity_default: proximity_default {
650 pins = "GPIO146_D13"; /* PS_INT */
651 ste,config = <&gpio_in_nopull>;
657 imu_default: imu_default {
659 pins = "GPIO206_AG24"; /* ACC_INT */
660 ste,config = <&gpio_in_pd>;
666 tsp_default: tsp_default {
668 pins = "GPIO218_AH11"; /* TSP_INT_1V8 */
669 ste,config = <&gpio_in_nopull>;
675 wlan_default: wlan_default {
677 pins = "GPIO216_AG12"; /* WLAN_HOST_WAKE */
678 ste,config = <&gpio_in_pd>;
682 wlan_en_default: wlan_en_default {
684 pins = "GPIO215_AH13"; /* WLAN_EN */
685 ste,config = <&gpio_out_lo>;
691 bluetooth_default: bluetooth_default {
693 pins = "GPIO199_AH23", /* BT_WAKE */
694 "GPIO222_AJ9"; /* BT_VREG_ON */
695 ste,config = <&gpio_out_lo>;
698 pins = "GPIO97_D9"; /* BT_HOST_WAKE */
699 ste,config = <&gpio_in_nopull>;
705 vibrator_default: vibrator_default {
707 pins = "GPIO195_AG28"; /* MOT_EN */
708 ste,config = <&gpio_out_lo>;
715 /* Hog a few default settings */
716 pinctrl-names = "default";
717 pinctrl-0 = <&gpio_default>;
720 gpio_default: gpio_default {
722 /* Change unused pins to GPIO mode */
724 groups = "gpio3_a_1", /* default: SysClkReq4 */
725 "gpio14_a_1"; /* default: PWMOut1 */
728 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";