Linux Audio

Check our new training course

Loading...
v5.14.15
  1// SPDX-License-Identifier: GPL-2.0-only
  2/dts-v1/;
  3
  4#include "ste-db8500.dtsi"
  5#include "ste-ab8505.dtsi"
  6#include "ste-dbx5x0-pinctrl.dtsi"
  7#include <dt-bindings/gpio/gpio.h>
  8#include <dt-bindings/leds/common.h>
  9#include <dt-bindings/input/input.h>
 10#include <dt-bindings/interrupt-controller/irq.h>
 11
 12/*
 13 * Note: This device tree cannot be booted directly with the Samsung bootloader.
 14 * You need an intermediate, device-tree compatible bootloader
 15 * that locks the L2 cache. Otherwise the kernel will crash after decompression.
 16 *
 17 * There is a port of (mainline) U-Boot, see
 18 * https://wiki.postmarketos.org/wiki/ST-Ericsson_NovaThor_U8500#U-Boot
 19 */
 20/ {
 21	model = "Samsung Galaxy S III mini (GT-I8190)";
 22	compatible = "samsung,golden", "st-ericsson,u8500";
 23
 24	chosen {
 25		stdout-path = &serial2;
 26	};
 27
 28	i2c-gpio-0 {
 29		compatible = "i2c-gpio";
 30		sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
 31		scl-gpios = <&gpio2 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
 32
 33		pinctrl-names = "default";
 34		pinctrl-0 = <&i2c_gpio_0_default>;
 35
 36		#address-cells = <1>;
 37		#size-cells = <0>;
 38
 39		touchkey@20 {
 40			compatible = "coreriver,tc360-touchkey";
 41			reg = <0x20>;
 42			vdd-supply = <&ab8500_ldo_aux4_reg>;
 43			vcc-supply = <&ab8500_ldo_aux6_reg>;
 44
 45			interrupt-parent = <&gpio2>;
 46			interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
 47
 48			pinctrl-names = "default";
 49			pinctrl-0 = <&touchkey_default>;
 50			linux,keycodes = <KEY_MENU KEY_BACK>;
 51		};
 52	};
 53
 54	i2c-gpio-1 {
 55		compatible = "i2c-gpio";
 56		sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
 57		scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
 58
 59		pinctrl-names = "default";
 60		pinctrl-0 = <&i2c_gpio_1_default>;
 61
 62		#address-cells = <1>;
 63		#size-cells = <0>;
 64
 65		magnetometer@c {
 66			compatible = "alps,hscdtd008a";
 67			reg = <0x0c>;
 68
 69			avdd-supply = <&ab8500_ldo_aux1_reg>;
 70			dvdd-supply = <&ab8500_ldo_aux8_reg>;
 71		};
 72	};
 73
 74	soc {
 75		/* External Micro SD card slot */
 76		mmc@80126000 {
 77			status = "okay";
 78
 79			arm,primecell-periphid = <0x10480180>;
 80			max-frequency = <100000000>;
 81			bus-width = <4>;
 82
 83			non-removable;
 84			/*
 85			 * Unfortunately, there is no way to enable the UHS
 86			 * modes due to a limitation of the SD level translator:
 87			 * It will either translate to 2.9V or disconnect the
 88			 * DATA lines, so switching to 1.8V signal voltage fails.
 89			 */
 90			cap-sd-highspeed;
 91			cap-mmc-highspeed;
 92			st,sig-pin-fbclk;
 93			full-pwr-cycle;
 94
 95			vmmc-supply = <&ab8500_ldo_aux3_reg>;
 96			vqmmc-supply = <&sd_level_translator>;
 97
 98			pinctrl-names = "default", "sleep";
 99			pinctrl-0 = <&mc0_a_2_default>;
100			pinctrl-1 = <&mc0_a_2_sleep>;
101		};
102
103		/* WLAN SDIO */
104		mmc@80118000 {
105			status = "okay";
106
107			arm,primecell-periphid = <0x10480180>;
108			max-frequency = <50000000>;
109			bus-width = <4>;
110
111			non-removable;
112			cap-sd-highspeed;
113
114			vmmc-supply = <&wl_reg_on>;
115
116			pinctrl-names = "default", "sleep";
117			pinctrl-0 = <&mc1_a_2_default>;
118			pinctrl-1 = <&mc1_a_2_sleep>;
119
120			#address-cells = <1>;
121			#size-cells = <0>;
122
123			wifi@1 {
124				compatible = "brcm,bcm4334-fmac", "brcm,bcm4329-fmac";
125				reg = <1>;
126
127				/* GPIO216 (WLAN_HOST_WAKE) */
128				interrupt-parent = <&gpio6>;
129				interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
130				interrupt-names = "host-wake";
131
132				pinctrl-names = "default";
133				pinctrl-0 = <&wlan_default>;
134			};
135		};
136
137		/* eMMC */
138		mmc@80005000 {
139			status = "okay";
140
141			arm,primecell-periphid = <0x10480180>;
142			max-frequency = <100000000>;
143			bus-width = <8>;
144
145			non-removable;
146			cap-mmc-highspeed;
147			mmc-ddr-1_8v;
148
149			vmmc-supply = <&vmem_3v3>;
150
151			pinctrl-names = "default", "sleep";
152			pinctrl-0 = <&mc2_a_1_default>;
153			pinctrl-1 = <&mc2_a_1_sleep>;
154		};
155
156		/* BT UART */
157		uart@80120000 {
158			status = "okay";
159
160			pinctrl-names = "default", "sleep";
161			pinctrl-0 = <&u0_a_1_default>;
162			pinctrl-1 = <&u0_a_1_sleep>;
163
164			bluetooth {
165				/* BCM4334B0 actually */
166				compatible = "brcm,bcm4330-bt";
167				/* GPIO222 (BT_VREG_ON) */
168				shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
169				/* GPIO199 (BT_WAKE) */
170				device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
171				/* GPIO97 (BT_HOST_WAKE) */
172				host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
173
174				pinctrl-names = "default";
175				pinctrl-0 = <&bluetooth_default>;
176			};
177		};
178
179		/* GPF UART */
180		uart@80121000 {
181			status = "okay";
182
183			pinctrl-names = "default", "sleep";
184			pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
185			pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
186		};
187
188		/* Debugging console UART */
189		uart@80007000 {
190			status = "okay";
191
192			pinctrl-names = "default", "sleep";
193			pinctrl-0 = <&u2rxtx_c_1_default>;
194			pinctrl-1 = <&u2rxtx_c_1_sleep>;
195		};
196
197		i2c@80004000 {
198			status = "okay";
199
200			pinctrl-names = "default", "sleep";
201			pinctrl-0 = <&i2c0_a_1_default>;
202			pinctrl-1 = <&i2c0_a_1_sleep>;
203
204			proximity@44 {
205				compatible = "sharp,gp2ap002s00f";
206				reg = <0x44>;
207
208				/* GPIO146 (PS_INT) */
209				interrupt-parent = <&gpio4>;
210				interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
211
212				vdd-supply = <&ab8500_ldo_aux1_reg>;
213				vio-supply = <&ab8500_ldo_aux8_reg>;
214
215				pinctrl-names = "default";
216				pinctrl-0 = <&proximity_default>;
217
218				sharp,proximity-far-hysteresis = <0x40>;
219				sharp,proximity-close-hysteresis = <0x0f>;
220			};
221		};
222
223		i2c@80128000 {
224			status = "okay";
225
226			pinctrl-names = "default", "sleep";
227			pinctrl-0 = <&i2c2_b_2_default>;
228			pinctrl-1 = <&i2c2_b_2_sleep>;
229
230			imu@68 {
231				compatible = "invensense,mpu6050";
232				reg = <0x68>;
233
234				/* GPIO206 (ACC_INT) */
235				interrupt-parent = <&gpio6>;
236				interrupts = <14 IRQ_TYPE_EDGE_RISING>;
237
238				mount-matrix = "0", "1", "0",
239					      "-1", "0", "0",
240					       "0", "0", "1";
241
242				vdd-supply = <&ab8500_ldo_aux1_reg>;
243				vddio-supply = <&ab8500_ldo_aux8_reg>;
244
245				pinctrl-names = "default";
246				pinctrl-0 = <&imu_default>;
247			};
248		};
249
250		i2c@80110000 {
251			status = "okay";
252
253			pinctrl-names = "default", "sleep";
254			pinctrl-0 = <&i2c3_c_2_default>;
255			pinctrl-1 = <&i2c3_c_2_sleep>;
256
257			touchscreen@4a {
258				compatible = "atmel,maxtouch";
259				reg = <0x4a>;
260
261				/* GPIO218 (TSP_INT_1V8) */
262				interrupt-parent = <&gpio6>;
263				interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
264
265				/* VDDA is "analog supply", 2.57-3.47 V */
266				vdda-supply = <&ab8500_ldo_aux2_reg>;
267				/* VDD is "digital supply" 1.71-3.47V */
268				vdd-supply = <&ab8500_ldo_aux5_reg>;
269
270				pinctrl-names = "default";
271				pinctrl-0 = <&tsp_default>;
272			};
273		};
274
275		prcmu@80157000 {
276			ab8505 {
277				ab8500_usb {
278					pinctrl-names = "default", "sleep";
279					pinctrl-0 = <&usb_a_1_default>;
280					pinctrl-1 = <&usb_a_1_sleep>;
281				};
282
283				ab8505-regulators {
284					ab8500_ldo_aux1 {
285						regulator-name = "sensor_3v";
286						regulator-min-microvolt = <3000000>;
287						regulator-max-microvolt = <3000000>;
288					};
289
290					ab8500_ldo_aux2 {
291						regulator-name = "vreg_tsp_a3v3";
292						regulator-min-microvolt = <3300000>;
293						regulator-max-microvolt = <3300000>;
 
294					};
295
296					ab8500_ldo_aux3 {
297						regulator-name = "vdd_tf_2v91";
298					};
299
300					ab8500_ldo_aux4 {
301						regulator-name = "key_led_3.3v";
302						regulator-min-microvolt = <3300000>;
303						regulator-max-microvolt = <3300000>;
304					};
305
306					ab8500_ldo_aux5 {
307						regulator-name = "vreg_tsp_1v8";
308						regulator-min-microvolt = <1800000>;
309						regulator-max-microvolt = <1800000>;
 
310					};
311
312					ab8500_ldo_aux6 {
313						regulator-name = "touch_key_2.2v";
314						regulator-min-microvolt = <2200000>;
315						regulator-max-microvolt = <2200000>;
316					};
317
318					ab8500_ldo_aux8 {
319						regulator-name = "sensor_1v8";
320					};
321				};
322			};
323		};
324
325		mcde@a0350000 {
326			status = "okay";
327			pinctrl-names = "default";
328			pinctrl-0 = <&dsi_default_mode>;
329
330			dsi@a0351000 {
331				panel@0 {
332					compatible = "samsung,s6e63m0";
333					reg = <0>;
334					max-brightness = <15>;
335					vdd3-supply = <&panel_reg_3v0>;
336					vci-supply = <&panel_reg_1v8>;
337					reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
338					/* ESD (electrostatic discharge) detection interrupt */
339					interrupt-parent = <&gpio2>;
340					interrupts = <18 IRQ_TYPE_EDGE_RISING>;
341					interrupt-names = "esd";
342					pinctrl-names = "default";
343					pinctrl-0 = <&display_default_mode>;
344				};
345			};
346		};
347	};
348
349	gpio-keys {
350		compatible = "gpio-keys";
351
352		pinctrl-names = "default";
353		pinctrl-0 = <&gpio_keys_default>;
354
355		label = "GPIO Buttons";
356
357		volume-up {
358			label = "Volume Up";
359			/* GPIO67 (VOL_UP) */
360			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
361			linux,code = <KEY_VOLUMEUP>;
362		};
363
364		volume-down {
365			label = "Volume Down";
366			/* GPIO92 (VOL_DOWN) */
367			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
368			linux,code = <KEY_VOLUMEDOWN>;
369		};
370
371		home {
372			label = "Home";
373			/* GPIO91 (HOME_KEY) */
374			gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
375			linux,code = <KEY_HOMEPAGE>;
376		};
377	};
378
379	/* Richtek RT8515GQW Flash LED Driver IC */
380	flash {
381		compatible = "richtek,rt8515";
382		/* GPIO 140 */
383		enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
384		/* GPIO 141 */
385		ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
386		/*
387		 * RFS is 16 kOhm and RTS is 100 kOhm giving
388		 * the flash max current 343mA and torch max
389		 * current 55 mA.
390		 */
391		richtek,rfs-ohms = <16000>;
392		richtek,rts-ohms = <100000>;
393		pinctrl-names = "default";
394		pinctrl-0 = <&gpio_flash_default_mode>;
395
396		led {
397			function = LED_FUNCTION_FLASH;
398			color = <LED_COLOR_ID_WHITE>;
399			flash-max-timeout-us = <250000>;
400			flash-max-microamp = <343750>;
401			led-max-microamp = <55000>;
402		};
403	};
404
405	vibrator {
406		compatible = "gpio-vibrator";
407		/* GPIO195 (MOT_EN) */
408		enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
409
410		pinctrl-names = "default";
411		pinctrl-0 = <&vibrator_default>;
412	};
413
414	/* External LDO for eMMC */
415	vmem_3v3: regulator-vmem {
416		compatible = "regulator-fixed";
417
418		regulator-name = "vmem_3v3";
419		regulator-min-microvolt = <3300000>;
420		regulator-max-microvolt = <3300000>;
421		regulator-boot-on;
422
423		startup-delay-us = <200>;
424
425		/* GPIO223 (MEM_LDO_EN) */
426		gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
427		enable-active-high;
428
429		pinctrl-names = "default";
430		pinctrl-0 = <&mem_ldo_default>;
431	};
432
433	/* TI TXS0206-29 level translator for 2.9 V */
434	sd_level_translator: regulator-sd-level-translator {
435		compatible = "regulator-fixed";
436
437		regulator-name = "sd-level-translator";
438		regulator-min-microvolt = <2900000>;
439		regulator-max-microvolt = <2900000>;
440
441		startup-delay-us = <200>;
442
443		/* GPIO87 (TXS0206-29_EN) */
444		gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
445		enable-active-high;
446
447		pinctrl-names = "default";
448		pinctrl-0 = <&sd_level_translator_default>;
449	};
450
451	/*
452	 * WL_REG_ON takes WLAN out of reset and enables the internal regulators.
453	 * The voltage specified here is only used to determine the OCR mask,
454	 * the BCM chip is actually connected directly to VBAT.
455	 */
456	wl_reg_on: regulator-wl-reg-on {
457		compatible = "regulator-fixed";
458
459		regulator-name = "wl-reg-on";
460		regulator-min-microvolt = <3000000>;
461		regulator-max-microvolt = <3000000>;
462
463		startup-delay-us = <100000>;
464
465		/* GPIO215 (WLAN_EN) */
466		gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
467		enable-active-high;
468
469		pinctrl-names = "default";
470		pinctrl-0 = <&wlan_en_default>;
471	};
472
473	/* MIC5366 GPIO-controlled regulator */
474	panel_reg_1v8: regulator-panel-1v8 {
475		compatible = "regulator-fixed";
476
477		regulator-name = "panel-fixed-supply";
478		regulator-min-microvolt = <1800000>;
479		regulator-max-microvolt = <1800000>;
480		/* GPIO219 */
481		gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
482
483		startup-delay-us = <200>;
484		enable-active-high;
485
486		pinctrl-names = "default";
487		pinctrl-0 = <&panel_reg_default_mode>;
488	};
489
490	/* MIC5366 GPIO-controlled regulator */
491	panel_reg_3v0: regulator-panel-3v0 {
492		compatible = "regulator-fixed";
493
494		regulator-name = "panel-fixed-supply";
495		regulator-min-microvolt = <3000000>;
496		regulator-max-microvolt = <3000000>;
497		/* GPIO219 */
498		gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
499
500		startup-delay-us = <200>;
501		enable-active-high;
502
503		pinctrl-names = "default";
504		pinctrl-0 = <&panel_reg_default_mode>;
505	};
506};
507
508&pinctrl {
509	gpio-keys {
510		gpio_keys_default: gpio_keys_default {
511			golden_cfg1 {
512				pins = "GPIO67",	/* VOL_UP */
513				       "GPIO91",	/* HOME_KEY */
514				       "GPIO92";	/* VOL_DOWN */
515				ste,config = <&gpio_in_pu>;
516			};
517		};
518	};
519
520	i2c-gpio-0 {
521		i2c_gpio_0_default: i2c_gpio_0 {
522			golden_cfg1 {
523				pins = "GPIO77",	/* TOUCHKEY_SCL */
524				       "GPIO78";	/* TOUCHKEY_SDA */
525				ste,config = <&gpio_in_nopull>;
526			};
527		};
528	};
529
530	flash {
531		gpio_flash_default_mode: flash_default {
532			golden_cfg1 {
533				pins = "GPIO140_B11", "GPIO141_C12";
534				ste,config = <&gpio_out_lo>;
535			};
536		};
537	};
538
539	i2c-gpio-1 {
540		i2c_gpio_1_default: i2c_gpio_1 {
541			golden_cfg1 {
542				pins = "GPIO151",	/* COMP_SCL */
543				       "GPIO152";	/* COMP_SDA */
544				ste,config = <&gpio_in_nopull>;
545			};
546		};
547	};
548
549	touchkey {
550		touchkey_default: touchkey_default {
551			golden_cfg1 {
552				pins = "GPIO79";	/* TOUCHKEY_INT */
553				ste,config = <&gpio_in_nopull>;
554			};
555		};
556	};
557
558	sdi0 {
559		sd_level_translator_default: sd_level_translator_default {
560			golden_cfg1 {
561				pins = "GPIO87_B3";	/* TXS0206-29_EN */
562				ste,config = <&gpio_out_lo>;
563			};
564		};
565	};
566
567	sdi2 {
568		mem_ldo_default: mem_ldo_default {
569			golden_cfg1 {
570				pins = "GPIO223_AH9";	/* MEM_LDO_EN */
571				ste,config = <&gpio_out_hi>;
572			};
573		};
574	};
575
576	mcde {
577		dsi_default_mode: dsi_default {
578			default_mux1 {
579				/* Mux in VSI0 used for DSI TE */
580				function = "lcd";
581				groups =
582				"lcdvsi0_a_1"; /* VSI0 for LCD */
583			};
584			default_cfg1 {
585				pins =
586				"GPIO68_E1"; /* VSI0 */
587				ste,config = <&in_nopull>;
588			};
589		};
590	};
591
592	display {
593		display_default_mode: display_default {
594			golden_cfg1 {
595				pins = "GPIO139_C9"; /* MIPI_DSI0_RESET_N */
596				ste,config = <&gpio_out_lo>;
597			};
598			golden_cfg2 {
599				pins = "GPIO82_C1"; /* LDI_ESD_DET */
600				ste,config = <&gpio_in_pu>;
601			};
602		};
603		panel_reg_default_mode: panel_reg_default {
604			golden_cfg1 {
605				pins = "GPIO219_AG10"; /* LCD_PWR_EN */
606				ste,config = <&gpio_out_lo>;
607			};
608		};
609	};
610
611	proximity {
612		proximity_default: proximity_default {
613			golden_cfg1 {
614				pins = "GPIO146_D13";	/* PS_INT */
615				ste,config = <&gpio_in_nopull>;
616			};
617		};
618	};
619
620	imu {
621		imu_default: imu_default {
622			golden_cfg1 {
623				pins = "GPIO206_AG24";	/* ACC_INT */
624				ste,config = <&gpio_in_pd>;
625			};
626		};
627	};
628
629	tsp {
630		tsp_default: tsp_default {
631			golden_cfg1 {
632				pins = "GPIO218_AH11";	/* TSP_INT_1V8 */
633				ste,config = <&gpio_in_nopull>;
634			};
635		};
636	};
637
638	wlan {
639		wlan_default: wlan_default {
640			golden_cfg1 {
641				pins = "GPIO216_AG12";	/* WLAN_HOST_WAKE */
642				ste,config = <&gpio_in_pd>;
643			};
644		};
645
646		wlan_en_default: wlan_en_default {
647			golden_cfg1 {
648				pins = "GPIO215_AH13";	/* WLAN_EN */
649				ste,config = <&gpio_out_lo>;
650			};
651		};
652	};
653
654	bluetooth {
655		bluetooth_default: bluetooth_default {
656			golden_cfg1 {
657				pins = "GPIO199_AH23",	/* BT_WAKE */
658				       "GPIO222_AJ9";	/* BT_VREG_ON */
659				ste,config = <&gpio_out_lo>;
660			};
661			golden_cfg2 {
662				pins = "GPIO97_D9";	/* BT_HOST_WAKE */
663				ste,config = <&gpio_in_nopull>;
664			};
665		};
666	};
667
668	vibrator {
669		vibrator_default: vibrator_default {
670			golden_cfg1 {
671				pins = "GPIO195_AG28";	/* MOT_EN */
672				ste,config = <&gpio_out_lo>;
673			};
674		};
675	};
676};
677
678&ab8505_gpio {
679	/* Hog a few default settings */
680	pinctrl-names = "default";
681	pinctrl-0 = <&gpio_default>;
682
683	gpio {
684		gpio_default: gpio_default {
685			golden_mux {
686				/* Change unused pins to GPIO mode */
687				function = "gpio";
688				groups = "gpio3_a_1",	/* default: SysClkReq4 */
689					 "gpio14_a_1";	/* default: PWMOut1 */
690			};
691			golden_cfg1 {
692				pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";
693				bias-disable;
694			};
695		};
696	};
697};
v5.9
  1// SPDX-License-Identifier: GPL-2.0-only
  2/dts-v1/;
  3
  4#include "ste-db8500.dtsi"
  5#include "ste-ab8505.dtsi"
  6#include "ste-dbx5x0-pinctrl.dtsi"
  7#include <dt-bindings/gpio/gpio.h>
 
  8#include <dt-bindings/input/input.h>
  9#include <dt-bindings/interrupt-controller/irq.h>
 10
 11/*
 12 * Note: This device tree cannot be booted directly with the Samsung bootloader.
 13 * You need an intermediate, device-tree compatible bootloader
 14 * that locks the L2 cache. Otherwise the kernel will crash after decompression.
 15 *
 16 * There is a port of (mainline) U-Boot, see
 17 * https://wiki.postmarketos.org/wiki/ST-Ericsson_NovaThor_U8500#U-Boot
 18 */
 19/ {
 20	model = "Samsung Galaxy S III mini (GT-I8190)";
 21	compatible = "samsung,golden", "st-ericsson,u8500";
 22
 23	chosen {
 24		stdout-path = &serial2;
 25	};
 26
 27	i2c-gpio-0 {
 28		compatible = "i2c-gpio";
 29		sda-gpios = <&gpio2 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
 30		scl-gpios = <&gpio2 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
 31
 32		pinctrl-names = "default";
 33		pinctrl-0 = <&i2c_gpio_0_default>;
 34
 35		#address-cells = <1>;
 36		#size-cells = <0>;
 37
 38		touchkey@20 {
 39			compatible = "coreriver,tc360-touchkey";
 40			reg = <0x20>;
 41			vdd-supply = <&ab8500_ldo_aux4_reg>;
 42			vcc-supply = <&ab8500_ldo_aux6_reg>;
 43
 44			interrupt-parent = <&gpio2>;
 45			interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
 46
 47			pinctrl-names = "default";
 48			pinctrl-0 = <&touchkey_default>;
 49			linux,keycodes = <KEY_MENU KEY_BACK>;
 50		};
 51	};
 52
 53	i2c-gpio-1 {
 54		compatible = "i2c-gpio";
 55		sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
 56		scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
 57
 58		pinctrl-names = "default";
 59		pinctrl-0 = <&i2c_gpio_1_default>;
 60
 61		#address-cells = <1>;
 62		#size-cells = <0>;
 63
 64		magnetometer@c {
 65			compatible = "alps,hscdtd008a";
 66			reg = <0x0c>;
 67
 68			avdd-supply = <&ab8500_ldo_aux1_reg>;
 69			dvdd-supply = <&ab8500_ldo_aux8_reg>;
 70		};
 71	};
 72
 73	soc {
 74		/* External Micro SD card slot */
 75		sdi0_per1@80126000 {
 76			status = "okay";
 77
 78			arm,primecell-periphid = <0x10480180>;
 79			max-frequency = <100000000>;
 80			bus-width = <4>;
 81
 82			non-removable;
 83			/*
 84			 * Unfortunately, there is no way to enable the UHS
 85			 * modes due to a limitation of the SD level translator:
 86			 * It will either translate to 2.9V or disconnect the
 87			 * DATA lines, so switching to 1.8V signal voltage fails.
 88			 */
 89			cap-sd-highspeed;
 90			cap-mmc-highspeed;
 91			st,sig-pin-fbclk;
 92			full-pwr-cycle;
 93
 94			vmmc-supply = <&ab8500_ldo_aux3_reg>;
 95			vqmmc-supply = <&sd_level_translator>;
 96
 97			pinctrl-names = "default", "sleep";
 98			pinctrl-0 = <&mc0_a_2_default>;
 99			pinctrl-1 = <&mc0_a_2_sleep>;
100		};
101
102		/* WLAN SDIO */
103		sdi1_per2@80118000 {
104			status = "okay";
105
106			arm,primecell-periphid = <0x10480180>;
107			max-frequency = <50000000>;
108			bus-width = <4>;
109
110			non-removable;
111			cap-sd-highspeed;
112
113			vmmc-supply = <&wl_reg_on>;
114
115			pinctrl-names = "default", "sleep";
116			pinctrl-0 = <&mc1_a_2_default>;
117			pinctrl-1 = <&mc1_a_2_sleep>;
118
119			#address-cells = <1>;
120			#size-cells = <0>;
121
122			wifi@1 {
123				compatible = "brcm,bcm4329-fmac";
124				reg = <1>;
125
126				/* GPIO216 (WLAN_HOST_WAKE) */
127				interrupt-parent = <&gpio6>;
128				interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
129				interrupt-names = "host-wake";
130
131				pinctrl-names = "default";
132				pinctrl-0 = <&wlan_default>;
133			};
134		};
135
136		/* eMMC */
137		sdi2_per3@80005000 {
138			status = "okay";
139
140			arm,primecell-periphid = <0x10480180>;
141			max-frequency = <100000000>;
142			bus-width = <8>;
143
144			non-removable;
145			cap-mmc-highspeed;
146			mmc-ddr-1_8v;
147
148			vmmc-supply = <&vmem_3v3>;
149
150			pinctrl-names = "default", "sleep";
151			pinctrl-0 = <&mc2_a_1_default>;
152			pinctrl-1 = <&mc2_a_1_sleep>;
153		};
154
155		/* BT UART */
156		uart@80120000 {
157			status = "okay";
158
159			pinctrl-names = "default", "sleep";
160			pinctrl-0 = <&u0_a_1_default>;
161			pinctrl-1 = <&u0_a_1_sleep>;
162
163			bluetooth {
 
164				compatible = "brcm,bcm4330-bt";
165				/* GPIO222 (BT_VREG_ON) */
166				shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
167				/* GPIO199 (BT_WAKE) */
168				device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
169				/* GPIO97 (BT_HOST_WAKE) */
170				host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
171
172				pinctrl-names = "default";
173				pinctrl-0 = <&bluetooth_default>;
174			};
175		};
176
177		/* GPF UART */
178		uart@80121000 {
179			status = "okay";
180
181			pinctrl-names = "default", "sleep";
182			pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
183			pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
184		};
185
186		/* Debugging console UART */
187		uart@80007000 {
188			status = "okay";
189
190			pinctrl-names = "default", "sleep";
191			pinctrl-0 = <&u2rxtx_c_1_default>;
192			pinctrl-1 = <&u2rxtx_c_1_sleep>;
193		};
194
195		i2c@80004000 {
196			status = "okay";
197
198			pinctrl-names = "default", "sleep";
199			pinctrl-0 = <&i2c0_a_1_default>;
200			pinctrl-1 = <&i2c0_a_1_sleep>;
201
202			proximity@44 {
203				compatible = "sharp,gp2ap002s00f";
204				reg = <0x44>;
205
206				/* GPIO146 (PS_INT) */
207				interrupt-parent = <&gpio4>;
208				interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
209
210				vdd-supply = <&ab8500_ldo_aux1_reg>;
211				vio-supply = <&ab8500_ldo_aux8_reg>;
212
213				pinctrl-names = "default";
214				pinctrl-0 = <&proximity_default>;
215
216				sharp,proximity-far-hysteresis = <0x40>;
217				sharp,proximity-close-hysteresis = <0x0f>;
218			};
219		};
220
221		i2c@80128000 {
222			status = "okay";
223
224			pinctrl-names = "default", "sleep";
225			pinctrl-0 = <&i2c2_b_2_default>;
226			pinctrl-1 = <&i2c2_b_2_sleep>;
227
228			imu@68 {
229				compatible = "invensense,mpu6050";
230				reg = <0x68>;
231
232				/* GPIO206 (ACC_INT) */
233				interrupt-parent = <&gpio6>;
234				interrupts = <14 IRQ_TYPE_EDGE_RISING>;
235
236				mount-matrix = "0", "1", "0",
237					      "-1", "0", "0",
238					       "0", "0", "1";
239
240				vdd-supply = <&ab8500_ldo_aux1_reg>;
241				vddio-supply = <&ab8500_ldo_aux8_reg>;
242
243				pinctrl-names = "default";
244				pinctrl-0 = <&imu_default>;
245			};
246		};
247
248		i2c@80110000 {
249			status = "okay";
250
251			pinctrl-names = "default", "sleep";
252			pinctrl-0 = <&i2c3_c_2_default>;
253			pinctrl-1 = <&i2c3_c_2_sleep>;
254
255			touchscreen@4a {
256				compatible = "atmel,maxtouch";
257				reg = <0x4a>;
258
259				/* GPIO218 (TSP_INT_1V8) */
260				interrupt-parent = <&gpio6>;
261				interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
262
 
 
 
 
 
263				pinctrl-names = "default";
264				pinctrl-0 = <&tsp_default>;
265			};
266		};
267
268		prcmu@80157000 {
269			ab8505 {
270				ab8500_usb {
271					pinctrl-names = "default", "sleep";
272					pinctrl-0 = <&usb_a_1_default>;
273					pinctrl-1 = <&usb_a_1_sleep>;
274				};
275
276				ab8505-regulators {
277					ab8500_ldo_aux1 {
278						regulator-name = "sensor_3v";
279						regulator-min-microvolt = <3000000>;
280						regulator-max-microvolt = <3000000>;
281					};
282
283					ab8500_ldo_aux2 {
284						regulator-name = "vreg_tsp_a3v3";
285						regulator-min-microvolt = <3300000>;
286						regulator-max-microvolt = <3300000>;
287						regulator-always-on; /* FIXME */
288					};
289
290					ab8500_ldo_aux3 {
291						regulator-name = "vdd_tf_2v91";
292					};
293
294					ab8500_ldo_aux4 {
295						regulator-name = "key_led_3.3v";
296						regulator-min-microvolt = <3300000>;
297						regulator-max-microvolt = <3300000>;
298					};
299
300					ab8500_ldo_aux5 {
301						regulator-name = "vreg_tsp_1v8";
302						regulator-min-microvolt = <1800000>;
303						regulator-max-microvolt = <1800000>;
304						regulator-always-on; /* FIXME */
305					};
306
307					ab8500_ldo_aux6 {
308						regulator-name = "touch_key_2.2v";
309						regulator-min-microvolt = <2200000>;
310						regulator-max-microvolt = <2200000>;
311					};
312
313					ab8500_ldo_aux8 {
314						regulator-name = "sensor_1v8";
315					};
316				};
317			};
318		};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319	};
320
321	gpio-keys {
322		compatible = "gpio-keys";
323
324		pinctrl-names = "default";
325		pinctrl-0 = <&gpio_keys_default>;
326
327		label = "GPIO Buttons";
328
329		volume-up {
330			label = "Volume Up";
331			/* GPIO67 (VOL_UP) */
332			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
333			linux,code = <KEY_VOLUMEUP>;
334		};
335
336		volume-down {
337			label = "Volume Down";
338			/* GPIO92 (VOL_DOWN) */
339			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
340			linux,code = <KEY_VOLUMEDOWN>;
341		};
342
343		home {
344			label = "Home";
345			/* GPIO91 (HOME_KEY) */
346			gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
347			linux,code = <KEY_HOMEPAGE>;
348		};
349	};
350
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351	vibrator {
352		compatible = "gpio-vibrator";
353		/* GPIO195 (MOT_EN) */
354		enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
355
356		pinctrl-names = "default";
357		pinctrl-0 = <&vibrator_default>;
358	};
359
360	/* External LDO for eMMC */
361	vmem_3v3: regulator-vmem {
362		compatible = "regulator-fixed";
363
364		regulator-name = "vmem_3v3";
365		regulator-min-microvolt = <3300000>;
366		regulator-max-microvolt = <3300000>;
367		regulator-boot-on;
368
369		startup-delay-us = <200>;
370
371		/* GPIO223 (MEM_LDO_EN) */
372		gpio = <&gpio6 31 GPIO_ACTIVE_HIGH>;
373		enable-active-high;
374
375		pinctrl-names = "default";
376		pinctrl-0 = <&mem_ldo_default>;
377	};
378
379	/* TI TXS0206-29 level translator for 2.9 V */
380	sd_level_translator: regulator-sd-level-translator {
381		compatible = "regulator-fixed";
382
383		regulator-name = "sd-level-translator";
384		regulator-min-microvolt = <2900000>;
385		regulator-max-microvolt = <2900000>;
386
387		startup-delay-us = <200>;
388
389		/* GPIO87 (TXS0206-29_EN) */
390		gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
391		enable-active-high;
392
393		pinctrl-names = "default";
394		pinctrl-0 = <&sd_level_translator_default>;
395	};
396
397	/*
398	 * WL_REG_ON takes WLAN out of reset and enables the internal regulators.
399	 * The voltage specified here is only used to determine the OCR mask,
400	 * the BCM chip is actually connected directly to VBAT.
401	 */
402	wl_reg_on: regulator-wl-reg-on {
403		compatible = "regulator-fixed";
404
405		regulator-name = "wl-reg-on";
406		regulator-min-microvolt = <3000000>;
407		regulator-max-microvolt = <3000000>;
408
409		startup-delay-us = <100000>;
410
411		/* GPIO215 (WLAN_EN) */
412		gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
413		enable-active-high;
414
415		pinctrl-names = "default";
416		pinctrl-0 = <&wlan_en_default>;
417	};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418};
419
420&pinctrl {
421	gpio-keys {
422		gpio_keys_default: gpio_keys_default {
423			golden_cfg1 {
424				pins = "GPIO67",	/* VOL_UP */
425				       "GPIO91",	/* HOME_KEY */
426				       "GPIO92";	/* VOL_DOWN */
427				ste,config = <&gpio_in_pu>;
428			};
429		};
430	};
431
432	i2c-gpio-0 {
433		i2c_gpio_0_default: i2c_gpio_0 {
434			golden_cfg1 {
435				pins = "GPIO77",	/* TOUCHKEY_SCL */
436				       "GPIO78";	/* TOUCHKEY_SDA */
437				ste,config = <&gpio_in_nopull>;
438			};
439		};
440	};
441
 
 
 
 
 
 
 
 
 
442	i2c-gpio-1 {
443		i2c_gpio_1_default: i2c_gpio_1 {
444			golden_cfg1 {
445				pins = "GPIO151",	/* COMP_SCL */
446				       "GPIO152";	/* COMP_SDA */
447				ste,config = <&gpio_in_nopull>;
448			};
449		};
450	};
451
452	touchkey {
453		touchkey_default: touchkey_default {
454			golden_cfg1 {
455				pins = "GPIO79";	/* TOUCHKEY_INT */
456				ste,config = <&gpio_in_nopull>;
457			};
458		};
459	};
460
461	sdi0 {
462		sd_level_translator_default: sd_level_translator_default {
463			golden_cfg1 {
464				pins = "GPIO87_B3";	/* TXS0206-29_EN */
465				ste,config = <&gpio_out_lo>;
466			};
467		};
468	};
469
470	sdi2 {
471		mem_ldo_default: mem_ldo_default {
472			golden_cfg1 {
473				pins = "GPIO223_AH9";	/* MEM_LDO_EN */
474				ste,config = <&gpio_out_hi>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475			};
476		};
477	};
478
479	proximity {
480		proximity_default: proximity_default {
481			golden_cfg1 {
482				pins = "GPIO146_D13";	/* PS_INT */
483				ste,config = <&gpio_in_nopull>;
484			};
485		};
486	};
487
488	imu {
489		imu_default: imu_default {
490			golden_cfg1 {
491				pins = "GPIO206_AG24";	/* ACC_INT */
492				ste,config = <&gpio_in_pd>;
493			};
494		};
495	};
496
497	tsp {
498		tsp_default: tsp_default {
499			golden_cfg1 {
500				pins = "GPIO218_AH11";	/* TSP_INT_1V8 */
501				ste,config = <&gpio_in_nopull>;
502			};
503		};
504	};
505
506	wlan {
507		wlan_default: wlan_default {
508			golden_cfg1 {
509				pins = "GPIO216_AG12";	/* WLAN_HOST_WAKE */
510				ste,config = <&gpio_in_pd>;
511			};
512		};
513
514		wlan_en_default: wlan_en_default {
515			golden_cfg1 {
516				pins = "GPIO215_AH13";	/* WLAN_EN */
517				ste,config = <&gpio_out_lo>;
518			};
519		};
520	};
521
522	bluetooth {
523		bluetooth_default: bluetooth_default {
524			golden_cfg1 {
525				pins = "GPIO199_AH23",	/* BT_WAKE */
526				       "GPIO222_AJ9";	/* BT_VREG_ON */
527				ste,config = <&gpio_out_lo>;
528			};
529			golden_cfg2 {
530				pins = "GPIO97_D9";	/* BT_HOST_WAKE */
531				ste,config = <&gpio_in_nopull>;
532			};
533		};
534	};
535
536	vibrator {
537		vibrator_default: vibrator_default {
538			golden_cfg1 {
539				pins = "GPIO195_AG28";	/* MOT_EN */
540				ste,config = <&gpio_out_lo>;
541			};
542		};
543	};
544};
545
546&ab8505_gpio {
547	/* Hog a few default settings */
548	pinctrl-names = "default";
549	pinctrl-0 = <&gpio_default>;
550
551	gpio {
552		gpio_default: gpio_default {
553			golden_mux {
554				/* Change unused pins to GPIO mode */
555				function = "gpio";
556				groups = "gpio3_a_1",	/* default: SysClkReq4 */
557					 "gpio14_a_1";	/* default: PWMOut1 */
558			};
559			golden_cfg1 {
560				pins = "GPIO11_B17", "GPIO13_D17", "GPIO50_L4";
561				bias-disable;
562			};
563		};
564	};
565};