xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sm6115p-lenovo-j606f.dts (revision 401ab69cff8fa2320a9f8ea4baa114a6da6c952b)
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (c) 2022 Linaro Limited
4 */
5
6/dts-v1/;
7
8#include "sm6115.dtsi"
9#include "pm6125.dtsi"
10
11/ {
12	model = "Lenovo Tab P11";
13	compatible = "lenovo,j606f", "qcom,sm6115p", "qcom,sm6115";
14	chassis-type = "tablet";
15
16	/* required for bootloader to select correct board */
17	qcom,msm-id = <445 0x10000>, <420 0x10000>;
18	qcom,board-id = <34 3>;
19
20	aliases {
21		mmc0 = &sdhc_2;
22	};
23
24	chosen {
25		#address-cells = <2>;
26		#size-cells = <2>;
27		ranges;
28
29		framebuffer0: framebuffer@5c000000 {
30			compatible = "simple-framebuffer";
31			reg = <0 0x5c000000 0 (2000 * 1200 * 4)>;
32			width = <1200>;
33			height = <2000>;
34			stride = <(1200 * 4)>;
35			format = "a8r8g8b8";
36			clocks = <&gcc GCC_DISP_HF_AXI_CLK>;
37		};
38	};
39
40	gpio-keys {
41		compatible = "gpio-keys";
42
43		pinctrl-names = "default";
44		pinctrl-0 = <&vol_up_n>;
45
46		key-volume-up {
47			label = "Volume Up";
48			linux,code = <KEY_VOLUMEUP>;
49			gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>;
50			debounce-interval = <15>;
51			linux,can-disable;
52			wakeup-source;
53		};
54	};
55
56	reserved-memory {
57		ramoops@ffc00000 {
58			compatible = "ramoops";
59			reg = <0x0 0xffc00000 0x0 0x100000>;
60			record-size = <0x1000>;
61			console-size = <0x40000>;
62			ftrace-size = <0x20000>;
63			ecc-size = <16>;
64		};
65	};
66};
67
68&dispcc {
69	/* HACK: disable until a panel driver is ready to retain simplefb */
70	status = "disabled";
71};
72
73&pm6125_gpios {
74	vol_up_n: vol-up-n-state {
75		pins = "gpio5";
76		function = "normal";
77		power-source = <0>;
78		bias-pull-up;
79		input-enable;
80	};
81};
82
83&pon_pwrkey {
84	status = "okay";
85};
86
87&pon_resin {
88	linux,code = <KEY_VOLUMEDOWN>;
89	status = "okay";
90};
91
92&remoteproc_adsp {
93	firmware-name = "qcom/sm6115/LENOVO/J606F/adsp.mbn";
94	status = "okay";
95};
96
97&remoteproc_cdsp {
98	firmware-name = "qcom/sm6115/LENOVO/J606F/cdsp.mbn";
99	status = "okay";
100};
101
102&remoteproc_mpss {
103	firmware-name = "qcom/sm6115/LENOVO/J606F/modem.mbn";
104	status = "okay";
105};
106
107&rpm_requests {
108	regulators-0 {
109		compatible = "qcom,rpm-pm6125-regulators";
110
111		pm6125_s6: s6 {
112			regulator-min-microvolt = <304000>;
113			regulator-max-microvolt = <1456000>;
114		};
115
116		pm6125_s7: s7 {
117			regulator-min-microvolt = <1280000>;
118			regulator-max-microvolt = <2080000>;
119		};
120
121		pm6125_s8: s8 {
122			regulator-min-microvolt = <1064000>;
123			regulator-max-microvolt = <1304000>;
124		};
125
126		pm6125_l1: l1 {
127			regulator-min-microvolt = <952000>;
128			regulator-max-microvolt = <1152000>;
129		};
130
131		pm6125_l4: l4 {
132			regulator-min-microvolt = <488000>;
133			regulator-max-microvolt = <1000000>;
134		};
135
136		pm6125_l5: l5 {
137			regulator-min-microvolt = <1648000>;
138			/* 3.056V capped to 2.96V for SDHCI */
139			regulator-max-microvolt = <2960000>;
140			regulator-allow-set-load;
141			/* Broken hw, this one can't be turned off or SDHCI will break! */
142			regulator-always-on;
143		};
144
145		pm6125_l6: l6 {
146			regulator-min-microvolt = <576000>;
147			regulator-max-microvolt = <656000>;
148		};
149
150		pm6125_l7: l7 {
151			/* 1.2V-1.304V fixed at 1.256V for SDHCI bias */
152			regulator-min-microvolt = <1256000>;
153			regulator-max-microvolt = <1256000>;
154			/*
155			 * TODO: SDHCI seems to also work with this one turned off, however
156			 * there exists a possibility that it may not work with some very
157			 * specific SDCard types, perhaps validating this against a wide
158			 * range of models could rule that out, saving some power would
159			 * certainly be nice..
160			 */
161			regulator-always-on;
162		};
163
164		pm6125_l8: l8 {
165			regulator-min-microvolt = <400000>;
166			regulator-max-microvolt = <728000>;
167		};
168
169		pm6125_l9: l9 {
170			regulator-min-microvolt = <1800000>;
171			regulator-max-microvolt = <2000000>;
172		};
173
174		pm6125_l10: l10 {
175			regulator-min-microvolt = <1704000>;
176			regulator-max-microvolt = <1904000>;
177		};
178
179		pm6125_l11: l11 {
180			regulator-min-microvolt = <1704000>;
181			regulator-max-microvolt = <1952000>;
182		};
183
184		pm6125_l12: l12 {
185			regulator-min-microvolt = <1624000>;
186			regulator-max-microvolt = <1984000>;
187		};
188
189		pm6125_l13: l13 {
190			regulator-min-microvolt = <1504000>;
191			regulator-max-microvolt = <1952000>;
192		};
193
194		pm6125_l14: l14 {
195			regulator-min-microvolt = <1704000>;
196			regulator-max-microvolt = <1904000>;
197		};
198
199		pm6125_l15: l15 {
200			regulator-min-microvolt = <2920000>;
201			regulator-max-microvolt = <3232000>;
202		};
203
204		pm6125_l16: l16 {
205			regulator-min-microvolt = <1704000>;
206			regulator-max-microvolt = <1904000>;
207		};
208
209		pm6125_l17: l17 {
210			regulator-min-microvolt = <1152000>;
211			regulator-max-microvolt = <1384000>;
212		};
213
214		pm6125_l18: l18 {
215			regulator-min-microvolt = <1104000>;
216			regulator-max-microvolt = <1312000>;
217		};
218
219		pm6125_l19: l19 {
220			regulator-min-microvolt = <1624000>;
221			regulator-max-microvolt = <3304000>;
222		};
223
224		pm6125_l20: l20 {
225			regulator-min-microvolt = <1624000>;
226			regulator-max-microvolt = <3304000>;
227		};
228
229		pm6125_l21: l21 {
230			regulator-min-microvolt = <2400000>;
231			regulator-max-microvolt = <3600000>;
232		};
233
234		pm6125_l22: l22 {
235			regulator-min-microvolt = <2952000>;
236			/* 3.304V capped to 2.96V for SDHCI */
237			regulator-max-microvolt = <2960000>;
238			regulator-allow-set-load;
239			/* Broken hw, this one can't be turned off or SDHCI will break! */
240			regulator-always-on;
241		};
242
243		pm6125_l23: l23 {
244			regulator-min-microvolt = <3200000>;
245			regulator-max-microvolt = <3400000>;
246		};
247
248		pm6125_l24: l24 {
249			regulator-min-microvolt = <2704000>;
250			regulator-max-microvolt = <3600000>;
251		};
252	};
253};
254
255&sdhc_2 {
256	cd-gpios = <&tlmm 88 GPIO_ACTIVE_HIGH>;
257	pinctrl-names = "default", "sleep";
258	pinctrl-0 = <&sdc2_state_on &sdc2_gate_pin>;
259	pinctrl-1 = <&sdc2_state_off>;
260	vmmc-supply = <&pm6125_l22>;
261	vqmmc-supply = <&pm6125_l5>;
262	no-sdio;
263	no-mmc;
264	status = "okay";
265};
266
267&sleep_clk {
268	clock-frequency = <32764>;
269};
270
271&tlmm {
272	gpio-reserved-ranges = <14 4>;
273
274	/*
275	 * This is a wholly undocumented pin (other than a single vague "pwr-gpios" reference)
276	 * that needs to be toggled for the SD Card slot to work properly..
277	 */
278	sdc2_gate_pin: sdc2-gate-state {
279		pins = "gpio45";
280		function = "gpio";
281		drive-strength = <2>;
282		bias-pull-up;
283		output-high;
284	};
285};
286
287&ufs_mem_hc {
288	vcc-supply = <&pm6125_l24>;
289	vcc-max-microamp = <600000>;
290	vccq2-supply = <&pm6125_l11>;
291	vccq2-max-microamp = <600000>;
292	status = "okay";
293};
294
295&ufs_mem_phy {
296	vdda-phy-supply = <&pm6125_l4>;
297	vdda-pll-supply = <&pm6125_l12>;
298	vddp-ref-clk-supply = <&pm6125_l18>;
299	status = "okay";
300};
301
302&usb {
303	status = "okay";
304};
305
306&usb_dwc3 {
307	maximum-speed = "high-speed";
308	dr_mode = "peripheral";
309};
310
311&usb_hsphy {
312	vdd-supply = <&pm6125_l4>;
313	vdda-pll-supply = <&pm6125_l12>;
314	vdda-phy-dpdm-supply = <&pm6125_l15>;
315	status = "okay";
316};
317
318&wifi {
319	vdd-0.8-cx-mx-supply = <&pm6125_l8>;
320	vdd-1.8-xo-supply = <&pm6125_l16>;
321	vdd-1.3-rfa-supply = <&pm6125_l17>;
322	vdd-3.3-ch0-supply = <&pm6125_l23>;
323	qcom,ath10k-calibration-variant = "Lenovo_P11";
324	status = "okay";
325};
326
327&xo_board {
328	clock-frequency = <19200000>;
329};
330