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			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		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		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
90	lt9611_1v2: lt9611-vdd12-regulator {
91		compatible = "regulator-fixed";
92		regulator-name = "LT9611_1V2";
93
94		vin-supply = <&vdc_3v3>;
95		regulator-min-microvolt = <1200000>;
96		regulator-max-microvolt = <1200000>;
97	};
98
99	lt9611_3v3: lt9611-3v3 {
100		compatible = "regulator-fixed";
101		regulator-name = "LT9611_3V3";
102
103		vin-supply = <&vdc_3v3>;
104		regulator-min-microvolt = <3300000>;
105		regulator-max-microvolt = <3300000>;
106		regulator-boot-on;
107		regulator-always-on;
108	};
109
110	thermal-zones {
111		conn-thermal {
112			polling-delay-passive = <0>;
113			polling-delay = <0>;
114			thermal-sensors = <&pm8150b_adc_tm 0>;
115
116			trips {
117				active-config0 {
118					temperature = <125000>;
119					hysteresis = <1000>;
120					type = "critical";
121				};
122			};
123		};
124
125		pm8150l-thermal {
126			polling-delay-passive = <0>;
127			polling-delay = <0>;
128			thermal-sensors = <&pm8150l_adc_tm 1>;
129
130			trips {
131				active-config0 {
132					temperature = <50000>;
133					hysteresis = <4000>;
134					type = "passive";
135				};
136			};
137		};
138
139		skin-msm-thermal {
140			polling-delay-passive = <0>;
141			polling-delay = <0>;
142			thermal-sensors = <&pm8150l_adc_tm 0>;
143
144			trips {
145				active-config0 {
146					temperature = <50000>;
147					hysteresis = <4000>;
148					type = "passive";
149				};
150			};
151		};
152
153		wifi-thermal {
154			polling-delay-passive = <0>;
155			polling-delay = <0>;
156			thermal-sensors = <&pm8150_adc_tm 1>;
157
158			trips {
159				active-config0 {
160					temperature = <52000>;
161					hysteresis = <4000>;
162					type = "passive";
163				};
164			};
165		};
166
167		xo-thermal {
168			polling-delay-passive = <0>;
169			polling-delay = <0>;
170			thermal-sensors = <&pm8150_adc_tm 0>;
171
172			trips {
173				active-config0 {
174					temperature = <50000>;
175					hysteresis = <4000>;
176					type = "passive";
177				};
178			};
179		};
180	};
181
182	vbat: vbat-regulator {
183		compatible = "regulator-fixed";
184		regulator-name = "VBAT";
185		vin-supply = <&vreg_l11c_3p3>;
186		regulator-min-microvolt = <4200000>;
187		regulator-max-microvolt = <4200000>;
188		regulator-always-on;
189	};
190
191	vbat_som: vbat-som-regulator {
192		compatible = "regulator-fixed";
193		regulator-name = "VBAT_SOM";
194		vin-supply = <&dc12v>;
195		regulator-min-microvolt = <4200000>;
196		regulator-max-microvolt = <4200000>;
197		regulator-always-on;
198	};
199
200	vdc_3v3: vdc-3v3-regulator {
201		compatible = "regulator-fixed";
202		regulator-name = "VDC_3V3";
203		vin-supply = <&vreg_l11c_3p3>;
204		regulator-min-microvolt = <3300000>;
205		regulator-max-microvolt = <3300000>;
206		regulator-always-on;
207	};
208
209	vdc_5v: vdc-5v-regulator {
210		compatible = "regulator-fixed";
211		regulator-name = "VDC_5V";
212
213		regulator-min-microvolt = <5000000>;
214		regulator-max-microvolt = <5000000>;
215		regulator-always-on;
216		vin-supply = <&vreg_l11c_3p3>;
217	};
218
219	vph_pwr: vph-pwr-regulator {
220		compatible = "regulator-fixed";
221		regulator-name = "vph_pwr";
222		regulator-min-microvolt = <3700000>;
223		regulator-max-microvolt = <3700000>;
224		regulator-always-on;
225	};
226
227	vreg_s4a_1p8: vreg-s4a-1p8 {
228		compatible = "regulator-fixed";
229		regulator-name = "vreg_s4a_1p8";
230		regulator-min-microvolt = <1800000>;
231		regulator-max-microvolt = <1800000>;
232		regulator-always-on;
233	};
234};
235
236&adsp {
237	status = "okay";
238	firmware-name = "qcom/sm8250/adsp.mbn";
239};
240
241&apps_rsc {
242	pm8009-rpmh-regulators {
243		compatible = "qcom,pm8009-1-rpmh-regulators";
244		qcom,pmic-id = "f";
245
246		vdd-s1-supply = <&vph_pwr>;
247		vdd-s2-supply = <&vph_pwr>;
248		vdd-l2-supply = <&vreg_s8c_1p3>;
249		vdd-l5-l6-supply = <&vreg_bob>;
250		vdd-l7-supply = <&vreg_s4a_1p8>;
251
252		vreg_s2f_0p95: smps2 {
253			regulator-name = "vreg_s2f_0p95";
254			regulator-min-microvolt = <900000>;
255			regulator-max-microvolt = <952000>;
256			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
257		};
258
259		vreg_l1f_1p1: ldo1 {
260			regulator-name = "vreg_l1f_1p1";
261			regulator-min-microvolt = <1104000>;
262			regulator-max-microvolt = <1104000>;
263			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
264		};
265
266		vreg_l2f_1p2: ldo2 {
267			regulator-name = "vreg_l2f_1p2";
268			regulator-min-microvolt = <1200000>;
269			regulator-max-microvolt = <1200000>;
270			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
271		};
272
273		vreg_l6f_2p8: ldo6 {
274			regulator-name = "vreg_l6f_2p8";
275			regulator-min-microvolt = <2800000>;
276			regulator-max-microvolt = <2800000>;
277			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
278		};
279
280		vreg_l7f_1p8: ldo7 {
281			regulator-name = "vreg_l7f_1p8";
282			regulator-min-microvolt = <1800000>;
283			regulator-max-microvolt = <1800000>;
284			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
285		};
286	};
287
288	pm8150-rpmh-regulators {
289		compatible = "qcom,pm8150-rpmh-regulators";
290		qcom,pmic-id = "a";
291
292		vdd-s1-supply = <&vph_pwr>;
293		vdd-s2-supply = <&vph_pwr>;
294		vdd-s3-supply = <&vph_pwr>;
295		vdd-s4-supply = <&vph_pwr>;
296		vdd-s5-supply = <&vph_pwr>;
297		vdd-s6-supply = <&vph_pwr>;
298		vdd-s7-supply = <&vph_pwr>;
299		vdd-s8-supply = <&vph_pwr>;
300		vdd-s9-supply = <&vph_pwr>;
301		vdd-s10-supply = <&vph_pwr>;
302		vdd-l2-l10-supply = <&vreg_bob>;
303		vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>;
304		vdd-l6-l9-supply = <&vreg_s8c_1p3>;
305		vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>;
306		vdd-l13-l16-l17-supply = <&vreg_bob>;
307
308		vreg_l2a_3p1: ldo2 {
309			regulator-name = "vreg_l2a_3p1";
310			regulator-min-microvolt = <3072000>;
311			regulator-max-microvolt = <3072000>;
312			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
313		};
314
315		vreg_l3a_0p9: ldo3 {
316			regulator-name = "vreg_l3a_0p9";
317			regulator-min-microvolt = <928000>;
318			regulator-max-microvolt = <932000>;
319			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
320		};
321
322		vreg_l5a_0p88: ldo5 {
323			regulator-name = "vreg_l5a_0p88";
324			regulator-min-microvolt = <880000>;
325			regulator-max-microvolt = <880000>;
326			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
327		};
328
329		vreg_l6a_1p2: ldo6 {
330			regulator-name = "vreg_l6a_1p2";
331			regulator-min-microvolt = <1200000>;
332			regulator-max-microvolt = <1200000>;
333			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
334		};
335
336		vreg_l7a_1p7: ldo7 {
337			regulator-name = "vreg_l7a_1p7";
338			regulator-min-microvolt = <1704000>;
339			regulator-max-microvolt = <1800000>;
340			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
341		};
342
343		vreg_l9a_1p2: ldo9 {
344			regulator-name = "vreg_l9a_1p2";
345			regulator-min-microvolt = <1200000>;
346			regulator-max-microvolt = <1200000>;
347			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
348		};
349
350		vreg_l10a_1p8: ldo10 {
351			regulator-name = "vreg_l10a_1p8";
352			regulator-min-microvolt = <1800000>;
353			regulator-max-microvolt = <1800000>;
354			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
355		};
356
357		vreg_l12a_1p8: ldo12 {
358			regulator-name = "vreg_l12a_1p8";
359			regulator-min-microvolt = <1800000>;
360			regulator-max-microvolt = <1800000>;
361			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
362		};
363
364		vreg_l13a_ts_3p0: ldo13 {
365			regulator-name = "vreg_l13a_ts_3p0";
366			regulator-min-microvolt = <3008000>;
367			regulator-max-microvolt = <3008000>;
368			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
369		};
370
371		vreg_l14a_1p8: ldo14 {
372			regulator-name = "vreg_l14a_1p8";
373			regulator-min-microvolt = <1800000>;
374			regulator-max-microvolt = <1880000>;
375			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
376		};
377
378		vreg_l15a_1p8: ldo15 {
379			regulator-name = "vreg_l15a_1p8";
380			regulator-min-microvolt = <1800000>;
381			regulator-max-microvolt = <1800000>;
382			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
383		};
384
385		vreg_l16a_2p7: ldo16 {
386			regulator-name = "vreg_l16a_2p7";
387			regulator-min-microvolt = <2704000>;
388			regulator-max-microvolt = <2960000>;
389			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
390		};
391
392		vreg_l17a_3p0: ldo17 {
393			regulator-name = "vreg_l17a_3p0";
394			regulator-min-microvolt = <2856000>;
395			regulator-max-microvolt = <3008000>;
396			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
397		};
398
399		vreg_l18a_0p92: ldo18 {
400			regulator-name = "vreg_l18a_0p92";
401			regulator-min-microvolt = <800000>;
402			regulator-max-microvolt = <912000>;
403			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
404		};
405
406		vreg_s5a_1p9: smps5 {
407			regulator-name = "vreg_s5a_1p9";
408			regulator-min-microvolt = <1904000>;
409			regulator-max-microvolt = <2000000>;
410			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
411		};
412
413		vreg_s6a_0p95: smps6 {
414			regulator-name = "vreg_s6a_0p95";
415			regulator-min-microvolt = <920000>;
416			regulator-max-microvolt = <1128000>;
417			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
418		};
419	};
420
421	pm8150l-rpmh-regulators {
422		compatible = "qcom,pm8150l-rpmh-regulators";
423		qcom,pmic-id = "c";
424
425		vdd-s1-supply = <&vph_pwr>;
426		vdd-s2-supply = <&vph_pwr>;
427		vdd-s3-supply = <&vph_pwr>;
428		vdd-s4-supply = <&vph_pwr>;
429		vdd-s5-supply = <&vph_pwr>;
430		vdd-s6-supply = <&vph_pwr>;
431		vdd-s7-supply = <&vph_pwr>;
432		vdd-s8-supply = <&vph_pwr>;
433		vdd-l1-l8-supply = <&vreg_s4a_1p8>;
434		vdd-l2-l3-supply = <&vreg_s8c_1p3>;
435		vdd-l4-l5-l6-supply = <&vreg_bob>;
436		vdd-l7-l11-supply = <&vreg_bob>;
437		vdd-l9-l10-supply = <&vreg_bob>;
438		vdd-bob-supply = <&vph_pwr>;
439
440		vreg_bob: bob {
441			regulator-name = "vreg_bob";
442			regulator-min-microvolt = <3008000>;
443			regulator-max-microvolt = <4000000>;
444			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
445		};
446
447		vreg_l1c_1p8: ldo1 {
448			regulator-name = "vreg_l1c_1p8";
449			regulator-min-microvolt = <1800000>;
450			regulator-max-microvolt = <1800000>;
451			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
452		};
453
454		vreg_l2c_1p2: ldo2 {
455			regulator-name = "vreg_l2c_1p2";
456			regulator-min-microvolt = <1200000>;
457			regulator-max-microvolt = <1200000>;
458			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
459		};
460
461		vreg_l3c_0p8: ldo3 {
462			regulator-name = "vreg_l3c_0p8";
463			regulator-min-microvolt = <800000>;
464			regulator-max-microvolt = <800000>;
465			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
466		};
467
468		vreg_l4c_1p7: ldo4 {
469			regulator-name = "vreg_l4c_1p7";
470			regulator-min-microvolt = <1704000>;
471			regulator-max-microvolt = <2928000>;
472			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
473		};
474
475		vreg_l5c_1p8: ldo5 {
476			regulator-name = "vreg_l5c_1p8";
477			regulator-min-microvolt = <1800000>;
478			regulator-max-microvolt = <2928000>;
479			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
480		};
481
482		vreg_l6c_2p96: ldo6 {
483			regulator-name = "vreg_l6c_2p96";
484			regulator-min-microvolt = <1800000>;
485			regulator-max-microvolt = <2960000>;
486			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
487		};
488
489		vreg_l7c_cam_vcm0_2p85: ldo7 {
490			regulator-name = "vreg_l7c_cam_vcm0_2p85";
491			regulator-min-microvolt = <2856000>;
492			regulator-max-microvolt = <3104000>;
493			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
494		};
495
496		vreg_l8c_1p8: ldo8 {
497			regulator-name = "vreg_l8c_1p8";
498			regulator-min-microvolt = <1800000>;
499			regulator-max-microvolt = <1800000>;
500			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
501		};
502
503		vreg_l9c_2p96: ldo9 {
504			regulator-name = "vreg_l9c_2p96";
505			regulator-min-microvolt = <2704000>;
506			regulator-max-microvolt = <2960000>;
507			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
508		};
509
510		vreg_l10c_3p0: ldo10 {
511			regulator-name = "vreg_l10c_3p0";
512			regulator-min-microvolt = <3000000>;
513			regulator-max-microvolt = <3000000>;
514			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
515		};
516
517		vreg_l11c_3p3: ldo11 {
518			regulator-name = "vreg_l11c_3p3";
519			regulator-min-microvolt = <3296000>;
520			regulator-max-microvolt = <3296000>;
521			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
522			regulator-always-on;
523		};
524
525		vreg_s8c_1p3: smps8 {
526			regulator-name = "vreg_s8c_1p3";
527			regulator-min-microvolt = <1352000>;
528			regulator-max-microvolt = <1352000>;
529			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
530		};
531	};
532};
533
534&cdsp {
535	status = "okay";
536	firmware-name = "qcom/sm8250/cdsp.mbn";
537};
538
539&dsi0 {
540	status = "okay";
541	vdda-supply = <&vreg_l9a_1p2>;
542
543#if 0
544	qcom,dual-dsi-mode;
545	qcom,master-dsi;
546#endif
547
548	ports {
549		port@1 {
550			endpoint {
551				remote-endpoint = <&lt9611_a>;
552				data-lanes = <0 1 2 3>;
553			};
554		};
555	};
556};
557
558&dsi0_phy {
559	status = "okay";
560	vdds-supply = <&vreg_l5a_0p88>;
561};
562
563&gmu {
564	status = "okay";
565};
566
567&gpu {
568	status = "okay";
569
570	zap-shader {
571		memory-region = <&gpu_mem>;
572		firmware-name = "qcom/sm8250/a650_zap.mbn";
573	};
574};
575
576/* LS-I2C0 */
577&i2c4 {
578	status = "okay";
579};
580
581&i2c5 {
582	status = "okay";
583	clock-frequency = <400000>;
584
585	lt9611_codec: hdmi-bridge@2b {
586		compatible = "lontium,lt9611uxc";
587		reg = <0x2b>;
588		#sound-dai-cells = <1>;
589
590		interrupts-extended = <&tlmm 63 IRQ_TYPE_EDGE_FALLING>;
591
592		reset-gpios = <&pm8150l_gpios 5 GPIO_ACTIVE_HIGH>;
593
594		vdd-supply = <&lt9611_1v2>;
595		vcc-supply = <&lt9611_3v3>;
596
597		pinctrl-names = "default";
598		pinctrl-0 = <&lt9611_irq_pin &lt9611_rst_pin>;
599
600		ports {
601			#address-cells = <1>;
602			#size-cells = <0>;
603
604			port@0 {
605				reg = <0>;
606
607				lt9611_a: endpoint {
608					remote-endpoint = <&dsi0_out>;
609				};
610			};
611
612#if 0
613			port@1 {
614				reg = <1>;
615
616				lt9611_b: endpoint {
617					remote-endpoint = <&dsi1_out>;
618				};
619			};
620#endif
621
622			port@2 {
623				reg = <2>;
624
625				lt9611_out: endpoint {
626					remote-endpoint = <&hdmi_con>;
627				};
628			};
629
630		};
631	};
632};
633
634/* LS-I2C1 */
635&i2c15 {
636	status = "okay";
637};
638
639&mdss {
640	status = "okay";
641};
642
643&mdss_mdp {
644	status = "okay";
645};
646
647&pm8150_adc {
648	xo-therm@4c {
649		reg = <ADC5_XO_THERM_100K_PU>;
650		qcom,ratiometric;
651		qcom,hw-settle-time = <200>;
652	};
653
654	wifi-therm@4e {
655		reg = <ADC5_AMUX_THM2_100K_PU>;
656		qcom,ratiometric;
657		qcom,hw-settle-time = <200>;
658	};
659};
660
661&pm8150_adc_tm {
662	status = "okay";
663
664	xo-therm@0 {
665		reg = <0>;
666		io-channels = <&pm8150_adc ADC5_XO_THERM_100K_PU>;
667		qcom,ratiometric;
668		qcom,hw-settle-time-us = <200>;
669	};
670
671	wifi-therm@1 {
672		reg = <1>;
673		io-channels = <&pm8150_adc ADC5_AMUX_THM2_100K_PU>;
674		qcom,ratiometric;
675		qcom,hw-settle-time-us = <200>;
676	};
677};
678
679&pcie0 {
680	status = "okay";
681};
682
683&pcie0_phy {
684	status = "okay";
685	vdda-phy-supply = <&vreg_l5a_0p88>;
686	vdda-pll-supply = <&vreg_l9a_1p2>;
687};
688
689&pcie1 {
690	status = "okay";
691};
692
693&pcie1_phy {
694	status = "okay";
695	vdda-phy-supply = <&vreg_l5a_0p88>;
696	vdda-pll-supply = <&vreg_l9a_1p2>;
697};
698
699&pcie2 {
700	status = "okay";
701};
702
703&pcie2_phy {
704	status = "okay";
705	vdda-phy-supply = <&vreg_l5a_0p88>;
706	vdda-pll-supply = <&vreg_l9a_1p2>;
707};
708
709&pm8150_gpios {
710	gpio-reserved-ranges = <1 1>, <3 2>, <7 1>;
711	gpio-line-names =
712		"NC",
713		"OPTION2",
714		"PM_GPIO-F",
715		"PM_SLP_CLK_IN",
716		"OPTION1",
717		"VOL_UP_N",
718		"PM8250_GPIO7", /* Blue LED */
719		"SP_ARI_PWR_ALARM",
720		"GPIO_9_P", /* Yellow LED */
721		"GPIO_10_P"; /* Green LED */
722};
723
724&pm8150b_adc {
725	conn-therm@4f {
726		reg = <ADC5_AMUX_THM3_100K_PU>;
727		qcom,ratiometric;
728		qcom,hw-settle-time = <200>;
729	};
730};
731
732&pm8150b_adc_tm {
733	status = "okay";
734
735	conn-therm@0 {
736		reg = <0>;
737		io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
738		qcom,ratiometric;
739		qcom,hw-settle-time-us = <200>;
740	};
741};
742
743&pm8150b_gpios {
744	gpio-line-names =
745		"NC",
746		"NC",
747		"NC",
748		"NC",
749		"HAP_BOOST_EN", /* SOM */
750		"SMB_STAT", /* SOM */
751		"NC",
752		"NC",
753		"SDM_FORCE_USB_BOOT",
754		"NC",
755		"NC",
756		"NC";
757};
758
759&pm8150l_adc {
760	skin-msm-therm@4e {
761		reg = <ADC5_AMUX_THM2_100K_PU>;
762		qcom,ratiometric;
763		qcom,hw-settle-time = <200>;
764	};
765
766	pm8150l-therm@4f {
767		reg = <ADC5_AMUX_THM3_100K_PU>;
768		qcom,ratiometric;
769		qcom,hw-settle-time = <200>;
770	};
771};
772
773&pm8150l_adc_tm {
774	status = "okay";
775
776	skin-msm-therm@0 {
777		reg = <0>;
778		io-channels = <&pm8150l_adc ADC5_AMUX_THM2_100K_PU>;
779		qcom,ratiometric;
780		qcom,hw-settle-time-us = <200>;
781	};
782
783	pm8150l-therm@1 {
784		reg = <1>;
785		io-channels = <&pm8150l_adc ADC5_AMUX_THM3_100K_PU>;
786		qcom,ratiometric;
787		qcom,hw-settle-time-us = <200>;
788	};
789};
790
791&pm8150l_gpios {
792	gpio-line-names =
793		"NC",
794		"PM3003A_EN",
795		"NC",
796		"NC",
797		"PM_GPIO5", /* HDMI RST_N */
798		"PM_GPIO-A", /* PWM */
799		"PM_GPIO7",
800		"NC",
801		"NC",
802		"PM_GPIO-B",
803		"NC",
804		"PM3003A_MODE";
805
806	lt9611_rst_pin: lt9611-rst-state {
807		pins = "gpio5";
808		function = "normal";
809
810		output-high;
811		input-disable;
812		power-source = <0>;
813	};
814};
815
816&pm8150l_lpg {
817	status = "okay";
818
819	led@1 {
820		reg = <1>;
821		color = <LED_COLOR_ID_GREEN>;
822		function = LED_FUNCTION_HEARTBEAT;
823		function-enumerator = <3>;
824
825		linux,default-trigger = "heartbeat";
826		default-state = "on";
827	};
828
829	led@2 {
830		reg = <2>;
831		color = <LED_COLOR_ID_GREEN>;
832		function = LED_FUNCTION_INDICATOR;
833		function-enumerator = <2>;
834		default-state = "on";
835	};
836
837	led@3 {
838		reg = <3>;
839		color = <LED_COLOR_ID_GREEN>;
840		function = LED_FUNCTION_INDICATOR;
841		function-enumerator = <1>;
842	};
843};
844
845&pon_pwrkey {
846	status = "okay";
847};
848
849&pon_resin {
850	status = "okay";
851
852	linux,code = <KEY_VOLUMEDOWN>;
853};
854
855&qupv3_id_0 {
856	status = "okay";
857};
858
859&qupv3_id_1 {
860	status = "okay";
861};
862
863&qupv3_id_2 {
864	status = "okay";
865};
866
867&q6afedai {
868	qi2s@16 {
869		reg = <PRIMARY_MI2S_RX>;
870		qcom,sd-lines = <0 1 2 3>;
871	};
872};
873
874/* TERT I2S Uses 1 I2S SD Lines for audio on LT9611 HDMI Bridge */
875&q6afedai {
876	qi2s@20 {
877		reg = <TERTIARY_MI2S_RX>;
878		qcom,sd-lines = <0>;
879	};
880};
881
882&q6asmdai {
883	dai@0 {
884		reg = <0>;
885	};
886
887	dai@1 {
888		reg = <1>;
889	};
890
891	dai@2 {
892		reg = <2>;
893	};
894};
895
896&sdhc_2 {
897	status = "okay";
898	pinctrl-names = "default";
899	pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
900	vmmc-supply = <&vreg_l9c_2p96>;
901	vqmmc-supply = <&vreg_l6c_2p96>;
902	cd-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
903	bus-width = <4>;
904	no-sdio;
905	no-emmc;
906};
907
908&sound {
909	compatible = "qcom,qrb5165-rb5-sndcard";
910	pinctrl-0 = <&tert_mi2s_active>;
911	pinctrl-names = "default";
912	model = "Qualcomm-RB5-WSA8815-Speakers-DMIC0";
913	audio-routing =
914		"SpkrLeft IN", "WSA_SPK1 OUT",
915		"SpkrRight IN", "WSA_SPK2 OUT",
916		"VA DMIC0", "vdd-micb",
917		"VA DMIC1", "vdd-micb",
918		"MM_DL1",  "MultiMedia1 Playback",
919		"MM_DL2",  "MultiMedia2 Playback",
920		"MultiMedia3 Capture", "MM_UL3";
921
922	mm1-dai-link {
923		link-name = "MultiMedia1";
924		cpu {
925			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
926		};
927	};
928
929	mm2-dai-link {
930		link-name = "MultiMedia2";
931		cpu {
932			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
933		};
934	};
935
936	mm3-dai-link {
937		link-name = "MultiMedia3";
938		cpu {
939			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
940		};
941	};
942
943	hdmi-dai-link {
944		link-name = "HDMI Playback";
945		cpu {
946			sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
947		};
948
949		platform {
950			sound-dai = <&q6routing>;
951		};
952
953		codec {
954			sound-dai = <&lt9611_codec 0>;
955		};
956	};
957
958	dma-dai-link {
959		link-name = "WSA Playback";
960		cpu {
961			sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
962		};
963
964		platform {
965			sound-dai = <&q6routing>;
966		};
967
968		codec {
969			sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
970		};
971	};
972
973	va-dai-link {
974		link-name = "VA Capture";
975		cpu {
976			sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
977		};
978
979		platform {
980			sound-dai = <&q6routing>;
981		};
982
983		codec {
984			sound-dai = <&vamacro 0>;
985		};
986	};
987};
988
989/* CAN */
990&spi0 {
991	status = "okay";
992	pinctrl-names = "default";
993	pinctrl-0 = <&qup_spi0_data_clk>, <&qup_spi0_cs_gpio>;
994	cs-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
995
996	can@0 {
997		compatible = "microchip,mcp2518fd";
998		reg = <0>;
999		clocks = <&clk40M>;
1000		interrupts-extended = <&tlmm 15 IRQ_TYPE_LEVEL_LOW>;
1001		spi-max-frequency = <10000000>;
1002		vdd-supply = <&vdc_5v>;
1003		xceiver-supply = <&vdc_5v>;
1004	};
1005};
1006
1007&swr0 {
1008	left_spkr: wsa8810-left{
1009		compatible = "sdw10217211000";
1010		reg = <0 3>;
1011		powerdown-gpios = <&tlmm 130 GPIO_ACTIVE_HIGH>;
1012		#thermal-sensor-cells = <0>;
1013		sound-name-prefix = "SpkrLeft";
1014		#sound-dai-cells = <0>;
1015	};
1016
1017	right_spkr: wsa8810-right{
1018		compatible = "sdw10217211000";
1019		reg = <0 4>;
1020		powerdown-gpios = <&tlmm 130 GPIO_ACTIVE_HIGH>;
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 {
1212		pins = "gpio63";
1213		function = "gpio";
1214		bias-disable;
1215	};
1216
1217	sdc2_default_state: sdc2-default {
1218		clk {
1219			pins = "sdc2_clk";
1220			bias-disable;
1221			drive-strength = <16>;
1222		};
1223
1224		cmd {
1225			pins = "sdc2_cmd";
1226			bias-pull-up;
1227			drive-strength = <10>;
1228		};
1229
1230		data {
1231			pins = "sdc2_data";
1232			bias-pull-up;
1233			drive-strength = <10>;
1234		};
1235	};
1236
1237	sdc2_card_det_n: sd-card-det-n {
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/* PINCTRL - additions to nodes defined in sm8250.dtsi */
1324&qup_spi0_cs_gpio {
1325	drive-strength = <6>;
1326	bias-disable;
1327};
1328
1329&qup_spi0_data_clk {
1330	drive-strength = <6>;
1331	bias-disable;
1332};
1333