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