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