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 temperature = <70000>;
48 bat_therm: thermistor {
49 compatible = "samsung,1404-001221";
50 io-channels = <&gpadc 0x02>; /* BatTemp */
51 pullup-uv = <1800000>;
52 pullup-ohm = <230000>;
54 #thermal-sensor-cells = <0>;
57 /* TI TXS0206 level translator for 2.9 V */
58 sd_level_translator: regulator-gpio {
59 compatible = "regulator-fixed";
62 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
65 regulator-name = "sd-level-translator";
66 regulator-min-microvolt = <2900000>;
67 regulator-max-microvolt = <2900000>;
68 regulator-type = "voltage";
70 startup-delay-us = <200>;
72 pinctrl-names = "default";
73 pinctrl-0 = <&sd_level_translator_default>;
76 /* External LDO MIC5366-3.3YMT for eMMC */
77 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
78 compatible = "regulator-fixed";
79 regulator-name = "en-3v3-fixed-supply";
80 regulator-min-microvolt = <3300000>;
81 regulator-max-microvolt = <3300000>;
82 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
83 startup-delay-us = <5000>;
85 pinctrl-names = "default";
86 pinctrl-0 = <&emmc_ldo_en_default_mode>;
90 * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
91 * LCD_PWR_EN controls both a 3.0V and 1.8V output.
93 lcd_3v0_reg: regulator-gpio-lcd-3v0 {
94 compatible = "regulator-fixed";
95 /* Supplied in turn by VBAT */
96 regulator-name = "VREG_LCD_3V0";
97 regulator-min-microvolt = <3000000>;
98 regulator-max-microvolt = <3000000>;
99 /* GPIO219 controls this regulator */
100 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
102 pinctrl-names = "default";
103 pinctrl-0 = <&lcd_pwr_en_default_mode>;
105 lcd_1v8_reg: regulator-gpio-lcd-1v8 {
106 compatible = "regulator-fixed";
107 /* Supplied in turn by VBAT */
108 regulator-name = "VREG_LCD_1V8";
109 regulator-min-microvolt = <1800000>;
110 regulator-max-microvolt = <1800000>;
111 /* GPIO219 controls this regulator too */
112 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
114 pinctrl-names = "default";
115 pinctrl-0 = <&lcd_pwr_en_default_mode>;
118 wlan_en: regulator-gpio-wlan-en {
119 compatible = "regulator-fixed";
120 regulator-name = "wl-reg-on";
121 regulator-min-microvolt = <3000000>;
122 regulator-max-microvolt = <3000000>;
123 startup-delay-us = <200000>;
124 /* GPIO215 WLAN_EN */
125 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
127 pinctrl-names = "default";
128 pinctrl-0 = <&wlan_en_default_mode>;
132 compatible = "gpio-vibrator";
133 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
134 pinctrl-names = "default";
135 pinctrl-0 = <&vibrator_default>;
139 compatible = "gpio-keys";
140 pinctrl-names = "default";
141 pinctrl-0 = <&gpio_keys_default_mode>;
144 linux,code = <KEY_HOME>;
147 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
150 linux,code = <KEY_VOLUMEUP>;
153 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
156 linux,code = <KEY_VOLUMEDOWN>;
159 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
164 compatible = "kinetic,ktd253";
166 enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
167 /* Default to 13/32 brightness */
168 default-brightness = <13>;
169 pinctrl-names = "default";
170 pinctrl-0 = <&gpio_backlight_default_mode>;
173 /* Richtek RT8515GQW Flash LED Driver IC */
175 compatible = "richtek,rt8515";
177 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
179 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
181 * RFS is 16 kOhm and RTS is 100 kOhm giving
182 * the flash max current 343mA and torch max
185 richtek,rfs-ohms = <16000>;
186 richtek,rts-ohms = <100000>;
187 pinctrl-names = "default";
188 pinctrl-0 = <&gpio_flash_default_mode>;
191 function = LED_FUNCTION_FLASH;
192 color = <LED_COLOR_ID_WHITE>;
193 flash-max-timeout-us = <250000>;
194 flash-max-microamp = <343750>;
195 led-max-microamp = <55000>;
200 compatible = "i2c-gpio";
201 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
202 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
203 pinctrl-names = "default";
204 pinctrl-0 = <&i2c_gpio_0_default>;
205 #address-cells = <1>;
207 /* TODO: this should be used by the NCP6914 Camera power management unit */
211 compatible = "i2c-gpio";
212 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
213 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
214 pinctrl-names = "default";
215 pinctrl-0 = <&i2c_gpio_1_default>;
216 #address-cells = <1>;
219 compatible = "alps,hscdtd008a";
221 avdd-supply = <&ab8500_ldo_aux1_reg>;
222 dvdd-supply = <&ab8500_ldo_aux6_reg>;
227 // External Micro SD slot
229 arm,primecell-periphid = <0x10480180>;
230 max-frequency = <100000000>;
236 vmmc-supply = <&ab8500_ldo_aux3_reg>;
237 vqmmc-supply = <&sd_level_translator>;
238 pinctrl-names = "default", "sleep";
239 pinctrl-0 = <&mc0_a_1_default>;
240 pinctrl-1 = <&mc0_a_1_sleep>;
241 cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
247 arm,primecell-periphid = <0x10480180>;
248 max-frequency = <50000000>;
252 vmmc-supply = <&wlan_en>;
253 pinctrl-names = "default", "sleep";
254 pinctrl-0 = <&mc1_a_2_default>;
255 pinctrl-1 = <&mc1_a_2_sleep>;
257 #address-cells = <1>;
261 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
263 /* GPIO216 WL_HOST_WAKE */
264 interrupt-parent = <&gpio6>;
265 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
266 interrupt-names = "host-wake";
267 pinctrl-names = "default";
268 pinctrl-0 = <&wlan_default_mode>;
273 * eMMC seems to be mostly Samsung KLM4G1YE4C "4YMD1R"
276 arm,primecell-periphid = <0x10480180>;
277 max-frequency = <100000000>;
284 /* From datasheet page 26 figure 9: 300 ms set-up time for 4GB */
285 post-power-on-delay-ms = <300>;
286 vmmc-supply = <&ldo_3v3_reg>;
287 pinctrl-names = "default", "sleep";
288 pinctrl-0 = <&mc2_a_1_default>;
289 pinctrl-1 = <&mc2_a_1_sleep>;
294 /* GBF (Bluetooth) UART */
296 pinctrl-names = "default", "sleep";
297 pinctrl-0 = <&u0_a_1_default>;
298 pinctrl-1 = <&u0_a_1_sleep>;
302 /* BCM4334B0 actually */
303 compatible = "brcm,bcm4330-bt";
304 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
305 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
306 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
307 pinctrl-names = "default";
308 pinctrl-0 = <&bluetooth_default_mode>;
315 pinctrl-names = "default", "sleep";
316 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
317 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
320 /* The CSRG05TA03-ICJE-R is a SirfStarV 5t chip */
321 compatible = "csr,csrg05ta03-icje-r";
322 /* GPS_RSTN on GPIO21 */
323 reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
324 /* GPS_ON_OFF on GPIO86 */
325 sirf,onoff-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;
326 /* GPS_1V8 (VSMPS2) */
327 vcc-supply = <&db8500_vsmps2_reg>;
328 pinctrl-names = "default";
329 pinctrl-0 = <&g05ta03_kyle_default>;
330 /* According to /etc/sirfgps.conf */
331 current-speed = <460800>;
335 /* Debugging console UART connected to AB8505 USB */
338 pinctrl-names = "default", "sleep";
339 pinctrl-0 = <&u2rxtx_c_1_default>;
340 pinctrl-1 = <&u2rxtx_c_1_sleep>;
346 pinctrl-names = "default", "sleep";
347 pinctrl-0 = <&usb_a_1_default>;
348 pinctrl-1 = <&usb_a_1_sleep>;
352 line-impedance-micro-ohms = <36000>;
357 /* Used for VDD for sensors */
358 regulator-name = "AUX1";
359 regulator-min-microvolt = <3000000>;
360 regulator-max-microvolt = <3300000>;
364 /* Supplies the MMS touchscreen only with 3.3V */
365 regulator-name = "AUX2";
366 regulator-min-microvolt = <3300000>;
367 regulator-max-microvolt = <3300000>;
371 /* Used for voltage for external MMC/SD card */
372 regulator-name = "AUX3";
373 regulator-min-microvolt = <1100000>;
374 regulator-max-microvolt = <3300000>;
378 regulator-name = "AUX4";
379 /* Hammer to 3.3V for the touchscreen */
380 regulator-min-microvolt = <3300000>;
381 regulator-max-microvolt = <3300000>;
385 regulator-name = "AUX5";
386 /* 1.8V for the touchscreen */
387 regulator-min-microvolt = <1800000>;
388 regulator-max-microvolt = <1800000>;
392 regulator-name = "AUX6";
393 /* Used by sensors for 1.8 V in R0.1+ */
394 regulator-min-microvolt = <1800000>;
395 regulator-max-microvolt = <1800000>;
400 regulator-name = "AUX8";
410 pinctrl-names = "default", "sleep";
411 pinctrl-0 = <&i2c0_a_1_default>;
412 pinctrl-1 = <&i2c0_a_1_sleep>;
415 compatible = "sharp,gp2ap002s00f";
416 clock-frequency = <400000>;
419 interrupt-parent = <&gpio4>;
420 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
421 vdd-supply = <&ab8500_ldo_aux1_reg>;
422 vio-supply = <&ab8500_ldo_aux6_reg>;
423 pinctrl-names = "default";
424 pinctrl-0 = <&gp2ap002_kyle_default>;
425 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
426 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
434 pinctrl-names = "default", "sleep";
435 pinctrl-0 = <&i2c2_b_2_default>;
436 pinctrl-1 = <&i2c2_b_2_sleep>;
439 compatible = "bosch,bma254";
440 clock-frequency = <400000>;
443 mount-matrix = "-1", "0", "0",
446 vdd-supply = <&ab8500_ldo_aux1_reg>;
447 vddio-supply = <&ab8500_ldo_aux6_reg>;
455 pinctrl-names = "default", "sleep";
456 pinctrl-0 = <&i2c3_c_2_default>;
457 pinctrl-1 = <&i2c3_c_2_sleep>;
459 /* Melfas MMS134S touchscreen */
461 compatible = "melfas,mms134s";
463 /* GPIO218 for IRQ */
464 interrupt-parent = <&gpio6>;
465 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
466 /* AVDD is "analog supply", 2.57-3.47 V */
467 avdd-supply = <&ab8500_ldo_aux2_reg>;
468 /* VDD is "digital supply" 1.71-3.47V */
469 vdd-supply = <&ab8500_ldo_aux5_reg>;
471 touchscreen-size-x = <480>;
472 touchscreen-size-y = <800>;
474 pinctrl-names = "default";
475 pinctrl-0 = <&mms134s_kyle_default>;
481 pinctrl-names = "default";
482 pinctrl-0 = <&dsi_default_mode>;
487 * NT35510-based Hydis HVA40WV1
488 * Apparently some Kyle models can have a NT35512 fitted
489 * here instead. In that case the boot loader needs to
490 * modify this compatible.
492 compatible = "hydis,hva40wv1", "novatek,nt35510";
494 /* v_lcd_3v0 2.3-4.8V */
495 vdd-supply = <&lcd_3v0_reg>;
496 /* v_lcd_1v8 1.65-3.3V */
497 vddi-supply = <&lcd_1v8_reg>;
499 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
500 pinctrl-names = "default";
501 pinctrl-0 = <&display_default_mode>;
502 backlight = <&ktd253>;
511 * This extends the MC0_A_1 default config to include
512 * the card detect GPIO217 line.
517 /* GPIO18, 19 & 20 unused so pull down */
518 ste,config = <&gpio_in_pd>;
521 pins = "GPIO217_AH12"; /* card detect */
522 ste,config = <&gpio_in_pd>;
528 dsi_default_mode: dsi_default {
530 /* Mux in VSI0 used for DSI TE */
532 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
535 pins = "GPIO68_E1"; /* VSI0 */
536 ste,config = <&in_nopull>;
541 /* Two GPIO lines used by the display */
543 display_default_mode: display_default {
546 * OLED DETECT or check_pba, this appears to be high
547 * on "PBA" which I guess is "prototype board A".
550 ste,config = <&gpio_in_nopull>;
555 * MIPI_DSI0_RESET_N resets the display, leave high
556 * (de-asserted) so we only assert reset explicitly
557 * from the display driver.
559 ste,config = <&gpio_out_hi>;
564 /* GPIO that enables the LDO regulator for the LCD display */
566 lcd_pwr_en_default_mode: lcd_pwr_en_default {
567 /* LCD_PWR_EN on GPIO219 */
569 pins = "GPIO219_AG10";
570 ste,config = <&gpio_out_hi>;
576 gpio_backlight_default_mode: backlight_default {
578 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
579 ste,config = <&gpio_out_lo>;
584 gpio_flash_default_mode: flash_default {
586 pins = "GPIO140_B11", "GPIO141_C12";
587 ste,config = <&gpio_out_lo>;
591 /* GPIO that enables the 2.9V SD card level translator */
592 sd-level-translator {
593 sd_level_translator_default: sd_level_translator_default {
594 /* level shifter on GPIO87 */
597 ste,config = <&gpio_out_hi>;
601 /* GPIO that enables the LDO regulator for the eMMC */
603 emmc_ldo_en_default_mode: emmc_ldo_default {
604 /* LDO enable on GPIO223 */
606 pins = "GPIO223_AH9";
607 ste,config = <&gpio_out_hi>;
613 gpio_keys_default_mode: gpio_keys_default {
615 pins = "GPIO67_G2", /* VOL UP */
616 "GPIO91_B6", /* HOME */
617 "GPIO92_D6"; /* VOL DOWN */
618 ste,config = <&gpio_in_pu>;
622 /* Interrupt line for light/proximity sensor GP2AP002 */
624 gp2ap002_kyle_default: gp2ap002_kyle {
626 pins = "GPIO146_D13";
627 ste,config = <&gpio_in_nopull>;
631 /* GPIO-based I2C bus for NCP6914 */
633 i2c_gpio_0_default: i2c_gpio_0 {
635 pins = "GPIO143_D12", "GPIO144_B13";
636 ste,config = <&gpio_in_nopull>;
640 /* GPIO-based I2C bus for ALPS HSCD compass */
642 i2c_gpio_1_default: i2c_gpio_1 {
644 pins = "GPIO151_B17", "GPIO152_D16";
645 ste,config = <&gpio_in_nopull>;
650 wlan_default_mode: wlan_default {
652 pins = "GPIO216_AG12";
653 ste,config = <&gpio_in_pd>;
656 wlan_en_default_mode: wlan_en_default {
658 pins = "GPIO215_AH13";
659 ste,config = <&gpio_out_lo>;
664 bluetooth_default_mode: bluetooth_default {
666 pins = "GPIO199_AH23", "GPIO222_AJ9";
667 ste,config = <&gpio_out_lo>;
671 ste,config = <&gpio_in_nopull>;
676 vibrator_default: vibrator_default {
678 pins = "GPIO195_AG28"; /* MOT_EN */
679 ste,config = <&gpio_out_lo>;
683 /* Interrupt line for the Melfas MMS134S touchscreen */
685 mms134s_kyle_default: mms134s_kyle {
687 pins = "GPIO218_AH11";
688 ste,config = <&gpio_in_nopull>;
693 g05ta03_kyle_default: g05ta03 {
694 /* Reset line, start out de-asserted */
697 ste,config = <&gpio_out_hi>;
699 /* GPS_ON_OFF, start out deasserted (off) */
702 ste,config = <&gpio_out_lo>;
709 /* Hog a few default settings */
710 pinctrl-names = "default";
711 pinctrl-0 = <&gpio_default>;
714 gpio_default: gpio_default {
716 /* Change unused pins to GPIO mode */
718 groups = "gpio3_a_1", /* default: SysClkReq4 */
719 "gpio14_a_1"; /* default: PWMOut1 */
722 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";