]> git.ipfire.org Git - people/ms/linux.git/blame - arch/arm/boot/dts/ste-ux500-samsung-janice.dts
ARM: dts: ux500: Fix Janice accelerometer mounting matrix
[people/ms/linux.git] / arch / arm / boot / dts / ste-ux500-samsung-janice.dts
CommitLineData
78894ade
LW
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Devicetree for the Samsung Galaxy S Advance GT-I9070 also known as Janice.
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>
e9cb878e 11#include <dt-bindings/leds/common.h>
78894ade
LW
12#include <dt-bindings/input/input.h>
13#include <dt-bindings/interrupt-controller/irq.h>
14
15/ {
16 model = "Samsung Galaxy S Advance (GT-I9070)";
17 compatible = "samsung,janice", "st-ericsson,u8500";
18
19 chosen {
20 stdout-path = &serial2;
21 };
22
be3a60a9
LW
23 battery: battery {
24 compatible = "samsung,eb535151vu";
25 };
26
fb7f1727
LW
27 thermal-zones {
28 battery-thermal {
29 /* This zone will be polled by the battery temperature code */
30 polling-delay = <0>;
31 polling-delay-passive = <0>;
32 thermal-sensors = <&bat_therm>;
33 };
34 };
35
36 bat_therm: thermistor {
37 compatible = "samsung,1404-001221";
38 io-channels = <&gpadc 0x02>; /* BatTemp */
39 pullup-uv = <1800000>;
40 pullup-ohm = <230000>;
41 pulldown-ohm = <0>;
42 #thermal-sensor-cells = <0>;
43 };
44
78894ade
LW
45 /* External LDO for eMMC LDO VMEM_3V3 controlled by GPIO6 */
46 ldo_3v3_reg: regulator-gpio-ldo-3v3 {
47 compatible = "regulator-fixed";
48 /* Supplied in turn by VBAT */
49 regulator-name = "VMEM_3V3";
50 regulator-min-microvolt = <3300000>;
51 regulator-max-microvolt = <3300000>;
52 gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
53 startup-delay-us = <5000>; // FIXME
54 enable-active-high;
55 pinctrl-names = "default";
56 pinctrl-0 = <&emmc_ldo_en_default_mode>;
57 };
58
59 /*
60 * External Ricoh "TSP" regulator for the touchscreen.
61 * One GPIO line controls two voltages of 3.3V and 1.8V
62 * this line is known as "TSP_LDO_ON1" in the schematics.
63 */
64 ldo_tsp_3v3_reg: regulator-gpio-tsp-ldo-3v3 {
65 compatible = "regulator-fixed";
66 /* Supplied in turn by VBAT */
67 regulator-name = "LDO_TSP_A3V3";
68 regulator-min-microvolt = <3300000>;
69 regulator-max-microvolt = <3300000>;
70 /* GPIO94 controls this regulator */
71 gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
72 /* 70 ms power-on delay */
73 startup-delay-us = <70000>;
74 enable-active-high;
75 pinctrl-names = "default";
76 pinctrl-0 = <&tsp_ldo_en_default_mode>;
77 };
78 ldo_tsp_1v8_reg: regulator-gpio-tsp-ldo-1v8 {
79 compatible = "regulator-fixed";
80 /* Supplied in turn by VBAT */
81 regulator-name = "VREG_TSP_1V8";
82 regulator-min-microvolt = <1800000>;
83 regulator-max-microvolt = <1800000>;
84 /* GPIO94 controls this regulator */
85 gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
86 /* 70 ms power-on delay */
87 startup-delay-us = <70000>;
88 enable-active-high;
89 pinctrl-names = "default";
90 pinctrl-0 = <&tsp_ldo_en_default_mode>;
91 };
92
93 /*
94 * External Ricoh "TSP" regulator for the touchkeys.
95 * Two GPIO lines controls two voltages of 3.3V and 1.8V
96 * TSP_LDO_ON2 controls VREG_TOUCHKEY_1V8
97 * EN_LED_LDO controls VREG_KLED_3V3 (key LED)
98 */
99 ldo_kled_3v3_reg: regulator-gpio-vreg-kled-3v3 {
100 compatible = "regulator-fixed";
101 /* Supplied in turn by VBAT */
102 regulator-name = "VREG_KLED_3V3";
103 regulator-min-microvolt = <3300000>;
104 regulator-max-microvolt = <3300000>;
105 /* GPIO68 controls this regulator */
106 gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
107 /* 70 ms power-on delay */
108 startup-delay-us = <70000>;
109 enable-active-high;
110 pinctrl-names = "default";
111 pinctrl-0 = <&en_led_ldo_default_mode>;
112 };
113 ldo_touchkey_1v8_reg: regulator-gpio-vreg-touchkey-1v8 {
114 compatible = "regulator-fixed";
115 /* Supplied in turn by VBAT */
116 regulator-name = "VREG_TOUCHKEY_1V8";
117 regulator-min-microvolt = <1800000>;
118 regulator-max-microvolt = <1800000>;
119 /* GPIO89 controls this regulator */
120 gpio = <&gpio2 25 GPIO_ACTIVE_HIGH>;
121 /* 70 ms power-on delay */
122 startup-delay-us = <70000>;
123 enable-active-high;
124 pinctrl-names = "default";
125 pinctrl-0 = <&tsp_ldo_on2_default_mode>;
126 };
127
128
129 /*
130 * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
131 * LCD_PWR_EN controls a 3.0V and 1.8V output.
132 */
133 lcd_3v0_reg: regulator-gpio-lcd-3v0 {
134 compatible = "regulator-fixed";
135 /* Supplied in turn by VBAT */
136 regulator-name = "VREG_LCD_3V0";
137 regulator-min-microvolt = <3000000>;
138 regulator-max-microvolt = <3000000>;
139 /* GPIO219 controls this regulator */
140 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
141 enable-active-high;
142 pinctrl-names = "default";
143 pinctrl-0 = <&lcd_pwr_en_default_mode>;
144 };
145 lcd_1v8_reg: regulator-gpio-lcd-1v8 {
146 compatible = "regulator-fixed";
147 /* Supplied in turn by VBAT */
148 regulator-name = "VREG_LCD_1V8";
149 regulator-min-microvolt = <1800000>;
150 regulator-max-microvolt = <1800000>;
151 /* GPIO219 controls this regulator */
152 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
153 enable-active-high;
154 pinctrl-names = "default";
155 pinctrl-0 = <&lcd_pwr_en_default_mode>;
156 };
157
158 /*
159 * This regulator is a GPIO line that drives the Broadcom WLAN
2a5b0570
LW
160 * line WL_REG_ON high and enables the internal regulators
161 * inside the chip. Unfortunatley it is erroneously named
162 * WLAN_RST_N on the schematic but it is not a reset line.
78894ade
LW
163 *
164 * The voltage specified here is only used to determine the OCR mask,
165 * the for the SDIO connector, the chip is actually connected
166 * directly to VBAT.
167 */
2a5b0570 168 wl_reg: regulator-gpio-wlan {
78894ade 169 compatible = "regulator-fixed";
2a5b0570 170 regulator-name = "WL_REG_ON";
78894ade
LW
171 regulator-min-microvolt = <3000000>;
172 regulator-max-microvolt = <3000000>;
173 startup-delay-us = <100000>;
2a5b0570
LW
174 /* GPIO215 (WLAN_RST_N to WL_REG_ON) */
175 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
78894ade
LW
176 enable-active-high;
177 pinctrl-names = "default";
178 pinctrl-0 = <&wlan_ldo_en_default>;
179 };
180
181
182 gpio-keys {
183 compatible = "gpio-keys";
184 pinctrl-names = "default";
185 pinctrl-0 = <&gpio_keys_default_mode>;
186
187 button-home {
188 linux,code = <KEY_HOME>;
189 label = "HOME";
190 /* GPIO91 */
191 gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
192 };
193 button-volup {
194 linux,code = <KEY_VOLUMEUP>;
195 label = "VOL+";
196 /* GPIO67 */
197 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
198 };
199 button-voldown {
200 linux,code = <KEY_VOLUMEDOWN>;
201 label = "VOL-";
202 /* GPIO92 */
203 gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
204 };
205 };
206
e9cb878e
LW
207 /* Richtek RT8515GQW Flash LED Driver IC */
208 flash {
209 compatible = "richtek,rt8515";
210 /* GPIO 140 */
211 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
212 /* GPIO 141 */
213 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
214 /*
215 * RFS is 16 kOhm and RTS is 100 kOhm giving
216 * the flash max current 343mA and torch max
217 * current 55 mA.
218 */
219 richtek,rfs-ohms = <16000>;
220 richtek,rts-ohms = <100000>;
221 pinctrl-names = "default";
222 pinctrl-0 = <&gpio_flash_default_mode>;
223
224 led {
225 function = LED_FUNCTION_FLASH;
226 color = <LED_COLOR_ID_WHITE>;
227 flash-max-timeout-us = <250000>;
228 flash-max-microamp = <343750>;
229 led-max-microamp = <55000>;
230 };
231 };
232
78894ade
LW
233 /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
234 i2c-gpio-0 {
235 compatible = "i2c-gpio";
236 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
237 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
238 pinctrl-names = "default";
239 pinctrl-0 = <&i2c_gpio_0_default>;
240 #address-cells = <1>;
241 #size-cells = <0>;
242
243 /* Yamaha YAS530 magnetometer */
244 magnetometer@2e {
245 compatible = "yamaha,yas530";
246 reg = <0x2e>;
247 /* VDD 3V */
248 vdd-supply = <&ab8500_ldo_aux1_reg>;
249 /* IOVDD 1.8V */
250 iovdd-supply = <&ab8500_ldo_aux2_reg>;
251 /* GPIO204 COMPASS_RST_N */
252 reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
253 pinctrl-names = "default";
254 pinctrl-0 = <&yas529_default>;
255 };
256 /* TODO: this should also be used by the NCP6914 Camera power management unit */
257 };
258
259 /*
260 * These pins do have an spi controller, however the controller on
261 * these pins is not the fully featured PL022 SSP/SPI block but the
262 * ST Micro diet "PL023" version. One of the lacking features in
263 * this derivative is 3wire support, so it cannot be used to drive
264 * this panel interface. We have to use GPIO bit-banging instead.
265 */
266 spi-gpio-0 {
267 compatible = "spi-gpio";
268 /* Clock on GPIO220 */
269 sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
270 /* MISO/MOSI on GPIO224 (no separate MISO pin) */
271 mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
272 /* Chip select on GPIO223 */
273 cs-gpios = <&gpio6 31 GPIO_ACTIVE_LOW>;
274 num-chipselects = <1>;
275
276 pinctrl-names = "default";
277 pinctrl-0 = <&spi_gpio_0_default>;
278 #address-cells = <1>;
279 #size-cells = <0>;
280
281 panel@0 {
282 compatible = "samsung,s6e63m0";
283 reg = <0>;
284 vdd3-supply = <&lcd_3v0_reg>;
285 vci-supply = <&lcd_1v8_reg>;
286 /* Reset on GPIO139 */
287 reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
288 pinctrl-names = "default";
289 pinctrl-0 = <&panel_default_mode>;
290 spi-3wire;
ffc011b6
LW
291 /* TYPE 3: inverse clock polarity and phase */
292 spi-cpha;
293 spi-cpol;
78894ade
LW
294
295 port {
296 panel_in: endpoint {
297 remote-endpoint = <&display_out>;
298 };
299 };
300 };
301 };
302
303 /*
304 * Current sense amplifier on the light sensor to convert current to
305 * voltage. We do not know if this is the actual configuration. The
306 * sense resistor value was found by calibrating in a room ambient
307 * light with a second mobile phone light sensor as reference. If you
308 * pry a Janice phone apart and inspect it you may figure this out.
309 */
310 gp2a_shunt: current-sense-shunt {
311 compatible = "current-sense-shunt";
312 io-channels = <&gpadc 0x07>;
313 shunt-resistor-micro-ohms = <15000000>; /* 15 ohms c:a */
314 #io-channel-cells = <0>;
315 io-channel-ranges;
316 };
317
318 /* Bit-banged I2C on GPIO196 and GPIO197 also called "TOUCHKEY_I2C" */
319 i2c-gpio-1 {
320 compatible = "i2c-gpio";
321 sda-gpios = <&gpio6 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
322 scl-gpios = <&gpio6 4 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
323 clock-frequency = <400000>;
324 pinctrl-names = "default";
325 pinctrl-0 = <&i2c_gpio_1_default>;
326 #address-cells = <1>;
327 #size-cells = <0>;
328
329 touchkey@20 {
330 compatible = "coreriver,tc360-touchkey";
331 reg = <0x20>;
332 vdd-supply = <&ldo_kled_3v3_reg>;
333 vcc-supply = <&ldo_touchkey_1v8_reg>;
334 vddio-supply = <&ldo_touchkey_1v8_reg>;
335
336 /* Interrupt on GPIO 198 */
337 interrupt-parent = <&gpio6>;
338 interrupts = <6 IRQ_TYPE_EDGE_RISING>;
339
340 pinctrl-names = "default";
341 pinctrl-0 = <&touchkey_default_mode>;
342 linux,keycodes = <KEY_MENU KEY_BACK>;
343 };
344 };
345
346 /* Bit-banged I2C on GPIO201 and GPIO202 also called "MOT_I2C" */
347 i2c-gpio-2 {
348 compatible = "i2c-gpio";
349 sda-gpios = <&gpio6 10 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
350 scl-gpios = <&gpio6 9 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
351 pinctrl-names = "default";
352 pinctrl-0 = <&i2c_gpio_2_default>;
353 #address-cells = <1>;
354 #size-cells = <0>;
355 /* TODO: add the Immersion ISA1200 I2C device here */
356 };
357
358 /* Bit-banged I2C on GPIO151 and GPIO152 also called "NFC_I2C" */
359 i2c-gpio-3 {
360 compatible = "i2c-gpio";
361 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
362 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
363 pinctrl-names = "default";
364 pinctrl-0 = <&i2c_gpio_3_default>;
365 #address-cells = <1>;
366 #size-cells = <0>;
367
368 nfc@30 {
369 compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
370 reg = <0x30>;
371 /* NFC IRQ on GPIO32 */
372 interrupt-parent = <&gpio1>;
373 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
374 /* GPIO 31 */
375 firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
376 /* GPIO88 */
377 enable-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>;
378 pinctrl-names = "default";
379 pinctrl-0 = <&pn547_janice_default>;
380 };
381 };
382
383 soc {
384 /* External Micro SD slot */
28734f87 385 mmc@80126000 {
78894ade
LW
386 arm,primecell-periphid = <0x10480180>;
387 max-frequency = <50000000>;
388 bus-width = <4>;
389 cap-sd-highspeed;
390 cap-mmc-highspeed;
391 st,sig-dir-cmd;
392 st,sig-dir-dat0;
393 st,sig-dir-dat2;
394 st,sig-pin-fbclk;
395 full-pwr-cycle;
396 /* MMC is powered by AUX3 1.2V .. 2.91V */
397 vmmc-supply = <&ab8500_ldo_aux3_reg>;
398 /* 2.9 V level translator is using AUX3 at 2.9 V as well */
399 vqmmc-supply = <&ab8500_ldo_aux3_reg>;
400 pinctrl-names = "default", "sleep";
401 pinctrl-0 = <&mc0_a_2_default>;
402 pinctrl-1 = <&mc0_a_2_sleep>;
403 cd-gpios = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
404 status = "okay";
405 };
406
407 /* WLAN SDIO channel */
28734f87 408 mmc@80118000 {
78894ade
LW
409 arm,primecell-periphid = <0x10480180>;
410 max-frequency = <50000000>;
411 bus-width = <4>;
412 non-removable;
413 cap-sd-highspeed;
414 pinctrl-names = "default", "sleep";
415 pinctrl-0 = <&mc1_a_2_default>;
416 pinctrl-1 = <&mc1_a_2_sleep>;
417 /*
418 * GPIO-controlled voltage enablement: this drives
2a5b0570
LW
419 * the WL_REG_ON line high when we use this device.
420 * Represented as regulator to fill OCR mask.
78894ade 421 */
2a5b0570 422 vmmc-supply = <&wl_reg>;
78894ade
LW
423
424 #address-cells = <1>;
425 #size-cells = <0>;
426 status = "okay";
427
428 wifi@1 {
59ba546d 429 compatible = "brcm,bcm4330-fmac", "brcm,bcm4329-fmac";
78894ade
LW
430 reg = <1>;
431 /* GPIO216 WL_HOST_WAKE */
432 interrupt-parent = <&gpio6>;
433 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
434 interrupt-names = "host-wake";
78894ade
LW
435 pinctrl-names = "default";
436 pinctrl-0 = <&wlan_default_mode>;
437 };
438 };
439
440 /* eMMC */
28734f87 441 mmc@80005000 {
78894ade
LW
442 arm,primecell-periphid = <0x10480180>;
443 max-frequency = <50000000>;
444 bus-width = <8>;
445 non-removable;
446 cap-mmc-highspeed;
447 mmc-ddr-1_8v;
a345142d
LW
448 no-sdio;
449 no-sd;
78894ade
LW
450 vmmc-supply = <&ldo_3v3_reg>;
451 pinctrl-names = "default", "sleep";
452 pinctrl-0 = <&mc2_a_1_default>;
453 pinctrl-1 = <&mc2_a_1_sleep>;
454 status = "okay";
455 };
456
457 /* GBF (Bluetooth) UART */
458 uart@80120000 {
459 pinctrl-names = "default", "sleep";
460 pinctrl-0 = <&u0_a_1_default>;
461 pinctrl-1 = <&u0_a_1_sleep>;
462 status = "okay";
463
464 bluetooth {
59ba546d 465 /* BCM4330B1 actually */
78894ade 466 compatible = "brcm,bcm4330-bt";
2a5b0570
LW
467 /* GPIO222 rail BT_VREG_EN to BT_REG_ON */
468 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
78894ade
LW
469 /* BT_WAKE on GPIO199 */
470 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
471 /* BT_HOST_WAKE on GPIO97 */
472 /* FIXME: convert to interrupt */
473 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
474 /* BT_RST_N on GPIO209 */
475 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
476 pinctrl-names = "default";
477 pinctrl-0 = <&bluetooth_default_mode>;
478 };
479 };
480
481 /* GPS UART */
482 uart@80121000 {
483 status = "okay";
484 pinctrl-names = "default", "sleep";
485 /* CTS/RTS is not used, CTS is repurposed as GPIO */
486 pinctrl-0 = <&u1rxtx_a_1_default>;
487 pinctrl-1 = <&u1rxtx_a_1_sleep>;
330e0165
LW
488
489 gnss {
490 /*
491 * The Low Noise Amplifier (LNA) power and enablement is controlled
492 * autonomously by the GSD4t.
493 * Janice has a SiRFstarIV-based GSD4t
494 * Golden has a SiRFstarV 5t-based CSRG05TA03-ICJE-R.
495 */
496 compatible = "csr,gsd4t";
497 /* GPS_RSTN on GPIO21 */
498 reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
499 /* GPS_ON_OFF on GPIO96 */
500 sirf,onoff-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
501 /* GPS_1V8 (VSMPS2) */
502 vcc-supply = <&db8500_vsmps2_reg>;
503 pinctrl-names = "default";
504 pinctrl-0 = <&gsd4t_janice_default>;
505 /* According to /etc/sirfgps.conf */
506 current-speed = <460800>;
507 };
78894ade
LW
508 };
509
510 /* Debugging console UART connected to TSU6111RSVR (FSA880) */
511 uart@80007000 {
512 status = "okay";
513 pinctrl-names = "default", "sleep";
514 pinctrl-0 = <&u2rxtx_c_1_default>;
515 pinctrl-1 = <&u2rxtx_c_1_sleep>;
516 };
517
518 prcmu@80157000 {
519 ab8500 {
218b2f88 520 phy {
78894ade
LW
521 pinctrl-names = "default", "sleep";
522 pinctrl-0 = <&usb_a_1_default>;
523 pinctrl-1 = <&usb_a_1_sleep>;
524 };
525
5c750239
LW
526 ab8500_fg {
527 line-impedance-micro-ohms = <15000>;
528 };
529
218b2f88 530 regulator {
78894ade
LW
531 ab8500_ldo_aux1 {
532 /* Used for VDD for sensors */
533 regulator-name = "V-SENSORS-VDD";
534 regulator-min-microvolt = <3000000>;
535 regulator-max-microvolt = <3000000>;
536 };
537
538 ab8500_ldo_aux2 {
539 /* Used for VIO for sensors */
540 regulator-name = "V-SENSORS-VIO";
541 regulator-min-microvolt = <1800000>;
542 regulator-max-microvolt = <1800000>;
543 };
544
545 ab8500_ldo_aux3 {
546 /* Used for voltage for external MMC/SD card */
547 regulator-name = "V-MMC-SD";
548 regulator-min-microvolt = <1200000>;
549 regulator-max-microvolt = <2910000>;
550 };
551 };
552 };
553 };
554
555 /* I2C0 */
556 i2c@80004000 {
557 status = "okay";
558 pinctrl-names = "default", "sleep";
559 pinctrl-0 = <&i2c0_a_1_default>;
560 pinctrl-1 = <&i2c0_a_1_sleep>;
561
562 proximity@44 {
563 /* Janice has the GP2AP002A00F with light sensor */
564 compatible = "sharp,gp2ap002a00f";
565 clock-frequency = <400000>;
566 reg = <0x44>;
567
568 interrupt-parent = <&gpio4>;
569 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
570 vdd-supply = <&ab8500_ldo_aux1_reg>;
571 vio-supply = <&ab8500_ldo_aux2_reg>;
572 /* ADC channel AUX2 to read ALSOUT ambient light sensor out */
573 io-channels = <&gp2a_shunt>;
574 io-channel-names = "alsout";
575 pinctrl-names = "default";
576 pinctrl-0 = <&gp2ap002_janice_default>;
577 /* B1 mode (arch/arm/mach-ux500/include/mach/gp2a.h) */
578 sharp,proximity-far-hysteresis = /bits/ 8 <0x40>;
579 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
580 };
581 };
582
583 /* I2C1 on GPIO16 and GPIO17 also called "MUS I2C" */
584 i2c@80122000 {
585 status = "okay";
586 pinctrl-names = "default","sleep";
587 pinctrl-0 = <&i2c1_b_2_default>;
588 pinctrl-1 = <&i2c1_b_2_sleep>;
589
590 /* Texas Instruments TSU6111 micro USB switch */
591 usb-switch@25 {
592 compatible = "ti,tsu6111";
593 reg = <0x25>;
594 /* Interrupt JACK_INT_N on GPIO95 */
595 interrupt-parent = <&gpio2>;
596 interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
597 pinctrl-names = "default";
598 pinctrl-0 = <&tsu6111_janice_default>;
599 };
600 };
601
602 /* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */
603 i2c@80128000 {
604 status = "okay";
605 pinctrl-names = "default", "sleep";
606 pinctrl-0 = <&i2c2_b_2_default>;
607 pinctrl-1 = <&i2c2_b_2_sleep>;
608
609 gyroscope@68 {
610 compatible = "invensense,mpu3050";
611 reg = <0x68>;
612 /* GPIO226 interrupt */
613 interrupt-parent = <&gpio7>;
614 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
615 /* FIXME: no idea about this */
616 mount-matrix = "1", "0", "0",
617 "0", "1", "0",
618 "0", "0", "1";
619 vlogic-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
620 vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
621 pinctrl-names = "default";
622 pinctrl-0 = <&mpu3050_janice_default>;
623
624 /*
625 * The MPU-3050 acts as a hub for the
626 * accelerometer.
627 */
628 i2c-gate {
629 #address-cells = <1>;
630 #size-cells = <0>;
631
632 /* Bosch BMA222 accelerometer */
9e62ec0e 633 accelerometer@8 {
78894ade
LW
634 compatible = "bosch,bma222";
635 reg = <0x08>;
013fda41
LW
636 mount-matrix = "0", "-1", "0",
637 "1", "0", "0",
cbc72c0f 638 "0", "0", "1";
78894ade
LW
639 vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
640 vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
641 };
642 };
643 };
644 };
645
646 /* I2C3 */
647 i2c@80110000 {
648 status = "okay";
649
650 pinctrl-names = "default", "sleep";
651 pinctrl-0 = <&i2c3_c_2_default>;
652 pinctrl-1 = <&i2c3_c_2_sleep>;
653
654 /* Atmel mXT224E touchscreen */
655 touchscreen@4a {
656 compatible = "atmel,maxtouch";
657 reg = <0x4a>;
658 /* GPIO218 (TSP_INT_1V8) */
659 interrupt-parent = <&gpio6>;
660 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
661 /* VDDA is "analog supply", 2.57-3.47 V */
662 vdda-supply = <&ldo_tsp_3v3_reg>;
663 /* VDD is "digital supply" 1.71-3.47V */
664 vdd-supply = <&ldo_tsp_1v8_reg>;
665 pinctrl-names = "default";
666 pinctrl-0 = <&tsp_default>;
667 };
668 };
669
670 mcde@a0350000 {
671 status = "okay";
672 pinctrl-names = "default";
673 pinctrl-0 = <&dpi_default_mode>;
674
675 port {
676 display_out: endpoint {
677 remote-endpoint = <&panel_in>;
678 };
679 };
680 };
681 };
682};
683
684&pinctrl {
685 /*
686 * This extends the MC0_A_2 default config to include
687 * the card detect GPIO217 line.
688 */
689 sdi0 {
690 mc0_a_2_default {
691 default_cfg4 {
692 pins = "GPIO217_AH12"; /* card detect */
693 ste,config = <&gpio_in_pd>;
694 };
695 };
696 };
697 mcde {
698 dpi_default_mode: dpi_default {
699 default_mux1 {
700 /* Mux in all the data lines */
701 function = "lcd";
702 groups =
703 /* Data lines D0-D7 GPIO70..GPIO77 */
704 "lcd_d0_d7_a_1",
705 /* Data lines D8-D11 GPIO78..GPIO81 */
706 "lcd_d8_d11_a_1",
707 /* Data lines D12-D15 GPIO82..GPIO85 */
708 "lcd_d12_d15_a_1",
709 /* Data lines D16-D23 GPIO161..GPIO168 */
710 "lcd_d16_d23_b_1";
711 };
712 default_mux2 {
713 function = "lcda";
714 /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */
715 groups = "lcdaclk_b_1", "lcda_b_1";
716 };
717 /* Input, no pull-up is the default state for pins used for an alt function */
718 default_cfg1 {
719 pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23";
720 ste,config = <&in_nopull>;
721 };
722 };
723 };
724 /* GPIO for panel reset control */
725 panel {
726 panel_default_mode: panel_default {
727 janice_cfg1 {
728 /* Reset line */
729 pins = "GPIO139_C9";
730 ste,config = <&gpio_out_lo>;
731 };
732 };
733 };
734 /* GPIO that enables the LDO regulator for the eMMC */
735 emmc-ldo {
736 emmc_ldo_en_default_mode: emmc_ldo_default {
737 /* LDO enable on GPIO6 */
738 janice_cfg1 {
739 pins = "GPIO6_AF6";
740 ste,config = <&gpio_out_hi>;
741 };
742 };
743 };
744 /* GPIO that enables the LDO regulator for the touchscreen */
745 tsp-ldo {
746 tsp_ldo_en_default_mode: tsp_ldo_default {
747 /* LDO enable on GPIO94 */
748 janice_cfg1 {
749 pins = "GPIO94_D7";
750 ste,config = <&gpio_out_hi>;
751 };
752 };
753 };
754 /* GPIO that enables the LDO regulator for the key LED */
755 key-led {
756 en_led_ldo_default_mode: en_led_ldo_default {
757 /* EN_LED_LDO on GPIO68 */
758 janice_cfg1 {
759 pins = "GPIO68_E1";
760 ste,config = <&gpio_out_hi>;
761 };
762 };
763 };
764 /* GPIO that enables the LDO regulator for the touchkeys */
765 touchkey-ldo {
766 tsp_ldo_on2_default_mode: tsp_ldo_on2_default {
767 /* TSP_LDO_ON2 on GPIO89 */
768 janice_cfg1 {
769 pins = "GPIO89_E6";
770 ste,config = <&gpio_out_lo>;
771 };
772 };
773 };
774 touchkey {
775 touchkey_default_mode: touchkey_default {
776 janice_cfg1 {
777 /* Interrupt */
778 pins = "GPIO198_AG25";
779 ste,config = <&gpio_in_nopull>;
780 };
781 janice_cfg2 {
782 /* Reset, actually completely unused (not routed) */
783 pins = "GPIO205_AG23";
784 ste,config = <&gpio_in_pd>;
785 };
786 };
787 };
788 /* GPIO that enabled the LDO regulator for the LCD display */
789 lcd-ldo {
790 lcd_pwr_en_default_mode: lcd_pwr_en_default {
791 /* LCD_PWR_EN on GPIO219 */
792 janice_cfg1 {
793 pins = "GPIO219_AG10";
794 ste,config = <&gpio_out_hi>;
795 };
796 };
797 };
798 /* GPIO that enables the WLAN internal LDO regulators */
799 wlan-ldo {
800 wlan_ldo_en_default: wlan_ldo_default {
2a5b0570 801 /* GPIO215 named WLAN_RST_N */
78894ade 802 janice_cfg1 {
2a5b0570 803 pins = "GPIO215_AH13";
78894ade
LW
804 ste,config = <&gpio_out_lo>;
805 };
806 };
807 };
e9cb878e
LW
808 /* Flash and torch */
809 flash {
810 gpio_flash_default_mode: flash_default {
811 janice_cfg1 {
812 pins = "GPIO140_B11", "GPIO141_C12";
813 ste,config = <&gpio_out_lo>;
814 };
815 };
816 };
78894ade
LW
817 /* GPIO keys */
818 gpio-keys {
819 gpio_keys_default_mode: gpio_keys_default {
820 skomer_cfg1 {
821 pins = "GPIO67_G2", /* VOL UP */
822 "GPIO91_B6", /* HOME */
823 "GPIO92_D6"; /* VOL DOWN */
824 ste,config = <&gpio_in_pu>;
825 };
826 };
827 };
828 /* Interrupt line for the Atmel MXT228 touchscreen */
829 tsp {
830 tsp_default: tsp_default {
831 janice_cfg1 {
832 pins = "GPIO218_AH11"; /* TSP_INT_1V8 */
833 ste,config = <&gpio_in_nopull>;
834 };
835 };
836 };
837 /* Reset line for the Yamaha YAS529 magnetometer */
838 yas529 {
839 yas529_default: yas529_janice {
840 janice_cfg1 {
841 pins = "GPIO204_AF23";
842 ste,config = <&gpio_out_hi>;
843 };
844 };
845 };
846 /* Interrupt line for light/proximity sensor GP2AP002 */
847 gp2ap002 {
848 gp2ap002_janice_default: gp2ap002_janice {
849 janice_cfg1 {
850 pins = "GPIO146_D13";
851 ste,config = <&gpio_in_nopull>;
852 };
853 };
854 };
855 /* Interrupt line for Invensense MPU3050 gyroscope */
856 mpu3050 {
857 mpu3050_janice_default: mpu3050_janice {
858 janice_cfg1 {
859 /* GPIO226 used for IRQ */
860 pins = "GPIO226_AF8";
861 ste,config = <&gpio_in_nopull>;
862 };
863 };
864 };
865 /* GPIO-based I2C bus for magnetometer and NCP6914 */
866 i2c-gpio-0 {
867 i2c_gpio_0_default: i2c_gpio_0 {
868 janice_cfg1 {
869 pins = "GPIO143_D12", "GPIO144_B13";
870 ste,config = <&gpio_in_nopull>;
871 };
872 };
873 };
874 /* GPIO-based I2C bus for the Cypress touchkeys */
875 i2c-gpio-1 {
876 i2c_gpio_1_default: i2c_gpio_1 {
877 janice_cfg1 {
878 pins = "GPIO196_AG26", "GPIO197_AH24";
879 ste,config = <&gpio_in_nopull>;
880 };
881 };
882 };
883 /* GPIO-based I2C bus for the Immersion ISA1200 */
884 i2c-gpio-2 {
885 i2c_gpio_2_default: i2c_gpio_2 {
886 janice_cfg1 {
887 pins = "GPIO201_AF24", "GPIO202_AF25";
888 ste,config = <&gpio_in_nopull>;
889 };
890 };
891 };
892 /* GPIO-based I2C bus for the NFC */
893 i2c-gpio-3 {
894 i2c_gpio_3_default: i2c_gpio_3 {
895 janice_cfg1 {
896 pins = "GPIO151_D17", "GPIO152_D16";
897 ste,config = <&gpio_in_nopull>;
898 };
899 };
900 };
901 /* GPIO-based SPI bus for the display */
902 spi-gpio-0 {
903 spi_gpio_0_default: spi_gpio_0 {
904 janice_cfg1 {
905 pins = "GPIO220_AH10", "GPIO223_AH9", "GPIO224_AG9";
906 ste,config = <&gpio_out_hi>;
907 };
908 /* This pin is unused but belongs with this SPI block */
909 janice_cfg2 {
910 pins = "GPIO225_AG8";
911 ste,config = <&in_pd>;
912 };
913 };
914 };
915 wlan {
916 wlan_default_mode: wlan_default {
78894ade
LW
917 /* GPIO216 for WL_HOST_WAKE */
918 janice_cfg2 {
919 pins = "GPIO216_AG12";
920 ste,config = <&gpio_in_pd>;
921 };
922 };
923 };
924 bluetooth {
925 bluetooth_default_mode: bluetooth_default {
2a5b0570 926 /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */
78894ade 927 janice_cfg1 {
2a5b0570 928 pins = "GPIO199_AH23", "GPIO222_AJ9";
78894ade
LW
929 ste,config = <&gpio_out_lo>;
930 };
2a5b0570 931 /* GPIO97 BT_HOST_WAKE */
78894ade
LW
932 janice_cfg2 {
933 pins = "GPIO97_D9";
934 ste,config = <&gpio_in_nopull>;
935 };
2a5b0570 936 /* GPIO209 BT_RST_N */
78894ade
LW
937 janice_cfg3 {
938 pins = "GPIO209_AG15";
939 ste,config = <&gpio_out_hi>;
940 };
941 };
942 };
943 /* Interrupt line for TI TSU6111 Micro USB switch */
944 tsu6111 {
945 tsu6111_janice_default: tsu6111_janice {
946 janice_cfg1 {
947 /* GPIO95 used for IRQ */
948 pins = "GPIO95_E8";
949 ste,config = <&gpio_in_nopull>;
950 };
951 };
952 };
953 nfc {
954 pn547_janice_default: pn547_janice {
955 /* Interrupt line */
956 janice_cfg1 {
957 pins = "GPIO32_V2";
958 ste,config = <&gpio_in_nopull>;
959 };
960 /* Enable and firmware GPIOs */
961 janice_cfg2 {
962 pins = "GPIO31_V3", "GPIO88_C4";
963 ste,config = <&gpio_out_lo>;
964 };
965 };
966 };
330e0165
LW
967 gsd4t {
968 gsd4t_janice_default: gsd4t_janice {
969 /* Reset line, start out asserted */
970 janice_cfg1 {
971 pins = "GPIO21_AB3";
972 ste,config = <&gpio_out_lo>;
973 };
974 /* GPS_ON_OFF, start out deasserted (off) */
975 janice_cfg2 {
976 pins = "GPIO96_D8";
977 ste,config = <&gpio_out_lo>;
978 };
979 /* Unused power enablement line, used in R0.0 and R0.1 boards */
980 janice_cfg3 {
981 pins = "GPIO86_C6";
982 ste,config = <&gpio_in_pd>;
983 };
984 };
985 };
78894ade 986};