xref: /linux/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi (revision 7115816b609a491e767d8ee63ed2727048f51b5f)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2021, The Linux Foundation. All rights reserved.
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/arm/qcom,ids.h>
9#include <dt-bindings/firmware/qcom,scm.h>
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
12#include "sm7125.dtsi"
13#include "pm6150.dtsi"
14#include "pm6150l.dtsi"
15
16/delete-node/ &ipa_fw_mem;
17/delete-node/ &rmtfs_mem;
18
19/ {
20	chassis-type = "handset";
21
22	qcom,msm-id = <QCOM_ID_SM7125 0>;
23
24	chosen {
25		#address-cells = <2>;
26		#size-cells = <2>;
27		ranges;
28
29		framebuffer@9c000000 {
30			compatible = "simple-framebuffer";
31			reg = <0x0 0x9c000000 0x0 (1080 * 2400 * 4)>;
32			width = <1080>;
33			height = <2400>;
34			stride = <(1080 * 4)>;
35			format = "a8r8g8b8";
36			clocks = <&gcc GCC_DISP_HF_AXI_CLK>;
37		};
38	};
39
40	gpio_keys: gpio-keys {
41		compatible = "gpio-keys";
42
43		key-vol-up {
44			label = "Volume Up";
45			linux,code = <KEY_VOLUMEUP>;
46			gpios = <&pm6150l_gpios 2 GPIO_ACTIVE_LOW>;
47			debounce-interval = <15>;
48			linux,can-disable;
49			wakeup-source;
50		};
51	};
52
53	reserved-memory {
54		mpss_mem: memory@86000000 {
55			reg = <0x0 0x86000000 0x0 0x8400000>;
56			no-map;
57		};
58
59		venus_mem: memory@8ee00000 {
60			reg = <0x0 0x8ee00000 0x0 0x500000>;
61			no-map;
62		};
63
64		cdsp_mem: memory@8f300000 {
65			reg = <0x0 0x8f300000 0x0 0x1e00000>;
66			no-map;
67		};
68
69		adsp_mem: memory@91100000 {
70			reg = <0x0 0x91100000 0x0 0x2800000>;
71			no-map;
72		};
73
74		wlan_mem: memory@93900000 {
75			reg = <0x0 0x93900000 0x0 0x200000>;
76			no-map;
77		};
78
79		ipa_fw_mem: memory@93b00000 {
80			reg = <0x0 0x93b00000 0x0 0x10000>;
81			no-map;
82		};
83
84		gpu_mem: memory@93b15000 {
85			reg = <0x0 0x93b15000 0x0 0x2000>;
86			no-map;
87		};
88
89		cont_splash_mem: memory@9c000000 {
90			reg = <0x0 0x9c000000 0x0 (1080 * 2400 * 4)>;
91			no-map;
92		};
93
94		pstore_mem: ramoops@9d800000 {
95			compatible = "ramoops";
96			reg = <0x0 0x9d800000 0x0 0x400000>;
97			record-size = <0x80000>;
98			pmsg-size = <0x200000>;
99			console-size = <0x100000>;
100		};
101
102		rmtfs_mem: memory@fa601000 {
103			compatible = "qcom,rmtfs-mem";
104			reg = <0x0 0xfa601000 0x0 0x200000>;
105			no-map;
106
107			qcom,client-id = <1>;
108			qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
109		};
110	};
111};
112
113&apps_rsc {
114	regulators-0 {
115		compatible = "qcom,pm6150-rpmh-regulators";
116		qcom,pmic-id = "a";
117
118		vreg_s1a_1p1: smps1 {
119			regulator-min-microvolt = <1128000>;
120			regulator-max-microvolt = <1128000>;
121		};
122
123		vreg_s4a_1p0: smps4 {
124			regulator-min-microvolt = <824000>;
125			regulator-max-microvolt = <1120000>;
126		};
127
128		vreg_s5a_2p0: smps5 {
129			regulator-min-microvolt = <1744000>;
130			regulator-max-microvolt = <2040000>;
131		};
132
133		vreg_l1a_1p2: ldo1 {
134			regulator-min-microvolt = <1178000>;
135			regulator-max-microvolt = <1256000>;
136			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
137		};
138
139		vreg_l2a_1p0: ldo2 {
140			regulator-min-microvolt = <944000>;
141			regulator-max-microvolt = <1056000>;
142			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
143		};
144
145		vreg_l3a_1p0: ldo3 {
146			regulator-min-microvolt = <968000>;
147			regulator-max-microvolt = <1064000>;
148			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
149		};
150
151		vreg_l4a_0p88: ldo4 {
152			regulator-min-microvolt = <824000>;
153			regulator-max-microvolt = <928000>;
154			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
155		};
156
157		vreg_l5a_2p7: ldo5 {
158			regulator-min-microvolt = <2496000>;
159			regulator-max-microvolt = <3000000>;
160			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
161		};
162
163		vreg_l6a_0p6: ldo6 {
164			regulator-min-microvolt = <568000>;
165			regulator-max-microvolt = <648000>;
166			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
167		};
168
169		vreg_l9a_0p664: ldo9 {
170			regulator-min-microvolt = <488000>;
171			regulator-max-microvolt = <800000>;
172			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
173		};
174
175		vreg_l10a_1p8: ldo10 {
176			regulator-min-microvolt = <1800000>;
177			regulator-max-microvolt = <1832000>;
178			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
179		};
180
181		vreg_l11a_1p8: ldo11 {
182			regulator-min-microvolt = <1696000>;
183			regulator-max-microvolt = <1904000>;
184			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
185		};
186
187		vreg_l12a_1p8: ldo12 {
188			regulator-min-microvolt = <1696000>;
189			regulator-max-microvolt = <1952000>;
190			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
191		};
192
193		vreg_l13a_1p8: ldo13 {
194			regulator-min-microvolt = <1696000>;
195			regulator-max-microvolt = <1904000>;
196			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
197		};
198
199		vreg_l14a_1p8: ldo14 {
200			regulator-min-microvolt = <1728000>;
201			regulator-max-microvolt = <1832000>;
202			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
203		};
204
205		vreg_l15a_1p8: ldo15 {
206			regulator-min-microvolt = <1696000>;
207			regulator-max-microvolt = <1904000>;
208			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
209		};
210
211		vreg_l16a_2p7: ldo16 {
212			regulator-min-microvolt = <2496000>;
213			regulator-max-microvolt = <3304000>;
214			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
215		};
216
217		vreg_l17a_3p1: ldo17 {
218			regulator-min-microvolt = <2920000>;
219			regulator-max-microvolt = <3232000>;
220			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
221		};
222
223		vreg_l18a_3p0: ldo18 {
224			regulator-min-microvolt = <1696000>;
225			regulator-max-microvolt = <1904000>;
226			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
227		};
228
229		vreg_l19a_3p0: ldo19 {
230			regulator-min-microvolt = <2696000>;
231			regulator-max-microvolt = <3304000>;
232			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
233		};
234	};
235
236	regulators-1 {
237		compatible = "qcom,pm6150l-rpmh-regulators";
238		qcom,pmic-id = "c";
239
240		vreg_s8c_1p3: smps8 {
241			regulator-min-microvolt = <1120000>;
242			regulator-max-microvolt = <1408000>;
243		};
244
245		vreg_l1c_1p8: ldo1 {
246			regulator-min-microvolt = <1616000>;
247			regulator-max-microvolt = <1984000>;
248			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
249		};
250
251		vreg_l2c_1p3: ldo2 {
252			regulator-min-microvolt = <1168000>;
253			regulator-max-microvolt = <1304000>;
254			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
255		};
256
257		vreg_l3c_1p23: ldo3 {
258			regulator-min-microvolt = <1144000>;
259			regulator-max-microvolt = <1304000>;
260			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
261		};
262
263		vreg_l4c_1p8: ldo4 {
264			regulator-min-microvolt = <1648000>;
265			regulator-max-microvolt = <3304000>;
266			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
267		};
268
269		vreg_l5c_1p8: ldo5 {
270			regulator-min-microvolt = <1648000>;
271			regulator-max-microvolt = <3304000>;
272			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
273		};
274
275		vreg_l6c_3p0: ldo6 {
276			regulator-min-microvolt = <1648000>;
277			regulator-max-microvolt = <3304000>;
278			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
279		};
280
281		vreg_l7c_3p0: ldo7 {
282			regulator-min-microvolt = <3000000>;
283			regulator-max-microvolt = <3312000>;
284			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
285		};
286
287		vreg_l8c_1p8: ldo8 {
288			regulator-min-microvolt = <1800000>;
289			regulator-max-microvolt = <1904000>;
290			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
291		};
292
293		vreg_l9c_2p9: ldo9 {
294			regulator-min-microvolt = <2952000>;
295			regulator-max-microvolt = <3304000>;
296			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
297		};
298
299		vreg_l10c_3p3: ldo10 {
300			regulator-min-microvolt = <3000000>;
301			regulator-max-microvolt = <3400000>;
302			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
303		};
304
305		vreg_l11c_3p3: ldo11 {
306			regulator-min-microvolt = <3000000>;
307			regulator-max-microvolt = <3400000>;
308			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
309		};
310
311		vreg_bob: bob {
312			regulator-min-microvolt = <3008000>;
313			regulator-max-microvolt = <3960000>;
314			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
315		};
316	};
317};
318
319&dispcc {
320	/* HACK: disable until a panel driver is ready to retain simplefb */
321	status = "disabled";
322};
323
324&pm6150_resin {
325	linux,code = <KEY_VOLUMEDOWN>;
326	status = "okay";
327};
328
329&pm6150_rtc {
330	status = "okay";
331};
332
333&sdhc_2 {
334	cd-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
335	pinctrl-names = "default","sleep";
336	pinctrl-0 = <&sdc2_on>;
337	pinctrl-1 = <&sdc2_off>;
338	vmmc-supply = <&vreg_l9c_2p9>;
339	vqmmc-supply = <&vreg_l6c_3p0>;
340	status = "okay";
341};
342
343&tlmm {
344	gpio-reserved-ranges = <0 4>, <34 4>, <59 4>;
345
346	sdc2_on: sdc2-on-state {
347		clk-pins {
348			pins = "sdc2_clk";
349			bias-disable;
350			drive-strength = <16>;
351		};
352
353		cmd-pins {
354			pins = "sdc2_cmd";
355			bias-pull-up;
356			drive-strength = <10>;
357		};
358
359		data-pins {
360			pins = "sdc2_data";
361			bias-pull-up;
362			drive-strength = <10>;
363		};
364
365		sd-cd-pins {
366			pins = "gpio69";
367			function = "gpio";
368			bias-pull-up;
369			drive-strength = <2>;
370		};
371	};
372
373	sdc2_off: sdc2-off-state {
374		clk-pins {
375			pins = "sdc2_clk";
376			bias-disable;
377			drive-strength = <2>;
378		};
379
380		cmd-pins {
381			pins = "sdc2_cmd";
382			bias-pull-up;
383			drive-strength = <2>;
384		};
385
386		data-pins {
387			pins = "sdc2_data";
388			bias-pull-up;
389			drive-strength = <2>;
390		};
391
392		sd-cd-pins {
393			pins = "gpio69";
394			function = "gpio";
395			bias-pull-up;
396			drive-strength = <2>;
397		};
398	};
399};
400
401&usb_1 {
402	qcom,select-utmi-as-pipe-clk;
403	status = "okay";
404};
405
406&usb_1_dwc3 {
407	dr_mode = "peripheral";
408	maximum-speed = "high-speed";
409	status = "okay";
410};
411
412&usb_1_hsphy {
413	vdd-supply = <&vreg_l4a_0p88>;
414	vdda-phy-dpdm-supply = <&vreg_l17a_3p1>;
415	vdda-pll-supply = <&vreg_l11a_1p8>;
416	status = "okay";
417};
418
419&usb_1_qmpphy {
420	vdda-phy-supply = <&vreg_l4a_0p88>;
421	vdda-pll-supply = <&vreg_l3c_1p23>;
422	status = "okay";
423};
424