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