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