Linux Audio

Check our new training course

Linux debugging, profiling, tracing and performance analysis training

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