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 /* Debugging console UART connected to AB8505 USB */
323 pinctrl-names = "default", "sleep";
324 pinctrl-0 = <&u2rxtx_c_1_default>;
325 pinctrl-1 = <&u2rxtx_c_1_sleep>;
331 pinctrl-names = "default", "sleep";
332 pinctrl-0 = <&usb_a_1_default>;
333 pinctrl-1 = <&usb_a_1_sleep>;
337 line-impedance-micro-ohms = <36000>;
342 /* Used for VDD for sensors */
343 regulator-name = "AUX1";
344 regulator-min-microvolt = <3000000>;
345 regulator-max-microvolt = <3300000>;
349 /* Supplies the MMS touchscreen only with 3.3V */
350 regulator-name = "AUX2";
351 regulator-min-microvolt = <3300000>;
352 regulator-max-microvolt = <3300000>;
356 /* Used for voltage for external MMC/SD card */
357 regulator-name = "AUX3";
358 regulator-min-microvolt = <1100000>;
359 regulator-max-microvolt = <3300000>;
363 regulator-name = "AUX4";
364 /* Hammer to 3.3V for the touchscreen */
365 regulator-min-microvolt = <3300000>;
366 regulator-max-microvolt = <3300000>;
370 regulator-name = "AUX5";
371 /* 1.8V for the touchscreen */
372 regulator-min-microvolt = <1800000>;
373 regulator-max-microvolt = <1800000>;
377 regulator-name = "AUX6";
378 /* Used by sensors for 1.8 V in R0.1+ */
379 regulator-min-microvolt = <1800000>;
380 regulator-max-microvolt = <1800000>;
385 regulator-name = "AUX8";
395 pinctrl-names = "default", "sleep";
396 pinctrl-0 = <&i2c0_a_1_default>;
397 pinctrl-1 = <&i2c0_a_1_sleep>;
400 compatible = "sharp,gp2ap002s00f";
401 clock-frequency = <400000>;
404 interrupt-parent = <&gpio4>;
405 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
406 vdd-supply = <&ab8500_ldo_aux1_reg>;
407 vio-supply = <&ab8500_ldo_aux6_reg>;
408 pinctrl-names = "default";
409 pinctrl-0 = <&gp2ap002_kyle_default>;
410 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
411 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
419 pinctrl-names = "default", "sleep";
420 pinctrl-0 = <&i2c2_b_2_default>;
421 pinctrl-1 = <&i2c2_b_2_sleep>;
424 compatible = "bosch,bma254";
425 clock-frequency = <400000>;
428 mount-matrix = "-1", "0", "0",
431 vdd-supply = <&ab8500_ldo_aux1_reg>;
432 vddio-supply = <&ab8500_ldo_aux6_reg>;
440 pinctrl-names = "default", "sleep";
441 pinctrl-0 = <&i2c3_c_2_default>;
442 pinctrl-1 = <&i2c3_c_2_sleep>;
444 /* Melfas MMS134S touchscreen */
446 compatible = "melfas,mms134s";
448 /* GPIO218 for IRQ */
449 interrupt-parent = <&gpio6>;
450 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
451 /* AVDD is "analog supply", 2.57-3.47 V */
452 avdd-supply = <&ab8500_ldo_aux2_reg>;
453 /* VDD is "digital supply" 1.71-3.47V */
454 vdd-supply = <&ab8500_ldo_aux5_reg>;
456 touchscreen-size-x = <480>;
457 touchscreen-size-y = <800>;
459 pinctrl-names = "default";
460 pinctrl-0 = <&mms134s_kyle_default>;
466 pinctrl-names = "default";
467 pinctrl-0 = <&dsi_default_mode>;
472 * NT35510-based Hydis HVA40WV1
473 * Apparently some Kyle models can have a NT35512 fitted
474 * here instead. In that case the boot loader needs to
475 * modify this compatible.
477 compatible = "hydis,hva40wv1", "novatek,nt35510";
479 /* v_lcd_3v0 2.3-4.8V */
480 vdd-supply = <&lcd_3v0_reg>;
481 /* v_lcd_1v8 1.65-3.3V */
482 vddi-supply = <&lcd_1v8_reg>;
484 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
485 pinctrl-names = "default";
486 pinctrl-0 = <&display_default_mode>;
487 backlight = <&ktd253>;
496 * This extends the MC0_A_1 default config to include
497 * the card detect GPIO217 line.
502 /* GPIO18, 19 & 20 unused so pull down */
503 ste,config = <&gpio_in_pd>;
506 pins = "GPIO217_AH12"; /* card detect */
507 ste,config = <&gpio_in_pd>;
513 dsi_default_mode: dsi_default {
515 /* Mux in VSI0 used for DSI TE */
517 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
520 pins = "GPIO68_E1"; /* VSI0 */
521 ste,config = <&in_nopull>;
526 /* Two GPIO lines used by the display */
528 display_default_mode: display_default {
531 * OLED DETECT or check_pba, this appears to be high
532 * on "PBA" which I guess is "prototype board A".
535 ste,config = <&gpio_in_nopull>;
540 * MIPI_DSI0_RESET_N resets the display, leave high
541 * (de-asserted) so we only assert reset explicitly
542 * from the display driver.
544 ste,config = <&gpio_out_hi>;
549 /* GPIO that enables the LDO regulator for the LCD display */
551 lcd_pwr_en_default_mode: lcd_pwr_en_default {
552 /* LCD_PWR_EN on GPIO219 */
554 pins = "GPIO219_AG10";
555 ste,config = <&gpio_out_hi>;
561 gpio_backlight_default_mode: backlight_default {
563 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
564 ste,config = <&gpio_out_lo>;
569 gpio_flash_default_mode: flash_default {
571 pins = "GPIO140_B11", "GPIO141_C12";
572 ste,config = <&gpio_out_lo>;
576 /* GPIO that enables the 2.9V SD card level translator */
577 sd-level-translator {
578 sd_level_translator_default: sd_level_translator_default {
579 /* level shifter on GPIO87 */
582 ste,config = <&gpio_out_hi>;
586 /* GPIO that enables the LDO regulator for the eMMC */
588 emmc_ldo_en_default_mode: emmc_ldo_default {
589 /* LDO enable on GPIO223 */
591 pins = "GPIO223_AH9";
592 ste,config = <&gpio_out_hi>;
598 gpio_keys_default_mode: gpio_keys_default {
600 pins = "GPIO67_G2", /* VOL UP */
601 "GPIO91_B6", /* HOME */
602 "GPIO92_D6"; /* VOL DOWN */
603 ste,config = <&gpio_in_pu>;
607 /* Interrupt line for light/proximity sensor GP2AP002 */
609 gp2ap002_kyle_default: gp2ap002_kyle {
611 pins = "GPIO146_D13";
612 ste,config = <&gpio_in_nopull>;
616 /* GPIO-based I2C bus for NCP6914 */
618 i2c_gpio_0_default: i2c_gpio_0 {
620 pins = "GPIO143_D12", "GPIO144_B13";
621 ste,config = <&gpio_in_nopull>;
625 /* GPIO-based I2C bus for ALPS HSCD compass */
627 i2c_gpio_1_default: i2c_gpio_1 {
629 pins = "GPIO151_B17", "GPIO152_D16";
630 ste,config = <&gpio_in_nopull>;
635 wlan_default_mode: wlan_default {
637 pins = "GPIO216_AG12";
638 ste,config = <&gpio_in_pd>;
641 wlan_en_default_mode: wlan_en_default {
643 pins = "GPIO215_AH13";
644 ste,config = <&gpio_out_lo>;
649 bluetooth_default_mode: bluetooth_default {
651 pins = "GPIO199_AH23", "GPIO222_AJ9";
652 ste,config = <&gpio_out_lo>;
656 ste,config = <&gpio_in_nopull>;
661 vibrator_default: vibrator_default {
663 pins = "GPIO195_AG28"; /* MOT_EN */
664 ste,config = <&gpio_out_lo>;
668 /* Interrupt line for the Melfas MMS134S touchscreen */
670 mms134s_kyle_default: mms134s_kyle {
672 pins = "GPIO218_AH11";
673 ste,config = <&gpio_in_nopull>;
680 /* Hog a few default settings */
681 pinctrl-names = "default";
682 pinctrl-0 = <&gpio_default>;
685 gpio_default: gpio_default {
687 /* Change unused pins to GPIO mode */
689 groups = "gpio3_a_1", /* default: SysClkReq4 */
690 "gpio14_a_1"; /* default: PWMOut1 */
693 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";