xref: /netbsd-src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/ste-ux500-samsung-codina.dts (revision 58c3e048f5c2f43ee7e820013e37079f2e0b6ae5)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Devicetree for the Samsung Galaxy Ace 2 GT-I8160 also known as Codina.
4 *
5 * NOTE: this is the most common variant according to the vendor tree, known
6 * as "R0.0". There appears to be a "R0.4" variant with backlight on GPIO69,
7 * AB8505 and other changes. There is also talk about some variants having a
8 * Samsung S6D27A1 display, indicated by passing a different command line from
9 * the boot loader.
10 *
11 * The Samsung tree further talks about GT-I8160P and GT-I8160chn (China).
12 * The GT-I8160 plain is knonw as the "europe" variant.
13 * The GT-I8160P appears to not use the ST Microelectronics accelerometer.
14 * The GT-I8160chn appears to be the same as the europe variant.
15 */
16
17/dts-v1/;
18#include "ste-db8500.dtsi"
19#include "ste-ab8500.dtsi"
20#include "ste-dbx5x0-pinctrl.dtsi"
21#include <dt-bindings/gpio/gpio.h>
22#include <dt-bindings/leds/common.h>
23#include <dt-bindings/input/input.h>
24#include <dt-bindings/interrupt-controller/irq.h>
25
26/ {
27	model = "Samsung Galaxy Ace 2 (GT-I8160)";
28	compatible = "samsung,codina", "st-ericsson,u8500";
29
30	cpus {
31		cpu@300 {
32			/*
33			 * This has a frequency cap at ~800 MHz in the firmware.
34			 * (Changing this number here will not overclock it.)
35			 */
36			operating-points = <798720 0
37					    399360 0
38					    199680 0>;
39		};
40	};
41
42	chosen {
43		stdout-path = &serial2;
44	};
45
46	/* TI TXS0206 level translator for 2.9 V */
47	sd_level_translator: regulator-gpio {
48		compatible = "regulator-fixed";
49
50		/* GPIO87 EN */
51		gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
52		enable-active-high;
53
54		regulator-name = "sd-level-translator";
55		regulator-min-microvolt = <2900000>;
56		regulator-max-microvolt = <2900000>;
57		regulator-type = "voltage";
58
59		startup-delay-us = <200>;
60
61		pinctrl-names = "default";
62		pinctrl-0 = <&sd_level_translator_default>;
63	};
64
65	/* External LDO MIC5366-3.3YMT for eMMC */
66	ldo_3v3_reg: regulator-gpio-ldo-3v3 {
67		compatible = "regulator-fixed";
68		/* Supplied in turn by VBAT */
69		regulator-name = "VMEM_3V3";
70		regulator-min-microvolt = <3300000>;
71		regulator-max-microvolt = <3300000>;
72		gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>;
73		startup-delay-us = <5000>;
74		enable-active-high;
75		pinctrl-names = "default";
76		pinctrl-0 = <&emmc_ldo_en_default_mode>;
77	};
78
79	/*
80	 * External Ricoh "TSP" regulator for the touchscreen.
81	 * One GPIO line controls two voltages of 3.3V and 1.8V
82	 * this line is known as "TSP_LDO_ON1" in the schematics.
83	 */
84	ldo_tsp_3v3_reg: regulator-gpio-tsp-ldo-3v3 {
85		compatible = "regulator-fixed";
86		/* Supplied in turn by VBAT */
87		regulator-name = "LDO_TSP_A3V3";
88		regulator-min-microvolt = <3300000>;
89		regulator-max-microvolt = <3300000>;
90		/* GPIO94 controls this regulator */
91		gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
92		/* 70 ms power-on delay */
93		startup-delay-us = <70000>;
94		enable-active-high;
95		pinctrl-names = "default";
96		pinctrl-0 = <&tsp_ldo_en_default_mode>;
97	};
98	ldo_tsp_1v8_reg: regulator-gpio-tsp-ldo-1v8 {
99		compatible = "regulator-fixed";
100		/* Supplied in turn by VBAT */
101		regulator-name = "VREG_TSP_1V8";
102		regulator-min-microvolt = <1800000>;
103		regulator-max-microvolt = <1800000>;
104		/* GPIO94 controls this regulator */
105		gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
106		/* 70 ms power-on delay */
107		startup-delay-us = <70000>;
108		enable-active-high;
109		pinctrl-names = "default";
110		pinctrl-0 = <&tsp_ldo_en_default_mode>;
111	};
112
113	/*
114	 * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
115	 * LCD_PWR_EN controls both a 3.0V and 1.8V output.
116	 */
117	lcd_3v0_reg: regulator-gpio-lcd-3v0 {
118		compatible = "regulator-fixed";
119		/* Supplied in turn by VBAT */
120		regulator-name = "VREG_LCD_3.0V";
121		regulator-min-microvolt = <3000000>;
122		regulator-max-microvolt = <3000000>;
123		/* GPIO219 controls this regulator */
124		gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
125		enable-active-high;
126		pinctrl-names = "default";
127		pinctrl-0 = <&lcd_pwr_en_default_mode>;
128	};
129	lcd_1v8_reg: regulator-gpio-lcd-1v8 {
130		compatible = "regulator-fixed";
131		/* Supplied in turn by VBAT */
132		regulator-name = "VREG_LCD_1.8V";
133		regulator-min-microvolt = <1800000>;
134		regulator-max-microvolt = <1800000>;
135		/* GPIO219 controls this regulator too */
136		gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
137		enable-active-high;
138		pinctrl-names = "default";
139		pinctrl-0 = <&lcd_pwr_en_default_mode>;
140	};
141
142	/*
143	 * This regulator is a GPIO line that drives the Broadcom WLAN
144	 * line WL_REG_ON high and enables the internal regulators
145	 * inside the chip. Unfortunatley it is erroneously named
146	 * WLAN_RST_N on the schematic but it is not a reset line.
147	 *
148	 * The voltage specified here is only used to determine the OCR mask,
149	 * the for the SDIO connector, the chip is actually connected
150	 * directly to VBAT.
151	 */
152	wl_reg: regulator-gpio-wlan {
153		compatible = "regulator-fixed";
154		regulator-name = "WL_REG_ON";
155		regulator-min-microvolt = <3000000>;
156		regulator-max-microvolt = <3000000>;
157		startup-delay-us = <100000>;
158		/* GPIO215 (WLAN_RST_N to WL_REG_ON) */
159		gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
160		enable-active-high;
161		pinctrl-names = "default";
162		pinctrl-0 = <&wlan_ldo_en_default>;
163	};
164
165	vibrator {
166		compatible = "gpio-vibrator";
167		/* GPIO195 "MOT_EN" */
168		enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
169		pinctrl-names = "default";
170		pinctrl-0 = <&vibrator_default>;
171	};
172
173	gpio-keys {
174		compatible = "gpio-keys";
175		pinctrl-names = "default";
176		pinctrl-0 = <&gpio_keys_default_mode>;
177
178		button-home {
179			linux,code = <KEY_HOME>;
180			label = "HOME";
181			/* GPIO91 */
182			gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
183		};
184		button-volup {
185			linux,code = <KEY_VOLUMEUP>;
186			label = "VOL+";
187			/* GPIO67 */
188			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
189		};
190		button-voldown {
191			linux,code = <KEY_VOLUMEDOWN>;
192			label = "VOL-";
193			/* GPIO92 */
194			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
195		};
196	};
197
198	gpio-leds {
199		compatible = "gpio-leds";
200		pinctrl-names = "default";
201		pinctrl-0 = <&gpio_leds_default_mode>;
202		touchkey-led {
203			label = "touchkeys";
204			/*
205			 * GPIO194 on R0.0, R0.4 does not use this at all, it
206			 * will instead turn LDO AUX4 on/off for key led backlighy.
207			 * (Line is pulled down on R0.4)
208			 */
209			gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;
210			default-state = "on";
211		};
212	};
213
214	ktd253: backlight {
215		compatible = "kinetic,ktd253";
216		/*
217		 * GPIO68 is for R0.0, the board file talks about a TMO variant
218		 * (R0.4) using GPIO69.
219		 */
220		enable-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
221		/* Default to 13/32 brightness */
222		default-brightness = <13>;
223		pinctrl-names = "default";
224		pinctrl-0 = <&ktd253_backlight_default_mode>;
225	};
226
227	/* Richtek RT8515GQW Flash LED Driver IC */
228	flash {
229		compatible = "richtek,rt8515";
230		/* GPIO 140 */
231		enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
232		/* GPIO 141 */
233		ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
234		/*
235		 * RFS is 16 kOhm and RTS is 100 kOhm giving
236		 * the flash max current 343mA and torch max
237		 * current 55 mA.
238		 */
239		richtek,rfs-ohms = <16000>;
240		richtek,rts-ohms = <100000>;
241		pinctrl-names = "default";
242		pinctrl-0 = <&gpio_flash_default_mode>;
243
244		led {
245			function = LED_FUNCTION_FLASH;
246			color = <LED_COLOR_ID_WHITE>;
247			flash-max-timeout-us = <250000>;
248			flash-max-microamp = <343750>;
249			led-max-microamp = <55000>;
250		};
251	};
252
253	/* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
254	i2c-gpio-0 {
255		compatible = "i2c-gpio";
256		sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
257		scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
258		pinctrl-names = "default";
259		pinctrl-0 = <&i2c_gpio_0_default>;
260		#address-cells = <1>;
261		#size-cells = <0>;
262
263		magnetometer@c {
264			compatible = "alps,hscdtd008a";
265			reg = <0x0c>;
266			clock-frequency = <400000>;
267
268			avdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
269			dvdd-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
270		};
271		/* TODO: this should also be used by the SM5103 Camera power management unit */
272	};
273
274	/* Bit-banged I2C on GPIO151 and GPIO152 also called "NFC I2C" */
275	i2c-gpio-1 {
276		compatible = "i2c-gpio";
277		sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
278		scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
279		pinctrl-names = "default";
280		pinctrl-0 = <&i2c_gpio_1_default>;
281		#address-cells = <1>;
282		#size-cells = <0>;
283
284		/* TODO: add the NFC chip here */
285	};
286
287	spi-gpio-0 {
288		compatible = "spi-gpio";
289		/* Clock on GPIO220, pin SCL */
290		sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
291		/* MOSI on GPIO224, pin SDI "slave data in" */
292		mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
293		/* MISO on GPIO225, pin SDO "slave data out" */
294		miso-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
295		/* Chip select on GPIO201 */
296		cs-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
297		num-chipselects = <1>;
298
299		pinctrl-names = "default";
300		pinctrl-0 = <&spi_gpio_0_default>;
301		#address-cells = <1>;
302		#size-cells = <0>;
303
304		/*
305		 * Some Codinas (90%) have a WideChips WS2401-based LMS380KF01
306		 * display mounted and some 10% has a Samsung S6D27A1 instead.
307		 * The boot loader needs to modify this compatible to
308		 * correspond to whatever is passed from the early Samsung boot.
309		 */
310		panel@0 {
311			compatible = "samsung,lms380kf01";
312			spi-max-frequency = <1200000>;
313			/* TYPE 3: inverse clock polarity and phase */
314			spi-cpha;
315			spi-cpol;
316
317			reg = <0>;
318			vci-supply = <&lcd_3v0_reg>;
319			vccio-supply = <&lcd_1v8_reg>;
320
321			/* Reset on GPIO139 */
322			reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
323			/* LCD_VGH/LCD_DETECT, ESD IRQ on GPIO93 */
324			interrupt-parent = <&gpio2>;
325			interrupts = <29 IRQ_TYPE_EDGE_RISING>;
326
327			pinctrl-names = "default";
328			pinctrl-0 = <&panel_default_mode>;
329			backlight = <&ktd253>;
330
331			port {
332				panel_in: endpoint {
333					remote-endpoint = <&display_out>;
334				};
335			};
336		};
337	};
338
339	soc {
340		/* External Micro SD slot */
341		mmc@80126000 {
342			arm,primecell-periphid = <0x10480180>;
343			max-frequency = <100000000>;
344			bus-width = <4>;
345			cap-sd-highspeed;
346			cap-mmc-highspeed;
347			st,sig-pin-fbclk;
348			full-pwr-cycle;
349			/* MMC is powered by AUX3 1.2V .. 2.91V */
350			vmmc-supply = <&ab8500_ldo_aux3_reg>;
351			/* 2.9 V level translator is using AUX3 at 2.9 V as well */
352			vqmmc-supply = <&sd_level_translator>;
353			pinctrl-names = "default", "sleep";
354			pinctrl-0 = <&mc0_a_2_default>;
355			pinctrl-1 = <&mc0_a_2_sleep>;
356			cd-gpios  = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
357			status = "okay";
358		};
359
360		/* WLAN SDIO channel */
361		mmc@80118000 {
362			arm,primecell-periphid = <0x10480180>;
363			max-frequency = <50000000>;
364			bus-width = <4>;
365			non-removable;
366			cap-sd-highspeed;
367			pinctrl-names = "default", "sleep";
368			pinctrl-0 = <&mc1_a_2_default>;
369			pinctrl-1 = <&mc1_a_2_sleep>;
370			/*
371			 * GPIO-controlled voltage enablement: this drives
372			 * the WL_REG_ON line high when we use this device.
373			 * Represented as regulator to fill OCR mask.
374			 */
375			vmmc-supply = <&wl_reg>;
376
377			#address-cells = <1>;
378			#size-cells = <0>;
379			status = "okay";
380
381			wifi@1 {
382				/* Actually BRCM4330 */
383				compatible = "brcm,bcm4330-fmac", "brcm,bcm4329-fmac";
384				reg = <1>;
385				/* GPIO216 WL_HOST_WAKE */
386				interrupt-parent = <&gpio6>;
387				interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
388				interrupt-names = "host-wake";
389				pinctrl-names = "default";
390				pinctrl-0 = <&wlan_default_mode>;
391			};
392		};
393
394		/* eMMC */
395		mmc@80005000 {
396			arm,primecell-periphid = <0x10480180>;
397			max-frequency = <100000000>;
398			bus-width = <8>;
399			non-removable;
400			cap-mmc-highspeed;
401			mmc-ddr-1_8v;
402			no-sdio;
403			no-sd;
404			vmmc-supply = <&ldo_3v3_reg>;
405			pinctrl-names = "default", "sleep";
406			/*
407			 * GPIO130 will be set to input no pull-up resulting in a resistor
408			 * pulling the reset high and taking the memory out of reset.
409			 */
410			pinctrl-0 = <&mc2_a_1_default>;
411			pinctrl-1 = <&mc2_a_1_sleep>;
412			status = "okay";
413		};
414
415		/* GBF (Bluetooth) UART */
416		uart@80120000 {
417			pinctrl-names = "default", "sleep";
418			pinctrl-0 = <&u0_a_1_default>;
419			pinctrl-1 = <&u0_a_1_sleep>;
420			status = "okay";
421
422			bluetooth {
423				compatible = "brcm,bcm4330-bt";
424				/* GPIO222 rail BT_VREG_EN to BT_REG_ON */
425				shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
426				/* BT_WAKE on GPIO199 */
427				device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
428				/* BT_HOST_WAKE on GPIO97 */
429				/* FIXME: convert to interrupt */
430				host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
431				/* BT_RST_N on GPIO209 */
432				reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
433				pinctrl-names = "default";
434				pinctrl-0 = <&bluetooth_default_mode>;
435			};
436		};
437
438		/* GPS UART */
439		uart@80121000 {
440			status = "okay";
441			pinctrl-names = "default", "sleep";
442			/* CTS/RTS is not used, CTS is repurposed as GPIO */
443			pinctrl-0 = <&u1rxtx_a_1_default>;
444			pinctrl-1 = <&u1rxtx_a_1_sleep>;
445			/* FIXME: add a device for the GPS here */
446		};
447
448		/* Debugging console UART connected to TSU6111RSVR (FSA880) */
449		uart@80007000 {
450			status = "okay";
451			pinctrl-names = "default", "sleep";
452			pinctrl-0 = <&u2rxtx_c_1_default>;
453			pinctrl-1 = <&u2rxtx_c_1_sleep>;
454		};
455
456		prcmu@80157000 {
457			ab8500 {
458				ab8500_usb {
459					pinctrl-names = "default", "sleep";
460					pinctrl-0 = <&usb_a_1_default>;
461					pinctrl-1 = <&usb_a_1_sleep>;
462				};
463
464				ab8500-regulators {
465					ab8500_ldo_aux1 {
466						/* Used for VDD for sensors */
467						regulator-name = "V-SENSORS-VDD";
468						regulator-min-microvolt = <3000000>;
469						regulator-max-microvolt = <3000000>;
470					};
471
472					ab8500_ldo_aux2 {
473						/* Used for VIO for sensors */
474						regulator-name = "V-SENSORS-VIO";
475						regulator-min-microvolt = <1800000>;
476						regulator-max-microvolt = <1800000>;
477					};
478
479					ab8500_ldo_aux3 {
480						/* Used for voltage for external MMC/SD card */
481						regulator-name = "V-MMC-SD";
482						regulator-min-microvolt = <1200000>;
483						regulator-max-microvolt = <2910000>;
484					};
485				};
486			};
487		};
488
489		/* I2C0 also known as "AGC I2C" */
490		i2c@80004000 {
491			status = "okay";
492			pinctrl-names = "default", "sleep";
493			pinctrl-0 = <&i2c0_a_1_default>;
494			pinctrl-1 = <&i2c0_a_1_sleep>;
495
496			/* TODO: write bindings and driver for this proximity sensor */
497			proximity@39 {
498				/* Codina has the Mouser TMD2672 */
499				compatible = "mouser,tmd2672";
500				clock-frequency = <400000>;
501				reg = <0x39>;
502
503				/* IRQ on GPIO146 "PS_INT" */
504				interrupt-parent = <&gpio4>;
505				interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
506				/* FIXME: needs a VDDIO supply that is connected to a pull-up resistor */
507				vdd-supply = <&ab8500_ldo_aux1_reg>;
508				pinctrl-names = "default";
509				pinctrl-0 = <&tms2672_codina_default>;
510			};
511		};
512
513		/* I2C1 on GPIO16 and GPIO17 also called "MUS I2C" */
514		i2c@80122000 {
515			status = "okay";
516			pinctrl-names = "default","sleep";
517			/* FIXME: If it doesn't work try what we use on Gavini */
518			pinctrl-0 = <&i2c1_b_2_default>;
519			pinctrl-1 = <&i2c1_b_2_sleep>;
520
521			/* Texas Instruments TSU6111 micro USB switch */
522			usb-switch@25 {
523				compatible = "ti,tsu6111";
524				reg = <0x25>;
525				/* Interrupt JACK_INT_N on GPIO95 */
526				interrupt-parent = <&gpio2>;
527				interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
528				pinctrl-names = "default";
529				pinctrl-0 = <&tsu6111_codina_default>;
530			};
531		};
532
533		/* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */
534		i2c@80128000 {
535			status = "okay";
536			pinctrl-names = "default", "sleep";
537			pinctrl-0 = <&i2c2_b_2_default>;
538			pinctrl-1 = <&i2c2_b_2_sleep>;
539
540			lisd3dh@19 {
541				/* ST Microelectronics Accelerometer */
542				compatible = "st,lis3dh-accel";
543				st,drdy-int-pin = <1>;
544				reg = <0x19>;
545				vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
546				vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
547				mount-matrix = "0", "-1", "0",
548					       "1", "0", "0",
549					       "0", "0", "1";
550			};
551		};
552
553		/* I2C3 */
554		i2c@80110000 {
555			status = "okay";
556
557			pinctrl-names = "default", "sleep";
558			pinctrl-0 = <&i2c3_c_2_default>;
559			pinctrl-1 = <&i2c3_c_2_sleep>;
560
561			/* TODO: write bindings and driver for this touchscreen */
562
563			/* Zinitix BT404 ISP part */
564			isp@50 {
565				compatible = "zinitix,bt404-isp";
566				reg = <0x50>;
567				pinctrl-names = "default";
568				pinctrl-0 = <&tsp_default>;
569			};
570
571			/* Zinitix BT404 touchscreen, also has the touchkeys for menu and back */
572			touchscreen@20 {
573				compatible = "zinitix,bt404";
574				reg = <0x20>;
575				/* GPIO218 (TSP_INT_1V8) */
576				interrupt-parent = <&gpio6>;
577				interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
578				vcca-supply = <&ldo_tsp_3v3_reg>;
579				vdd-supply = <&ldo_tsp_1v8_reg>;
580				zinitix,mode = <2>;
581				touchscreen-size-x = <480>;
582				touchscreen-size-y = <800>;
583				pinctrl-names = "default";
584				pinctrl-0 = <&tsp_default>;
585			};
586		};
587
588		mcde@a0350000 {
589			status = "okay";
590			pinctrl-names = "default";
591			pinctrl-0 = <&dpi_default_mode>;
592
593			port {
594				display_out: endpoint {
595					remote-endpoint = <&panel_in>;
596				};
597			};
598		};
599	};
600};
601
602&pinctrl {
603	/*
604	 * This extends the MC0_A_2 default config to include
605	 * the card detect GPIO217 line.
606	 */
607	sdi0 {
608		mc0_a_2_default {
609			default_cfg4 {
610				pins = "GPIO217_AH12"; /* card detect */
611				ste,config = <&gpio_in_pd>;
612			};
613		};
614	};
615	sdi2 {
616		/*
617		 * This will make the resistor mounted in R0.0 pull up
618		 * the reset line and take the eMMC out of reset. On
619		 * R0.4 variants, GPIO130 should be set in GPIO mode and
620		 * pulled down. (Not connected.)
621		 */
622		mc2_a_1_default {
623			default_cfg2 {
624				pins = "GPIO130_C8"; /* FBCLK */
625				ste,config = <&in_nopull>;
626			};
627		};
628	};
629	/* GPIO that enables the 2.9V SD card level translator */
630	sd-level-translator {
631		sd_level_translator_default: sd_level_translator_default {
632			/* level shifter on GPIO87 */
633			codina_cfg1 {
634				pins = "GPIO87_B3";
635				ste,config = <&gpio_out_hi>;
636			};
637		};
638	};
639	/* GPIO that enables the LDO regulator for the eMMC */
640	emmc-ldo {
641		emmc_ldo_en_default_mode: emmc_ldo_default {
642			/* LDO enable on GPIO223 */
643			codina_cfg1 {
644				pins = "GPIO223_AH9";
645				ste,config = <&gpio_out_hi>;
646			};
647		};
648	};
649	/* GPIOs for panel control */
650	panel {
651		panel_default_mode: panel_default {
652			codina_cfg1 {
653				/* Reset line */
654				pins = "GPIO139_C9";
655				ste,config = <&gpio_out_lo>;
656			};
657			codina_cfg2 {
658				/* ESD IRQ line "LCD detect" */
659				pins = "GPIO93_B7";
660				ste,config = <&gpio_in_nopull>;
661			};
662		};
663	};
664	/* GPIO that enables the LDO regulator for the touchscreen */
665	tsp-ldo {
666		tsp_ldo_en_default_mode: tsp_ldo_default {
667			/* LDO enable on GPIO94 */
668			gavini_cfg1 {
669				pins = "GPIO94_D7";
670				ste,config = <&gpio_out_hi>;
671			};
672		};
673	};
674	/* GPIO that enables the LDO regulator for the LCD display */
675	lcd-ldo {
676		lcd_pwr_en_default_mode: lcd_pwr_en_default {
677			/* LCD_PWR_EN on GPIO219 */
678			codina_cfg1 {
679				pins = "GPIO219_AG10";
680				ste,config = <&gpio_out_hi>;
681			};
682		};
683	};
684	/* GPIO that enables the LDO regulator for the key LED */
685	key-led {
686		gpio_leds_default_mode: en_led_ldo_default {
687			/* EN_LED_LDO on GPIO194 */
688			codina_cfg1 {
689				pins = "GPIO194_AF27";
690				ste,config = <&gpio_out_hi>;
691			};
692		};
693	};
694	/* GPIO that enables the WLAN internal LDO regulators */
695	wlan-ldo {
696		wlan_ldo_en_default: wlan_ldo_default {
697			/* GPIO215 named WLAN_RST_N */
698			codina_cfg1 {
699				pins = "GPIO215_AH13";
700				ste,config = <&gpio_out_lo>;
701			};
702		};
703	};
704	/* Backlight GPIO */
705	backlight {
706		ktd253_backlight_default_mode: backlight_default {
707			skomer_cfg1 {
708				pins = "GPIO68_E1"; /* LCD_BL_CTRL */
709				ste,config = <&gpio_out_lo>;
710			};
711		};
712	};
713	/* Flash and torch */
714	flash {
715		gpio_flash_default_mode: flash_default {
716			codina_cfg1 {
717				pins = "GPIO140_B11", "GPIO141_C12";
718				ste,config = <&gpio_out_lo>;
719			};
720		};
721	};
722	/* GPIO keys */
723	gpio-keys {
724		gpio_keys_default_mode: gpio_keys_default {
725			skomer_cfg1 {
726				pins = "GPIO67_G2", /* VOL UP */
727				       "GPIO91_B6", /* HOME */
728				       "GPIO92_D6"; /* VOL DOWN */
729				ste,config = <&gpio_in_pu>;
730			};
731		};
732	};
733	/* Interrupt line for the Zinitix BT404 touchscreen */
734	tsp {
735		tsp_default: tsp_default {
736			codina_cfg1 {
737				pins = "GPIO218_AH11";	/* TSP_INT_1V8 */
738				ste,config = <&gpio_in_nopull>;
739			};
740		};
741	};
742	/* Interrupt line for light/proximity sensor TMS2672 */
743	tms2672 {
744		tms2672_codina_default: tms2672_codina {
745			codina_cfg1 {
746				pins = "GPIO146_D13";
747				ste,config = <&gpio_in_nopull>;
748			};
749		};
750	};
751	/* GPIO-based I2C bus for subpmu */
752	i2c-gpio-0 {
753		i2c_gpio_0_default: i2c_gpio_0 {
754			codina_cfg1 {
755				pins = "GPIO143_D12", "GPIO144_B13";
756				ste,config = <&gpio_in_nopull>;
757			};
758		};
759	};
760	/* GPIO-based I2C bus for the NFC */
761	i2c-gpio-1 {
762		i2c_gpio_1_default: i2c_gpio_1 {
763			codina_cfg1 {
764				pins = "GPIO151_D17", "GPIO152_D16";
765				ste,config = <&gpio_in_nopull>;
766			};
767		};
768	};
769	/* GPIO-based SPI bus for the display */
770	spi-gpio-0 {
771		spi_gpio_0_default: spi_gpio_0_d {
772			codina_cfg1 {
773				pins = "GPIO220_AH10", "GPIO201_AF24", "GPIO224_AG9";
774				ste,config = <&gpio_out_hi>;
775			};
776			codina_cfg2 {
777				pins = "GPIO225_AG8";
778				/* Needs pull down, no pull down resistor on board */
779				ste,config = <&gpio_in_pd>;
780			};
781		};
782		spi_gpio_0_sleep: spi_gpio_0_s {
783			codina_cfg1 {
784				pins = "GPIO220_AH10", "GPIO201_AF24",
785				       "GPIO224_AG9", "GPIO225_AG8";
786				ste,config = <&gpio_out_hi>;
787			};
788		};
789	};
790	wlan {
791		wlan_default_mode: wlan_default {
792			/* GPIO216 for WL_HOST_WAKE */
793			codina_cfg2 {
794				pins = "GPIO216_AG12";
795				ste,config = <&gpio_in_pd>;
796			};
797		};
798	};
799	bluetooth {
800		bluetooth_default_mode: bluetooth_default {
801			/* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */
802			codina_cfg1 {
803				pins = "GPIO199_AH23", "GPIO222_AJ9";
804				ste,config = <&gpio_out_lo>;
805			};
806			/* GPIO97 BT_HOST_WAKE */
807			codina_cfg2 {
808				pins = "GPIO97_D9";
809				ste,config = <&gpio_in_nopull>;
810			};
811			/* GPIO209 BT_RST_N */
812			codina_cfg3 {
813				pins = "GPIO209_AG15";
814				ste,config = <&gpio_out_hi>;
815			};
816		};
817	};
818	/* Interrupt line for TI TSU6111 Micro USB switch */
819	tsu6111 {
820		tsu6111_codina_default: tsu6111_codina {
821			codina_cfg1 {
822				/* GPIO95 used for IRQ */
823				pins = "GPIO95_E8";
824				ste,config = <&gpio_in_nopull>;
825			};
826		};
827	};
828	vibrator {
829		vibrator_default: vibrator_default {
830			codina_cfg1 {
831				pins = "GPIO195_AG28";	/* MOT_EN */
832				ste,config = <&gpio_out_lo>;
833			};
834		};
835	};
836	mcde {
837		dpi_default_mode: dpi_default {
838			default_mux1 {
839				/* Mux in all the data lines */
840				function = "lcd";
841				groups =
842					/* Data lines D0-D7 GPIO70..GPIO77 */
843					"lcd_d0_d7_a_1",
844					/* Data lines D8-D11 GPIO78..GPIO81 */
845					"lcd_d8_d11_a_1",
846					/* Data lines D12-D15 GPIO82..GPIO85 */
847					"lcd_d12_d15_a_1",
848					/* Data lines D16-D23 GPIO161..GPIO168 */
849					"lcd_d16_d23_b_1";
850			};
851			default_mux2 {
852				function = "lcda";
853				/* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */
854				groups = "lcdaclk_b_1", "lcda_b_1";
855			};
856			/* Input, no pull-up is the default state for pins used for an alt function */
857			default_cfg1 {
858				pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23";
859				ste,config = <&in_nopull>;
860			};
861		};
862	};
863};
864