xref: /linux/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts (revision 5c61f59824b5e46516ea5d0543ad7a8871567416)
1// SPDX-License-Identifier: GPL-2.0
2#include "qcom-msm8974.dtsi"
3#include "pm8841.dtsi"
4#include "pm8941.dtsi"
5#include <dt-bindings/input/input.h>
6#include <dt-bindings/leds/common.h>
7#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
8
9/ {
10	model = "LGE MSM 8974 HAMMERHEAD";
11	compatible = "lge,hammerhead", "qcom,msm8974";
12	chassis-type = "handset";
13
14	aliases {
15		serial0 = &blsp1_uart1;
16		serial1 = &blsp2_uart4;
17	};
18
19	chosen {
20		stdout-path = "serial0:115200n8";
21	};
22
23	gpio-keys {
24		compatible = "gpio-keys";
25
26		pinctrl-names = "default";
27		pinctrl-0 = <&gpio_keys_pin_a>;
28
29		key-volume-up {
30			label = "volume_up";
31			gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
32			linux,input-type = <1>;
33			linux,code = <KEY_VOLUMEUP>;
34		};
35
36		key-volume-down {
37			label = "volume_down";
38			gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
39			linux,input-type = <1>;
40			linux,code = <KEY_VOLUMEDOWN>;
41		};
42	};
43
44	clk_pwm: pwm {
45		compatible = "clk-pwm";
46		clocks = <&mmcc CAMSS_GP1_CLK>;
47
48		pinctrl-0 = <&vibrator_pin>;
49		pinctrl-names = "default";
50
51		#pwm-cells = <2>;
52	};
53
54	vibrator {
55		compatible = "pwm-vibrator";
56		pwms = <&clk_pwm 0 100000>;
57		pwm-names = "enable";
58
59		vcc-supply = <&pm8941_l19>;
60		enable-gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>;
61	};
62
63	vreg_boost: vreg-boost {
64		compatible = "regulator-fixed";
65
66		regulator-name = "vreg-boost";
67		regulator-min-microvolt = <3150000>;
68		regulator-max-microvolt = <3150000>;
69
70		regulator-always-on;
71		regulator-boot-on;
72
73		gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
74		enable-active-high;
75
76		pinctrl-names = "default";
77		pinctrl-0 = <&boost_bypass_n_pin>;
78	};
79
80	vreg_vph_pwr: vreg-vph-pwr {
81		compatible = "regulator-fixed";
82		regulator-name = "vph-pwr";
83
84		regulator-min-microvolt = <3600000>;
85		regulator-max-microvolt = <3600000>;
86
87		regulator-always-on;
88	};
89
90	vreg_wlan: wlan-regulator {
91		compatible = "regulator-fixed";
92
93		regulator-name = "wl-reg";
94		regulator-min-microvolt = <3300000>;
95		regulator-max-microvolt = <3300000>;
96
97		gpio = <&tlmm 26 GPIO_ACTIVE_HIGH>;
98		enable-active-high;
99
100		pinctrl-names = "default";
101		pinctrl-0 = <&wlan_regulator_pin>;
102	};
103};
104
105&blsp1_i2c1 {
106	status = "okay";
107	clock-frequency = <100000>;
108
109	charger: bq24192@6b {
110		compatible = "ti,bq24192";
111		reg = <0x6b>;
112		interrupts-extended = <&spmi_bus 0 0xd5 0 IRQ_TYPE_EDGE_FALLING>;
113
114		omit-battery-class;
115
116		usb_otg_vbus: usb-otg-vbus { };
117	};
118
119	fuelgauge: max17048@36 {
120		compatible = "maxim,max17048";
121		reg = <0x36>;
122
123		maxim,double-soc;
124		maxim,rcomp = /bits/ 8 <0x4d>;
125
126		interrupt-parent = <&tlmm>;
127		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
128
129		pinctrl-names = "default";
130		pinctrl-0 = <&fuelgauge_pin>;
131
132		maxim,alert-low-soc-level = <2>;
133	};
134};
135
136&blsp1_i2c2 {
137	status = "okay";
138	clock-frequency = <355000>;
139
140	synaptics@70 {
141		compatible = "syna,rmi4-i2c";
142		reg = <0x70>;
143
144		interrupts-extended = <&tlmm 5 IRQ_TYPE_EDGE_FALLING>;
145		vdd-supply = <&pm8941_l22>;
146		vio-supply = <&pm8941_lvs3>;
147
148		pinctrl-names = "default";
149		pinctrl-0 = <&touch_pin>;
150
151		#address-cells = <1>;
152		#size-cells = <0>;
153
154		rmi4-f01@1 {
155			reg = <0x1>;
156			syna,nosleep-mode = <1>;
157		};
158
159		rmi4-f12@12 {
160			reg = <0x12>;
161			syna,sensor-type = <1>;
162		};
163	};
164};
165
166&blsp1_i2c3 {
167	status = "okay";
168	clock-frequency = <100000>;
169
170	avago_apds993@39 {
171		compatible = "avago,apds9930";
172		reg = <0x39>;
173		interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>;
174		vdd-supply = <&pm8941_l17>;
175		vddio-supply = <&pm8941_lvs1>;
176		led-max-microamp = <100000>;
177		amstaos,proximity-diodes = <0>;
178	};
179};
180
181&blsp2_i2c5 {
182	status = "okay";
183	clock-frequency = <355000>;
184
185	backlight: led-controller@38 {
186		compatible = "ti,lm3630a";
187		status = "okay";
188		reg = <0x38>;
189
190		#address-cells = <1>;
191		#size-cells = <0>;
192
193		led@0 {
194			reg = <0>;
195			led-sources = <0 1>;
196			label = "lcd-backlight";
197			default-brightness = <200>;
198		};
199	};
200};
201
202&blsp2_i2c6 {
203	status = "okay";
204	clock-frequency = <100000>;
205
206	mpu6515@68 {
207		compatible = "invensense,mpu6515";
208		reg = <0x68>;
209		interrupts-extended = <&tlmm 73 IRQ_TYPE_EDGE_FALLING>;
210		vddio-supply = <&pm8941_lvs1>;
211
212		pinctrl-names = "default";
213		pinctrl-0 = <&mpu6515_pin>;
214
215		mount-matrix = "0", "-1", "0",
216				"-1", "0", "0",
217				"0", "0", "1";
218
219		i2c-gate {
220			#address-cells = <1>;
221			#size-cells = <0>;
222			ak8963@f {
223				compatible = "asahi-kasei,ak8963";
224				reg = <0x0f>;
225				gpios = <&tlmm 67 GPIO_ACTIVE_HIGH>;
226				vid-supply = <&pm8941_lvs1>;
227				vdd-supply = <&pm8941_l17>;
228			};
229
230			bmp280@76 {
231				compatible = "bosch,bmp280";
232				reg = <0x76>;
233				vdda-supply = <&pm8941_lvs1>;
234				vddd-supply = <&pm8941_l17>;
235			};
236		};
237	};
238};
239
240&blsp1_uart1 {
241	status = "okay";
242};
243
244&blsp2_uart4 {
245	status = "okay";
246
247	bluetooth {
248		compatible = "brcm,bcm43438-bt";
249		max-speed = <3000000>;
250
251		pinctrl-names = "default";
252		pinctrl-0 = <&bt_pin>;
253
254		host-wakeup-gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
255		device-wakeup-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
256		shutdown-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>;
257	};
258};
259
260&mdss {
261	status = "okay";
262};
263
264&mdss_dsi0 {
265	status = "okay";
266
267	vdda-supply = <&pm8941_l2>;
268	vdd-supply = <&pm8941_lvs3>;
269	vddio-supply = <&pm8941_l12>;
270
271	panel: panel@0 {
272		reg = <0>;
273		compatible = "lg,acx467akm-7";
274
275		backlight = <&backlight>;
276
277		pinctrl-names = "default";
278		pinctrl-0 = <&panel_pin>;
279
280		port {
281			panel_in: endpoint {
282				remote-endpoint = <&mdss_dsi0_out>;
283			};
284		};
285	};
286};
287
288&mdss_dsi0_out {
289	remote-endpoint = <&panel_in>;
290	data-lanes = <0 1 2 3>;
291};
292
293&mdss_dsi0_phy {
294	status = "okay";
295
296	vddio-supply = <&pm8941_l12>;
297};
298
299&pm8941_gpios {
300	gpio_keys_pin_a: gpio-keys-active-state {
301		pins = "gpio2", "gpio3";
302		function = "normal";
303
304		bias-pull-up;
305		power-source = <PM8941_GPIO_S3>;
306	};
307
308	fuelgauge_pin: fuelgauge-int-state {
309		pins = "gpio9";
310		function = "normal";
311
312		bias-disable;
313		input-enable;
314		power-source = <PM8941_GPIO_S3>;
315	};
316
317	wlan_sleep_clk_pin: wl-sleep-clk-state {
318		pins = "gpio16";
319		function = "func2";
320
321		output-high;
322		power-source = <PM8941_GPIO_S3>;
323	};
324
325	wlan_regulator_pin: wl-reg-active-state {
326		pins = "gpio17";
327		function = "normal";
328
329		bias-disable;
330		power-source = <PM8941_GPIO_S3>;
331	};
332
333	otg-hog {
334		gpio-hog;
335		gpios = <35 GPIO_ACTIVE_HIGH>;
336		output-high;
337		line-name = "otg-gpio";
338	};
339};
340
341&pm8941_lpg {
342	status = "okay";
343
344	qcom,power-source = <1>;
345
346	multi-led {
347		color = <LED_COLOR_ID_RGB>;
348		function = LED_FUNCTION_STATUS;
349
350		#address-cells = <1>;
351		#size-cells = <0>;
352
353		led@7 {
354			reg = <7>;
355			color = <LED_COLOR_ID_RED>;
356		};
357
358		led@6 {
359			reg = <6>;
360			color = <LED_COLOR_ID_GREEN>;
361		};
362
363		led@5 {
364			reg = <5>;
365			color = <LED_COLOR_ID_BLUE>;
366		};
367	};
368};
369
370&remoteproc_adsp {
371	cx-supply = <&pm8841_s2>;
372	status = "okay";
373};
374
375&remoteproc_mss {
376	cx-supply = <&pm8841_s2>;
377	mss-supply = <&pm8841_s3>;
378	mx-supply = <&pm8841_s1>;
379	pll-supply = <&pm8941_l12>;
380	status = "okay";
381};
382
383&rpm_requests {
384	regulators-0 {
385		compatible = "qcom,rpm-pm8841-regulators";
386
387		pm8841_s1: s1 {
388			regulator-min-microvolt = <675000>;
389			regulator-max-microvolt = <1050000>;
390		};
391
392		pm8841_s2: s2 {
393			regulator-min-microvolt = <500000>;
394			regulator-max-microvolt = <1050000>;
395		};
396
397		pm8841_s3: s3 {
398			regulator-min-microvolt = <1050000>;
399			regulator-max-microvolt = <1050000>;
400		};
401
402		pm8841_s4: s4 {
403			regulator-min-microvolt = <815000>;
404			regulator-max-microvolt = <900000>;
405		};
406	};
407
408	regulators-1 {
409		compatible = "qcom,rpm-pm8941-regulators";
410
411		vdd_l1_l3-supply = <&pm8941_s1>;
412		vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
413		vdd_l4_l11-supply = <&pm8941_s1>;
414		vdd_l5_l7-supply = <&pm8941_s2>;
415		vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
416		vdd_l8_l16_l18_l19-supply = <&vreg_vph_pwr>;
417		vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
418		vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
419		vdd_l21-supply = <&vreg_boost>;
420
421		pm8941_s1: s1 {
422			regulator-min-microvolt = <1300000>;
423			regulator-max-microvolt = <1300000>;
424			regulator-always-on;
425			regulator-boot-on;
426		};
427
428		pm8941_s2: s2 {
429			regulator-min-microvolt = <2150000>;
430			regulator-max-microvolt = <2150000>;
431			regulator-boot-on;
432		};
433
434		pm8941_s3: s3 {
435			regulator-min-microvolt = <1800000>;
436			regulator-max-microvolt = <1800000>;
437			regulator-always-on;
438			regulator-boot-on;
439		};
440
441		pm8941_l1: l1 {
442			regulator-min-microvolt = <1225000>;
443			regulator-max-microvolt = <1225000>;
444			regulator-always-on;
445			regulator-boot-on;
446		};
447
448		pm8941_l2: l2 {
449			regulator-min-microvolt = <1200000>;
450			regulator-max-microvolt = <1200000>;
451		};
452
453		pm8941_l3: l3 {
454			regulator-min-microvolt = <1225000>;
455			regulator-max-microvolt = <1225000>;
456		};
457
458		pm8941_l4: l4 {
459			regulator-min-microvolt = <1225000>;
460			regulator-max-microvolt = <1225000>;
461		};
462
463		pm8941_l5: l5 {
464			regulator-min-microvolt = <1800000>;
465			regulator-max-microvolt = <1800000>;
466		};
467
468		pm8941_l6: l6 {
469			regulator-min-microvolt = <1800000>;
470			regulator-max-microvolt = <1800000>;
471			regulator-boot-on;
472		};
473
474		pm8941_l7: l7 {
475			regulator-min-microvolt = <1800000>;
476			regulator-max-microvolt = <1800000>;
477			regulator-boot-on;
478		};
479
480		pm8941_l8: l8 {
481			regulator-min-microvolt = <1800000>;
482			regulator-max-microvolt = <1800000>;
483		};
484
485		pm8941_l9: l9 {
486			regulator-min-microvolt = <1800000>;
487			regulator-max-microvolt = <2950000>;
488		};
489
490		pm8941_l10: l10 {
491			regulator-min-microvolt = <1800000>;
492			regulator-max-microvolt = <2950000>;
493		};
494
495		pm8941_l11: l11 {
496			regulator-min-microvolt = <1300000>;
497			regulator-max-microvolt = <1300000>;
498		};
499
500		pm8941_l12: l12 {
501			regulator-min-microvolt = <1800000>;
502			regulator-max-microvolt = <1800000>;
503			regulator-always-on;
504			regulator-boot-on;
505		};
506
507		pm8941_l13: l13 {
508			regulator-min-microvolt = <1800000>;
509			regulator-max-microvolt = <2950000>;
510			regulator-boot-on;
511		};
512
513		pm8941_l14: l14 {
514			regulator-min-microvolt = <1800000>;
515			regulator-max-microvolt = <1800000>;
516		};
517
518		pm8941_l15: l15 {
519			regulator-min-microvolt = <2050000>;
520			regulator-max-microvolt = <2050000>;
521		};
522
523		pm8941_l16: l16 {
524			regulator-min-microvolt = <2700000>;
525			regulator-max-microvolt = <2700000>;
526		};
527
528		pm8941_l17: l17 {
529			regulator-min-microvolt = <2850000>;
530			regulator-max-microvolt = <2850000>;
531		};
532
533		pm8941_l18: l18 {
534			regulator-min-microvolt = <2850000>;
535			regulator-max-microvolt = <2850000>;
536		};
537
538		pm8941_l19: l19 {
539			regulator-min-microvolt = <3000000>;
540			regulator-max-microvolt = <3300000>;
541		};
542
543		pm8941_l20: l20 {
544			regulator-min-microvolt = <2950000>;
545			regulator-max-microvolt = <2950000>;
546			regulator-system-load = <200000>;
547			regulator-allow-set-load;
548			regulator-boot-on;
549		};
550
551		pm8941_l21: l21 {
552			regulator-min-microvolt = <2950000>;
553			regulator-max-microvolt = <2950000>;
554			regulator-boot-on;
555		};
556
557		pm8941_l22: l22 {
558			regulator-min-microvolt = <3000000>;
559			regulator-max-microvolt = <3300000>;
560		};
561
562		pm8941_l23: l23 {
563			regulator-min-microvolt = <3000000>;
564			regulator-max-microvolt = <3000000>;
565		};
566
567		pm8941_l24: l24 {
568			regulator-min-microvolt = <3075000>;
569			regulator-max-microvolt = <3075000>;
570			regulator-boot-on;
571		};
572
573		pm8941_lvs1: lvs1 {};
574		pm8941_lvs3: lvs3 {};
575	};
576};
577
578&sdhc_1 {
579	status = "okay";
580
581	vmmc-supply = <&pm8941_l20>;
582	vqmmc-supply = <&pm8941_s3>;
583
584	pinctrl-names = "default", "sleep";
585	pinctrl-0 = <&sdc1_on>;
586	pinctrl-1 = <&sdc1_off>;
587};
588
589&sdhc_2 {
590	status = "okay";
591
592	max-frequency = <100000000>;
593	vmmc-supply = <&vreg_wlan>;
594	vqmmc-supply = <&pm8941_s3>;
595	non-removable;
596
597	pinctrl-names = "default", "sleep";
598	pinctrl-0 = <&sdc2_on>;
599	pinctrl-1 = <&sdc2_off>;
600
601	bcrmf@1 {
602		compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac";
603		reg = <1>;
604
605		brcm,drive-strength = <10>;
606
607		pinctrl-names = "default";
608		pinctrl-0 = <&wlan_sleep_clk_pin>;
609	};
610};
611
612&tlmm {
613	sdc1_on: sdc1-on-state {
614		clk-pins {
615			pins = "sdc1_clk";
616			drive-strength = <16>;
617			bias-disable;
618		};
619
620		cmd-data-pins {
621			pins = "sdc1_cmd", "sdc1_data";
622			drive-strength = <10>;
623			bias-pull-up;
624		};
625	};
626
627	sdc2_on: sdc2-on-state {
628		clk-pins {
629			pins = "sdc2_clk";
630			drive-strength = <6>;
631			bias-disable;
632		};
633
634		cmd-data-pins {
635			pins = "sdc2_cmd", "sdc2_data";
636			drive-strength = <6>;
637			bias-pull-up;
638		};
639	};
640
641	mpu6515_pin: mpu6515-state {
642		pins = "gpio73";
643		function = "gpio";
644		bias-disable;
645	};
646
647	touch_pin: touch-state {
648		int-pins {
649			pins = "gpio5";
650			function = "gpio";
651
652			drive-strength = <2>;
653			bias-disable;
654		};
655
656		reset-pins {
657			pins = "gpio8";
658			function = "gpio";
659
660			drive-strength = <2>;
661			bias-pull-up;
662		};
663	};
664
665	panel_pin: panel-state {
666		pins = "gpio12";
667		function = "mdp_vsync";
668		drive-strength = <2>;
669		bias-disable;
670	};
671
672	bt_pin: bt-state {
673		hostwake-pins {
674			pins = "gpio42";
675			function = "gpio";
676		};
677
678		devwake-pins {
679			pins = "gpio62";
680			function = "gpio";
681		};
682
683		shutdown-pins {
684			pins = "gpio41";
685			function = "gpio";
686		};
687	};
688
689	vibrator_pin: vibrator-state {
690		core-pins {
691			pins = "gpio27";
692			function = "gp1_clk";
693			drive-strength = <6>;
694			bias-disable;
695		};
696
697		enable-pins {
698			pins = "gpio60";
699			function = "gpio";
700			drive-strength = <2>;
701			bias-disable;
702		};
703	};
704};
705
706&usb {
707	status = "okay";
708
709	phys = <&usb_hs1_phy>;
710	phy-select = <&tcsr 0xb000 0>;
711
712	extcon = <&charger>, <&usb_id>;
713	vbus-supply = <&usb_otg_vbus>;
714
715	hnp-disable;
716	srp-disable;
717	adp-disable;
718};
719
720&usb_hs1_phy {
721	status = "okay";
722
723	v1p8-supply = <&pm8941_l6>;
724	v3p3-supply = <&pm8941_l24>;
725
726	qcom,init-seq = /bits/ 8 <0x1 0x64>;
727};
728