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