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