xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/qrb5165-rb5.dts (revision f81cdf24ba5436367377f7c8e8f51f6df2a75ca7)
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&dsi0 {
539	status = "okay";
540	vdda-supply = <&vreg_l9a_1p2>;
541
542#if 0
543	qcom,dual-dsi-mode;
544	qcom,master-dsi;
545#endif
546
547	ports {
548		port@1 {
549			endpoint {
550				remote-endpoint = <&lt9611_a>;
551				data-lanes = <0 1 2 3>;
552			};
553		};
554	};
555};
556
557&dsi0_phy {
558	status = "okay";
559	vdds-supply = <&vreg_l5a_0p88>;
560};
561
562&gmu {
563	status = "okay";
564};
565
566&gpu {
567	status = "okay";
568
569	zap-shader {
570		memory-region = <&gpu_mem>;
571		firmware-name = "qcom/sm8250/a650_zap.mbn";
572	};
573};
574
575/* LS-I2C0 */
576&i2c4 {
577	status = "okay";
578};
579
580&i2c5 {
581	status = "okay";
582	clock-frequency = <400000>;
583
584	lt9611_codec: hdmi-bridge@2b {
585		compatible = "lontium,lt9611uxc";
586		reg = <0x2b>;
587		#sound-dai-cells = <1>;
588
589		interrupts-extended = <&tlmm 63 IRQ_TYPE_EDGE_FALLING>;
590
591		reset-gpios = <&pm8150l_gpios 5 GPIO_ACTIVE_HIGH>;
592
593		vdd-supply = <&lt9611_1v2>;
594		vcc-supply = <&lt9611_3v3>;
595
596		pinctrl-names = "default";
597		pinctrl-0 = <&lt9611_irq_pin &lt9611_rst_pin>;
598
599		ports {
600			#address-cells = <1>;
601			#size-cells = <0>;
602
603			port@0 {
604				reg = <0>;
605
606				lt9611_a: endpoint {
607					remote-endpoint = <&dsi0_out>;
608				};
609			};
610
611#if 0
612			port@1 {
613				reg = <1>;
614
615				lt9611_b: endpoint {
616					remote-endpoint = <&dsi1_out>;
617				};
618			};
619#endif
620
621			port@2 {
622				reg = <2>;
623
624				lt9611_out: endpoint {
625					remote-endpoint = <&hdmi_con>;
626				};
627			};
628
629		};
630	};
631};
632
633/* LS-I2C1 */
634&i2c15 {
635	status = "okay";
636};
637
638&mdss {
639	status = "okay";
640};
641
642&mdss_mdp {
643	status = "okay";
644};
645
646&pm8150_adc {
647	xo-therm@4c {
648		reg = <ADC5_XO_THERM_100K_PU>;
649		qcom,ratiometric;
650		qcom,hw-settle-time = <200>;
651	};
652
653	wifi-therm@4e {
654		reg = <ADC5_AMUX_THM2_100K_PU>;
655		qcom,ratiometric;
656		qcom,hw-settle-time = <200>;
657	};
658};
659
660&pm8150_adc_tm {
661	status = "okay";
662
663	xo-therm@0 {
664		reg = <0>;
665		io-channels = <&pm8150_adc ADC5_XO_THERM_100K_PU>;
666		qcom,ratiometric;
667		qcom,hw-settle-time-us = <200>;
668	};
669
670	wifi-therm@1 {
671		reg = <1>;
672		io-channels = <&pm8150_adc ADC5_AMUX_THM2_100K_PU>;
673		qcom,ratiometric;
674		qcom,hw-settle-time-us = <200>;
675	};
676};
677
678&pcie0 {
679	status = "okay";
680};
681
682&pcie0_phy {
683	status = "okay";
684	vdda-phy-supply = <&vreg_l5a_0p88>;
685	vdda-pll-supply = <&vreg_l9a_1p2>;
686};
687
688&pcie1 {
689	status = "okay";
690};
691
692&pcie1_phy {
693	status = "okay";
694	vdda-phy-supply = <&vreg_l5a_0p88>;
695	vdda-pll-supply = <&vreg_l9a_1p2>;
696};
697
698&pcie2 {
699	status = "okay";
700};
701
702&pcie2_phy {
703	status = "okay";
704	vdda-phy-supply = <&vreg_l5a_0p88>;
705	vdda-pll-supply = <&vreg_l9a_1p2>;
706};
707
708&pm8150_gpios {
709	gpio-reserved-ranges = <1 1>, <3 2>, <7 1>;
710	gpio-line-names =
711		"NC",
712		"OPTION2",
713		"PM_GPIO-F",
714		"PM_SLP_CLK_IN",
715		"OPTION1",
716		"VOL_UP_N",
717		"PM8250_GPIO7", /* Blue LED */
718		"SP_ARI_PWR_ALARM",
719		"GPIO_9_P", /* Yellow LED */
720		"GPIO_10_P"; /* Green LED */
721};
722
723&pm8150b_adc {
724	conn-therm@4f {
725		reg = <ADC5_AMUX_THM3_100K_PU>;
726		qcom,ratiometric;
727		qcom,hw-settle-time = <200>;
728	};
729};
730
731&pm8150b_adc_tm {
732	status = "okay";
733
734	conn-therm@0 {
735		reg = <0>;
736		io-channels = <&pm8150b_adc ADC5_AMUX_THM3_100K_PU>;
737		qcom,ratiometric;
738		qcom,hw-settle-time-us = <200>;
739	};
740};
741
742&pm8150b_gpios {
743	gpio-line-names =
744		"NC",
745		"NC",
746		"NC",
747		"NC",
748		"HAP_BOOST_EN", /* SOM */
749		"SMB_STAT", /* SOM */
750		"NC",
751		"NC",
752		"SDM_FORCE_USB_BOOT",
753		"NC",
754		"NC",
755		"NC";
756};
757
758&pm8150l_adc {
759	skin-msm-therm@4e {
760		reg = <ADC5_AMUX_THM2_100K_PU>;
761		qcom,ratiometric;
762		qcom,hw-settle-time = <200>;
763	};
764
765	pm8150l-therm@4f {
766		reg = <ADC5_AMUX_THM3_100K_PU>;
767		qcom,ratiometric;
768		qcom,hw-settle-time = <200>;
769	};
770};
771
772&pm8150l_adc_tm {
773	status = "okay";
774
775	skin-msm-therm@0 {
776		reg = <0>;
777		io-channels = <&pm8150l_adc ADC5_AMUX_THM2_100K_PU>;
778		qcom,ratiometric;
779		qcom,hw-settle-time-us = <200>;
780	};
781
782	pm8150l-therm@1 {
783		reg = <1>;
784		io-channels = <&pm8150l_adc ADC5_AMUX_THM3_100K_PU>;
785		qcom,ratiometric;
786		qcom,hw-settle-time-us = <200>;
787	};
788};
789
790&pm8150l_gpios {
791	gpio-line-names =
792		"NC",
793		"PM3003A_EN",
794		"NC",
795		"NC",
796		"PM_GPIO5", /* HDMI RST_N */
797		"PM_GPIO-A", /* PWM */
798		"PM_GPIO7",
799		"NC",
800		"NC",
801		"PM_GPIO-B",
802		"NC",
803		"PM3003A_MODE";
804
805	lt9611_rst_pin: lt9611-rst-state {
806		pins = "gpio5";
807		function = "normal";
808
809		output-high;
810		input-disable;
811		power-source = <0>;
812	};
813};
814
815&pm8150l_lpg {
816	status = "okay";
817
818	#address-cells = <1>;
819	#size-cells = <0>;
820
821	led@1 {
822		reg = <1>;
823		color = <LED_COLOR_ID_GREEN>;
824		function = LED_FUNCTION_HEARTBEAT;
825		function-enumerator = <3>;
826
827		linux,default-trigger = "heartbeat";
828		default-state = "on";
829	};
830
831	led@2 {
832		reg = <2>;
833		color = <LED_COLOR_ID_GREEN>;
834		function = LED_FUNCTION_INDICATOR;
835		function-enumerator = <2>;
836		default-state = "on";
837	};
838
839	led@3 {
840		reg = <3>;
841		color = <LED_COLOR_ID_GREEN>;
842		function = LED_FUNCTION_INDICATOR;
843		function-enumerator = <1>;
844	};
845};
846
847&pon_pwrkey {
848	status = "okay";
849};
850
851&pon_resin {
852	status = "okay";
853
854	linux,code = <KEY_VOLUMEDOWN>;
855};
856
857&qupv3_id_0 {
858	status = "okay";
859};
860
861&qupv3_id_1 {
862	status = "okay";
863};
864
865&qupv3_id_2 {
866	status = "okay";
867};
868
869&q6afedai {
870	dai@16 {
871		reg = <PRIMARY_MI2S_RX>;
872		qcom,sd-lines = <0 1 2 3>;
873	};
874};
875
876/* TERT I2S Uses 1 I2S SD Lines for audio on LT9611 HDMI Bridge */
877&q6afedai {
878	dai@20 {
879		reg = <TERTIARY_MI2S_RX>;
880		qcom,sd-lines = <0>;
881	};
882};
883
884&q6asmdai {
885	dai@0 {
886		reg = <0>;
887	};
888
889	dai@1 {
890		reg = <1>;
891	};
892
893	dai@2 {
894		reg = <2>;
895	};
896};
897
898&sdhc_2 {
899	status = "okay";
900	pinctrl-names = "default";
901	pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
902	vmmc-supply = <&vreg_l9c_2p96>;
903	vqmmc-supply = <&vreg_l6c_2p96>;
904	cd-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
905	bus-width = <4>;
906	no-sdio;
907	no-mmc;
908};
909
910&sound {
911	compatible = "qcom,qrb5165-rb5-sndcard";
912	pinctrl-0 = <&tert_mi2s_active>;
913	pinctrl-names = "default";
914	model = "Qualcomm-RB5-WSA8815-Speakers-DMIC0";
915	audio-routing =
916		"SpkrLeft IN", "WSA_SPK1 OUT",
917		"SpkrRight IN", "WSA_SPK2 OUT",
918		"VA DMIC0", "vdd-micb",
919		"VA DMIC1", "vdd-micb",
920		"MM_DL1",  "MultiMedia1 Playback",
921		"MM_DL2",  "MultiMedia2 Playback",
922		"MultiMedia3 Capture", "MM_UL3";
923
924	mm1-dai-link {
925		link-name = "MultiMedia1";
926		cpu {
927			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
928		};
929	};
930
931	mm2-dai-link {
932		link-name = "MultiMedia2";
933		cpu {
934			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
935		};
936	};
937
938	mm3-dai-link {
939		link-name = "MultiMedia3";
940		cpu {
941			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
942		};
943	};
944
945	hdmi-dai-link {
946		link-name = "HDMI Playback";
947		cpu {
948			sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
949		};
950
951		platform {
952			sound-dai = <&q6routing>;
953		};
954
955		codec {
956			sound-dai = <&lt9611_codec 0>;
957		};
958	};
959
960	dma-dai-link {
961		link-name = "WSA Playback";
962		cpu {
963			sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
964		};
965
966		platform {
967			sound-dai = <&q6routing>;
968		};
969
970		codec {
971			sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
972		};
973	};
974
975	va-dai-link {
976		link-name = "VA Capture";
977		cpu {
978			sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
979		};
980
981		platform {
982			sound-dai = <&q6routing>;
983		};
984
985		codec {
986			sound-dai = <&vamacro 0>;
987		};
988	};
989};
990
991/* CAN */
992&spi0 {
993	status = "okay";
994	pinctrl-names = "default";
995	pinctrl-0 = <&qup_spi0_data_clk>, <&qup_spi0_cs_gpio>;
996	cs-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
997
998	can@0 {
999		compatible = "microchip,mcp2518fd";
1000		reg = <0>;
1001		clocks = <&clk40M>;
1002		interrupts-extended = <&tlmm 15 IRQ_TYPE_LEVEL_LOW>;
1003		spi-max-frequency = <10000000>;
1004		vdd-supply = <&vdc_5v>;
1005		xceiver-supply = <&vdc_5v>;
1006	};
1007};
1008
1009&swr0 {
1010	status = "okay";
1011
1012	left_spkr: speaker@0,3 {
1013		compatible = "sdw10217211000";
1014		reg = <0 3>;
1015		powerdown-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>;
1016		#thermal-sensor-cells = <0>;
1017		sound-name-prefix = "SpkrLeft";
1018		#sound-dai-cells = <0>;
1019	};
1020
1021	right_spkr: speaker@0,4 {
1022		compatible = "sdw10217211000";
1023		reg = <0 4>;
1024		powerdown-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>;
1025		#thermal-sensor-cells = <0>;
1026		sound-name-prefix = "SpkrRight";
1027		#sound-dai-cells = <0>;
1028	};
1029};
1030
1031&tlmm {
1032	gpio-reserved-ranges = <40 4>;
1033	gpio-line-names =
1034		"GPIO-MM",
1035		"GPIO-NN",
1036		"GPIO-OO",
1037		"GPIO-PP",
1038		"GPIO-A",
1039		"GPIO-C",
1040		"GPIO-E",
1041		"GPIO-D",
1042		"I2C0-SDA",
1043		"I2C0-SCL",
1044		"GPIO-TT", /* GPIO_10 */
1045		"NC",
1046		"GPIO_12_I2C_SDA",
1047		"GPIO_13_I2C_SCL",
1048		"GPIO-X",
1049		"GPIO_15_RGMII_INT",
1050		"HST_BT_UART_CTS",
1051		"HST_BT_UART_RFR",
1052		"HST_BT_UART_TX",
1053		"HST_BT_UART_RX",
1054		"HST_WLAN_EN", /* GPIO_20 */
1055		"HST_BT_EN",
1056		"GPIO-AAA",
1057		"GPIO-BBB",
1058		"GPIO-CCC",
1059		"GPIO-Z",
1060		"GPIO-DDD",
1061		"GPIO-BB",
1062		"GPIO_28_CAN_SPI_MISO",
1063		"GPIO_29_CAN_SPI_MOSI",
1064		"GPIO_30_CAN_SPI_CLK", /* GPIO_30 */
1065		"GPIO_31_CAN_SPI_CS",
1066		"GPIO-UU",
1067		"NC",
1068		"UART1_TXD_SOM",
1069		"UART1_RXD_SOM",
1070		"UART0_CTS",
1071		"UART0_RTS",
1072		"UART0_TXD",
1073		"UART0_RXD",
1074		"SPI1_MISO", /* GPIO_40 */
1075		"SPI1_MOSI",
1076		"SPI1_CLK",
1077		"SPI1_CS",
1078		"I2C1_SDA",
1079		"I2C1_SCL",
1080		"GPIO-F",
1081		"GPIO-JJ",
1082		"Board_ID1",
1083		"Board_ID2",
1084		"NC", /* GPIO_50 */
1085		"NC",
1086		"SPI0_MISO",
1087		"SPI0_MOSI",
1088		"SPI0_SCLK",
1089		"SPI0_CS",
1090		"GPIO-QQ",
1091		"GPIO-RR",
1092		"USB2LAN_RESET",
1093		"USB2LAN_EXTWAKE",
1094		"NC", /* GPIO_60 */
1095		"NC",
1096		"NC",
1097		"LT9611_INT",
1098		"GPIO-AA",
1099		"USB_CC_DIR",
1100		"GPIO-G",
1101		"GPIO-LL",
1102		"USB_DP_HPD_1P8",
1103		"NC",
1104		"NC", /* GPIO_70 */
1105		"SD_CMD",
1106		"SD_DAT3",
1107		"SD_SCLK",
1108		"SD_DAT2",
1109		"SD_DAT1",
1110		"SD_DAT0", /* BOOT_CFG3 */
1111		"SD_UFS_CARD_DET_N",
1112		"GPIO-II",
1113		"PCIE0_RST_N",
1114		"PCIE0_CLK_REQ_N", /* GPIO_80 */
1115		"PCIE0_WAKE_N",
1116		"GPIO-CC",
1117		"GPIO-DD",
1118		"GPIO-EE",
1119		"GPIO-FF",
1120		"GPIO-GG",
1121		"GPIO-HH",
1122		"GPIO-VV",
1123		"GPIO-WW",
1124		"NC", /* GPIO_90 */
1125		"NC",
1126		"GPIO-K",
1127		"GPIO-I",
1128		"CSI0_MCLK",
1129		"CSI1_MCLK",
1130		"CSI2_MCLK",
1131		"CSI3_MCLK",
1132		"GPIO-AA", /* CSI4_MCLK */
1133		"GPIO-BB", /* CSI5_MCLK */
1134		"GPIO-KK", /* GPIO_100 */
1135		"CCI_I2C_SDA0",
1136		"CCI_I2C_SCL0",
1137		"CCI_I2C_SDA1",
1138		"CCI_I2C_SCL1",
1139		"CCI_I2C_SDA2",
1140		"CCI_I2C_SCL2",
1141		"CCI_I2C_SDA3",
1142		"CCI_I2C_SCL3",
1143		"GPIO-L",
1144		"NC", /* GPIO_110 */
1145		"NC",
1146		"ACCEL_INT",
1147		"GYRO_INT",
1148		"GPIO-J",
1149		"GPIO-YY",
1150		"GPIO-H",
1151		"GPIO-ZZ",
1152		"NC",
1153		"NC",
1154		"NC", /* GPIO_120 */
1155		"NC",
1156		"MAG_INT",
1157		"MAG_DRDY_INT",
1158		"HST_SW_CTRL",
1159		"GPIO-M",
1160		"GPIO-N",
1161		"GPIO-O",
1162		"GPIO-P",
1163		"PS_INT",
1164		"WSA1_EN", /* GPIO_130 */
1165		"USB_HUB_RESET",
1166		"SDM_FORCE_USB_BOOT",
1167		"I2S1_CLK_HDMI",
1168		"I2S1_DATA0_HDMI",
1169		"I2S1_WS_HDMI",
1170		"GPIO-B",
1171		"GPIO_137", /* To LT9611_I2S_MCLK_3V3 */
1172		"PCM_CLK",
1173		"PCM_DI",
1174		"PCM_DO", /* GPIO_140 */
1175		"PCM_FS",
1176		"HST_SLIM_CLK",
1177		"HST_SLIM_DATA",
1178		"GPIO-U",
1179		"GPIO-Y",
1180		"GPIO-R",
1181		"GPIO-Q",
1182		"GPIO-S",
1183		"GPIO-T",
1184		"GPIO-V", /* GPIO_150 */
1185		"GPIO-W",
1186		"DMIC_CLK1",
1187		"DMIC_DATA1",
1188		"DMIC_CLK2",
1189		"DMIC_DATA2",
1190		"WSA_SWR_CLK",
1191		"WSA_SWR_DATA",
1192		"DMIC_CLK3",
1193		"DMIC_DATA3",
1194		"I2C4_SDA", /* GPIO_160 */
1195		"I2C4_SCL",
1196		"SPI3_CS1",
1197		"SPI3_CS2",
1198		"SPI2_MISO_LS3",
1199		"SPI2_MOSI_LS3",
1200		"SPI2_CLK_LS3",
1201		"SPI2_ACCEL_CS_LS3",
1202		"SPI2_CS1",
1203		"NC",
1204		"GPIO-SS", /* GPIO_170 */
1205		"GPIO-XX",
1206		"SPI3_MISO",
1207		"SPI3_MOSI",
1208		"SPI3_CLK",
1209		"SPI3_CS",
1210		"HST_BLE_SNS_UART_TX",
1211		"HST_BLE_SNS_UART_RX",
1212		"HST_WLAN_UART_TX",
1213		"HST_WLAN_UART_RX";
1214
1215	lt9611_irq_pin: lt9611-irq-state {
1216		pins = "gpio63";
1217		function = "gpio";
1218		bias-disable;
1219	};
1220
1221	sdc2_default_state: sdc2-default-state {
1222		clk-pins {
1223			pins = "sdc2_clk";
1224			bias-disable;
1225			drive-strength = <16>;
1226		};
1227
1228		cmd-pins {
1229			pins = "sdc2_cmd";
1230			bias-pull-up;
1231			drive-strength = <10>;
1232		};
1233
1234		data-pins {
1235			pins = "sdc2_data";
1236			bias-pull-up;
1237			drive-strength = <10>;
1238		};
1239	};
1240
1241	sdc2_card_det_n: sd-card-det-n-state {
1242		pins = "gpio77";
1243		function = "gpio";
1244		bias-pull-up;
1245	};
1246};
1247
1248&uart12 {
1249	status = "okay";
1250};
1251
1252&ufs_mem_hc {
1253	status = "okay";
1254
1255	vcc-supply = <&vreg_l17a_3p0>;
1256	vcc-max-microamp = <800000>;
1257	vccq-supply = <&vreg_l6a_1p2>;
1258	vccq-max-microamp = <800000>;
1259	vccq2-supply = <&vreg_s4a_1p8>;
1260	vccq2-max-microamp = <800000>;
1261};
1262
1263&ufs_mem_phy {
1264	status = "okay";
1265
1266	vdda-phy-supply = <&vreg_l5a_0p88>;
1267	vdda-pll-supply = <&vreg_l9a_1p2>;
1268};
1269
1270&usb_1 {
1271	status = "okay";
1272};
1273
1274&usb_1_dwc3 {
1275	dr_mode = "peripheral";
1276};
1277
1278&usb_1_hsphy {
1279	status = "okay";
1280
1281	vdda-pll-supply = <&vreg_l5a_0p88>;
1282	vdda33-supply = <&vreg_l2a_3p1>;
1283	vdda18-supply = <&vreg_l12a_1p8>;
1284};
1285
1286&usb_1_qmpphy {
1287	status = "okay";
1288
1289	vdda-phy-supply = <&vreg_l9a_1p2>;
1290	vdda-pll-supply = <&vreg_l18a_0p92>;
1291};
1292
1293&usb_2 {
1294	status = "okay";
1295};
1296
1297&usb_2_dwc3 {
1298	dr_mode = "host";
1299};
1300
1301&usb_2_hsphy {
1302	status = "okay";
1303
1304	vdda-pll-supply = <&vreg_l5a_0p88>;
1305	vdda33-supply = <&vreg_l2a_3p1>;
1306	vdda18-supply = <&vreg_l12a_1p8>;
1307};
1308
1309&usb_2_qmpphy {
1310	status = "okay";
1311
1312	vdda-phy-supply = <&vreg_l9a_1p2>;
1313	vdda-pll-supply = <&vreg_l18a_0p92>;
1314};
1315
1316&vamacro {
1317	pinctrl-0 = <&dmic01_active>;
1318	pinctrl-names = "default";
1319	vdd-micb-supply = <&vreg_s4a_1p8>;
1320	qcom,dmic-sample-rate = <600000>;
1321};
1322
1323&venus {
1324	status = "okay";
1325};
1326
1327&wsamacro {
1328	status = "okay";
1329};
1330
1331/* PINCTRL - additions to nodes defined in sm8250.dtsi */
1332&qup_spi0_cs_gpio {
1333	drive-strength = <6>;
1334	bias-disable;
1335};
1336
1337&qup_spi0_data_clk {
1338	drive-strength = <6>;
1339	bias-disable;
1340};
1341