1 // SPDX-License-Identifier: GPL-2.0-only
3 * Devicetree for the Samsung Galaxy Amp SGH-I407 also known as Kyle.
5 * The code also refers to "Kyle AT&T" reflecting that this mobile phone
6 * was customized for the AT&T subsidiary Aio Wireless (All In One) and
7 * offered by the company in 2013.
11 #include "ste-db8500.dtsi"
12 #include "ste-ab8505.dtsi"
13 #include "ste-dbx5x0-pinctrl.dtsi"
14 #include <dt-bindings/gpio/gpio.h>
15 #include <dt-bindings/leds/common.h>
16 #include <dt-bindings/input/input.h>
17 #include <dt-bindings/interrupt-controller/irq.h>
20 model = "Samsung Galaxy Amp (SGH-I407)";
21 compatible = "samsung,kyle", "st-ericsson,u8500";
24 stdout-path = &serial2;
28 compatible = "samsung,eb425161la";
33 /* This zone will be polled by the battery temperature code */
35 polling-delay-passive = <0>;
36 thermal-sensors = <&bat_therm>;
40 bat_therm: thermistor {
41 compatible = "samsung,1404-001221";
42 io-channels = <&gpadc 0x02>; /* BatTemp */
43 pullup-uv = <1800000>;
44 pullup-ohm = <230000>;
46 #thermal-sensor-cells = <0>;
49 /* TI TXS0206 level translator for 2.9 V */
50 sd_level_translator: regulator-gpio {
51 compatible = "regulator-fixed";
54 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
57 regulator-name = "sd-level-translator";
58 regulator-min-microvolt = <2900000>;
59 regulator-max-microvolt = <2900000>;
60 regulator-type = "voltage";
62 startup-delay-us = <200>;
64 pinctrl-names = "default";
65 pinctrl-0 = <&sd_level_translator_default>;
68 /* External LDO MIC5366-3.3YMT for eMMC */
69 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
70 compatible = "regulator-fixed";
71 regulator-name = "en-3v3-fixed-supply";
72 regulator-min-microvolt = <3300000>;
73 regulator-max-microvolt = <3300000>;
74 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
75 startup-delay-us = <5000>;
77 pinctrl-names = "default";
78 pinctrl-0 = <&emmc_ldo_en_default_mode>;
82 * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
83 * LCD_PWR_EN controls both a 3.0V and 1.8V output.
85 lcd_3v0_reg: regulator-gpio-lcd-3v0 {
86 compatible = "regulator-fixed";
87 /* Supplied in turn by VBAT */
88 regulator-name = "VREG_LCD_3V0";
89 regulator-min-microvolt = <3000000>;
90 regulator-max-microvolt = <3000000>;
91 /* GPIO219 controls this regulator */
92 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
94 pinctrl-names = "default";
95 pinctrl-0 = <&lcd_pwr_en_default_mode>;
97 lcd_1v8_reg: regulator-gpio-lcd-1v8 {
98 compatible = "regulator-fixed";
99 /* Supplied in turn by VBAT */
100 regulator-name = "VREG_LCD_1V8";
101 regulator-min-microvolt = <1800000>;
102 regulator-max-microvolt = <1800000>;
103 /* GPIO219 controls this regulator too */
104 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
106 pinctrl-names = "default";
107 pinctrl-0 = <&lcd_pwr_en_default_mode>;
110 wlan_en: regulator-gpio-wlan-en {
111 compatible = "regulator-fixed";
112 regulator-name = "wl-reg-on";
113 regulator-min-microvolt = <3000000>;
114 regulator-max-microvolt = <3000000>;
115 startup-delay-us = <200000>;
116 /* GPIO215 WLAN_EN */
117 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
119 pinctrl-names = "default";
120 pinctrl-0 = <&wlan_en_default_mode>;
124 compatible = "gpio-vibrator";
125 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
126 pinctrl-names = "default";
127 pinctrl-0 = <&vibrator_default>;
131 compatible = "gpio-keys";
132 pinctrl-names = "default";
133 pinctrl-0 = <&gpio_keys_default_mode>;
136 linux,code = <KEY_HOME>;
139 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
142 linux,code = <KEY_VOLUMEUP>;
145 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
148 linux,code = <KEY_VOLUMEDOWN>;
151 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
156 compatible = "kinetic,ktd253";
158 enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
159 /* Default to 13/32 brightness */
160 default-brightness = <13>;
161 pinctrl-names = "default";
162 pinctrl-0 = <&gpio_backlight_default_mode>;
165 /* Richtek RT8515GQW Flash LED Driver IC */
167 compatible = "richtek,rt8515";
169 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
171 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
173 * RFS is 16 kOhm and RTS is 100 kOhm giving
174 * the flash max current 343mA and torch max
177 richtek,rfs-ohms = <16000>;
178 richtek,rts-ohms = <100000>;
179 pinctrl-names = "default";
180 pinctrl-0 = <&gpio_flash_default_mode>;
183 function = LED_FUNCTION_FLASH;
184 color = <LED_COLOR_ID_WHITE>;
185 flash-max-timeout-us = <250000>;
186 flash-max-microamp = <343750>;
187 led-max-microamp = <55000>;
192 compatible = "i2c-gpio";
193 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
194 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
195 pinctrl-names = "default";
196 pinctrl-0 = <&i2c_gpio_0_default>;
197 #address-cells = <1>;
199 /* TODO: this should be used by the NCP6914 Camera power management unit */
203 compatible = "i2c-gpio";
204 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
205 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
206 pinctrl-names = "default";
207 pinctrl-0 = <&i2c_gpio_1_default>;
208 #address-cells = <1>;
211 compatible = "alps,hscdtd008a";
213 avdd-supply = <&ab8500_ldo_aux1_reg>;
214 dvdd-supply = <&ab8500_ldo_aux6_reg>;
219 // External Micro SD slot
221 arm,primecell-periphid = <0x10480180>;
222 max-frequency = <100000000>;
228 vmmc-supply = <&ab8500_ldo_aux3_reg>;
229 vqmmc-supply = <&sd_level_translator>;
230 pinctrl-names = "default", "sleep";
231 pinctrl-0 = <&mc0_a_1_default>;
232 pinctrl-1 = <&mc0_a_1_sleep>;
233 cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
239 arm,primecell-periphid = <0x10480180>;
240 max-frequency = <50000000>;
244 vmmc-supply = <&wlan_en>;
245 pinctrl-names = "default", "sleep";
246 pinctrl-0 = <&mc1_a_2_default>;
247 pinctrl-1 = <&mc1_a_2_sleep>;
249 #address-cells = <1>;
253 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
255 /* GPIO216 WL_HOST_WAKE */
256 interrupt-parent = <&gpio6>;
257 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
258 interrupt-names = "host-wake";
259 pinctrl-names = "default";
260 pinctrl-0 = <&wlan_default_mode>;
265 * eMMC seems to be mostly Samsung KLM4G1YE4C "4YMD1R"
268 arm,primecell-periphid = <0x10480180>;
269 max-frequency = <100000000>;
276 /* From datasheet page 26 figure 9: 300 ms set-up time for 4GB */
277 post-power-on-delay-ms = <300>;
278 vmmc-supply = <&ldo_3v3_reg>;
279 pinctrl-names = "default", "sleep";
280 pinctrl-0 = <&mc2_a_1_default>;
281 pinctrl-1 = <&mc2_a_1_sleep>;
286 /* GBF (Bluetooth) UART */
288 pinctrl-names = "default", "sleep";
289 pinctrl-0 = <&u0_a_1_default>;
290 pinctrl-1 = <&u0_a_1_sleep>;
294 /* BCM4334B0 actually */
295 compatible = "brcm,bcm4330-bt";
296 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
297 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
298 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
299 pinctrl-names = "default";
300 pinctrl-0 = <&bluetooth_default_mode>;
307 pinctrl-names = "default", "sleep";
308 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
309 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
312 /* Debugging console UART connected to AB8505 USB */
315 pinctrl-names = "default", "sleep";
316 pinctrl-0 = <&u2rxtx_c_1_default>;
317 pinctrl-1 = <&u2rxtx_c_1_sleep>;
323 pinctrl-names = "default", "sleep";
324 pinctrl-0 = <&usb_a_1_default>;
325 pinctrl-1 = <&usb_a_1_sleep>;
329 line-impedance-micro-ohms = <36000>;
334 /* Used for VDD for sensors */
335 regulator-name = "AUX1";
336 regulator-min-microvolt = <3000000>;
337 regulator-max-microvolt = <3300000>;
341 /* Supplies the MMS touchscreen only with 3.3V */
342 regulator-name = "AUX2";
343 regulator-min-microvolt = <3300000>;
344 regulator-max-microvolt = <3300000>;
348 /* Used for voltage for external MMC/SD card */
349 regulator-name = "AUX3";
350 regulator-min-microvolt = <1100000>;
351 regulator-max-microvolt = <3300000>;
355 regulator-name = "AUX4";
356 /* Hammer to 3.3V for the touchscreen */
357 regulator-min-microvolt = <3300000>;
358 regulator-max-microvolt = <3300000>;
362 regulator-name = "AUX5";
363 /* 1.8V for the touchscreen */
364 regulator-min-microvolt = <1800000>;
365 regulator-max-microvolt = <1800000>;
369 regulator-name = "AUX6";
370 /* Used by sensors for 1.8 V in R0.1+ */
371 regulator-min-microvolt = <1800000>;
372 regulator-max-microvolt = <1800000>;
377 regulator-name = "AUX8";
387 pinctrl-names = "default", "sleep";
388 pinctrl-0 = <&i2c0_a_1_default>;
389 pinctrl-1 = <&i2c0_a_1_sleep>;
392 compatible = "sharp,gp2ap002s00f";
393 clock-frequency = <400000>;
396 interrupt-parent = <&gpio4>;
397 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
398 vdd-supply = <&ab8500_ldo_aux1_reg>;
399 vio-supply = <&ab8500_ldo_aux6_reg>;
400 pinctrl-names = "default";
401 pinctrl-0 = <&gp2ap002_kyle_default>;
402 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
403 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
411 pinctrl-names = "default", "sleep";
412 pinctrl-0 = <&i2c2_b_2_default>;
413 pinctrl-1 = <&i2c2_b_2_sleep>;
416 compatible = "bosch,bma254";
417 clock-frequency = <400000>;
420 mount-matrix = "-1", "0", "0",
423 vdd-supply = <&ab8500_ldo_aux1_reg>;
424 vddio-supply = <&ab8500_ldo_aux6_reg>;
432 pinctrl-names = "default", "sleep";
433 pinctrl-0 = <&i2c3_c_2_default>;
434 pinctrl-1 = <&i2c3_c_2_sleep>;
436 /* Melfas MMS134S touchscreen */
438 compatible = "melfas,mms134s";
440 /* GPIO218 for IRQ */
441 interrupt-parent = <&gpio6>;
442 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
443 /* AVDD is "analog supply", 2.57-3.47 V */
444 avdd-supply = <&ab8500_ldo_aux2_reg>;
445 /* VDD is "digital supply" 1.71-3.47V */
446 vdd-supply = <&ab8500_ldo_aux5_reg>;
448 touchscreen-size-x = <480>;
449 touchscreen-size-y = <800>;
451 pinctrl-names = "default";
452 pinctrl-0 = <&mms134s_kyle_default>;
458 pinctrl-names = "default";
459 pinctrl-0 = <&dsi_default_mode>;
464 * NT35510-based Hydis HVA40WV1
465 * Apparently some Kyle models can have a NT35512 fitted
466 * here instead. In that case the boot loader needs to
467 * modify this compatible.
469 compatible = "hydis,hva40wv1", "novatek,nt35510";
471 /* v_lcd_3v0 2.3-4.8V */
472 vdd-supply = <&lcd_3v0_reg>;
473 /* v_lcd_1v8 1.65-3.3V */
474 vddi-supply = <&lcd_1v8_reg>;
476 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
477 pinctrl-names = "default";
478 pinctrl-0 = <&display_default_mode>;
479 backlight = <&ktd253>;
488 * This extends the MC0_A_1 default config to include
489 * the card detect GPIO217 line.
494 /* GPIO18, 19 & 20 unused so pull down */
495 ste,config = <&gpio_in_pd>;
498 pins = "GPIO217_AH12"; /* card detect */
499 ste,config = <&gpio_in_pd>;
505 dsi_default_mode: dsi_default {
507 /* Mux in VSI0 used for DSI TE */
509 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
512 pins = "GPIO68_E1"; /* VSI0 */
513 ste,config = <&in_nopull>;
518 /* Two GPIO lines used by the display */
520 display_default_mode: display_default {
523 * OLED DETECT or check_pba, this appears to be high
524 * on "PBA" which I guess is "prototype board A".
527 ste,config = <&gpio_in_nopull>;
532 * MIPI_DSI0_RESET_N resets the display, leave high
533 * (de-asserted) so we only assert reset explicitly
534 * from the display driver.
536 ste,config = <&gpio_out_hi>;
541 /* GPIO that enables the LDO regulator for the LCD display */
543 lcd_pwr_en_default_mode: lcd_pwr_en_default {
544 /* LCD_PWR_EN on GPIO219 */
546 pins = "GPIO219_AG10";
547 ste,config = <&gpio_out_hi>;
553 gpio_backlight_default_mode: backlight_default {
555 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
556 ste,config = <&gpio_out_lo>;
561 gpio_flash_default_mode: flash_default {
563 pins = "GPIO140_B11", "GPIO141_C12";
564 ste,config = <&gpio_out_lo>;
568 /* GPIO that enables the 2.9V SD card level translator */
569 sd-level-translator {
570 sd_level_translator_default: sd_level_translator_default {
571 /* level shifter on GPIO87 */
574 ste,config = <&gpio_out_hi>;
578 /* GPIO that enables the LDO regulator for the eMMC */
580 emmc_ldo_en_default_mode: emmc_ldo_default {
581 /* LDO enable on GPIO223 */
583 pins = "GPIO223_AH9";
584 ste,config = <&gpio_out_hi>;
590 gpio_keys_default_mode: gpio_keys_default {
592 pins = "GPIO67_G2", /* VOL UP */
593 "GPIO91_B6", /* HOME */
594 "GPIO92_D6"; /* VOL DOWN */
595 ste,config = <&gpio_in_pu>;
599 /* Interrupt line for light/proximity sensor GP2AP002 */
601 gp2ap002_kyle_default: gp2ap002_kyle {
603 pins = "GPIO146_D13";
604 ste,config = <&gpio_in_nopull>;
608 /* GPIO-based I2C bus for NCP6914 */
610 i2c_gpio_0_default: i2c_gpio_0 {
612 pins = "GPIO143_D12", "GPIO144_B13";
613 ste,config = <&gpio_in_nopull>;
617 /* GPIO-based I2C bus for ALPS HSCD compass */
619 i2c_gpio_1_default: i2c_gpio_1 {
621 pins = "GPIO151_B17", "GPIO152_D16";
622 ste,config = <&gpio_in_nopull>;
627 wlan_default_mode: wlan_default {
629 pins = "GPIO216_AG12";
630 ste,config = <&gpio_in_pd>;
633 wlan_en_default_mode: wlan_en_default {
635 pins = "GPIO215_AH13";
636 ste,config = <&gpio_out_lo>;
641 bluetooth_default_mode: bluetooth_default {
643 pins = "GPIO199_AH23", "GPIO222_AJ9";
644 ste,config = <&gpio_out_lo>;
648 ste,config = <&gpio_in_nopull>;
653 vibrator_default: vibrator_default {
655 pins = "GPIO195_AG28"; /* MOT_EN */
656 ste,config = <&gpio_out_lo>;
660 /* Interrupt line for the Melfas MMS134S touchscreen */
662 mms134s_kyle_default: mms134s_kyle {
664 pins = "GPIO218_AH11";
665 ste,config = <&gpio_in_nopull>;
672 /* Hog a few default settings */
673 pinctrl-names = "default";
674 pinctrl-0 = <&gpio_default>;
677 gpio_default: gpio_default {
679 /* Change unused pins to GPIO mode */
681 groups = "gpio3_a_1", /* default: SysClkReq4 */
682 "gpio14_a_1"; /* default: PWMOut1 */
685 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";