1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2020, Alexey Minnekhanov <alexey.min@gmail.com>
4 * Copyright (c) 2021, Dang Huynh <danct12@riseup.net>
11 #include "pm660l.dtsi"
12 #include <dt-bindings/input/input.h>
13 #include <dt-bindings/input/gpio-keys.h>
16 model = "Xiaomi Redmi Note 7";
17 compatible = "xiaomi,lavender", "qcom,sdm660";
18 chassis-type = "handset";
21 serial0 = &blsp1_uart2;
29 stdout-path = "serial0:115200n8";
31 framebuffer0: framebuffer@9d400000 {
32 compatible = "simple-framebuffer";
33 reg = <0 0x9d400000 0 (1080 * 2340 * 4)>;
36 stride = <(1080 * 4)>;
41 vph_pwr: vph-pwr-regulator {
42 compatible = "regulator-fixed";
43 regulator-name = "vph_pwr";
44 regulator-min-microvolt = <3700000>;
45 regulator-max-microvolt = <3700000>;
52 compatible = "gpio-keys";
56 gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_VOLUMEUP>;
58 debounce-interval = <15>;
68 compatible = "ramoops";
69 reg = <0x0 0xa0000000 0x0 0x400000>;
70 console-size = <0x20000>;
71 record-size = <0x20000>;
73 pmsg-size = <0x20000>;
76 framebuffer_mem: memory@9d400000 {
77 reg = <0x0 0x9d400000 0x0 0x23ff000>;
83 * Until we hook up type-c detection, we
84 * have to stick with this. But it works.
86 extcon_usb: extcon-usb {
87 compatible = "linux,extcon-usb-gpio";
88 id-gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
103 linux,code = <KEY_VOLUMEDOWN>;
109 vdd-supply = <&vreg_l1b_0p925>;
110 vdda-phy-dpdm-supply = <&vreg_l7b_3p125>;
115 compatible = "qcom,rpm-pm660l-regulators";
117 vdd_s1-supply = <&vph_pwr>;
118 vdd_s2-supply = <&vph_pwr>;
119 vdd_s3_s4-supply = <&vph_pwr>;
120 vdd_s5-supply = <&vph_pwr>;
121 vdd_s6-supply = <&vph_pwr>;
123 vdd_l1_l9_l10-supply = <&vreg_s2b_1p05>;
124 vdd_l2-supply = <&vreg_bob>;
125 vdd_l3_l5_l7_l8-supply = <&vreg_bob>;
126 vdd_l4_l6-supply = <&vreg_bob>;
127 vdd_bob-supply = <&vph_pwr>;
130 regulator-min-microvolt = <1125000>;
131 regulator-max-microvolt = <1125000>;
132 regulator-enable-ramp-delay = <200>;
136 regulator-min-microvolt = <1050000>;
137 regulator-max-microvolt = <1050000>;
138 regulator-enable-ramp-delay = <200>;
143 regulator-min-microvolt = <800000>;
144 regulator-max-microvolt = <925000>;
145 regulator-enable-ramp-delay = <250>;
146 regulator-allow-set-load;
149 /* SDHCI 3.3V signal doesn't seem to be supported. */
151 regulator-min-microvolt = <1648000>;
152 regulator-max-microvolt = <2696000>;
153 regulator-enable-ramp-delay = <250>;
154 regulator-allow-set-load;
158 regulator-min-microvolt = <1700000>;
159 regulator-max-microvolt = <3300000>;
160 regulator-enable-ramp-delay = <250>;
161 regulator-allow-set-load;
165 regulator-min-microvolt = <2944000>;
166 regulator-max-microvolt = <2952000>;
167 regulator-enable-ramp-delay = <250>;
169 regulator-min-microamp = <200>;
170 regulator-max-microamp = <600000>;
171 regulator-system-load = <570000>;
172 regulator-allow-set-load;
176 * Downstream specifies a range of 1721-3600mV,
177 * but the only assigned consumers are SDHCI2 VMMC
178 * and Coresight QPDI that both request pinned 2.95V.
179 * Tighten the range to 1.8-3.328 (closest to 3.3) to
180 * make the mmc driver happy.
183 regulator-min-microvolt = <1800000>;
184 regulator-max-microvolt = <3328000>;
185 regulator-enable-ramp-delay = <250>;
186 regulator-allow-set-load;
187 regulator-system-load = <800000>;
191 regulator-min-microvolt = <2700000>;
192 regulator-max-microvolt = <3125000>;
193 regulator-enable-ramp-delay = <250>;
197 regulator-min-microvolt = <3200000>;
198 regulator-max-microvolt = <3400000>;
199 regulator-enable-ramp-delay = <250>;
203 regulator-min-microvolt = <3300000>;
204 regulator-max-microvolt = <3600000>;
205 regulator-enable-ramp-delay = <500>;
210 compatible = "qcom,rpm-pm660-regulators";
212 vdd_s1-supply = <&vph_pwr>;
213 vdd_s2-supply = <&vph_pwr>;
214 vdd_s3-supply = <&vph_pwr>;
215 vdd_s4-supply = <&vph_pwr>;
216 vdd_s5-supply = <&vph_pwr>;
217 vdd_s6-supply = <&vph_pwr>;
219 vdd_l1_l6_l7-supply = <&vreg_s5a_1p35>;
220 vdd_l2_l3-supply = <&vreg_s2b_1p05>;
221 vdd_l5-supply = <&vreg_s2b_1p05>;
222 vdd_l8_l9_l10_l11_l12_l13_l14-supply = <&vreg_s4a_2p04>;
223 vdd_l15_l16_l17_l18_l19-supply = <&vreg_bob>;
226 * S1A (FTAPC0), S2A (FTAPC1), S3A (HFAPC1) are managed
227 * by the Core Power Reduction hardened (CPRh) and the
228 * Operating State Manager (OSM) HW automatically.
232 regulator-min-microvolt = <1805000>;
233 regulator-max-microvolt = <2040000>;
234 regulator-enable-ramp-delay = <200>;
239 regulator-min-microvolt = <1224000>;
240 regulator-max-microvolt = <1350000>;
241 regulator-enable-ramp-delay = <200>;
245 regulator-min-microvolt = <504000>;
246 regulator-max-microvolt = <992000>;
247 regulator-enable-ramp-delay = <150>;
252 regulator-min-microvolt = <1150000>;
253 regulator-max-microvolt = <1250000>;
254 regulator-enable-ramp-delay = <250>;
255 regulator-allow-set-load;
259 regulator-min-microvolt = <950000>;
260 regulator-max-microvolt = <1010000>;
261 regulator-enable-ramp-delay = <250>;
265 regulator-min-microvolt = <950000>;
266 regulator-max-microvolt = <1010000>;
267 regulator-enable-ramp-delay = <250>;
271 regulator-min-microvolt = <525000>;
272 regulator-max-microvolt = <950000>;
273 regulator-enable-ramp-delay = <250>;
277 regulator-min-microvolt = <1200000>;
278 regulator-max-microvolt = <1370000>;
279 regulator-allow-set-load;
280 regulator-enable-ramp-delay = <250>;
284 regulator-min-microvolt = <1200000>;
285 regulator-max-microvolt = <1200000>;
286 regulator-enable-ramp-delay = <250>;
290 regulator-min-microvolt = <1750000>;
291 regulator-max-microvolt = <1800000>;
292 regulator-enable-ramp-delay = <250>;
293 regulator-system-load = <325000>;
294 regulator-allow-set-load;
298 regulator-min-microvolt = <1750000>;
299 regulator-max-microvolt = <1900000>;
300 regulator-enable-ramp-delay = <250>;
301 regulator-allow-set-load;
305 regulator-min-microvolt = <1780000>;
306 regulator-max-microvolt = <1950000>;
307 regulator-enable-ramp-delay = <250>;
308 regulator-allow-set-load;
312 regulator-min-microvolt = <1780000>;
313 regulator-max-microvolt = <1950000>;
314 regulator-enable-ramp-delay = <250>;
318 regulator-min-microvolt = <1780000>;
319 regulator-max-microvolt = <1950000>;
320 regulator-enable-ramp-delay = <250>;
323 /* This gives power to the LPDDR4: never turn it off! */
325 regulator-min-microvolt = <1780000>;
326 regulator-max-microvolt = <1950000>;
327 regulator-enable-ramp-delay = <250>;
333 regulator-min-microvolt = <1710000>;
334 regulator-max-microvolt = <1900000>;
335 regulator-enable-ramp-delay = <250>;
339 regulator-min-microvolt = <1650000>;
340 regulator-max-microvolt = <2950000>;
341 regulator-enable-ramp-delay = <250>;
345 regulator-min-microvolt = <2800000>;
346 regulator-max-microvolt = <2800000>;
347 regulator-enable-ramp-delay = <250>;
352 regulator-min-microvolt = <1648000>;
353 regulator-max-microvolt = <2952000>;
354 regulator-enable-ramp-delay = <250>;
358 regulator-min-microvolt = <3312000>;
359 regulator-max-microvolt = <3400000>;
360 regulator-enable-ramp-delay = <250>;
361 regulator-allow-set-load;
369 qcom,switching-freq = <800>;
370 qcom,current-limit-microamp = <20000>;
371 qcom,num-strings = <2>;
379 drive-strength = <2>;
388 drive-strength = <2>;
398 mmc-hs400-enhanced-strobe;
400 vmmc-supply = <&vreg_l4b_2p95>;
401 vqmmc-supply = <&vreg_l8a_1p8>;
407 vmmc-supply = <&vreg_l5b_2p95>;
408 vqmmc-supply = <&vreg_l2b_2p95>;
412 gpio-reserved-ranges = <8 4>;
420 dr_mode = "peripheral";
421 extcon = <&extcon_usb>;