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 bat_therm: thermistor {
42 compatible = "samsung,1404-001221";
43 io-channels = <&gpadc 0x02>; /* BatTemp */
44 pullup-uv = <1800000>;
45 pullup-ohm = <230000>;
47 #thermal-sensor-cells = <0>;
51 compatible = "i2c-gpio";
52 sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
53 scl-gpios = <&gpio2 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
55 pinctrl-names = "default";
56 pinctrl-0 = <&i2c_gpio_0_default>;
62 compatible = "coreriver,tc360-touchkey";
64 vdd-supply = <&ab8500_ldo_aux4_reg>;
65 vcc-supply = <&ab8500_ldo_aux6_reg>;
67 interrupt-parent = <&gpio2>;
68 interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
70 pinctrl-names = "default";
71 pinctrl-0 = <&touchkey_default>;
72 linux,keycodes = <KEY_MENU KEY_BACK>;
77 compatible = "i2c-gpio";
78 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
79 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
81 pinctrl-names = "default";
82 pinctrl-0 = <&i2c_gpio_1_default>;
88 compatible = "alps,hscdtd008a";
91 avdd-supply = <&ab8500_ldo_aux1_reg>;
92 dvdd-supply = <&ab8500_ldo_aux8_reg>;
97 /* External Micro SD card slot */
101 arm,primecell-periphid = <0x10480180>;
102 max-frequency = <100000000>;
107 * Unfortunately, there is no way to enable the UHS
108 * modes due to a limitation of the SD level translator:
109 * It will either translate to 2.9V or disconnect the
110 * DATA lines, so switching to 1.8V signal voltage fails.
117 vmmc-supply = <&ab8500_ldo_aux3_reg>;
118 vqmmc-supply = <&sd_level_translator>;
120 pinctrl-names = "default", "sleep";
121 pinctrl-0 = <&mc0_a_2_default>;
122 pinctrl-1 = <&mc0_a_2_sleep>;
129 arm,primecell-periphid = <0x10480180>;
130 max-frequency = <50000000>;
136 vmmc-supply = <&wl_reg_on>;
138 pinctrl-names = "default", "sleep";
139 pinctrl-0 = <&mc1_a_2_default>;
140 pinctrl-1 = <&mc1_a_2_sleep>;
142 #address-cells = <1>;
146 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
149 /* GPIO216 (WLAN_HOST_WAKE) */
150 interrupt-parent = <&gpio6>;
151 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
152 interrupt-names = "host-wake";
154 pinctrl-names = "default";
155 pinctrl-0 = <&wlan_default>;
163 arm,primecell-periphid = <0x10480180>;
164 max-frequency = <100000000>;
173 vmmc-supply = <&vmem_3v3>;
175 pinctrl-names = "default", "sleep";
176 pinctrl-0 = <&mc2_a_1_default>;
177 pinctrl-1 = <&mc2_a_1_sleep>;
184 pinctrl-names = "default", "sleep";
185 pinctrl-0 = <&u0_a_1_default>;
186 pinctrl-1 = <&u0_a_1_sleep>;
189 /* BCM4334B0 actually */
190 compatible = "brcm,bcm4330-bt";
191 /* GPIO222 (BT_VREG_ON) */
192 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
193 /* GPIO199 (BT_WAKE) */
194 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
195 /* GPIO97 (BT_HOST_WAKE) */
196 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
198 pinctrl-names = "default";
199 pinctrl-0 = <&bluetooth_default>;
207 pinctrl-names = "default", "sleep";
208 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
209 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
212 /* Debugging console UART */
216 pinctrl-names = "default", "sleep";
217 pinctrl-0 = <&u2rxtx_c_1_default>;
218 pinctrl-1 = <&u2rxtx_c_1_sleep>;
224 pinctrl-names = "default", "sleep";
225 pinctrl-0 = <&i2c0_a_1_default>;
226 pinctrl-1 = <&i2c0_a_1_sleep>;
229 compatible = "sharp,gp2ap002s00f";
232 /* GPIO146 (PS_INT) */
233 interrupt-parent = <&gpio4>;
234 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
236 vdd-supply = <&ab8500_ldo_aux1_reg>;
237 vio-supply = <&ab8500_ldo_aux8_reg>;
239 pinctrl-names = "default";
240 pinctrl-0 = <&proximity_default>;
242 sharp,proximity-far-hysteresis = <0x40>;
243 sharp,proximity-close-hysteresis = <0x0f>;
250 pinctrl-names = "default", "sleep";
251 pinctrl-0 = <&i2c2_b_2_default>;
252 pinctrl-1 = <&i2c2_b_2_sleep>;
255 compatible = "invensense,mpu6050";
258 /* GPIO206 (ACC_INT) */
259 interrupt-parent = <&gpio6>;
260 interrupts = <14 IRQ_TYPE_EDGE_RISING>;
262 mount-matrix = "0", "1", "0",
266 vdd-supply = <&ab8500_ldo_aux1_reg>;
267 vddio-supply = <&ab8500_ldo_aux8_reg>;
269 pinctrl-names = "default";
270 pinctrl-0 = <&imu_default>;
277 pinctrl-names = "default", "sleep";
278 pinctrl-0 = <&i2c3_c_2_default>;
279 pinctrl-1 = <&i2c3_c_2_sleep>;
282 compatible = "atmel,maxtouch";
285 /* GPIO218 (TSP_INT_1V8) */
286 interrupt-parent = <&gpio6>;
287 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
289 /* VDDA is "analog supply", 2.57-3.47 V */
290 vdda-supply = <&ab8500_ldo_aux2_reg>;
291 /* VDD is "digital supply" 1.71-3.47V */
292 vdd-supply = <&ab8500_ldo_aux5_reg>;
294 pinctrl-names = "default";
295 pinctrl-0 = <&tsp_default>;
302 pinctrl-names = "default", "sleep";
303 pinctrl-0 = <&usb_a_1_default>;
304 pinctrl-1 = <&usb_a_1_sleep>;
308 line-impedance-micro-ohms = <36000>;
313 regulator-name = "sensor_3v";
314 regulator-min-microvolt = <3000000>;
315 regulator-max-microvolt = <3000000>;
319 regulator-name = "vreg_tsp_a3v3";
320 regulator-min-microvolt = <3300000>;
321 regulator-max-microvolt = <3300000>;
325 regulator-name = "vdd_tf_2v91";
329 regulator-name = "key_led_3.3v";
330 regulator-min-microvolt = <3300000>;
331 regulator-max-microvolt = <3300000>;
335 regulator-name = "vreg_tsp_1v8";
336 regulator-min-microvolt = <1800000>;
337 regulator-max-microvolt = <1800000>;
341 regulator-name = "touch_key_2.2v";
342 regulator-min-microvolt = <2200000>;
343 regulator-max-microvolt = <2200000>;
347 regulator-name = "sensor_1v8";
355 pinctrl-names = "default";
356 pinctrl-0 = <&dsi_default_mode>;
360 compatible = "samsung,s6e63m0";
362 max-brightness = <15>;
363 vdd3-supply = <&panel_reg_3v0>;
364 vci-supply = <&panel_reg_1v8>;
365 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
366 /* ESD (electrostatic discharge) detection interrupt */
367 interrupt-parent = <&gpio2>;
368 interrupts = <18 IRQ_TYPE_EDGE_RISING>;
369 interrupt-names = "esd";
370 pinctrl-names = "default";
371 pinctrl-0 = <&display_default_mode>;
378 compatible = "gpio-keys";
380 pinctrl-names = "default";
381 pinctrl-0 = <&gpio_keys_default>;
383 label = "GPIO Buttons";
387 /* GPIO67 (VOL_UP) */
388 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
389 linux,code = <KEY_VOLUMEUP>;
393 label = "Volume Down";
394 /* GPIO92 (VOL_DOWN) */
395 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
396 linux,code = <KEY_VOLUMEDOWN>;
401 /* GPIO91 (HOME_KEY) */
402 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
403 linux,code = <KEY_HOMEPAGE>;
407 /* Richtek RT8515GQW Flash LED Driver IC */
409 compatible = "richtek,rt8515";
411 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
413 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
415 * RFS is 16 kOhm and RTS is 100 kOhm giving
416 * the flash max current 343mA and torch max
419 richtek,rfs-ohms = <16000>;
420 richtek,rts-ohms = <100000>;
421 pinctrl-names = "default";
422 pinctrl-0 = <&gpio_flash_default_mode>;
425 function = LED_FUNCTION_FLASH;
426 color = <LED_COLOR_ID_WHITE>;
427 flash-max-timeout-us = <250000>;
428 flash-max-microamp = <343750>;
429 led-max-microamp = <55000>;
434 compatible = "gpio-vibrator";
435 /* GPIO195 (MOT_EN) */
436 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
438 pinctrl-names = "default";
439 pinctrl-0 = <&vibrator_default>;
442 /* External LDO for eMMC */
443 vmem_3v3: regulator-vmem {
444 compatible = "regulator-fixed";
446 regulator-name = "vmem_3v3";
447 regulator-min-microvolt = <3300000>;
448 regulator-max-microvolt = <3300000>;
451 startup-delay-us = <200>;
453 /* GPIO223 (MEM_LDO_EN) */
454 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
457 pinctrl-names = "default";
458 pinctrl-0 = <&mem_ldo_default>;
461 /* TI TXS0206-29 level translator for 2.9 V */
462 sd_level_translator: regulator-sd-level-translator {
463 compatible = "regulator-fixed";
465 regulator-name = "sd-level-translator";
466 regulator-min-microvolt = <2900000>;
467 regulator-max-microvolt = <2900000>;
469 startup-delay-us = <200>;
471 /* GPIO87 (TXS0206-29_EN) */
472 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
475 pinctrl-names = "default";
476 pinctrl-0 = <&sd_level_translator_default>;
480 * WL_REG_ON takes WLAN out of reset and enables the internal regulators.
481 * The voltage specified here is only used to determine the OCR mask,
482 * the BCM chip is actually connected directly to VBAT.
484 wl_reg_on: regulator-wl-reg-on {
485 compatible = "regulator-fixed";
487 regulator-name = "wl-reg-on";
488 regulator-min-microvolt = <3000000>;
489 regulator-max-microvolt = <3000000>;
491 startup-delay-us = <100000>;
493 /* GPIO215 (WLAN_EN) */
494 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
497 pinctrl-names = "default";
498 pinctrl-0 = <&wlan_en_default>;
501 /* MIC5366 GPIO-controlled regulator */
502 panel_reg_1v8: regulator-panel-1v8 {
503 compatible = "regulator-fixed";
505 regulator-name = "panel-fixed-supply";
506 regulator-min-microvolt = <1800000>;
507 regulator-max-microvolt = <1800000>;
509 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
511 startup-delay-us = <200>;
514 pinctrl-names = "default";
515 pinctrl-0 = <&panel_reg_default_mode>;
518 /* MIC5366 GPIO-controlled regulator */
519 panel_reg_3v0: regulator-panel-3v0 {
520 compatible = "regulator-fixed";
522 regulator-name = "panel-fixed-supply";
523 regulator-min-microvolt = <3000000>;
524 regulator-max-microvolt = <3000000>;
526 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
528 startup-delay-us = <200>;
531 pinctrl-names = "default";
532 pinctrl-0 = <&panel_reg_default_mode>;
538 gpio_keys_default: gpio_keys_default {
540 pins = "GPIO67", /* VOL_UP */
541 "GPIO91", /* HOME_KEY */
542 "GPIO92"; /* VOL_DOWN */
543 ste,config = <&gpio_in_pu>;
549 i2c_gpio_0_default: i2c_gpio_0 {
551 pins = "GPIO77", /* TOUCHKEY_SCL */
552 "GPIO78"; /* TOUCHKEY_SDA */
553 ste,config = <&gpio_in_nopull>;
559 gpio_flash_default_mode: flash_default {
561 pins = "GPIO140_B11", "GPIO141_C12";
562 ste,config = <&gpio_out_lo>;
568 i2c_gpio_1_default: i2c_gpio_1 {
570 pins = "GPIO151", /* COMP_SCL */
571 "GPIO152"; /* COMP_SDA */
572 ste,config = <&gpio_in_nopull>;
578 touchkey_default: touchkey_default {
580 pins = "GPIO79"; /* TOUCHKEY_INT */
581 ste,config = <&gpio_in_nopull>;
587 sd_level_translator_default: sd_level_translator_default {
589 pins = "GPIO87_B3"; /* TXS0206-29_EN */
590 ste,config = <&gpio_out_lo>;
596 mem_ldo_default: mem_ldo_default {
598 pins = "GPIO223_AH9"; /* MEM_LDO_EN */
599 ste,config = <&gpio_out_hi>;
605 dsi_default_mode: dsi_default {
607 /* Mux in VSI0 used for DSI TE */
610 "lcdvsi0_a_1"; /* VSI0 for LCD */
614 "GPIO68_E1"; /* VSI0 */
615 ste,config = <&in_nopull>;
621 display_default_mode: display_default {
623 pins = "GPIO139_C9"; /* MIPI_DSI0_RESET_N */
624 ste,config = <&gpio_out_lo>;
627 pins = "GPIO82_C1"; /* LDI_ESD_DET */
628 ste,config = <&gpio_in_pu>;
631 panel_reg_default_mode: panel_reg_default {
633 pins = "GPIO219_AG10"; /* LCD_PWR_EN */
634 ste,config = <&gpio_out_lo>;
640 proximity_default: proximity_default {
642 pins = "GPIO146_D13"; /* PS_INT */
643 ste,config = <&gpio_in_nopull>;
649 imu_default: imu_default {
651 pins = "GPIO206_AG24"; /* ACC_INT */
652 ste,config = <&gpio_in_pd>;
658 tsp_default: tsp_default {
660 pins = "GPIO218_AH11"; /* TSP_INT_1V8 */
661 ste,config = <&gpio_in_nopull>;
667 wlan_default: wlan_default {
669 pins = "GPIO216_AG12"; /* WLAN_HOST_WAKE */
670 ste,config = <&gpio_in_pd>;
674 wlan_en_default: wlan_en_default {
676 pins = "GPIO215_AH13"; /* WLAN_EN */
677 ste,config = <&gpio_out_lo>;
683 bluetooth_default: bluetooth_default {
685 pins = "GPIO199_AH23", /* BT_WAKE */
686 "GPIO222_AJ9"; /* BT_VREG_ON */
687 ste,config = <&gpio_out_lo>;
690 pins = "GPIO97_D9"; /* BT_HOST_WAKE */
691 ste,config = <&gpio_in_nopull>;
697 vibrator_default: vibrator_default {
699 pins = "GPIO195_AG28"; /* MOT_EN */
700 ste,config = <&gpio_out_lo>;
707 /* Hog a few default settings */
708 pinctrl-names = "default";
709 pinctrl-0 = <&gpio_default>;
712 gpio_default: gpio_default {
714 /* Change unused pins to GPIO mode */
716 groups = "gpio3_a_1", /* default: SysClkReq4 */
717 "gpio14_a_1"; /* default: PWMOut1 */
720 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";