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;
27 /* TI TXS0206 level translator for 2.9 V */
28 sd_level_translator: regulator-gpio {
29 compatible = "regulator-fixed";
32 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
35 regulator-name = "sd-level-translator";
36 regulator-min-microvolt = <2900000>;
37 regulator-max-microvolt = <2900000>;
38 regulator-type = "voltage";
40 startup-delay-us = <200>;
42 pinctrl-names = "default";
43 pinctrl-0 = <&sd_level_translator_default>;
46 /* External LDO MIC5366-3.3YMT for eMMC */
47 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
48 compatible = "regulator-fixed";
49 regulator-name = "en-3v3-fixed-supply";
50 regulator-min-microvolt = <3300000>;
51 regulator-max-microvolt = <3300000>;
52 gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
53 startup-delay-us = <5000>;
55 pinctrl-names = "default";
56 pinctrl-0 = <&emmc_ldo_en_default_mode>;
60 * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
61 * LCD_PWR_EN controls both a 3.0V and 1.8V output.
63 lcd_3v0_reg: regulator-gpio-lcd-3v0 {
64 compatible = "regulator-fixed";
65 /* Supplied in turn by VBAT */
66 regulator-name = "VREG_LCD_3V0";
67 regulator-min-microvolt = <3000000>;
68 regulator-max-microvolt = <3000000>;
69 /* GPIO219 controls this regulator */
70 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
72 pinctrl-names = "default";
73 pinctrl-0 = <&lcd_pwr_en_default_mode>;
75 lcd_1v8_reg: regulator-gpio-lcd-1v8 {
76 compatible = "regulator-fixed";
77 /* Supplied in turn by VBAT */
78 regulator-name = "VREG_LCD_1V8";
79 regulator-min-microvolt = <1800000>;
80 regulator-max-microvolt = <1800000>;
81 /* GPIO219 controls this regulator too */
82 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
84 pinctrl-names = "default";
85 pinctrl-0 = <&lcd_pwr_en_default_mode>;
88 wlan_en: regulator-gpio-wlan-en {
89 compatible = "regulator-fixed";
90 regulator-name = "wl-reg-on";
91 regulator-min-microvolt = <3000000>;
92 regulator-max-microvolt = <3000000>;
93 startup-delay-us = <200000>;
95 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
97 pinctrl-names = "default";
98 pinctrl-0 = <&wlan_en_default_mode>;
102 compatible = "gpio-vibrator";
103 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
104 pinctrl-names = "default";
105 pinctrl-0 = <&vibrator_default>;
109 compatible = "gpio-keys";
110 pinctrl-names = "default";
111 pinctrl-0 = <&gpio_keys_default_mode>;
114 linux,code = <KEY_HOME>;
117 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
120 linux,code = <KEY_VOLUMEUP>;
123 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
126 linux,code = <KEY_VOLUMEDOWN>;
129 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
134 compatible = "kinetic,ktd253";
136 enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
137 /* Default to 13/32 brightness */
138 default-brightness = <13>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&gpio_backlight_default_mode>;
143 /* Richtek RT8515GQW Flash LED Driver IC */
145 compatible = "richtek,rt8515";
147 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
149 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
151 * RFS is 16 kOhm and RTS is 100 kOhm giving
152 * the flash max current 343mA and torch max
155 richtek,rfs-ohms = <16000>;
156 richtek,rts-ohms = <100000>;
157 pinctrl-names = "default";
158 pinctrl-0 = <&gpio_flash_default_mode>;
161 function = LED_FUNCTION_FLASH;
162 color = <LED_COLOR_ID_WHITE>;
163 flash-max-timeout-us = <250000>;
164 flash-max-microamp = <343750>;
165 led-max-microamp = <55000>;
170 compatible = "i2c-gpio";
171 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
172 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
173 pinctrl-names = "default";
174 pinctrl-0 = <&i2c_gpio_0_default>;
175 #address-cells = <1>;
177 /* TODO: this should be used by the NCP6914 Camera power management unit */
181 compatible = "i2c-gpio";
182 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
183 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
184 pinctrl-names = "default";
185 pinctrl-0 = <&i2c_gpio_1_default>;
186 #address-cells = <1>;
189 compatible = "alps,hscdtd008a";
191 avdd-supply = <&ab8500_ldo_aux1_reg>;
192 dvdd-supply = <&ab8500_ldo_aux6_reg>;
197 // External Micro SD slot
199 arm,primecell-periphid = <0x10480180>;
200 max-frequency = <100000000>;
206 vmmc-supply = <&ab8500_ldo_aux3_reg>;
207 vqmmc-supply = <&sd_level_translator>;
208 pinctrl-names = "default", "sleep";
209 pinctrl-0 = <&mc0_a_1_default>;
210 pinctrl-1 = <&mc0_a_1_sleep>;
211 cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
217 arm,primecell-periphid = <0x10480180>;
218 max-frequency = <50000000>;
222 vmmc-supply = <&wlan_en>;
223 pinctrl-names = "default", "sleep";
224 pinctrl-0 = <&mc1_a_2_default>;
225 pinctrl-1 = <&mc1_a_2_sleep>;
227 #address-cells = <1>;
231 compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
233 /* GPIO216 WL_HOST_WAKE */
234 interrupt-parent = <&gpio6>;
235 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
236 interrupt-names = "host-wake";
237 pinctrl-names = "default";
238 pinctrl-0 = <&wlan_default_mode>;
243 * eMMC seems to be mostly Samsung KLM4G1YE4C "4YMD1R"
246 arm,primecell-periphid = <0x10480180>;
247 max-frequency = <100000000>;
254 /* From datasheet page 26 figure 9: 300 ms set-up time for 4GB */
255 post-power-on-delay-ms = <300>;
256 vmmc-supply = <&ldo_3v3_reg>;
257 pinctrl-names = "default", "sleep";
258 pinctrl-0 = <&mc2_a_1_default>;
259 pinctrl-1 = <&mc2_a_1_sleep>;
264 /* GBF (Bluetooth) UART */
266 pinctrl-names = "default", "sleep";
267 pinctrl-0 = <&u0_a_1_default>;
268 pinctrl-1 = <&u0_a_1_sleep>;
272 /* BCM4334B0 actually */
273 compatible = "brcm,bcm4330-bt";
274 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
275 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
276 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
277 pinctrl-names = "default";
278 pinctrl-0 = <&bluetooth_default_mode>;
285 pinctrl-names = "default", "sleep";
286 pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
287 pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
290 /* Debugging console UART connected to AB8505 USB */
293 pinctrl-names = "default", "sleep";
294 pinctrl-0 = <&u2rxtx_c_1_default>;
295 pinctrl-1 = <&u2rxtx_c_1_sleep>;
301 pinctrl-names = "default", "sleep";
302 pinctrl-0 = <&usb_a_1_default>;
303 pinctrl-1 = <&usb_a_1_sleep>;
308 /* Used for VDD for sensors */
309 regulator-name = "AUX1";
310 regulator-min-microvolt = <3000000>;
311 regulator-max-microvolt = <3300000>;
315 /* Supplies the MMS touchscreen only with 3.3V */
316 regulator-name = "AUX2";
317 regulator-min-microvolt = <3300000>;
318 regulator-max-microvolt = <3300000>;
322 /* Used for voltage for external MMC/SD card */
323 regulator-name = "AUX3";
324 regulator-min-microvolt = <1100000>;
325 regulator-max-microvolt = <3300000>;
329 regulator-name = "AUX4";
330 /* Hammer to 3.3V for the touchscreen */
331 regulator-min-microvolt = <3300000>;
332 regulator-max-microvolt = <3300000>;
336 regulator-name = "AUX5";
337 /* 1.8V for the touchscreen */
338 regulator-min-microvolt = <1800000>;
339 regulator-max-microvolt = <1800000>;
343 regulator-name = "AUX6";
344 /* Used by sensors for 1.8 V in R0.1+ */
345 regulator-min-microvolt = <1800000>;
346 regulator-max-microvolt = <1800000>;
351 regulator-name = "AUX8";
361 pinctrl-names = "default", "sleep";
362 pinctrl-0 = <&i2c0_a_1_default>;
363 pinctrl-1 = <&i2c0_a_1_sleep>;
366 compatible = "sharp,gp2ap002s00f";
367 clock-frequency = <400000>;
370 interrupt-parent = <&gpio4>;
371 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
372 vdd-supply = <&ab8500_ldo_aux1_reg>;
373 vio-supply = <&ab8500_ldo_aux6_reg>;
374 pinctrl-names = "default";
375 pinctrl-0 = <&gp2ap002_kyle_default>;
376 sharp,proximity-far-hysteresis = /bits/ 8 <0x2f>;
377 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
385 pinctrl-names = "default", "sleep";
386 pinctrl-0 = <&i2c2_b_2_default>;
387 pinctrl-1 = <&i2c2_b_2_sleep>;
390 compatible = "bosch,bma254";
391 clock-frequency = <400000>;
394 mount-matrix = "-1", "0", "0",
397 vdd-supply = <&ab8500_ldo_aux1_reg>;
398 vddio-supply = <&ab8500_ldo_aux6_reg>;
406 pinctrl-names = "default", "sleep";
407 pinctrl-0 = <&i2c3_c_2_default>;
408 pinctrl-1 = <&i2c3_c_2_sleep>;
410 /* Melfas MMS134S touchscreen */
412 compatible = "melfas,mms134s";
414 /* GPIO218 for IRQ */
415 interrupt-parent = <&gpio6>;
416 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
417 /* AVDD is "analog supply", 2.57-3.47 V */
418 avdd-supply = <&ab8500_ldo_aux2_reg>;
419 /* VDD is "digital supply" 1.71-3.47V */
420 vdd-supply = <&ab8500_ldo_aux5_reg>;
422 touchscreen-size-x = <480>;
423 touchscreen-size-y = <800>;
425 pinctrl-names = "default";
426 pinctrl-0 = <&mms134s_kyle_default>;
432 pinctrl-names = "default";
433 pinctrl-0 = <&dsi_default_mode>;
438 * NT35510-based Hydis HVA40WV1
439 * Apparently some Kyle models can have a NT35512 fitted
440 * here instead. In that case the boot loader needs to
441 * modify this compatible.
443 compatible = "hydis,hva40wv1", "novatek,nt35510";
445 /* v_lcd_3v0 2.3-4.8V */
446 vdd-supply = <&lcd_3v0_reg>;
447 /* v_lcd_1v8 1.65-3.3V */
448 vddi-supply = <&lcd_1v8_reg>;
450 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
451 pinctrl-names = "default";
452 pinctrl-0 = <&display_default_mode>;
453 backlight = <&ktd253>;
462 * This extends the MC0_A_1 default config to include
463 * the card detect GPIO217 line.
468 /* GPIO18, 19 & 20 unused so pull down */
469 ste,config = <&gpio_in_pd>;
472 pins = "GPIO217_AH12"; /* card detect */
473 ste,config = <&gpio_in_pd>;
479 dsi_default_mode: dsi_default {
481 /* Mux in VSI0 used for DSI TE */
483 groups = "lcdvsi0_a_1"; /* VSI0 for LCD */
486 pins = "GPIO68_E1"; /* VSI0 */
487 ste,config = <&in_nopull>;
492 /* Two GPIO lines used by the display */
494 display_default_mode: display_default {
497 * OLED DETECT or check_pba, this appears to be high
498 * on "PBA" which I guess is "prototype board A".
501 ste,config = <&gpio_in_nopull>;
506 * MIPI_DSI0_RESET_N resets the display, leave high
507 * (de-asserted) so we only assert reset explicitly
508 * from the display driver.
510 ste,config = <&gpio_out_hi>;
515 /* GPIO that enables the LDO regulator for the LCD display */
517 lcd_pwr_en_default_mode: lcd_pwr_en_default {
518 /* LCD_PWR_EN on GPIO219 */
520 pins = "GPIO219_AG10";
521 ste,config = <&gpio_out_hi>;
527 gpio_backlight_default_mode: backlight_default {
529 pins = "GPIO69_E2"; /* LCD_BL_CTRL */
530 ste,config = <&gpio_out_lo>;
535 gpio_flash_default_mode: flash_default {
537 pins = "GPIO140_B11", "GPIO141_C12";
538 ste,config = <&gpio_out_lo>;
542 /* GPIO that enables the 2.9V SD card level translator */
543 sd-level-translator {
544 sd_level_translator_default: sd_level_translator_default {
545 /* level shifter on GPIO87 */
548 ste,config = <&gpio_out_hi>;
552 /* GPIO that enables the LDO regulator for the eMMC */
554 emmc_ldo_en_default_mode: emmc_ldo_default {
555 /* LDO enable on GPIO223 */
557 pins = "GPIO223_AH9";
558 ste,config = <&gpio_out_hi>;
564 gpio_keys_default_mode: gpio_keys_default {
566 pins = "GPIO67_G2", /* VOL UP */
567 "GPIO91_B6", /* HOME */
568 "GPIO92_D6"; /* VOL DOWN */
569 ste,config = <&gpio_in_pu>;
573 /* Interrupt line for light/proximity sensor GP2AP002 */
575 gp2ap002_kyle_default: gp2ap002_kyle {
577 pins = "GPIO146_D13";
578 ste,config = <&gpio_in_nopull>;
582 /* GPIO-based I2C bus for NCP6914 */
584 i2c_gpio_0_default: i2c_gpio_0 {
586 pins = "GPIO143_D12", "GPIO144_B13";
587 ste,config = <&gpio_in_nopull>;
591 /* GPIO-based I2C bus for ALPS HSCD compass */
593 i2c_gpio_1_default: i2c_gpio_1 {
595 pins = "GPIO151_B17", "GPIO152_D16";
596 ste,config = <&gpio_in_nopull>;
601 wlan_default_mode: wlan_default {
603 pins = "GPIO216_AG12";
604 ste,config = <&gpio_in_pd>;
607 wlan_en_default_mode: wlan_en_default {
609 pins = "GPIO215_AH13";
610 ste,config = <&gpio_out_lo>;
615 bluetooth_default_mode: bluetooth_default {
617 pins = "GPIO199_AH23", "GPIO222_AJ9";
618 ste,config = <&gpio_out_lo>;
622 ste,config = <&gpio_in_nopull>;
627 vibrator_default: vibrator_default {
629 pins = "GPIO195_AG28"; /* MOT_EN */
630 ste,config = <&gpio_out_lo>;
634 /* Interrupt line for the Melfas MMS134S touchscreen */
636 mms134s_kyle_default: mms134s_kyle {
638 pins = "GPIO218_AH11";
639 ste,config = <&gpio_in_nopull>;
646 /* Hog a few default settings */
647 pinctrl-names = "default";
648 pinctrl-0 = <&gpio_default>;
651 gpio_default: gpio_default {
653 /* Change unused pins to GPIO mode */
655 groups = "gpio3_a_1", /* default: SysClkReq4 */
656 "gpio14_a_1"; /* default: PWMOut1 */
659 pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";