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