1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2019, Linaro Ltd.
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/leds/common.h>
9#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
10#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11#include <dt-bindings/sound/qcom,q6afe.h>
12#include <dt-bindings/sound/qcom,q6asm.h>
13#include "sdm845.dtsi"
14#include "sdm845-wcd9340.dtsi"
15#include "pm8998.dtsi"
16#include "pmi8998.dtsi"
17
18/ {
19	model = "Thundercomm Dragonboard 845c";
20	compatible = "thundercomm,db845c", "qcom,sdm845";
21	qcom,msm-id = <341 0x20001>;
22	qcom,board-id = <8 0>;
23
24	aliases {
25		serial0 = &uart9;
26		serial1 = &uart6;
27	};
28
29	chosen {
30		stdout-path = "serial0:115200n8";
31	};
32
33	/* Fixed crystal oscillator dedicated to MCP2517FD */
34	clk40M: can-clock {
35		compatible = "fixed-clock";
36		#clock-cells = <0>;
37		clock-frequency = <40000000>;
38	};
39
40	dc12v: dc12v-regulator {
41		compatible = "regulator-fixed";
42		regulator-name = "DC12V";
43		regulator-min-microvolt = <12000000>;
44		regulator-max-microvolt = <12000000>;
45		regulator-always-on;
46	};
47
48	gpio-keys {
49		compatible = "gpio-keys";
50		autorepeat;
51
52		pinctrl-names = "default";
53		pinctrl-0 = <&vol_up_pin_a>;
54
55		key-vol-up {
56			label = "Volume Up";
57			linux,code = <KEY_VOLUMEUP>;
58			gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
59		};
60	};
61
62	leds {
63		compatible = "gpio-leds";
64
65		led-0 {
66			label = "green:user4";
67			function = LED_FUNCTION_INDICATOR;
68			color = <LED_COLOR_ID_GREEN>;
69			gpios = <&pm8998_gpios 13 GPIO_ACTIVE_HIGH>;
70			linux,default-trigger = "panic-indicator";
71			default-state = "off";
72		};
73
74		led-1 {
75			label = "yellow:wlan";
76			function = LED_FUNCTION_WLAN;
77			color = <LED_COLOR_ID_YELLOW>;
78			gpios = <&pm8998_gpios 9 GPIO_ACTIVE_HIGH>;
79			linux,default-trigger = "phy0tx";
80			default-state = "off";
81		};
82
83		led-2 {
84			label = "blue:bt";
85			function = LED_FUNCTION_BLUETOOTH;
86			color = <LED_COLOR_ID_BLUE>;
87			gpios = <&pm8998_gpios 5 GPIO_ACTIVE_HIGH>;
88			linux,default-trigger = "bluetooth-power";
89			default-state = "off";
90		};
91	};
92
93	hdmi-out {
94		compatible = "hdmi-connector";
95		type = "a";
96
97		port {
98			hdmi_con: endpoint {
99				remote-endpoint = <&lt9611_out>;
100			};
101		};
102	};
103
104	lt9611_1v8: lt9611-vdd18-regulator {
105		compatible = "regulator-fixed";
106		regulator-name = "LT9611_1V8";
107
108		vin-supply = <&vdc_5v>;
109		regulator-min-microvolt = <1800000>;
110		regulator-max-microvolt = <1800000>;
111
112		gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
113		enable-active-high;
114	};
115
116	lt9611_3v3: lt9611-3v3 {
117		compatible = "regulator-fixed";
118		regulator-name = "LT9611_3V3";
119
120		vin-supply = <&vdc_3v3>;
121		regulator-min-microvolt = <3300000>;
122		regulator-max-microvolt = <3300000>;
123
124		/*
125		 * TODO: make it possible to drive same GPIO from two clients
126		 * gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
127		 * enable-active-high;
128		 */
129	};
130
131	pcie0_1p05v: pcie-0-1p05v-regulator {
132		compatible = "regulator-fixed";
133		regulator-name = "PCIE0_1.05V";
134
135		vin-supply = <&vbat>;
136		regulator-min-microvolt = <1050000>;
137		regulator-max-microvolt = <1050000>;
138
139		/*
140		 * TODO: make it possible to drive same GPIO from two clients
141		 * gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
142		 * enable-active-high;
143		 */
144	};
145
146	cam0_dvdd_1v2: cam0-dvdd-1v2-regulator {
147		compatible = "regulator-fixed";
148		regulator-name = "CAM0_DVDD_1V2";
149		regulator-min-microvolt = <1200000>;
150		regulator-max-microvolt = <1200000>;
151		enable-active-high;
152		gpio = <&pm8998_gpios 12 GPIO_ACTIVE_HIGH>;
153		pinctrl-names = "default";
154		pinctrl-0 = <&cam0_dvdd_1v2_en_default>;
155		vin-supply = <&vbat>;
156	};
157
158	cam0_avdd_2v8: cam0-avdd-2v8-regulator {
159		compatible = "regulator-fixed";
160		regulator-name = "CAM0_AVDD_2V8";
161		regulator-min-microvolt = <2800000>;
162		regulator-max-microvolt = <2800000>;
163		enable-active-high;
164		gpio = <&pm8998_gpios 10 GPIO_ACTIVE_HIGH>;
165		pinctrl-names = "default";
166		pinctrl-0 = <&cam0_avdd_2v8_en_default>;
167		vin-supply = <&vbat>;
168	};
169
170	/* This regulator is enabled when the VREG_LVS1A_1P8 trace is enabled */
171	cam3_avdd_2v8: cam3-avdd-2v8-regulator {
172		compatible = "regulator-fixed";
173		regulator-name = "CAM3_AVDD_2V8";
174		regulator-min-microvolt = <2800000>;
175		regulator-max-microvolt = <2800000>;
176		regulator-always-on;
177		vin-supply = <&vbat>;
178	};
179
180	pcie0_3p3v_dual: vldo-3v3-regulator {
181		compatible = "regulator-fixed";
182		regulator-name = "VLDO_3V3";
183
184		vin-supply = <&vbat>;
185		regulator-min-microvolt = <3300000>;
186		regulator-max-microvolt = <3300000>;
187
188		gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
189		enable-active-high;
190
191		pinctrl-names = "default";
192		pinctrl-0 = <&pcie0_pwren_state>;
193	};
194
195	v5p0_hdmiout: v5p0-hdmiout-regulator {
196		compatible = "regulator-fixed";
197		regulator-name = "V5P0_HDMIOUT";
198
199		vin-supply = <&vdc_5v>;
200		regulator-min-microvolt = <500000>;
201		regulator-max-microvolt = <500000>;
202
203		/*
204		 * TODO: make it possible to drive same GPIO from two clients
205		 * gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
206		 * enable-active-high;
207		 */
208	};
209
210	vbat: vbat-regulator {
211		compatible = "regulator-fixed";
212		regulator-name = "VBAT";
213
214		vin-supply = <&dc12v>;
215		regulator-min-microvolt = <4200000>;
216		regulator-max-microvolt = <4200000>;
217		regulator-always-on;
218	};
219
220	vbat_som: vbat-som-regulator {
221		compatible = "regulator-fixed";
222		regulator-name = "VBAT_SOM";
223
224		vin-supply = <&dc12v>;
225		regulator-min-microvolt = <4200000>;
226		regulator-max-microvolt = <4200000>;
227		regulator-always-on;
228	};
229
230	vdc_3v3: vdc-3v3-regulator {
231		compatible = "regulator-fixed";
232		regulator-name = "VDC_3V3";
233		vin-supply = <&dc12v>;
234		regulator-min-microvolt = <3300000>;
235		regulator-max-microvolt = <3300000>;
236		regulator-always-on;
237	};
238
239	vdc_5v: vdc-5v-regulator {
240		compatible = "regulator-fixed";
241		regulator-name = "VDC_5V";
242
243		vin-supply = <&dc12v>;
244		regulator-min-microvolt = <500000>;
245		regulator-max-microvolt = <500000>;
246		regulator-always-on;
247	};
248
249	vreg_s4a_1p8: vreg-s4a-1p8 {
250		compatible = "regulator-fixed";
251		regulator-name = "vreg_s4a_1p8";
252
253		regulator-min-microvolt = <1800000>;
254		regulator-max-microvolt = <1800000>;
255		regulator-always-on;
256	};
257
258	vph_pwr: vph-pwr-regulator {
259		compatible = "regulator-fixed";
260		regulator-name = "vph_pwr";
261
262		vin-supply = <&vbat_som>;
263	};
264};
265
266&adsp_pas {
267	status = "okay";
268
269	firmware-name = "qcom/sdm845/adsp.mbn";
270};
271
272&apps_rsc {
273	regulators-0 {
274		compatible = "qcom,pm8998-rpmh-regulators";
275		qcom,pmic-id = "a";
276		vdd-s1-supply = <&vph_pwr>;
277		vdd-s2-supply = <&vph_pwr>;
278		vdd-s3-supply = <&vph_pwr>;
279		vdd-s4-supply = <&vph_pwr>;
280		vdd-s5-supply = <&vph_pwr>;
281		vdd-s6-supply = <&vph_pwr>;
282		vdd-s7-supply = <&vph_pwr>;
283		vdd-s8-supply = <&vph_pwr>;
284		vdd-s9-supply = <&vph_pwr>;
285		vdd-s10-supply = <&vph_pwr>;
286		vdd-s11-supply = <&vph_pwr>;
287		vdd-s12-supply = <&vph_pwr>;
288		vdd-s13-supply = <&vph_pwr>;
289		vdd-l1-l27-supply = <&vreg_s7a_1p025>;
290		vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
291		vdd-l3-l11-supply = <&vreg_s7a_1p025>;
292		vdd-l4-l5-supply = <&vreg_s7a_1p025>;
293		vdd-l6-supply = <&vph_pwr>;
294		vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
295		vdd-l9-supply = <&vreg_bob>;
296		vdd-l10-l23-l25-supply = <&vreg_bob>;
297		vdd-l13-l19-l21-supply = <&vreg_bob>;
298		vdd-l16-l28-supply = <&vreg_bob>;
299		vdd-l18-l22-supply = <&vreg_bob>;
300		vdd-l20-l24-supply = <&vreg_bob>;
301		vdd-l26-supply = <&vreg_s3a_1p35>;
302		vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
303
304		vreg_s3a_1p35: smps3 {
305			regulator-min-microvolt = <1352000>;
306			regulator-max-microvolt = <1352000>;
307		};
308
309		vreg_s5a_2p04: smps5 {
310			regulator-min-microvolt = <1904000>;
311			regulator-max-microvolt = <2040000>;
312		};
313
314		vreg_s7a_1p025: smps7 {
315			regulator-min-microvolt = <900000>;
316			regulator-max-microvolt = <1028000>;
317		};
318
319		vreg_l1a_0p875: ldo1 {
320			regulator-min-microvolt = <880000>;
321			regulator-max-microvolt = <880000>;
322			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
323		};
324
325		vreg_l5a_0p8: ldo5 {
326			regulator-min-microvolt = <800000>;
327			regulator-max-microvolt = <800000>;
328			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
329		};
330
331		vreg_l12a_1p8: ldo12 {
332			regulator-min-microvolt = <1800000>;
333			regulator-max-microvolt = <1800000>;
334			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
335		};
336
337		vreg_l7a_1p8: ldo7 {
338			regulator-min-microvolt = <1800000>;
339			regulator-max-microvolt = <1800000>;
340			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
341		};
342
343		vreg_l13a_2p95: ldo13 {
344			regulator-min-microvolt = <1800000>;
345			regulator-max-microvolt = <2960000>;
346			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
347		};
348
349		vreg_l17a_1p3: ldo17 {
350			regulator-min-microvolt = <1304000>;
351			regulator-max-microvolt = <1304000>;
352			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
353		};
354
355		vreg_l20a_2p95: ldo20 {
356			regulator-min-microvolt = <2960000>;
357			regulator-max-microvolt = <2968000>;
358			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
359		};
360
361		vreg_l21a_2p95: ldo21 {
362			regulator-min-microvolt = <2960000>;
363			regulator-max-microvolt = <2968000>;
364			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
365		};
366
367		vreg_l24a_3p075: ldo24 {
368			regulator-min-microvolt = <3088000>;
369			regulator-max-microvolt = <3088000>;
370			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
371		};
372
373		vreg_l25a_3p3: ldo25 {
374			regulator-min-microvolt = <3300000>;
375			regulator-max-microvolt = <3312000>;
376			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
377		};
378
379		vreg_l26a_1p2: ldo26 {
380			regulator-min-microvolt = <1200000>;
381			regulator-max-microvolt = <1200000>;
382			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
383		};
384
385		vreg_lvs1a_1p8: lvs1 {
386			regulator-min-microvolt = <1800000>;
387			regulator-max-microvolt = <1800000>;
388			regulator-always-on;
389		};
390
391		vreg_lvs2a_1p8: lvs2 {
392			regulator-min-microvolt = <1800000>;
393			regulator-max-microvolt = <1800000>;
394			regulator-always-on;
395		};
396	};
397
398	regulators-1 {
399		compatible = "qcom,pmi8998-rpmh-regulators";
400		qcom,pmic-id = "b";
401
402		vdd-bob-supply = <&vph_pwr>;
403
404		vreg_bob: bob {
405			regulator-min-microvolt = <3312000>;
406			regulator-max-microvolt = <3600000>;
407			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
408			regulator-allow-bypass;
409		};
410	};
411};
412
413&cdsp_pas {
414	status = "okay";
415	firmware-name = "qcom/sdm845/cdsp.mbn";
416};
417
418&gcc {
419	protected-clocks = <GCC_QSPI_CORE_CLK>,
420			   <GCC_QSPI_CORE_CLK_SRC>,
421			   <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
422			   <GCC_LPASS_Q6_AXI_CLK>,
423			   <GCC_LPASS_SWAY_CLK>;
424};
425
426&gmu {
427	status = "okay";
428};
429
430&gpi_dma0 {
431	status = "okay";
432};
433
434&gpi_dma1 {
435	status = "okay";
436};
437
438&gpu {
439	status = "okay";
440	zap-shader {
441		memory-region = <&gpu_mem>;
442		firmware-name = "qcom/sdm845/a630_zap.mbn";
443	};
444};
445
446&i2c10 {
447	status = "okay";
448	clock-frequency = <400000>;
449
450	lt9611_codec: hdmi-bridge@3b {
451		compatible = "lontium,lt9611";
452		reg = <0x3b>;
453		#sound-dai-cells = <1>;
454
455		interrupts-extended = <&tlmm 84 IRQ_TYPE_EDGE_FALLING>;
456
457		reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
458
459		vdd-supply = <&lt9611_1v8>;
460		vcc-supply = <&lt9611_3v3>;
461
462		pinctrl-names = "default";
463		pinctrl-0 = <&lt9611_irq_pin>, <&dsi_sw_sel>;
464
465		ports {
466			#address-cells = <1>;
467			#size-cells = <0>;
468
469			port@0 {
470				reg = <0>;
471
472				lt9611_a: endpoint {
473					remote-endpoint = <&mdss_dsi0_out>;
474				};
475			};
476
477			port@1 {
478				reg = <1>;
479
480				lt9611_b: endpoint {
481					remote-endpoint = <&mdss_dsi1_out>;
482				};
483			};
484
485			port@2 {
486				reg = <2>;
487
488				lt9611_out: endpoint {
489					remote-endpoint = <&hdmi_con>;
490				};
491			};
492		};
493	};
494};
495
496&i2c11 {
497	/* On Low speed expansion */
498	clock-frequency = <100000>;
499	status = "okay";
500};
501
502&i2c14 {
503	/* On Low speed expansion */
504	clock-frequency = <100000>;
505	status = "okay";
506};
507
508&mdss {
509	status = "okay";
510};
511
512&mdss_dsi0 {
513	status = "okay";
514	vdda-supply = <&vreg_l26a_1p2>;
515
516	qcom,dual-dsi-mode;
517	qcom,master-dsi;
518
519	ports {
520		port@1 {
521			endpoint {
522				remote-endpoint = <&lt9611_a>;
523				data-lanes = <0 1 2 3>;
524			};
525		};
526	};
527};
528
529&mdss_dsi0_phy {
530	status = "okay";
531	vdds-supply = <&vreg_l1a_0p875>;
532};
533
534&mdss_dsi1 {
535	vdda-supply = <&vreg_l26a_1p2>;
536
537	qcom,dual-dsi-mode;
538
539	/* DSI1 is slave, so use DSI0 clocks */
540	assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
541
542	status = "okay";
543
544	ports {
545		port@1 {
546			endpoint {
547				remote-endpoint = <&lt9611_b>;
548				data-lanes = <0 1 2 3>;
549			};
550		};
551	};
552};
553
554&mdss_dsi1_phy {
555	vdds-supply = <&vreg_l1a_0p875>;
556	status = "okay";
557};
558
559&mss_pil {
560	status = "okay";
561	firmware-name = "qcom/sdm845/mba.mbn", "qcom/sdm845/modem.mbn";
562};
563
564&pcie0 {
565	status = "okay";
566	perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
567	enable-gpio = <&tlmm 134 GPIO_ACTIVE_HIGH>;
568
569	vddpe-3v3-supply = <&pcie0_3p3v_dual>;
570
571	pinctrl-names = "default";
572	pinctrl-0 = <&pcie0_default_state>;
573};
574
575&pcie0_phy {
576	status = "okay";
577
578	vdda-phy-supply = <&vreg_l1a_0p875>;
579	vdda-pll-supply = <&vreg_l26a_1p2>;
580};
581
582&pcie1 {
583	status = "okay";
584	perst-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>;
585
586	pinctrl-names = "default";
587	pinctrl-0 = <&pcie1_default_state>;
588};
589
590&pcie1_phy {
591	status = "okay";
592
593	vdda-phy-supply = <&vreg_l1a_0p875>;
594	vdda-pll-supply = <&vreg_l26a_1p2>;
595};
596
597&pm8998_gpios {
598	gpio-line-names =
599		"NC",
600		"NC",
601		"WLAN_SW_CTRL",
602		"NC",
603		"PM_GPIO5_BLUE_BT_LED",
604		"VOL_UP_N",
605		"NC",
606		"ADC_IN1",
607		"PM_GPIO9_YEL_WIFI_LED",
608		"CAM0_AVDD_EN",
609		"NC",
610		"CAM0_DVDD_EN",
611		"PM_GPIO13_GREEN_U4_LED",
612		"DIV_CLK2",
613		"NC",
614		"NC",
615		"NC",
616		"SMB_STAT",
617		"NC",
618		"NC",
619		"ADC_IN2",
620		"OPTION1",
621		"WCSS_PWR_REQ",
622		"PM845_GPIO24",
623		"OPTION2",
624		"PM845_SLB";
625
626	cam0_dvdd_1v2_en_default: cam0-dvdd-1v2-en-state {
627		pins = "gpio12";
628		function = "normal";
629
630		bias-pull-up;
631		drive-push-pull;
632		qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
633	};
634
635	cam0_avdd_2v8_en_default: cam0-avdd-2v8-en-state {
636		pins = "gpio10";
637		function = "normal";
638
639		bias-pull-up;
640		drive-push-pull;
641		qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
642	};
643
644	vol_up_pin_a: vol-up-active-state {
645		pins = "gpio6";
646		function = "normal";
647		input-enable;
648		bias-pull-up;
649		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
650	};
651};
652
653&pm8998_resin {
654	linux,code = <KEY_VOLUMEDOWN>;
655	status = "okay";
656};
657
658&pmi8998_lpg {
659	status = "okay";
660
661	qcom,power-source = <1>;
662
663	led@3 {
664		reg = <3>;
665		color = <LED_COLOR_ID_GREEN>;
666		function = LED_FUNCTION_HEARTBEAT;
667		function-enumerator = <3>;
668
669		linux,default-trigger = "heartbeat";
670		default-state = "on";
671	};
672
673	led@4 {
674		reg = <4>;
675		color = <LED_COLOR_ID_GREEN>;
676		function = LED_FUNCTION_INDICATOR;
677		function-enumerator = <2>;
678	};
679
680	led@5 {
681		reg = <5>;
682		color = <LED_COLOR_ID_GREEN>;
683		function = LED_FUNCTION_INDICATOR;
684		function-enumerator = <1>;
685	};
686};
687
688/* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */
689&q6afedai {
690	dai@22 {
691		reg = <QUATERNARY_MI2S_RX>;
692		qcom,sd-lines = <0 1 2 3>;
693	};
694};
695
696&q6asmdai {
697	dai@0 {
698		reg = <0>;
699	};
700
701	dai@1 {
702		reg = <1>;
703	};
704
705	dai@2 {
706		reg = <2>;
707	};
708
709	dai@3 {
710		reg = <3>;
711		direction = <2>;
712		is-compress-dai;
713	};
714};
715
716&qupv3_id_0 {
717	status = "okay";
718};
719
720&qupv3_id_1 {
721	status = "okay";
722};
723
724&sdhc_2 {
725	status = "okay";
726
727	pinctrl-names = "default";
728	pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
729
730	vmmc-supply = <&vreg_l21a_2p95>;
731	vqmmc-supply = <&vreg_l13a_2p95>;
732
733	bus-width = <4>;
734	cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
735};
736
737&sound {
738	compatible = "qcom,db845c-sndcard", "qcom,sdm845-sndcard";
739	pinctrl-0 = <&quat_mi2s_active
740			 &quat_mi2s_sd0_active
741			 &quat_mi2s_sd1_active
742			 &quat_mi2s_sd2_active
743			 &quat_mi2s_sd3_active>;
744	pinctrl-names = "default";
745	model = "DB845c";
746	audio-routing =
747		"RX_BIAS", "MCLK",
748		"AMIC1", "MIC BIAS1",
749		"AMIC2", "MIC BIAS2",
750		"DMIC0", "MIC BIAS1",
751		"DMIC1", "MIC BIAS1",
752		"DMIC2", "MIC BIAS3",
753		"DMIC3", "MIC BIAS3",
754		"SpkrLeft IN", "SPK1 OUT",
755		"SpkrRight IN", "SPK2 OUT",
756		"MM_DL1",  "MultiMedia1 Playback",
757		"MM_DL2",  "MultiMedia2 Playback",
758		"MM_DL4",  "MultiMedia4 Playback",
759		"MultiMedia3 Capture", "MM_UL3";
760
761	mm1-dai-link {
762		link-name = "MultiMedia1";
763		cpu {
764			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
765		};
766	};
767
768	mm2-dai-link {
769		link-name = "MultiMedia2";
770		cpu {
771			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
772		};
773	};
774
775	mm3-dai-link {
776		link-name = "MultiMedia3";
777		cpu {
778			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
779		};
780	};
781
782	mm4-dai-link {
783		link-name = "MultiMedia4";
784		cpu {
785			sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA4>;
786		};
787	};
788
789	hdmi-dai-link {
790		link-name = "HDMI Playback";
791		cpu {
792			sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
793		};
794
795		platform {
796			sound-dai = <&q6routing>;
797		};
798
799		codec {
800			sound-dai = <&lt9611_codec 0>;
801		};
802	};
803
804	slim-dai-link {
805		link-name = "SLIM Playback";
806		cpu {
807			sound-dai = <&q6afedai SLIMBUS_0_RX>;
808		};
809
810		platform {
811			sound-dai = <&q6routing>;
812		};
813
814		codec {
815			sound-dai = <&left_spkr>, <&right_spkr>, <&swm 0>, <&wcd9340 0>;
816		};
817	};
818
819	slimcap-dai-link {
820		link-name = "SLIM Capture";
821		cpu {
822			sound-dai = <&q6afedai SLIMBUS_0_TX>;
823		};
824
825		platform {
826			sound-dai = <&q6routing>;
827		};
828
829		codec {
830			sound-dai = <&wcd9340 1>;
831		};
832	};
833};
834
835&spi0 {
836	status = "okay";
837	pinctrl-names = "default";
838	pinctrl-0 = <&qup_spi0_default>;
839	cs-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
840
841	can@0 {
842		compatible = "microchip,mcp2517fd";
843		reg = <0>;
844		clocks = <&clk40M>;
845		interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
846		spi-max-frequency = <10000000>;
847		vdd-supply = <&vdc_5v>;
848		xceiver-supply = <&vdc_5v>;
849	};
850};
851
852&spi2 {
853	/* On Low speed expansion */
854	status = "okay";
855};
856
857&tlmm {
858	cam0_default: cam0-default-state {
859		rst-pins {
860			pins = "gpio9";
861			function = "gpio";
862
863			drive-strength = <16>;
864			bias-disable;
865		};
866
867		mclk0-pins {
868			pins = "gpio13";
869			function = "cam_mclk";
870
871			drive-strength = <16>;
872			bias-disable;
873		};
874	};
875
876	cam3_default: cam3-default-state {
877		rst-pins {
878			function = "gpio";
879			pins = "gpio21";
880
881			drive-strength = <16>;
882			bias-disable;
883		};
884
885		mclk3-pins {
886			function = "cam_mclk";
887			pins = "gpio16";
888
889			drive-strength = <16>;
890			bias-disable;
891		};
892	};
893
894	dsi_sw_sel: dsi-sw-sel-state {
895		pins = "gpio120";
896		function = "gpio";
897
898		drive-strength = <2>;
899		bias-disable;
900		output-high;
901	};
902
903	lt9611_irq_pin: lt9611-irq-state {
904		pins = "gpio84";
905		function = "gpio";
906		bias-disable;
907	};
908
909	pcie0_default_state: pcie0-default-state {
910		clkreq-pins {
911			pins = "gpio36";
912			function = "pci_e0";
913			bias-pull-up;
914		};
915
916		reset-n-pins {
917			pins = "gpio35";
918			function = "gpio";
919
920			drive-strength = <2>;
921			output-low;
922			bias-pull-down;
923		};
924
925		wake-n-pins {
926			pins = "gpio37";
927			function = "gpio";
928
929			drive-strength = <2>;
930			bias-pull-up;
931		};
932	};
933
934	pcie0_pwren_state: pcie0-pwren-state {
935		pins = "gpio90";
936		function = "gpio";
937
938		drive-strength = <2>;
939		bias-disable;
940	};
941
942	pcie1_default_state: pcie1-default-state {
943		perst-n-pins {
944			pins = "gpio102";
945			function = "gpio";
946
947			drive-strength = <16>;
948			bias-disable;
949		};
950
951		clkreq-pins {
952			pins = "gpio103";
953			function = "pci_e1";
954			bias-pull-up;
955		};
956
957		wake-n-pins {
958			pins = "gpio11";
959			function = "gpio";
960
961			drive-strength = <2>;
962			bias-pull-up;
963		};
964
965		reset-n-pins {
966			pins = "gpio75";
967			function = "gpio";
968
969			drive-strength = <16>;
970			bias-pull-up;
971			output-high;
972		};
973	};
974
975	sdc2_default_state: sdc2-default-state {
976		clk-pins {
977			pins = "sdc2_clk";
978			bias-disable;
979
980			/*
981			 * It seems that mmc_test reports errors if drive
982			 * strength is not 16 on clk, cmd, and data pins.
983			 */
984			drive-strength = <16>;
985		};
986
987		cmd-pins {
988			pins = "sdc2_cmd";
989			bias-pull-up;
990			drive-strength = <10>;
991		};
992
993		data-pins {
994			pins = "sdc2_data";
995			bias-pull-up;
996			drive-strength = <10>;
997		};
998	};
999
1000	sdc2_card_det_n: sd-card-det-n-state {
1001		pins = "gpio126";
1002		function = "gpio";
1003		bias-pull-up;
1004	};
1005};
1006
1007&uart3 {
1008	label = "LS-UART0";
1009	pinctrl-0 = <&qup_uart3_4pin>;
1010
1011	status = "disabled";
1012};
1013
1014&uart6 {
1015	status = "okay";
1016
1017	pinctrl-0 = <&qup_uart6_4pin>;
1018
1019	bluetooth {
1020		compatible = "qcom,wcn3990-bt";
1021
1022		vddio-supply = <&vreg_s4a_1p8>;
1023		vddxo-supply = <&vreg_l7a_1p8>;
1024		vddrf-supply = <&vreg_l17a_1p3>;
1025		vddch0-supply = <&vreg_l25a_3p3>;
1026		max-speed = <3200000>;
1027	};
1028};
1029
1030&uart9 {
1031	label = "LS-UART1";
1032	status = "okay";
1033};
1034
1035&usb_1 {
1036	status = "okay";
1037};
1038
1039&usb_1_dwc3 {
1040	dr_mode = "peripheral";
1041};
1042
1043&usb_1_hsphy {
1044	status = "okay";
1045
1046	vdd-supply = <&vreg_l1a_0p875>;
1047	vdda-pll-supply = <&vreg_l12a_1p8>;
1048	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
1049
1050	qcom,imp-res-offset-value = <8>;
1051	qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
1052	qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
1053	qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
1054};
1055
1056&usb_1_qmpphy {
1057	status = "okay";
1058
1059	vdda-phy-supply = <&vreg_l26a_1p2>;
1060	vdda-pll-supply = <&vreg_l1a_0p875>;
1061};
1062
1063&usb_2 {
1064	status = "okay";
1065};
1066
1067&usb_2_dwc3 {
1068	dr_mode = "host";
1069};
1070
1071&usb_2_hsphy {
1072	status = "okay";
1073
1074	vdd-supply = <&vreg_l1a_0p875>;
1075	vdda-pll-supply = <&vreg_l12a_1p8>;
1076	vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
1077
1078	qcom,imp-res-offset-value = <8>;
1079	qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_22_8_MA>;
1080};
1081
1082&usb_2_qmpphy {
1083	status = "okay";
1084
1085	vdda-phy-supply = <&vreg_l26a_1p2>;
1086	vdda-pll-supply = <&vreg_l1a_0p875>;
1087};
1088
1089&ufs_mem_hc {
1090	status = "okay";
1091
1092	reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
1093
1094	vcc-supply = <&vreg_l20a_2p95>;
1095	vcc-max-microamp = <800000>;
1096};
1097
1098&ufs_mem_phy {
1099	status = "okay";
1100
1101	vdda-phy-supply = <&vreg_l1a_0p875>;
1102	vdda-pll-supply = <&vreg_l26a_1p2>;
1103};
1104
1105&venus {
1106	status = "okay";
1107};
1108
1109&wcd9340 {
1110	reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
1111	vdd-buck-supply = <&vreg_s4a_1p8>;
1112	vdd-buck-sido-supply = <&vreg_s4a_1p8>;
1113	vdd-tx-supply = <&vreg_s4a_1p8>;
1114	vdd-rx-supply = <&vreg_s4a_1p8>;
1115	vdd-io-supply = <&vreg_s4a_1p8>;
1116
1117	swm: swm@c85 {
1118		left_spkr: speaker@0,1 {
1119			compatible = "sdw10217201000";
1120			reg = <0 1>;
1121			powerdown-gpios = <&wcdgpio 1 GPIO_ACTIVE_HIGH>;
1122			#thermal-sensor-cells = <0>;
1123			sound-name-prefix = "SpkrLeft";
1124			#sound-dai-cells = <0>;
1125		};
1126
1127		right_spkr: speaker@0,2 {
1128			compatible = "sdw10217201000";
1129			powerdown-gpios = <&wcdgpio 1 GPIO_ACTIVE_HIGH>;
1130			reg = <0 2>;
1131			#thermal-sensor-cells = <0>;
1132			sound-name-prefix = "SpkrRight";
1133			#sound-dai-cells = <0>;
1134		};
1135	};
1136};
1137
1138&wifi {
1139	status = "okay";
1140
1141	vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
1142	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
1143	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
1144	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
1145
1146	qcom,snoc-host-cap-8bit-quirk;
1147	qcom,ath10k-calibration-variant = "Thundercomm_DB845C";
1148};
1149
1150/* PINCTRL - additions to nodes defined in sdm845.dtsi */
1151&qup_spi2_default {
1152	drive-strength = <16>;
1153};
1154
1155&qup_i2c10_default {
1156	drive-strength = <2>;
1157	bias-disable;
1158};
1159
1160&qup_uart9_rx {
1161	drive-strength = <2>;
1162	bias-pull-up;
1163};
1164
1165&qup_uart9_tx {
1166	drive-strength = <2>;
1167	bias-disable;
1168};
1169
1170/* PINCTRL - additions to nodes defined in sdm845.dtsi */
1171&qup_spi0_default {
1172	drive-strength = <6>;
1173	bias-disable;
1174};
1175