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