xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sc8280xp-crd.dts (revision 8a271827e7b5d5310e06df1f9f49ba0ef9efd263)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2022, Linaro Limited
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11
12#include "sc8280xp.dtsi"
13#include "sc8280xp-pmics.dtsi"
14
15/ {
16	model = "Qualcomm SC8280XP CRD";
17	compatible = "qcom,sc8280xp-crd", "qcom,sc8280xp";
18
19	aliases {
20		serial0 = &qup2_uart17;
21	};
22
23	backlight {
24		compatible = "pwm-backlight";
25		pwms = <&pmc8280c_lpg 3 1000000>;
26		enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>;
27		power-supply = <&vreg_edp_bl>;
28
29		pinctrl-names = "default";
30		pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
31	};
32
33	chosen {
34		stdout-path = "serial0:115200n8";
35	};
36
37	vreg_edp_bl: regulator-edp-bl {
38		compatible = "regulator-fixed";
39
40		regulator-name = "VREG_EDP_BL";
41		regulator-min-microvolt = <3600000>;
42		regulator-max-microvolt = <3600000>;
43
44		gpio = <&pmc8280_1_gpios 9 GPIO_ACTIVE_HIGH>;
45		enable-active-high;
46
47		pinctrl-names = "default";
48		pinctrl-0 = <&edp_bl_reg_en>;
49
50		regulator-boot-on;
51	};
52
53	vreg_misc_3p3: regulator-misc-3p3 {
54		compatible = "regulator-fixed";
55
56		regulator-name = "VREG_MISC_3P3";
57		regulator-min-microvolt = <3300000>;
58		regulator-max-microvolt = <3300000>;
59
60		gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>;
61		enable-active-high;
62
63		pinctrl-names = "default";
64		pinctrl-0 = <&misc_3p3_reg_en>;
65
66		regulator-boot-on;
67		regulator-always-on;
68	};
69};
70
71&apps_rsc {
72	pmc8280-1-rpmh-regulators {
73		compatible = "qcom,pm8350-rpmh-regulators";
74		qcom,pmic-id = "b";
75
76		vdd-l3-l5-supply = <&vreg_s11b>;
77
78		vreg_s11b: smps11 {
79			regulator-name = "vreg_s11b";
80			regulator-min-microvolt = <1272000>;
81			regulator-max-microvolt = <1272000>;
82			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
83		};
84
85		vreg_l3b: ldo3 {
86			regulator-name = "vreg_l3b";
87			regulator-min-microvolt = <1200000>;
88			regulator-max-microvolt = <1200000>;
89			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
90			regulator-allow-set-load;
91			regulator-boot-on;
92			regulator-always-on;
93		};
94
95		vreg_l4b: ldo4 {
96			regulator-name = "vreg_l4b";
97			regulator-min-microvolt = <912000>;
98			regulator-max-microvolt = <912000>;
99			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
100			regulator-allow-set-load;
101		};
102
103		vreg_l6b: ldo6 {
104			regulator-name = "vreg_l6b";
105			regulator-min-microvolt = <880000>;
106			regulator-max-microvolt = <880000>;
107			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
108			regulator-allow-set-load;
109			regulator-boot-on;
110		};
111	};
112
113	pmc8280c-rpmh-regulators {
114		compatible = "qcom,pm8350c-rpmh-regulators";
115		qcom,pmic-id = "c";
116
117		vreg_l1c: ldo1 {
118			regulator-name = "vreg_l1c";
119			regulator-min-microvolt = <1800000>;
120			regulator-max-microvolt = <1800000>;
121			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
122			regulator-allow-set-load;
123		};
124
125		vreg_l7c: ldo7 {
126			regulator-name = "vreg_l7c";
127			regulator-min-microvolt = <2504000>;
128			regulator-max-microvolt = <2504000>;
129			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
130			regulator-allow-set-load;
131		};
132
133		vreg_l13c: ldo13 {
134			regulator-name = "vreg_l13c";
135			regulator-min-microvolt = <3072000>;
136			regulator-max-microvolt = <3072000>;
137			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
138			regulator-allow-set-load;
139		};
140	};
141
142	pmc8280-2-rpmh-regulators {
143		compatible = "qcom,pm8350-rpmh-regulators";
144		qcom,pmic-id = "d";
145
146		vdd-l1-l4-supply = <&vreg_s11b>;
147
148		vreg_l3d: ldo3 {
149			regulator-name = "vreg_l3d";
150			regulator-min-microvolt = <1200000>;
151			regulator-max-microvolt = <1200000>;
152			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
153			regulator-allow-set-load;
154		};
155
156		vreg_l4d: ldo4 {
157			regulator-name = "vreg_l4d";
158			regulator-min-microvolt = <1200000>;
159			regulator-max-microvolt = <1200000>;
160			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
161			regulator-allow-set-load;
162		};
163
164		vreg_l6d: ldo6 {
165			regulator-name = "vreg_l6d";
166			regulator-min-microvolt = <880000>;
167			regulator-max-microvolt = <880000>;
168			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
169			regulator-allow-set-load;
170		};
171
172		vreg_l7d: ldo7 {
173			regulator-name = "vreg_l7d";
174			regulator-min-microvolt = <3072000>;
175			regulator-max-microvolt = <3072000>;
176			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
177			regulator-allow-set-load;
178		};
179
180		vreg_l9d: ldo9 {
181			regulator-name = "vreg_l9d";
182			regulator-min-microvolt = <912000>;
183			regulator-max-microvolt = <912000>;
184			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
185			regulator-allow-set-load;
186		};
187	};
188};
189
190&pmc8280c_lpg {
191	status = "okay";
192};
193
194&pmk8280_pon_pwrkey {
195	status = "okay";
196};
197
198&qup0 {
199	status = "okay";
200};
201
202&qup0_i2c4 {
203	clock-frequency = <400000>;
204
205	pinctrl-names = "default";
206	pinctrl-0 = <&qup0_i2c4_default>, <&ts0_default>;
207
208	status = "okay";
209
210	touchscreen@10 {
211		compatible = "hid-over-i2c";
212		reg = <0x10>;
213		hid-descr-addr = <0x1>;
214		interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
215		vdd-supply = <&vreg_misc_3p3>;
216	};
217};
218
219&qup1 {
220	status = "okay";
221};
222
223&qup2 {
224	status = "okay";
225};
226
227&qup2_i2c5 {
228	clock-frequency = <400000>;
229
230	pinctrl-names = "default";
231	pinctrl-0 = <&qup2_i2c5_default>, <&kybd_default>, <&tpad_default>;
232
233	status = "okay";
234
235	touchpad@15 {
236		compatible = "hid-over-i2c";
237		reg = <0x15>;
238		hid-descr-addr = <0x1>;
239		interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>;
240		vdd-supply = <&vreg_misc_3p3>;
241	};
242
243	keyboard@68 {
244		compatible = "hid-over-i2c";
245		reg = <0x68>;
246		hid-descr-addr = <0x1>;
247		interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
248		vdd-supply = <&vreg_misc_3p3>;
249	};
250};
251
252&qup2_uart17 {
253	compatible = "qcom,geni-debug-uart";
254
255	status = "okay";
256};
257
258&remoteproc_adsp {
259	firmware-name = "qcom/sc8280xp/qcadsp8280.mbn";
260
261	status = "okay";
262};
263
264&remoteproc_nsp0 {
265	firmware-name = "qcom/sc8280xp/qccdsp8280.mbn";
266
267	status = "okay";
268};
269
270&ufs_mem_hc {
271	reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>;
272
273	vcc-supply = <&vreg_l7c>;
274	vcc-max-microamp = <800000>;
275	vccq-supply = <&vreg_l3d>;
276	vccq-max-microamp = <900000>;
277
278	status = "okay";
279};
280
281&ufs_mem_phy {
282	vdda-phy-supply = <&vreg_l6b>;
283	vdda-pll-supply = <&vreg_l3b>;
284
285	status = "okay";
286};
287
288&usb_0 {
289	status = "okay";
290};
291
292&usb_0_dwc3 {
293	/* TODO: Define USB-C connector properly */
294	dr_mode = "host";
295};
296
297&usb_0_hsphy {
298	vdda-pll-supply = <&vreg_l9d>;
299	vdda18-supply = <&vreg_l1c>;
300	vdda33-supply = <&vreg_l7d>;
301
302	status = "okay";
303};
304
305&usb_0_qmpphy {
306	vdda-phy-supply = <&vreg_l9d>;
307	vdda-pll-supply = <&vreg_l4d>;
308
309	status = "okay";
310};
311
312&usb_1 {
313	status = "okay";
314};
315
316&usb_1_dwc3 {
317	/* TODO: Define USB-C connector properly */
318	dr_mode = "host";
319};
320
321&usb_1_hsphy {
322	vdda-pll-supply = <&vreg_l4b>;
323	vdda18-supply = <&vreg_l1c>;
324	vdda33-supply = <&vreg_l13c>;
325
326	status = "okay";
327};
328
329&usb_1_qmpphy {
330	vdda-phy-supply = <&vreg_l4b>;
331	vdda-pll-supply = <&vreg_l3b>;
332
333	status = "okay";
334};
335
336&xo_board_clk {
337	clock-frequency = <38400000>;
338};
339
340/* PINCTRL - additions to nodes defined in sc8280xp.dtsi */
341
342&pmc8280_1_gpios {
343	edp_bl_en: edp-bl-en-state {
344		pins = "gpio8";
345		function = "normal";
346	};
347
348	edp_bl_reg_en: edp-bl-reg-en-state {
349		pins = "gpio9";
350		function = "normal";
351	};
352
353	misc_3p3_reg_en: misc-3p3-reg-en-state {
354		pins = "gpio1";
355		function = "normal";
356	};
357};
358
359&pmc8280c_gpios {
360	edp_bl_pwm: edp-bl-pwm-state {
361		pins = "gpio8";
362		function = "func1";
363	};
364};
365
366&tlmm {
367	gpio-reserved-ranges = <74 6>, <83 4>, <125 2>, <128 2>, <154 7>;
368
369	kybd_default: kybd-default-state {
370		disable {
371			pins = "gpio102";
372			function = "gpio";
373			output-low;
374		};
375
376		int-n {
377			pins = "gpio104";
378			function = "gpio";
379			bias-disable;
380		};
381
382		reset {
383			pins = "gpio105";
384			function = "gpio";
385			bias-disable;
386		};
387	};
388
389	qup0_i2c4_default: qup0-i2c4-default-state {
390		pins = "gpio171", "gpio172";
391		function = "qup4";
392
393		bias-disable;
394		drive-strength = <16>;
395	};
396
397	qup2_i2c5_default: qup2-i2c5-default-state {
398		pins = "gpio81", "gpio82";
399		function = "qup21";
400
401		bias-disable;
402		drive-strength = <16>;
403	};
404
405	tpad_default: tpad-default-state {
406		int-n {
407			pins = "gpio182";
408			function = "gpio";
409			bias-disable;
410		};
411	};
412
413	ts0_default: ts0-default-state {
414		int-n {
415			pins = "gpio175";
416			function = "gpio";
417			bias-pull-up;
418		};
419
420		reset-n {
421			pins = "gpio99";
422			function = "gpio";
423			output-high;
424			drive-strength = <16>;
425		};
426	};
427};
428