1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2020, Linaro Ltd.
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/leds/common.h>
9#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
10#include <dt-bindings/sound/qcom,q6afe.h>
11#include <dt-bindings/sound/qcom,q6asm.h>
12#include "sm8250.dtsi"
13#include "pm8150.dtsi"
14#include "pm8150b.dtsi"
15#include "pm8150l.dtsi"
16
17/ {
18	model = "Qualcomm Technologies, Inc. Robotics RB5";
19	compatible = "qcom,qrb5165-rb5", "qcom,sm8250";
20	qcom,msm-id = <455 0x20001>;
21	qcom,board-id = <11 3>;
22
23	aliases {
24		serial0 = &uart12;
25		sdhc2 = &sdhc_2;
26	};
27
28	chosen {
29		stdout-path = "serial0:115200n8";
30	};
31
32	/* Fixed crystal oscillator dedicated to MCP2518FD */
33	clk40M: can-clock {
34		compatible = "fixed-clock";
35		#clock-cells = <0>;
36		clock-frequency = <40000000>;
37	};
38
39	dc12v: dc12v-regulator {
40		compatible = "regulator-fixed";
41		regulator-name = "DC12V";
42		regulator-min-microvolt = <12000000>;
43		regulator-max-microvolt = <12000000>;
44		regulator-always-on;
45	};
46
47	hdmi-out {
48		compatible = "hdmi-connector";
49		type = "a";
50
51		port {
52			hdmi_con: endpoint {
53				remote-endpoint = <&lt9611_out>;
54			};
55		};
56	};
57
58	leds {
59		compatible = "gpio-leds";
60
61		user4 {
62			label = "green:user4";
63			gpios = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>;
64			linux,default-trigger = "panic-indicator";
65			default-state = "off";
66		};
67
68		wlan {
69			label = "yellow:wlan";
70			gpios = <&pm8150_gpios 9 GPIO_ACTIVE_HIGH>;
71			linux,default-trigger = "phy0tx";
72			default-state = "off";
73		};
74
75		bt {
76			label = "blue:bt";
77			gpios = <&pm8150_gpios 7 GPIO_ACTIVE_HIGH>;
78			linux,default-trigger = "bluetooth-power";
79			default-state = "off";
80		};
81
82	};
83
84	lt9611_1v2: lt9611-vdd12-regulator {
85		compatible = "regulator-fixed";
86		regulator-name = "LT9611_1V2";
87
88		vin-supply = <&vdc_3v3>;
89		regulator-min-microvolt = <1200000>;
90		regulator-max-microvolt = <1200000>;
91	};
92
93	lt9611_3v3: lt9611-3v3 {
94		compatible = "regulator-fixed";
95		regulator-name = "LT9611_3V3";
96
97		vin-supply = <&vdc_3v3>;
98		regulator-min-microvolt = <3300000>;
99		regulator-max-microvolt = <3300000>;
100		regulator-boot-on;
101		regulator-always-on;
102	};
103
104	thermal-zones {
105		conn-thermal {
106			polling-delay-passive = <0>;
107			polling-delay = <0>;
108			thermal-sensors = <&pm8150b_adc_tm 0>;
109
110			trips {
111				active-config0 {
112					temperature = <125000>;
113					hysteresis = <1000>;
114					type = "critical";
115				};
116			};
117		};
118
119		pm8150l-thermal {
120			polling-delay-passive = <0>;
121			polling-delay = <0>;
122			thermal-sensors = <&pm8150l_adc_tm 1>;
123
124			trips {
125				active-config0 {
126					temperature = <50000>;
127					hysteresis = <4000>;
128					type = "passive";
129				};
130			};
131		};
132
133		skin-msm-thermal {
134			polling-delay-passive = <0>;
135			polling-delay = <0>;
136			thermal-sensors = <&pm8150l_adc_tm 0>;
137
138			trips {
139				active-config0 {
140					temperature = <50000>;
141					hysteresis = <4000>;
142					type = "passive";
143				};
144			};
145		};
146
147		wifi-thermal {
148			polling-delay-passive = <0>;
149			polling-delay = <0>;
150			thermal-sensors = <&pm8150_adc_tm 1>;
151
152			trips {
153				active-config0 {
154					temperature = <52000>;
155					hysteresis = <4000>;
156					type = "passive";
157				};
158			};
159		};
160
161		xo-thermal {
162			polling-delay-passive = <0>;
163			polling-delay = <0>;
164			thermal-sensors = <&pm8150_adc_tm 0>;
165
166			trips {
167				active-config0 {
168					temperature = <50000>;
169					hysteresis = <4000>;
170					type = "passive";
171				};
172			};
173		};
174	};
175
176	vbat: vbat-regulator {
177		compatible = "regulator-fixed";
178		regulator-name = "VBAT";
179		vin-supply = <&vreg_l11c_3p3>;
180		regulator-min-microvolt = <4200000>;
181		regulator-max-microvolt = <4200000>;
182		regulator-always-on;
183	};
184
185	vbat_som: vbat-som-regulator {
186		compatible = "regulator-fixed";
187		regulator-name = "VBAT_SOM";
188		vin-supply = <&dc12v>;
189		regulator-min-microvolt = <4200000>;
190		regulator-max-microvolt = <4200000>;
191		regulator-always-on;
192	};
193
194	vdc_3v3: vdc-3v3-regulator {
195		compatible = "regulator-fixed";
196		regulator-name = "VDC_3V3";
197		vin-supply = <&vreg_l11c_3p3>;
198		regulator-min-microvolt = <3300000>;
199		regulator-max-microvolt = <3300000>;
200		regulator-always-on;
201	};
202
203	vdc_5v: vdc-5v-regulator {
204		compatible = "regulator-fixed";
205		regulator-name = "VDC_5V";
206
207		regulator-min-microvolt = <5000000>;
208		regulator-max-microvolt = <5000000>;
209		regulator-always-on;
210		vin-supply = <&vreg_l11c_3p3>;
211	};
212
213	vph_pwr: vph-pwr-regulator {
214		compatible = "regulator-fixed";
215		regulator-name = "vph_pwr";
216		regulator-min-microvolt = <3700000>;
217		regulator-max-microvolt = <3700000>;
218		regulator-always-on;
219	};
220
221	vreg_s4a_1p8: vreg-s4a-1p8 {
222		compatible = "regulator-fixed";
223		regulator-name = "vreg_s4a_1p8";
224		regulator-min-microvolt = <1800000>;
225		regulator-max-microvolt = <1800000>;
226		regulator-always-on;
227	};
228};
229
230&adsp {
231	status = "okay";
232	firmware-name = "qcom/sm8250/adsp.mbn";
233};
234
235&apps_rsc {
236	pm8009-rpmh-regulators {
237		compatible = "qcom,pm8009-1-rpmh-regulators";
238		qcom,pmic-id = "f";
239
240		vdd-s1-supply = <&vph_pwr>;
241		vdd-s2-supply = <&vph_pwr>;
242		vdd-l2-supply = <&vreg_s8c_1p3>;
243		vdd-l5-l6-supply = <&vreg_bob>;
244		vdd-l7-supply = <&vreg_s4a_1p8>;
245
246		vreg_s2f_0p95: smps2 {
247			regulator-name = "vreg_s2f_0p95";
248			regulator-min-microvolt = <900000>;
249			regulator-max-microvolt = <952000>;
250			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
251		};
252
253		vreg_l1f_1p1: ldo1 {
254			regulator-name = "vreg_l1f_1p1";
255			regulator-min-microvolt = <1104000>;
256			regulator-max-microvolt = <1104000>;
257			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
258		};
259
260		vreg_l2f_1p2: ldo2 {
261			regulator-name = "vreg_l2f_1p2";
262			regulator-min-microvolt = <1200000>;
263			regulator-max-microvolt = <1200000>;
264			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
265		};
266
267		vreg_l6f_2p8: ldo6 {
268			regulator-name = "vreg_l6f_2p8";
269			regulator-min-microvolt = <2800000>;
270			regulator-max-microvolt = <2800000>;
271			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
272		};
273
274		vreg_l7f_1p8: ldo7 {
275			regulator-name = "vreg_l7f_1p8";
276			regulator-min-microvolt = <1800000>;
277			regulator-max-microvolt = <1800000>;
278			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
279		};
280	};
281
282	pm8150-rpmh-regulators {
283		compatible = "qcom,pm8150-rpmh-regulators";
284		qcom,pmic-id = "a";
285
286		vdd-s1-supply = <&vph_pwr>;
287		vdd-s2-supply = <&vph_pwr>;
288		vdd-s3-supply = <&vph_pwr>;
289		vdd-s4-supply = <&vph_pwr>;
290		vdd-s5-supply = <&vph_pwr>;
291		vdd-s6-supply = <&vph_pwr>;
292		vdd-s7-supply = <&vph_pwr>;
293		vdd-s8-supply = <&vph_pwr>;
294		vdd-s9-supply = <&vph_pwr>;
295		vdd-s10-supply = <&vph_pwr>;
296		vdd-l2-l10-supply = <&vreg_bob>;
297		vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>;
298		vdd-l6-l9-supply = <&vreg_s8c_1p3>;
299		vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
300		vdd-l13-l16-l17-supply = <&vreg_bob>;
301
302		vreg_l2a_3p1: ldo2 {
303			regulator-name = "vreg_l2a_3p1";
304			regulator-min-microvolt = <3072000>;
305			regulator-max-microvolt = <3072000>;
306			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
307		};
308
309		vreg_l3a_0p9: ldo3 {
310			regulator-name = "vreg_l3a_0p9";
311			regulator-min-microvolt = <928000>;
312			regulator-max-microvolt = <932000>;
313			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
314		};
315
316		vreg_l5a_0p88: ldo5 {
317			regulator-name = "vreg_l5a_0p88";
318			regulator-min-microvolt = <880000>;
319			regulator-max-microvolt = <880000>;
320			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
321		};
322
323		vreg_l6a_1p2: ldo6 {
324			regulator-name = "vreg_l6a_1p2";
325			regulator-min-microvolt = <1200000>;
326			regulator-max-microvolt = <1200000>;
327			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
328		};
329
330		vreg_l7a_1p7: ldo7 {
331			regulator-name = "vreg_l7a_1p7";
332			regulator-min-microvolt = <1704000>;
333			regulator-max-microvolt = <1800000>;
334			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
335		};
336
337		vreg_l9a_1p2: ldo9 {
338			regulator-name = "vreg_l9a_1p2";
339			regulator-min-microvolt = <1200000>;
340			regulator-max-microvolt = <1200000>;
341			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
342		};
343
344		vreg_l10a_1p8: ldo10 {
345			regulator-name = "vreg_l10a_1p8";
346			regulator-min-microvolt = <1800000>;
347			regulator-max-microvolt = <1800000>;
348			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
349		};
350
351		vreg_l12a_1p8: ldo12 {
352			regulator-name = "vreg_l12a_1p8";
353			regulator-min-microvolt = <1800000>;
354			regulator-max-microvolt = <1800000>;
355			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
356		};
357
358		vreg_l13a_ts_3p0: ldo13 {
359			regulator-name = "vreg_l13a_ts_3p0";
360			regulator-min-microvolt = <3008000>;
361			regulator-max-microvolt = <3008000>;
362			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
363		};
364
365		vreg_l14a_1p8: ldo14 {
366			regulator-name = "vreg_l14a_1p8";
367			regulator-min-microvolt = <1800000>;
368			regulator-max-microvolt = <1880000>;
369			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
370		};
371
372		vreg_l15a_1p8: ldo15 {
373			regulator-name = "vreg_l15a_1p8";
374			regulator-min-microvolt = <1800000>;
375			regulator-max-microvolt = <1800000>;
376			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
377		};
378
379		vreg_l16a_2p7: ldo16 {
380			regulator-name = "vreg_l16a_2p7";
381			regulator-min-microvolt = <2704000>;
382			regulator-max-microvolt = <2960000>;
383			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
384		};
385
386		vreg_l17a_3p0: ldo17 {
387			regulator-name = "vreg_l17a_3p0";
388			regulator-min-microvolt = <2856000>;
389			regulator-max-microvolt = <3008000>;
390			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
391		};
392
393		vreg_l18a_0p92: ldo18 {
394			regulator-name = "vreg_l18a_0p92";
395			regulator-min-microvolt = <800000>;
396			regulator-max-microvolt = <912000>;
397			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
398		};
399
400		vreg_s5a_1p9: smps5 {
401			regulator-name = "vreg_s5a_1p9";
402			regulator-min-microvolt = <1904000>;
403			regulator-max-microvolt = <2000000>;
404			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
405		};
406
407		vreg_s6a_0p95: smps6 {
408			regulator-name = "vreg_s6a_0p95";
409			regulator-min-microvolt = <920000>;
410			regulator-max-microvolt = <1128000>;
411			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
412		};
413	};
414
415	pm8150l-rpmh-regulators {
416		compatible = "qcom,pm8150l-rpmh-regulators";
417		qcom,pmic-id = "c";
418
419		vdd-s1-supply = <&vph_pwr>;
420		vdd-s2-supply = <&vph_pwr>;
421		vdd-s3-supply = <&vph_pwr>;
422		vdd-s4-supply = <&vph_pwr>;
423		vdd-s5-supply = <&vph_pwr>;
424		vdd-s6-supply = <&vph_pwr>;
425		vdd-s7-supply = <&vph_pwr>;
426		vdd-s8-supply = <&vph_pwr>;
427		vdd-l1-l8-supply = <&vreg_s4a_1p8>;
428		vdd-l2-l3-supply = <&vreg_s8c_1p3>;
429		vdd-l4-l5-l6-supply = <&vreg_bob>;
430		vdd-l7-l11-supply = <&vreg_bob>;
431		vdd-l9-l10-supply = <&vreg_bob>;
432		vdd-bob-supply = <&vph_pwr>;
433
434		vreg_bob: bob {
435			regulator-name = "vreg_bob";
436			regulator-min-microvolt = <3008000>;
437			regulator-max-microvolt = <4000000>;
438			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
439		};
440
441		vreg_l1c_1p8: ldo1 {
442			regulator-name = "vreg_l1c_1p8";
443			regulator-min-microvolt = <1800000>;
444			regulator-max-microvolt = <1800000>;
445			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
446		};
447
448		vreg_l2c_1p2: ldo2 {
449			regulator-name = "vreg_l2c_1p2";
450			regulator-min-microvolt = <1200000>;
451			regulator-max-microvolt = <1200000>;
452			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
453		};
454
455		vreg_l3c_0p8: ldo3 {
456			regulator-name = "vreg_l3c_0p8";
457			regulator-min-microvolt = <800000>;
458			regulator-max-microvolt = <800000>;
459			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
460		};
461
462		vreg_l4c_1p7: ldo4 {
463			regulator-name = "vreg_l4c_1p7";
464			regulator-min-microvolt = <1704000>;
465			regulator-max-microvolt = <2928000>;
466			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
467		};
468
469		vreg_l5c_1p8: ldo5 {
470			regulator-name = "vreg_l5c_1p8";
471			regulator-min-microvolt = <1800000>;
472			regulator-max-microvolt = <2928000>;
473			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
474		};
475
476		vreg_l6c_2p96: ldo6 {
477			regulator-name = "vreg_l6c_2p96";
478			regulator-min-microvolt = <1800000>;
479			regulator-max-microvolt = <2960000>;
480			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
481		};
482
483		vreg_l7c_cam_vcm0_2p85: ldo7 {
484			regulator-name = "vreg_l7c_cam_vcm0_2p85";
485			regulator-min-microvolt = <2856000>;
486			regulator-max-microvolt = <3104000>;
487			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
488		};
489
490		vreg_l8c_1p8: ldo8 {
491			regulator-name = "vreg_l8c_1p8";
492			regulator-min-microvolt = <1800000>;
493			regulator-max-microvolt = <1800000>;
494			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
495		};
496
497		vreg_l9c_2p96: ldo9 {
498			regulator-name = "vreg_l9c_2p96";
499			regulator-min-microvolt = <2704000>;
500			regulator-max-microvolt = <2960000>;
501			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
502		};
503
504		vreg_l10c_3p0: ldo10 {
505			regulator-name = "vreg_l10c_3p0";
506			regulator-min-microvolt = <3000000>;
507			regulator-max-microvolt = <3000000>;
508			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
509		};
510
511		vreg_l11c_3p3: ldo11 {
512			regulator-name = "vreg_l11c_3p3";
513			regulator-min-microvolt = <3296000>;
514			regulator-max-microvolt = <3296000>;
515			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
516			regulator-always-on;
517		};
518
519		vreg_s8c_1p3: smps8 {
520			regulator-name = "vreg_s8c_1p3";
521			regulator-min-microvolt = <1352000>;
522			regulator-max-microvolt = <1352000>;
523			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
524		};
525	};
526};
527
528&cdsp {
529	status = "okay";
530	firmware-name = "qcom/sm8250/cdsp.mbn";
531};
532
533&dsi0 {
534	status = "okay";
535	vdda-supply = <&vreg_l9a_1p2>;
536
537#if 0
538	qcom,dual-dsi-mode;
539	qcom,master-dsi;
540#endif
541
542	ports {
543		port@1 {
544			endpoint {
545				remote-endpoint = <&lt9611_a>;
546				data-lanes = <0 1 2 3>;
547			};
548		};
549	};
550};
551
552&dsi0_phy {
553	status = "okay";
554	vdds-supply = <&vreg_l5a_0p88>;
555};
556
557&gmu {
558	status = "okay";
559};
560
561&gpu {
562	status = "okay";
563
564	zap-shader {
565		memory-region = <&gpu_mem>;
566		firmware-name = "qcom/sm8250/a650_zap.mbn";
567	};
568};
569
570/* LS-I2C0 */
571&i2c4 {
572	status = "okay";
573};
574
575&i2c5 {
576	status = "okay";
577	clock-frequency = <400000>;
578
579	lt9611_codec: hdmi-bridge@2b {
580		compatible = "lontium,lt9611uxc";
581		reg = <0x2b>;
582		#sound-dai-cells = <1>;
583
584		interrupts-extended = <&tlmm 63 IRQ_TYPE_EDGE_FALLING>;
585
586		reset-gpios = <&pm8150l_gpios 5 GPIO_ACTIVE_HIGH>;
587
588		vdd-supply = <&lt9611_1v2>;
589		vcc-supply = <&lt9611_3v3>;
590
591		pinctrl-names = "default";
592		pinctrl-0 = <&lt9611_irq_pin &lt9611_rst_pin>;
593
594		ports {
595			#address-cells = <1>;
596			#size-cells = <0>;
597
598			port@0 {
599				reg = <0>;
600
601				lt9611_a: endpoint {
602					remote-endpoint = <&dsi0_out>;
603				};
604			};
605
606#if 0
607			port@1 {
608				reg = <1>;
609
610				lt9611_b: endpoint {
611					remote-endpoint = <&dsi1_out>;
612				};
613			};
614#endif
615
616			port@2 {
617				reg = <2>;
618
619				lt9611_out: endpoint {
620					remote-endpoint = <&hdmi_con>;
621				};
622			};
623
624		};
625	};
626};
627
628/* LS-I2C1 */
629&i2c15 {
630	status = "okay";
631};
632
633&mdss {
634	status = "okay";
635};
636
637&mdss_mdp {
638	status = "okay";
639};
640
641&pm8150_adc {
642	xo-therm@4c {
643		reg = <ADC5_XO_THERM_100K_PU>;
644		qcom,ratiometric;
645		qcom,hw-settle-time = <200>;
646	};
647
648	wifi-therm@4e {
649		reg = <ADC5_AMUX_THM2_100K_PU>;
650		qcom,ratiometric;
651		qcom,hw-settle-time = <200>;
652	};
653};
654
655&pm8150_adc_tm {
656	status = "okay";
657
658	xo-therm@0 {
659		reg = <0>;
660		io-channels = <&pm8150_adc ADC5_XO_THERM_100K_PU>;
661		qcom,ratiometric;
662		qcom,hw-settle-time-us = <200>;
663	};
664
665	wifi-therm@1 {
666		reg = <1>;
667		io-channels = <&pm8150_adc ADC5_AMUX_THM2_100K_PU>;
668		qcom,ratiometric;
669		qcom,hw-settle-time-us = <200>;
670	};
671};
672
673&pcie0 {
674	status = "okay";
675};
676
677&pcie0_phy {
678	status = "okay";
679	vdda-phy-supply = <&vreg_l5a_0p88>;
680	vdda-pll-supply = <&vreg_l9a_1p2>;
681};
682
683&pcie1 {
684	status = "okay";
685};
686
687&pcie1_phy {
688	status = "okay";
689	vdda-phy-supply = <&vreg_l5a_0p88>;
690	vdda-pll-supply = <&vreg_l9a_1p2>;
691};
692
693&pcie2 {
694	status = "okay";
695};
696
697&pcie2_phy {
698	status = "okay";
699	vdda-phy-supply = <&vreg_l5a_0p88>;
700	vdda-pll-supply = <&vreg_l9a_1p2>;
701};
702
703&pm8150_gpios {
704	gpio-reserved-ranges = <1 1>, <3 2>, <7 1>;
705	gpio-line-names =
706		"NC",
707		"OPTION2",
708		"PM_GPIO-F",
709		"PM_SLP_CLK_IN",
710		"OPTION1",
711		"VOL_UP_N",
712		"PM8250_GPIO7", /* Blue LED */
713		"SP_ARI_PWR_ALARM",
714		"GPIO_9_P", /* Yellow LED */
715		"GPIO_10_P"; /* Green LED */
716};
717
718&pm8150b_adc {
719	conn-therm@4f {
720		reg = <ADC5_AMUX_THM3_100K_PU>;
721		qcom,ratiometric;
722		qcom,hw-settle-time = <200>;
723	};
724};
725
726&pm8150b_adc_tm {
727	status = "okay";
728
729	conn-therm@0 {
730		reg = <0>;
731		io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
732		qcom,ratiometric;
733		qcom,hw-settle-time-us = <200>;
734	};
735};
736
737&pm8150b_gpios {
738	gpio-line-names =
739		"NC",
740		"NC",
741		"NC",
742		"NC",
743		"HAP_BOOST_EN", /* SOM */
744		"SMB_STAT", /* SOM */
745		"NC",
746		"NC",
747		"SDM_FORCE_USB_BOOT",
748		"NC",
749		"NC",
750		"NC";
751};
752
753&pm8150l_adc {
754	skin-msm-therm@4e {
755		reg = <ADC5_AMUX_THM2_100K_PU>;
756		qcom,ratiometric;
757		qcom,hw-settle-time = <200>;
758	};
759
760	pm8150l-therm@4f {
761		reg = <ADC5_AMUX_THM3_100K_PU>;
762		qcom,ratiometric;
763		qcom,hw-settle-time = <200>;
764	};
765};
766
767&pm8150l_adc_tm {
768	status = "okay";
769
770	skin-msm-therm@0 {
771		reg = <0>;
772		io-channels = <&pm8150l_adc ADC5_AMUX_THM2_100K_PU>;
773		qcom,ratiometric;
774		qcom,hw-settle-time-us = <200>;
775	};
776
777	pm8150l-therm@1 {
778		reg = <1>;
779		io-channels = <&pm8150l_adc ADC5_AMUX_THM3_100K_PU>;
780		qcom,ratiometric;
781		qcom,hw-settle-time-us = <200>;
782	};
783};
784
785&pm8150l_gpios {
786	gpio-line-names =
787		"NC",
788		"PM3003A_EN",
789		"NC",
790		"NC",
791		"PM_GPIO5", /* HDMI RST_N */
792		"PM_GPIO-A", /* PWM */
793		"PM_GPIO7",
794		"NC",
795		"NC",
796		"PM_GPIO-B",
797		"NC",
798		"PM3003A_MODE";
799
800	lt9611_rst_pin: lt9611-rst-state {
801		pins = "gpio5";
802		function = "normal";
803
804		output-high;
805		input-disable;
806		power-source = <0>;
807	};
808};
809
810&pm8150l_lpg {
811	status = "okay";
812
813	led@1 {
814		reg = <1>;
815		color = <LED_COLOR_ID_GREEN>;
816		function = LED_FUNCTION_HEARTBEAT;
817		function-enumerator = <3>;
818
819		linux,default-trigger = "heartbeat";
820		default-state = "on";
821	};
822
823	led@2 {
824		reg = <2>;
825		color = <LED_COLOR_ID_GREEN>;
826		function = LED_FUNCTION_INDICATOR;
827		function-enumerator = <2>;
828		default-state = "on";
829	};
830
831	led@3 {
832		reg = <3>;
833		color = <LED_COLOR_ID_GREEN>;
834		function = LED_FUNCTION_INDICATOR;
835		function-enumerator = <1>;
836	};
837};
838
839&pon_pwrkey {
840	status = "okay";
841};
842
843&pon_resin {
844	status = "okay";
845
846	linux,code = <KEY_VOLUMEDOWN>;
847};
848
849&qupv3_id_0 {
850	status = "okay";
851};
852
853&qupv3_id_1 {
854	status = "okay";
855};
856
857&qupv3_id_2 {
858	status = "okay";
859};
860
861&q6afedai {
862	qi2s@16 {
863		reg = <16>;
864		qcom,sd-lines = <0 1 2 3>;
865	};
866};
867
868/* TERT I2S Uses 1 I2S SD Lines for audio on LT9611 HDMI Bridge */
869&q6afedai {
870	qi2s@20 {
871		reg = <20>;
872		qcom,sd-lines = <0>;
873	};
874};
875
876&q6asmdai {
877	dai@0 {
878		reg = <0>;
879	};
880
881	dai@1 {
882		reg = <1>;
883	};
884
885	dai@2 {
886		reg = <2>;
887	};
888};
889
890&sdhc_2 {
891	status = "okay";
892	pinctrl-names = "default";
893	pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
894	vmmc-supply = <&vreg_l9c_2p96>;
895	vqmmc-supply = <&vreg_l6c_2p96>;
896	cd-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
897	bus-width = <4>;
898	no-sdio;
899	no-emmc;
900};
901
902&sound {
903	compatible = "qcom,qrb5165-rb5-sndcard";
904	pinctrl-0 = <&tert_mi2s_active>;
905	pinctrl-names = "default";
906	model = "Qualcomm-RB5-WSA8815-Speakers-DMIC0";
907	audio-routing =
908		"SpkrLeft IN", "WSA_SPK1 OUT",
909		"SpkrRight IN", "WSA_SPK2 OUT",
910		"VA DMIC0", "vdd-micb",
911		"VA DMIC1", "vdd-micb",
912		"MM_DL1",  "MultiMedia1 Playback",
913		"MM_DL2",  "MultiMedia2 Playback",
914		"MultiMedia3 Capture", "MM_UL3";
915
916	mm1-dai-link {
917		link-name = "MultiMedia1";
918		cpu {
919			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
920		};
921	};
922
923	mm2-dai-link {
924		link-name = "MultiMedia2";
925		cpu {
926			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
927		};
928	};
929
930	mm3-dai-link {
931		link-name = "MultiMedia3";
932		cpu {
933			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
934		};
935	};
936
937	hdmi-dai-link {
938		link-name = "HDMI Playback";
939		cpu {
940			sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
941		};
942
943		platform {
944			sound-dai = <&q6routing>;
945		};
946
947		codec {
948			sound-dai = <&lt9611_codec 0>;
949		};
950	};
951
952	dma-dai-link {
953		link-name = "WSA Playback";
954		cpu {
955			sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
956		};
957
958		platform {
959			sound-dai = <&q6routing>;
960		};
961
962		codec {
963			sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
964		};
965	};
966
967	va-dai-link {
968		link-name = "VA Capture";
969		cpu {
970			sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
971		};
972
973		platform {
974			sound-dai = <&q6routing>;
975		};
976
977		codec {
978			sound-dai = <&vamacro 0>;
979		};
980	};
981};
982
983/* CAN */
984&spi0 {
985	status = "okay";
986	pinctrl-names = "default";
987	pinctrl-0 = <&qup_spi0_data_clk>, <&qup_spi0_cs_gpio>;
988	cs-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
989
990	can@0 {
991		compatible = "microchip,mcp2518fd";
992		reg = <0>;
993		clocks = <&clk40M>;
994		interrupts-extended = <&tlmm 15 IRQ_TYPE_LEVEL_LOW>;
995		spi-max-frequency = <10000000>;
996		vdd-supply = <&vdc_5v>;
997		xceiver-supply = <&vdc_5v>;
998	};
999};
1000
1001&swr0 {
1002	left_spkr: wsa8810-left{
1003		compatible = "sdw10217211000";
1004		reg = <0 3>;
1005		powerdown-gpios = <&tlmm 130 GPIO_ACTIVE_HIGH>;
1006		#thermal-sensor-cells = <0>;
1007		sound-name-prefix = "SpkrLeft";
1008		#sound-dai-cells = <0>;
1009	};
1010
1011	right_spkr: wsa8810-right{
1012		compatible = "sdw10217211000";
1013		reg = <0 4>;
1014		powerdown-gpios = <&tlmm 130 GPIO_ACTIVE_HIGH>;
1015		#thermal-sensor-cells = <0>;
1016		sound-name-prefix = "SpkrRight";
1017		#sound-dai-cells = <0>;
1018	};
1019};
1020
1021&tlmm {
1022	gpio-reserved-ranges = <40 4>;
1023	gpio-line-names =
1024		"GPIO-MM",
1025		"GPIO-NN",
1026		"GPIO-OO",
1027		"GPIO-PP",
1028		"GPIO-A",
1029		"GPIO-C",
1030		"GPIO-E",
1031		"GPIO-D",
1032		"I2C0-SDA",
1033		"I2C0-SCL",
1034		"GPIO-TT", /* GPIO_10 */
1035		"NC",
1036		"GPIO_12_I2C_SDA",
1037		"GPIO_13_I2C_SCL",
1038		"GPIO-X",
1039		"GPIO_15_RGMII_INT",
1040		"HST_BT_UART_CTS",
1041		"HST_BT_UART_RFR",
1042		"HST_BT_UART_TX",
1043		"HST_BT_UART_RX",
1044		"HST_WLAN_EN", /* GPIO_20 */
1045		"HST_BT_EN",
1046		"GPIO-AAA",
1047		"GPIO-BBB",
1048		"GPIO-CCC",
1049		"GPIO-Z",
1050		"GPIO-DDD",
1051		"GPIO-BB",
1052		"GPIO_28_CAN_SPI_MISO",
1053		"GPIO_29_CAN_SPI_MOSI",
1054		"GPIO_30_CAN_SPI_CLK", /* GPIO_30 */
1055		"GPIO_31_CAN_SPI_CS",
1056		"GPIO-UU",
1057		"NC",
1058		"UART1_TXD_SOM",
1059		"UART1_RXD_SOM",
1060		"UART0_CTS",
1061		"UART0_RTS",
1062		"UART0_TXD",
1063		"UART0_RXD",
1064		"SPI1_MISO", /* GPIO_40 */
1065		"SPI1_MOSI",
1066		"SPI1_CLK",
1067		"SPI1_CS",
1068		"I2C1_SDA",
1069		"I2C1_SCL",
1070		"GPIO-F",
1071		"GPIO-JJ",
1072		"Board_ID1",
1073		"Board_ID2",
1074		"NC", /* GPIO_50 */
1075		"NC",
1076		"SPI0_MISO",
1077		"SPI0_MOSI",
1078		"SPI0_SCLK",
1079		"SPI0_CS",
1080		"GPIO-QQ",
1081		"GPIO-RR",
1082		"USB2LAN_RESET",
1083		"USB2LAN_EXTWAKE",
1084		"NC", /* GPIO_60 */
1085		"NC",
1086		"NC",
1087		"LT9611_INT",
1088		"GPIO-AA",
1089		"USB_CC_DIR",
1090		"GPIO-G",
1091		"GPIO-LL",
1092		"USB_DP_HPD_1P8",
1093		"NC",
1094		"NC", /* GPIO_70 */
1095		"SD_CMD",
1096		"SD_DAT3",
1097		"SD_SCLK",
1098		"SD_DAT2",
1099		"SD_DAT1",
1100		"SD_DAT0", /* BOOT_CFG3 */
1101		"SD_UFS_CARD_DET_N",
1102		"GPIO-II",
1103		"PCIE0_RST_N",
1104		"PCIE0_CLK_REQ_N", /* GPIO_80 */
1105		"PCIE0_WAKE_N",
1106		"GPIO-CC",
1107		"GPIO-DD",
1108		"GPIO-EE",
1109		"GPIO-FF",
1110		"GPIO-GG",
1111		"GPIO-HH",
1112		"GPIO-VV",
1113		"GPIO-WW",
1114		"NC", /* GPIO_90 */
1115		"NC",
1116		"GPIO-K",
1117		"GPIO-I",
1118		"CSI0_MCLK",
1119		"CSI1_MCLK",
1120		"CSI2_MCLK",
1121		"CSI3_MCLK",
1122		"GPIO-AA", /* CSI4_MCLK */
1123		"GPIO-BB", /* CSI5_MCLK */
1124		"GPIO-KK", /* GPIO_100 */
1125		"CCI_I2C_SDA0",
1126		"CCI_I2C_SCL0",
1127		"CCI_I2C_SDA1",
1128		"CCI_I2C_SCL1",
1129		"CCI_I2C_SDA2",
1130		"CCI_I2C_SCL2",
1131		"CCI_I2C_SDA3",
1132		"CCI_I2C_SCL3",
1133		"GPIO-L",
1134		"NC", /* GPIO_110 */
1135		"NC",
1136		"ACCEL_INT",
1137		"GYRO_INT",
1138		"GPIO-J",
1139		"GPIO-YY",
1140		"GPIO-H",
1141		"GPIO-ZZ",
1142		"NC",
1143		"NC",
1144		"NC", /* GPIO_120 */
1145		"NC",
1146		"MAG_INT",
1147		"MAG_DRDY_INT",
1148		"HST_SW_CTRL",
1149		"GPIO-M",
1150		"GPIO-N",
1151		"GPIO-O",
1152		"GPIO-P",
1153		"PS_INT",
1154		"WSA1_EN", /* GPIO_130 */
1155		"USB_HUB_RESET",
1156		"SDM_FORCE_USB_BOOT",
1157		"I2S1_CLK_HDMI",
1158		"I2S1_DATA0_HDMI",
1159		"I2S1_WS_HDMI",
1160		"GPIO-B",
1161		"GPIO_137", /* To LT9611_I2S_MCLK_3V3 */
1162		"PCM_CLK",
1163		"PCM_DI",
1164		"PCM_DO", /* GPIO_140 */
1165		"PCM_FS",
1166		"HST_SLIM_CLK",
1167		"HST_SLIM_DATA",
1168		"GPIO-U",
1169		"GPIO-Y",
1170		"GPIO-R",
1171		"GPIO-Q",
1172		"GPIO-S",
1173		"GPIO-T",
1174		"GPIO-V", /* GPIO_150 */
1175		"GPIO-W",
1176		"DMIC_CLK1",
1177		"DMIC_DATA1",
1178		"DMIC_CLK2",
1179		"DMIC_DATA2",
1180		"WSA_SWR_CLK",
1181		"WSA_SWR_DATA",
1182		"DMIC_CLK3",
1183		"DMIC_DATA3",
1184		"I2C4_SDA", /* GPIO_160 */
1185		"I2C4_SCL",
1186		"SPI3_CS1",
1187		"SPI3_CS2",
1188		"SPI2_MISO_LS3",
1189		"SPI2_MOSI_LS3",
1190		"SPI2_CLK_LS3",
1191		"SPI2_ACCEL_CS_LS3",
1192		"SPI2_CS1",
1193		"NC",
1194		"GPIO-SS", /* GPIO_170 */
1195		"GPIO-XX",
1196		"SPI3_MISO",
1197		"SPI3_MOSI",
1198		"SPI3_CLK",
1199		"SPI3_CS",
1200		"HST_BLE_SNS_UART_TX",
1201		"HST_BLE_SNS_UART_RX",
1202		"HST_WLAN_UART_TX",
1203		"HST_WLAN_UART_RX";
1204
1205	lt9611_irq_pin: lt9611-irq {
1206		pins = "gpio63";
1207		function = "gpio";
1208		bias-disable;
1209	};
1210
1211	sdc2_default_state: sdc2-default {
1212		clk {
1213			pins = "sdc2_clk";
1214			bias-disable;
1215			drive-strength = <16>;
1216		};
1217
1218		cmd {
1219			pins = "sdc2_cmd";
1220			bias-pull-up;
1221			drive-strength = <10>;
1222		};
1223
1224		data {
1225			pins = "sdc2_data";
1226			bias-pull-up;
1227			drive-strength = <10>;
1228		};
1229	};
1230
1231	sdc2_card_det_n: sd-card-det-n {
1232		pins = "gpio77";
1233		function = "gpio";
1234		bias-pull-up;
1235	};
1236};
1237
1238&uart12 {
1239	status = "okay";
1240};
1241
1242&ufs_mem_hc {
1243	status = "okay";
1244
1245	vcc-supply = <&vreg_l17a_3p0>;
1246	vcc-max-microamp = <800000>;
1247	vccq-supply = <&vreg_l6a_1p2>;
1248	vccq-max-microamp = <800000>;
1249	vccq2-supply = <&vreg_s4a_1p8>;
1250	vccq2-max-microamp = <800000>;
1251};
1252
1253&ufs_mem_phy {
1254	status = "okay";
1255
1256	vdda-phy-supply = <&vreg_l5a_0p88>;
1257	vdda-pll-supply = <&vreg_l9a_1p2>;
1258};
1259
1260&usb_1 {
1261	status = "okay";
1262};
1263
1264&usb_1_dwc3 {
1265	dr_mode = "peripheral";
1266};
1267
1268&usb_1_hsphy {
1269	status = "okay";
1270
1271	vdda-pll-supply = <&vreg_l5a_0p88>;
1272	vdda33-supply = <&vreg_l2a_3p1>;
1273	vdda18-supply = <&vreg_l12a_1p8>;
1274};
1275
1276&usb_1_qmpphy {
1277	status = "okay";
1278
1279	vdda-phy-supply = <&vreg_l9a_1p2>;
1280	vdda-pll-supply = <&vreg_l18a_0p92>;
1281};
1282
1283&usb_2 {
1284	status = "okay";
1285};
1286
1287&usb_2_dwc3 {
1288	dr_mode = "host";
1289};
1290
1291&usb_2_hsphy {
1292	status = "okay";
1293
1294	vdda-pll-supply = <&vreg_l5a_0p88>;
1295	vdda33-supply = <&vreg_l2a_3p1>;
1296	vdda18-supply = <&vreg_l12a_1p8>;
1297};
1298
1299&usb_2_qmpphy {
1300	status = "okay";
1301
1302	vdda-phy-supply = <&vreg_l9a_1p2>;
1303	vdda-pll-supply = <&vreg_l18a_0p92>;
1304};
1305
1306&vamacro {
1307	pinctrl-0 = <&dmic01_active>;
1308	pinctrl-names = "default";
1309	vdd-micb-supply = <&vreg_s4a_1p8>;
1310	qcom,dmic-sample-rate = <600000>;
1311};
1312
1313&venus {
1314	status = "okay";
1315};
1316
1317/* PINCTRL - additions to nodes defined in sm8250.dtsi */
1318&qup_spi0_cs_gpio {
1319	drive-strength = <6>;
1320	bias-disable;
1321};
1322
1323&qup_spi0_data_clk {
1324	drive-strength = <6>;
1325	bias-disable;
1326};
1327