xref: /linux/arch/arm64/boot/dts/qcom/sm8650-qrd.dts (revision fcc79e1714e8c2b8e216dc3149812edd37884eef)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2023, Linaro Limited
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/leds/common.h>
9#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
10#include "sm8650.dtsi"
11#include "pm8010.dtsi"
12#include "pm8550.dtsi"
13#include "pm8550b.dtsi"
14#define PMK8550VE_SID 8
15#include "pm8550ve.dtsi"
16#include "pm8550vs.dtsi"
17#include "pmk8550.dtsi"
18#include "pmr735d_a.dtsi"
19
20/ {
21	model = "Qualcomm Technologies, Inc. SM8650 QRD";
22	compatible = "qcom,sm8650-qrd", "qcom,sm8650";
23
24	aliases {
25		serial0 = &uart15;
26		serial1 = &uart14;
27	};
28
29	chosen {
30		stdout-path = "serial0:115200n8";
31	};
32
33	gpio-keys {
34		compatible = "gpio-keys";
35
36		pinctrl-0 = <&volume_up_n>;
37		pinctrl-names = "default";
38
39		key-volume-up {
40			label = "Volume Up";
41			linux,code = <KEY_VOLUMEUP>;
42			gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>;
43			debounce-interval = <15>;
44			linux,can-disable;
45			wakeup-source;
46		};
47	};
48
49	pmic-glink {
50		compatible = "qcom,sm8650-pmic-glink",
51			     "qcom,sm8550-pmic-glink",
52			     "qcom,pmic-glink";
53		#address-cells = <1>;
54		#size-cells = <0>;
55		orientation-gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
56
57		connector@0 {
58			compatible = "usb-c-connector";
59			reg = <0>;
60
61			power-role = "dual";
62			data-role = "dual";
63
64			ports {
65				#address-cells = <1>;
66				#size-cells = <0>;
67
68				port@0 {
69					reg = <0>;
70
71					pmic_glink_hs_in: endpoint {
72						remote-endpoint = <&usb_1_dwc3_hs>;
73					};
74				};
75
76				port@1 {
77					reg = <1>;
78
79					pmic_glink_ss_in: endpoint {
80						remote-endpoint = <&redriver_ss_out>;
81					};
82				};
83
84				port@2 {
85					reg = <2>;
86
87					pmic_glink_sbu: endpoint {
88						remote-endpoint = <&wcd_usbss_sbu_mux>;
89				    };
90				};
91			};
92		};
93	};
94
95	sound {
96		compatible = "qcom,sm8650-sndcard", "qcom,sm8450-sndcard";
97		model = "SM8650-QRD";
98		audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
99				"SpkrRight IN", "WSA_SPK2 OUT",
100				"IN1_HPHL", "HPHL_OUT",
101				"IN2_HPHR", "HPHR_OUT",
102				"AMIC1", "MIC BIAS1",
103				"AMIC2", "MIC BIAS2",
104				"AMIC3", "MIC BIAS3",
105				"AMIC4", "MIC BIAS3",
106				"AMIC5", "MIC BIAS4",
107				"TX SWR_INPUT0", "ADC1_OUTPUT",
108				"TX SWR_INPUT1", "ADC2_OUTPUT",
109				"TX SWR_INPUT2", "ADC3_OUTPUT",
110				"TX SWR_INPUT3", "ADC4_OUTPUT";
111
112		wcd-playback-dai-link {
113			link-name = "WCD Playback";
114
115			cpu {
116				sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
117			};
118
119			codec {
120				sound-dai = <&wcd939x 0>, <&swr1 0>, <&lpass_rxmacro 0>;
121			};
122
123			platform {
124				sound-dai = <&q6apm>;
125			};
126		};
127
128		wcd-capture-dai-link {
129			link-name = "WCD Capture";
130
131			cpu {
132				sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
133			};
134
135			codec {
136				sound-dai = <&wcd939x 1>, <&swr2 0>, <&lpass_txmacro 0>;
137			};
138
139			platform {
140				sound-dai = <&q6apm>;
141			};
142		};
143
144		wsa-dai-link {
145			link-name = "WSA Playback";
146
147			cpu {
148				sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
149			};
150
151			codec {
152				sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&lpass_wsamacro 0>;
153			};
154
155			platform {
156				sound-dai = <&q6apm>;
157			};
158		};
159	};
160
161	vph_pwr: vph-pwr-regulator {
162		compatible = "regulator-fixed";
163
164		regulator-name = "vph_pwr";
165		regulator-min-microvolt = <3700000>;
166		regulator-max-microvolt = <3700000>;
167
168		regulator-always-on;
169		regulator-boot-on;
170	};
171
172	wcd939x: audio-codec {
173		compatible = "qcom,wcd9395-codec", "qcom,wcd9390-codec";
174
175		pinctrl-0 = <&wcd_default>;
176		pinctrl-names = "default";
177
178		qcom,micbias1-microvolt = <1800000>;
179		qcom,micbias2-microvolt = <1800000>;
180		qcom,micbias3-microvolt = <1800000>;
181		qcom,micbias4-microvolt = <1800000>;
182		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
183		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
184		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
185		qcom,rx-device = <&wcd_rx>;
186		qcom,tx-device = <&wcd_tx>;
187
188		reset-gpios = <&tlmm 107 GPIO_ACTIVE_LOW>;
189
190		vdd-buck-supply = <&vreg_l15b_1p8>;
191		vdd-rxtx-supply = <&vreg_l15b_1p8>;
192		vdd-io-supply = <&vreg_l15b_1p8>;
193		vdd-mic-bias-supply = <&vreg_bob1>;
194
195		#sound-dai-cells = <1>;
196
197		mode-switch;
198		orientation-switch;
199
200		port {
201			wcd_codec_headset_in: endpoint {
202				remote-endpoint = <&wcd_usbss_headset_out>;
203			};
204		};
205	};
206
207	wcn7850-pmu {
208		compatible = "qcom,wcn7850-pmu";
209
210		pinctrl-names = "default";
211		pinctrl-0 = <&wlan_en>, <&bt_default>;
212
213		wlan-enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
214		bt-enable-gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
215
216		vdd-supply = <&vreg_s4i_0p85>;
217		vddio-supply = <&vreg_l15b_1p8>;
218		vddio1p2-supply = <&vreg_l3c_1p2>;
219		vddaon-supply = <&vreg_s2c_0p8>;
220		vdddig-supply = <&vreg_s3c_0p9>;
221		vddrfa1p2-supply = <&vreg_s1c_1p2>;
222		vddrfa1p8-supply = <&vreg_s6c_1p8>;
223
224		clocks = <&rpmhcc RPMH_RF_CLK1>;
225
226		regulators {
227			vreg_pmu_rfa_cmn: ldo0 {
228				regulator-name = "vreg_pmu_rfa_cmn";
229			};
230
231			vreg_pmu_aon_0p59: ldo1 {
232				regulator-name = "vreg_pmu_aon_0p59";
233			};
234
235			vreg_pmu_wlcx_0p8: ldo2 {
236				regulator-name = "vreg_pmu_wlcx_0p8";
237			};
238
239			vreg_pmu_wlmx_0p85: ldo3 {
240				regulator-name = "vreg_pmu_wlmx_0p85";
241			};
242
243			vreg_pmu_btcmx_0p85: ldo4 {
244				regulator-name = "vreg_pmu_btcmx_0p85";
245			};
246
247			vreg_pmu_rfa_0p8: ldo5 {
248				regulator-name = "vreg_pmu_rfa_0p8";
249			};
250
251			vreg_pmu_rfa_1p2: ldo6 {
252				regulator-name = "vreg_pmu_rfa_1p2";
253			};
254
255			vreg_pmu_rfa_1p8: ldo7 {
256				regulator-name = "vreg_pmu_rfa_1p8";
257			};
258
259			vreg_pmu_pcie_0p9: ldo8 {
260				regulator-name = "vreg_pmu_pcie_0p9";
261			};
262
263			vreg_pmu_pcie_1p8: ldo9 {
264				regulator-name = "vreg_pmu_pcie_1p8";
265			};
266		};
267	};
268};
269
270&apps_rsc {
271	regulators-0 {
272		compatible = "qcom,pm8550-rpmh-regulators";
273
274		vdd-bob1-supply = <&vph_pwr>;
275		vdd-bob2-supply = <&vph_pwr>;
276		vdd-l2-l13-l14-supply = <&vreg_bob1>;
277		vdd-l3-supply = <&vreg_s1c_1p2>;
278		vdd-l5-l16-supply = <&vreg_bob1>;
279		vdd-l6-l7-supply = <&vreg_bob1>;
280		vdd-l8-l9-supply = <&vreg_bob1>;
281		vdd-l11-supply = <&vreg_s1c_1p2>;
282		vdd-l12-supply = <&vreg_s6c_1p8>;
283		vdd-l15-supply = <&vreg_s6c_1p8>;
284		vdd-l17-supply = <&vreg_bob2>;
285
286		qcom,pmic-id = "b";
287
288		vreg_bob1: bob1 {
289			regulator-name = "vreg_bob1";
290			regulator-min-microvolt = <3296000>;
291			regulator-max-microvolt = <3960000>;
292			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
293		};
294
295		vreg_bob2: bob2 {
296			regulator-name = "vreg_bob2";
297			regulator-min-microvolt = <2720000>;
298			regulator-max-microvolt = <3008000>;
299			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
300		};
301
302		vreg_l2b_3p0: ldo2 {
303			regulator-name = "vreg_l2b_3p0";
304			regulator-min-microvolt = <3008000>;
305			regulator-max-microvolt = <3008000>;
306			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
307			regulator-allow-set-load;
308			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
309						   RPMH_REGULATOR_MODE_HPM>;
310		};
311
312		vreg_l5b_3p1: ldo5 {
313			regulator-name = "vreg_l5b_3p1";
314			regulator-min-microvolt = <3104000>;
315			regulator-max-microvolt = <3104000>;
316			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
317			regulator-allow-set-load;
318			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
319						   RPMH_REGULATOR_MODE_HPM>;
320		};
321
322		vreg_l6b_1p8: ldo6 {
323			regulator-name = "vreg_l6b_1p8";
324			regulator-min-microvolt = <1800000>;
325			regulator-max-microvolt = <3008000>;
326			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
327			regulator-allow-set-load;
328			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
329						   RPMH_REGULATOR_MODE_HPM>;
330		};
331
332		vreg_l7b_1p8: ldo7 {
333			regulator-name = "vreg_l7b_1p8";
334			regulator-min-microvolt = <1800000>;
335			regulator-max-microvolt = <3008000>;
336			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
337		};
338
339		vreg_l8b_1p8: ldo8 {
340			regulator-name = "vreg_l8b_1p8";
341			regulator-min-microvolt = <1800000>;
342			regulator-max-microvolt = <3008000>;
343			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
344			regulator-allow-set-load;
345			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
346						   RPMH_REGULATOR_MODE_HPM>;
347		};
348
349		vreg_l11b_1p2: ldo11 {
350			regulator-name = "vreg_l11b_1p2";
351			regulator-min-microvolt = <1200000>;
352			regulator-max-microvolt = <1504000>;
353			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
354			regulator-allow-set-load;
355			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
356						   RPMH_REGULATOR_MODE_HPM>;
357		};
358
359		vreg_l12b_1p8: ldo12 {
360			regulator-name = "vreg_l12b_1p8";
361			regulator-min-microvolt = <1800000>;
362			regulator-max-microvolt = <1800000>;
363			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
364			regulator-allow-set-load;
365			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
366						   RPMH_REGULATOR_MODE_HPM>;
367		};
368
369		vreg_l13b_3p0: ldo13 {
370			regulator-name = "vreg_l13b_3p0";
371			regulator-min-microvolt = <3000000>;
372			regulator-max-microvolt = <3000000>;
373			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
374			regulator-allow-set-load;
375			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
376						   RPMH_REGULATOR_MODE_HPM>;
377		};
378
379		vreg_l14b_3p2: ldo14 {
380			regulator-name = "vreg_l14b_3p2";
381			regulator-min-microvolt = <3200000>;
382			regulator-max-microvolt = <3200000>;
383			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
384			regulator-allow-set-load;
385			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
386						   RPMH_REGULATOR_MODE_HPM>;
387		};
388
389		vreg_l15b_1p8: ldo15 {
390			regulator-name = "vreg_l15b_1p8";
391			regulator-min-microvolt = <1800000>;
392			regulator-max-microvolt = <1800000>;
393			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
394			regulator-allow-set-load;
395			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
396						   RPMH_REGULATOR_MODE_HPM>;
397		};
398
399		vreg_l16b_2p8: ldo16 {
400			regulator-name = "vreg_l16b_2p8";
401			regulator-min-microvolt = <2800000>;
402			regulator-max-microvolt = <2800000>;
403			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
404			regulator-allow-set-load;
405			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
406						   RPMH_REGULATOR_MODE_HPM>;
407		};
408
409		vreg_l17b_2p5: ldo17 {
410			regulator-name = "vreg_l17b_2p5";
411			regulator-min-microvolt = <2504000>;
412			regulator-max-microvolt = <2504000>;
413			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
414			regulator-allow-set-load;
415			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
416						   RPMH_REGULATOR_MODE_HPM>;
417		};
418	};
419
420	regulators-1 {
421		compatible = "qcom,pm8550vs-rpmh-regulators";
422
423		vdd-l1-supply = <&vreg_s1c_1p2>;
424		vdd-l2-supply = <&vreg_s1c_1p2>;
425		vdd-l3-supply = <&vreg_s1c_1p2>;
426		vdd-s1-supply = <&vph_pwr>;
427		vdd-s2-supply = <&vph_pwr>;
428		vdd-s3-supply = <&vph_pwr>;
429		vdd-s4-supply = <&vph_pwr>;
430		vdd-s5-supply = <&vph_pwr>;
431		vdd-s6-supply = <&vph_pwr>;
432
433		qcom,pmic-id = "c";
434
435		vreg_s1c_1p2: smps1 {
436			regulator-name = "vreg_s1c_1p2";
437			regulator-min-microvolt = <1256000>;
438			regulator-max-microvolt = <1348000>;
439			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
440		};
441
442		vreg_s2c_0p8: smps2 {
443			regulator-name = "vreg_s2c_0p8";
444			regulator-min-microvolt = <852000>;
445			regulator-max-microvolt = <1036000>;
446			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
447		};
448
449		vreg_s3c_0p9: smps3 {
450			regulator-name = "vreg_s3c_0p9";
451			regulator-min-microvolt = <976000>;
452			regulator-max-microvolt = <1064000>;
453			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
454		};
455
456		vreg_s4c_1p2: smps4 {
457			regulator-name = "vreg_s4c_1p2";
458			regulator-min-microvolt = <1224000>;
459			regulator-max-microvolt = <1280000>;
460			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
461		};
462
463		vreg_s5c_0p7: smps5 {
464			regulator-name = "vreg_s5c_0p7";
465			regulator-min-microvolt = <752000>;
466			regulator-max-microvolt = <900000>;
467			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
468		};
469
470		vreg_s6c_1p8: smps6 {
471			regulator-name = "vreg_s6c_1p8";
472			regulator-min-microvolt = <1856000>;
473			regulator-max-microvolt = <2000000>;
474			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
475		};
476
477		vreg_l1c_1p2: ldo1 {
478			regulator-name = "vreg_l1c_1p2";
479			regulator-min-microvolt = <1200000>;
480			regulator-max-microvolt = <1200000>;
481			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
482			regulator-allow-set-load;
483			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
484						   RPMH_REGULATOR_MODE_HPM>;
485		};
486
487		vreg_l3c_1p2: ldo3 {
488			regulator-name = "vreg_l3c_1p2";
489			regulator-min-microvolt = <1200000>;
490			regulator-max-microvolt = <1200000>;
491			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
492			regulator-allow-set-load;
493			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
494						   RPMH_REGULATOR_MODE_HPM>;
495		};
496	};
497
498	regulators-2 {
499		compatible = "qcom,pm8550vs-rpmh-regulators";
500
501		vdd-l1-supply = <&vreg_s3c_0p9>;
502
503		qcom,pmic-id = "d";
504
505		vreg_l1d_0p88: ldo1 {
506			regulator-name = "vreg_l1d_0p88";
507			regulator-min-microvolt = <912000>;
508			regulator-max-microvolt = <920000>;
509			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
510			regulator-allow-set-load;
511			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
512						   RPMH_REGULATOR_MODE_HPM>;
513		};
514	};
515
516	regulators-3 {
517		compatible = "qcom,pm8550vs-rpmh-regulators";
518
519		vdd-l3-supply = <&vreg_s3c_0p9>;
520
521		qcom,pmic-id = "e";
522
523		vreg_l3e_0p9: ldo3 {
524			regulator-name = "vreg_l3e_0p9";
525			regulator-min-microvolt = <880000>;
526			regulator-max-microvolt = <920000>;
527			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
528			regulator-allow-set-load;
529			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
530						   RPMH_REGULATOR_MODE_HPM>;
531		};
532	};
533
534	regulators-4 {
535		compatible = "qcom,pm8550vs-rpmh-regulators";
536
537		vdd-l1-supply = <&vreg_s3c_0p9>;
538		vdd-l3-supply = <&vreg_s3c_0p9>;
539
540		qcom,pmic-id = "g";
541
542		vreg_l1g_0p91: ldo1 {
543			regulator-name = "vreg_l1g_0p91";
544			regulator-min-microvolt = <912000>;
545			regulator-max-microvolt = <920000>;
546			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
547			regulator-allow-set-load;
548			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
549						   RPMH_REGULATOR_MODE_HPM>;
550		};
551
552		vreg_l3g_0p91: ldo3 {
553			regulator-name = "vreg_l3g_0p91";
554			regulator-min-microvolt = <880000>;
555			regulator-max-microvolt = <912000>;
556			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
557			regulator-allow-set-load;
558			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
559						   RPMH_REGULATOR_MODE_HPM>;
560		};
561	};
562
563	regulators-5 {
564		compatible = "qcom,pm8550ve-rpmh-regulators";
565
566		vdd-l1-supply = <&vreg_s3c_0p9>;
567		vdd-l2-supply = <&vreg_s3c_0p9>;
568		vdd-l3-supply = <&vreg_s1c_1p2>;
569		vdd-s4-supply = <&vph_pwr>;
570
571		qcom,pmic-id = "i";
572
573		vreg_s4i_0p85: smps4 {
574			regulator-name = "vreg_s4i_0p85";
575			regulator-min-microvolt = <852000>;
576			regulator-max-microvolt = <1004000>;
577			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
578		};
579
580		vreg_l1i_0p88: ldo1 {
581			regulator-name = "vreg_l1i_0p88";
582			regulator-min-microvolt = <880000>;
583			regulator-max-microvolt = <912000>;
584			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
585			regulator-allow-set-load;
586			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
587						   RPMH_REGULATOR_MODE_HPM>;
588		};
589
590		vreg_l2i_0p88: ldo2 {
591			regulator-name = "vreg_l2i_0p88";
592			regulator-min-microvolt = <880000>;
593			regulator-max-microvolt = <912000>;
594			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
595			regulator-allow-set-load;
596			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
597						   RPMH_REGULATOR_MODE_HPM>;
598		};
599
600		vreg_l3i_1p2: ldo3 {
601			regulator-name = "vreg_l3i_0p91";
602			regulator-min-microvolt = <1200000>;
603			regulator-max-microvolt = <1200000>;
604			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
605			regulator-allow-set-load;
606			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
607						   RPMH_REGULATOR_MODE_HPM>;
608		};
609	};
610
611	regulators-6 {
612		compatible = "qcom,pm8010-rpmh-regulators";
613		qcom,pmic-id = "m";
614
615		vdd-l1-l2-supply = <&vreg_s1c_1p2>;
616		vdd-l3-l4-supply = <&vreg_bob2>;
617		vdd-l5-supply = <&vreg_s6c_1p8>;
618		vdd-l6-supply = <&vreg_bob1>;
619		vdd-l7-supply = <&vreg_bob1>;
620
621		vreg_l1m_1p1: ldo1 {
622			regulator-name = "vreg_l1m_1p1";
623			regulator-min-microvolt = <1104000>;
624			regulator-max-microvolt = <1104000>;
625			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
626			regulator-allow-set-load;
627			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
628						   RPMH_REGULATOR_MODE_HPM>;
629		};
630
631		vreg_l2m_1p056: ldo2 {
632			regulator-name = "vreg_l2m_1p056";
633			regulator-min-microvolt = <1056000>;
634			regulator-max-microvolt = <1056000>;
635			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
636			regulator-allow-set-load;
637			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
638						   RPMH_REGULATOR_MODE_HPM>;
639		};
640
641		vreg_l3m_2p8: ldo3 {
642			regulator-name = "vreg_l3m_2p8";
643			regulator-min-microvolt = <2800000>;
644			regulator-max-microvolt = <2800000>;
645			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
646		};
647
648		vreg_l4m_2p8: ldo4 {
649			regulator-name = "vreg_l4m_2p8";
650			regulator-min-microvolt = <2800000>;
651			regulator-max-microvolt = <2800000>;
652			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
653		};
654
655		vreg_l5m_1p8: ldo5 {
656			regulator-name = "vreg_l5m_1p8";
657			regulator-min-microvolt = <1800000>;
658			regulator-max-microvolt = <1800000>;
659			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
660		};
661
662		vreg_l6m_2p8: ldo6 {
663			regulator-name = "vreg_l6m_2p8";
664			regulator-min-microvolt = <2800000>;
665			regulator-max-microvolt = <2800000>;
666			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
667		};
668
669		vreg_l7m_2p96: ldo7 {
670			regulator-name = "vreg_l7m_2p96";
671			regulator-min-microvolt = <2960000>;
672			regulator-max-microvolt = <2960000>;
673			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
674		};
675	};
676
677	regulators-7 {
678		compatible = "qcom,pm8010-rpmh-regulators";
679		qcom,pmic-id = "n";
680
681		vdd-l1-l2-supply = <&vreg_s1c_1p2>;
682		vdd-l3-l4-supply = <&vreg_s6c_1p8>;
683		vdd-l5-supply = <&vreg_bob2>;
684		vdd-l6-supply = <&vreg_bob2>;
685		vdd-l7-supply = <&vreg_bob1>;
686
687		vreg_l1n_1p1: ldo1 {
688			regulator-name = "vreg_l1n_1p1";
689			regulator-min-microvolt = <1104000>;
690			regulator-max-microvolt = <1104000>;
691			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
692			regulator-allow-set-load;
693			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
694						   RPMH_REGULATOR_MODE_HPM>;
695		};
696
697		vreg_l2n_1p056: ldo2 {
698			regulator-name = "vreg_l2n_1p056";
699			regulator-min-microvolt = <1056000>;
700			regulator-max-microvolt = <1056000>;
701			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
702			regulator-allow-set-load;
703			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
704						   RPMH_REGULATOR_MODE_HPM>;
705		};
706
707		vreg_l3n_1p8: ldo3 {
708			regulator-name = "vreg_l3n_1p8";
709			regulator-min-microvolt = <1800000>;
710			regulator-max-microvolt = <1800000>;
711			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
712		};
713
714		vreg_l4n_1p8: ldo4 {
715			regulator-name = "vreg_l4n_1p8";
716			regulator-min-microvolt = <1800000>;
717			regulator-max-microvolt = <1800000>;
718			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
719		};
720
721		vreg_l5n_2p8: ldo5 {
722			regulator-name = "vreg_l5n_2p8";
723			regulator-min-microvolt = <2800000>;
724			regulator-max-microvolt = <2800000>;
725			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
726		};
727
728		vreg_l6n_2p8: ldo6 {
729			regulator-name = "vreg_l6n_2p8";
730			regulator-min-microvolt = <2800000>;
731			regulator-max-microvolt = <2800000>;
732			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
733		};
734
735		vreg_l7n_3p3: ldo7 {
736			regulator-name = "vreg_l7n_3p3";
737			regulator-min-microvolt = <3304000>;
738			regulator-max-microvolt = <3304000>;
739			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
740		};
741	};
742};
743
744&gpi_dma1 {
745	status = "okay";
746};
747
748&i2c3 {
749       status = "okay";
750
751       wcd_usbss: typec-mux@e {
752		compatible = "qcom,wcd9395-usbss", "qcom,wcd9390-usbss";
753		reg = <0xe>;
754
755		vdd-supply = <&vreg_l15b_1p8>;
756		reset-gpios = <&tlmm 152 GPIO_ACTIVE_HIGH>;
757
758		mode-switch;
759		orientation-switch;
760
761		ports {
762			#address-cells = <1>;
763			#size-cells = <0>;
764
765			port@0 {
766				reg = <0>;
767
768				wcd_usbss_sbu_mux: endpoint {
769					remote-endpoint = <&pmic_glink_sbu>;
770				};
771			};
772
773			port@1 {
774				reg = <1>;
775
776				wcd_usbss_headset_out: endpoint {
777					remote-endpoint = <&wcd_codec_headset_in>;
778				};
779			};
780		};
781       };
782};
783
784&i2c6 {
785	status = "okay";
786
787	typec-mux@1c {
788		compatible = "onnn,nb7vpq904m";
789		reg = <0x1c>;
790
791		vcc-supply = <&vreg_l15b_1p8>;
792
793		retimer-switch;
794		orientation-switch;
795
796		ports {
797			#address-cells = <1>;
798			#size-cells = <0>;
799
800			port@0 {
801				reg = <0>;
802
803				redriver_ss_out: endpoint {
804					remote-endpoint = <&pmic_glink_ss_in>;
805				};
806			};
807
808			port@1 {
809				reg = <1>;
810
811				redriver_ss_in: endpoint {
812					data-lanes = <3 2 1 0>;
813					remote-endpoint = <&usb_dp_qmpphy_out>;
814				};
815			};
816		};
817	};
818};
819
820&ipa {
821	qcom,gsi-loader = "self";
822	memory-region = <&ipa_fw_mem>;
823	firmware-name = "qcom/sm8650/ipa_fws.mbn";
824	status = "okay";
825};
826
827&gpu {
828	status = "okay";
829
830	zap-shader {
831		firmware-name = "qcom/sm8650/gen70900_zap.mbn";
832	};
833};
834
835&lpass_tlmm {
836	spkr_1_sd_n_active: spkr-1-sd-n-active-state {
837		pins = "gpio21";
838		function = "gpio";
839		drive-strength = <16>;
840		bias-disable;
841		output-low;
842	};
843};
844
845&mdss {
846	status = "okay";
847};
848
849&mdss_dsi0 {
850	vdda-supply = <&vreg_l3i_1p2>;
851
852	status = "okay";
853
854	panel@0 {
855		compatible = "visionox,vtdr6130";
856		reg = <0>;
857
858		reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
859
860		vddio-supply = <&vreg_l12b_1p8>;
861		vci-supply = <&vreg_l13b_3p0>;
862		vdd-supply = <&vreg_l11b_1p2>;
863
864		pinctrl-0 = <&disp0_reset_n_active>, <&mdp_vsync_active>;
865		pinctrl-1 = <&disp0_reset_n_suspend>, <&mdp_vsync_suspend>;
866		pinctrl-names = "default", "sleep";
867
868		port {
869			panel0_in: endpoint {
870				remote-endpoint = <&mdss_dsi0_out>;
871			};
872		};
873	};
874};
875
876&mdss_dsi0_out {
877	remote-endpoint = <&panel0_in>;
878	data-lanes = <0 1 2 3>;
879};
880
881&mdss_dsi0_phy {
882	vdds-supply = <&vreg_l1i_0p88>;
883
884	status = "okay";
885};
886
887&mdss_dp0 {
888	status = "okay";
889};
890
891&mdss_dp0_out {
892	data-lanes = <0 1>;
893};
894
895&pcie0 {
896	wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
897	perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
898
899	pinctrl-0 = <&pcie0_default_state>;
900	pinctrl-names = "default";
901
902	status = "okay";
903};
904
905&pcieport0 {
906	wifi@0 {
907		compatible = "pci17cb,1107";
908		reg = <0x10000 0x0 0x0 0x0 0x0>;
909
910		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
911		vddaon-supply = <&vreg_pmu_aon_0p59>;
912		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
913		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
914		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
915		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
916		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
917		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
918		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
919	};
920};
921
922&pcie0_phy {
923	vdda-phy-supply = <&vreg_l1i_0p88>;
924	vdda-pll-supply = <&vreg_l3i_1p2>;
925
926	status = "okay";
927};
928
929&pon_pwrkey {
930	status = "okay";
931};
932
933&pon_resin {
934	linux,code = <KEY_VOLUMEDOWN>;
935
936	status = "okay";
937};
938
939&pm8550_flash {
940	status = "okay";
941
942	led-0 {
943		function = LED_FUNCTION_FLASH;
944		color = <LED_COLOR_ID_YELLOW>;
945		led-sources = <1>, <4>;
946		led-max-microamp = <500000>;
947		flash-max-microamp = <2000000>;
948		flash-max-timeout-us = <1280000>;
949		function-enumerator = <0>;
950	};
951
952	led-1 {
953		function = LED_FUNCTION_FLASH;
954		color = <LED_COLOR_ID_WHITE>;
955		led-sources = <2>, <3>;
956		led-max-microamp = <500000>;
957		flash-max-microamp = <2000000>;
958		flash-max-timeout-us = <1280000>;
959		function-enumerator = <1>;
960	};
961};
962
963&pm8550_gpios {
964	volume_up_n: volume-up-n-state {
965		pins = "gpio6";
966		function = "normal";
967		bias-pull-up;
968		input-enable;
969		power-source = <1>;
970	};
971};
972
973&pm8550_pwm {
974	status = "okay";
975
976	multi-led {
977		color = <LED_COLOR_ID_RGB>;
978		function = LED_FUNCTION_STATUS;
979
980		#address-cells = <1>;
981		#size-cells = <0>;
982
983		led@1 {
984			reg = <1>;
985			color = <LED_COLOR_ID_RED>;
986		};
987
988		led@2 {
989			reg = <2>;
990			color = <LED_COLOR_ID_GREEN>;
991		};
992
993		led@3 {
994			reg = <3>;
995			color = <LED_COLOR_ID_BLUE>;
996		};
997	};
998};
999
1000&pm8550b_eusb2_repeater {
1001	vdd18-supply = <&vreg_l15b_1p8>;
1002	vdd3-supply = <&vreg_l5b_3p1>;
1003};
1004
1005&pmk8550_rtc {
1006	status = "okay";
1007};
1008
1009&qup_i2c3_data_clk {
1010	/* Use internal I2C pull-up */
1011	bias-pull-up = <2200>;
1012};
1013
1014&qupv3_id_0 {
1015	status = "okay";
1016};
1017
1018&qupv3_id_1 {
1019	status = "okay";
1020};
1021
1022&remoteproc_adsp {
1023	firmware-name = "qcom/sm8650/adsp.mbn",
1024			"qcom/sm8650/adsp_dtb.mbn";
1025
1026	status = "okay";
1027};
1028
1029&remoteproc_cdsp {
1030	firmware-name = "qcom/sm8650/cdsp.mbn",
1031			"qcom/sm8650/cdsp_dtb.mbn";
1032
1033	status = "okay";
1034};
1035
1036&remoteproc_mpss {
1037	firmware-name = "qcom/sm8650/modem.mbn",
1038			"qcom/sm8650/modem_dtb.mbn";
1039
1040	status = "okay";
1041};
1042
1043&sleep_clk {
1044	clock-frequency = <32000>;
1045};
1046
1047&spi4 {
1048	status = "okay";
1049
1050	touchscreen@0 {
1051		compatible = "goodix,gt9916";
1052		reg = <0>;
1053
1054		interrupt-parent = <&tlmm>;
1055		interrupts = <162 IRQ_TYPE_LEVEL_LOW>;
1056
1057		reset-gpios = <&tlmm 161 GPIO_ACTIVE_LOW>;
1058
1059		avdd-supply = <&vreg_l14b_3p2>;
1060
1061		spi-max-frequency = <1000000>;
1062
1063		touchscreen-size-x = <1080>;
1064		touchscreen-size-y = <2400>;
1065
1066		pinctrl-0 = <&ts_irq>, <&ts_reset>;
1067		pinctrl-names = "default";
1068	};
1069};
1070
1071&swr0 {
1072	status = "okay";
1073
1074	/* WSA8845, Speaker Left */
1075	left_spkr: speaker@0,0 {
1076		compatible = "sdw20217020400";
1077		reg = <0 0>;
1078		pinctrl-0 = <&spkr_1_sd_n_active>;
1079		pinctrl-names = "default";
1080		powerdown-gpios = <&lpass_tlmm 21 GPIO_ACTIVE_LOW>;
1081		#sound-dai-cells = <0>;
1082		sound-name-prefix = "SpkrLeft";
1083		vdd-1p8-supply = <&vreg_l15b_1p8>;
1084		vdd-io-supply = <&vreg_l3c_1p2>;
1085
1086		/*
1087		 * WSA8845 Port 1 (DAC)     <=> SWR0 Port 1 (SPKR_L)
1088		 * WSA8845 Port 2 (COMP)    <=> SWR0 Port 2 (SPKR_L_COMP)
1089		 * WSA8845 Port 3 (BOOST)   <=> SWR0 Port 3 (SPKR_L_BOOST)
1090		 * WSA8845 Port 4 (PBR)     <=> SWR0 Port 7 (PBR)
1091		 * WSA8845 Port 5 (VISENSE) <=> SWR0 Port 10 (SPKR_L_VI)
1092		 * WSA8845 Port 6 (CPS)     <=> SWR0 Port 13 (CPS)
1093		 */
1094		qcom,port-mapping = <1 2 3 7 10 13>;
1095	};
1096
1097	/* WSA8845, Speaker Right */
1098	right_spkr: speaker@0,1 {
1099		compatible = "sdw20217020400";
1100		reg = <0 1>;
1101		pinctrl-0 = <&spkr_2_sd_n_active>;
1102		pinctrl-names = "default";
1103		powerdown-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>;
1104		#sound-dai-cells = <0>;
1105		sound-name-prefix = "SpkrRight";
1106		vdd-1p8-supply = <&vreg_l15b_1p8>;
1107		vdd-io-supply = <&vreg_l3c_1p2>;
1108
1109		/*
1110		 * WSA8845 Port 1 (DAC)     <=> SWR0 Port 4 (SPKR_R)
1111		 * WSA8845 Port 2 (COMP)    <=> SWR0 Port 5 (SPKR_R_COMP)
1112		 * WSA8845 Port 3 (BOOST)   <=> SWR0 Port 6 (SPKR_R_BOOST)
1113		 * WSA8845 Port 4 (PBR)     <=> SWR0 Port 7 (PBR)
1114		 * WSA8845 Port 5 (VISENSE) <=> SWR0 Port 11 (SPKR_R_VI)
1115		 * WSA8845 Port 6 (CPS)     <=> SWR0 Port 13 (CPS)
1116		 */
1117		qcom,port-mapping = <4 5 6 7 11 13>;
1118	};
1119};
1120
1121&swr1 {
1122	status = "okay";
1123
1124	/* WCD9395 RX */
1125	wcd_rx: codec@0,4 {
1126		compatible = "sdw20217010e00";
1127		reg = <0 4>;
1128
1129		/*
1130		 * WCD9395 RX Port 1 (HPH_L/R)      <=> SWR1 Port 1 (HPH_L/R)
1131		 * WCD9395 RX Port 2 (CLSH)         <=> SWR1 Port 2 (CLSH)
1132		 * WCD9395 RX Port 3 (COMP_L/R)     <=> SWR1 Port 3 (COMP_L/R)
1133		 * WCD9395 RX Port 4 (LO)           <=> SWR1 Port 4 (LO)
1134		 * WCD9395 RX Port 5 (DSD_L/R)      <=> SWR1 Port 5 (DSD_L/R)
1135		 * WCD9395 RX Port 6 (HIFI_PCM_L/R) <=> SWR1 Port 9 (HIFI_PCM_L/R)
1136		 */
1137		qcom,rx-port-mapping = <1 2 3 4 5 9>;
1138	};
1139};
1140
1141&swr2 {
1142	status = "okay";
1143
1144	/* WCD9395 TX */
1145	wcd_tx: codec@0,3 {
1146		compatible = "sdw20217010e00";
1147		reg = <0 3>;
1148
1149		/*
1150		 * WCD9395 TX Port 1 (ADC1,2,3,4)         <=> SWR2 Port 2 (TX SWR_INPUT 0,1,2,3)
1151		 * WCD9395 TX Port 2 (ADC3,4 & DMIC0,1)   <=> SWR2 Port 2 (TX SWR_INPUT 0,1,2,3)
1152		 * WCD9395 TX Port 3 (DMIC0,1,2,3 & MBHC) <=> SWR2 Port 3 (TX SWR_INPUT 4,5,6,7)
1153		 * WCD9395 TX Port 4 (DMIC4,5,6,7)        <=> SWR2 Port 4 (TX SWR_INPUT 8,9,10,11)
1154		 */
1155		qcom,tx-port-mapping = <2 2 3 4>;
1156	};
1157};
1158
1159&tlmm {
1160	/* Reserved I/Os for NFC */
1161	gpio-reserved-ranges = <32 8>, <74 1>;
1162
1163	bt_default: bt-default-state {
1164		bt-en-pins {
1165			pins = "gpio17";
1166			function = "gpio";
1167			drive-strength = <16>;
1168			bias-disable;
1169		};
1170
1171		sw-ctrl-pins {
1172			pins = "gpio18";
1173			function = "gpio";
1174			bias-pull-down;
1175		};
1176	};
1177
1178	disp0_reset_n_active: disp0-reset-n-active-state {
1179		pins = "gpio133";
1180		function = "gpio";
1181		drive-strength = <8>;
1182		bias-disable;
1183	};
1184
1185	disp0_reset_n_suspend: disp0-reset-n-suspend-state {
1186		pins = "gpio133";
1187		function = "gpio";
1188		drive-strength = <2>;
1189		bias-pull-down;
1190	};
1191
1192	mdp_vsync_active: mdp-vsync-active-state {
1193		pins = "gpio86";
1194		function = "mdp_vsync";
1195		drive-strength = <2>;
1196		bias-pull-down;
1197	};
1198
1199	mdp_vsync_suspend: mdp-vsync-suspend-state {
1200		pins = "gpio86";
1201		function = "mdp_vsync";
1202		drive-strength = <2>;
1203		bias-pull-down;
1204	};
1205
1206	spkr_2_sd_n_active: spkr-2-sd-n-active-state {
1207		pins = "gpio77";
1208		function = "gpio";
1209		drive-strength = <16>;
1210		bias-disable;
1211		output-low;
1212	};
1213
1214	ts_irq: ts-irq-state {
1215		pins = "gpio161";
1216		function = "gpio";
1217		drive-strength = <8>;
1218		bias-pull-up;
1219		output-disable;
1220	};
1221
1222	ts_reset: ts-reset-state {
1223		pins = "gpio162";
1224		function = "gpio";
1225		drive-strength = <8>;
1226		bias-pull-up;
1227	};
1228
1229	wcd_default: wcd-reset-n-active-state {
1230		pins = "gpio107";
1231		function = "gpio";
1232		drive-strength = <16>;
1233		bias-disable;
1234		output-low;
1235	};
1236
1237	wlan_en: wlan-en-state {
1238		pins = "gpio16";
1239		function = "gpio";
1240		drive-strength = <8>;
1241		bias-pull-down;
1242	};
1243};
1244
1245&uart14 {
1246	status = "okay";
1247
1248	bluetooth {
1249		compatible = "qcom,wcn7850-bt";
1250
1251		vddrfacmn-supply = <&vreg_pmu_rfa_cmn>;
1252		vddaon-supply = <&vreg_pmu_aon_0p59>;
1253		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
1254		vddwlmx-supply = <&vreg_pmu_wlmx_0p85>;
1255		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
1256		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
1257		vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>;
1258
1259		max-speed = <3200000>;
1260	};
1261};
1262
1263&uart15 {
1264	status = "okay";
1265};
1266
1267&ufs_mem_hc {
1268	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
1269
1270	vcc-supply = <&vreg_l17b_2p5>;
1271	vcc-max-microamp = <1300000>;
1272	vccq-supply = <&vreg_l1c_1p2>;
1273	vccq-max-microamp = <1200000>;
1274
1275	status = "okay";
1276};
1277
1278&ufs_mem_phy {
1279	vdda-phy-supply = <&vreg_l1d_0p88>;
1280	vdda-pll-supply = <&vreg_l3i_1p2>;
1281
1282	status = "okay";
1283};
1284
1285/*
1286 * DPAUX -> WCD9395 -> USB_SBU -> USB-C
1287 * eUSB2 DP/DM -> PM85550HS -> eUSB2 DP/DM -> WCD9395 -> USB-C
1288 * USB SS -> NB7VPQ904MMUTWG -> USB-C
1289 */
1290
1291&usb_1 {
1292	status = "okay";
1293};
1294
1295&usb_1_dwc3 {
1296	dr_mode = "otg";
1297	usb-role-switch;
1298};
1299
1300&usb_1_dwc3_hs {
1301	remote-endpoint = <&pmic_glink_hs_in>;
1302};
1303
1304&usb_1_hsphy {
1305	vdd-supply = <&vreg_l1i_0p88>;
1306	vdda12-supply = <&vreg_l3i_1p2>;
1307
1308	phys = <&pm8550b_eusb2_repeater>;
1309
1310	status = "okay";
1311};
1312
1313&usb_dp_qmpphy {
1314	vdda-phy-supply = <&vreg_l3i_1p2>;
1315	vdda-pll-supply = <&vreg_l3g_0p91>;
1316
1317	status = "okay";
1318};
1319
1320&usb_dp_qmpphy_out {
1321	remote-endpoint = <&redriver_ss_in>;
1322};
1323
1324&xo_board {
1325	clock-frequency = <76800000>;
1326};
1327