1 // SPDX-License-Identifier: BSD-3-Clause
3 * OnePlus 5(T) (cheeseburger / dumpling) common device tree source based on msm8998-mtp.dtsi
5 * Copyright (c) 2021, Jami Kettunen <jamipkettunen@gmail.com>
6 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
13 #include "msm8998.dtsi"
14 #include "pm8998.dtsi"
15 #include "pmi8998.dtsi"
16 #include "pm8005.dtsi"
19 /* Required for bootloader to select correct board */
20 qcom,msm-id = <292 0x20001>; /* 8998 v2.1 */
27 /* Use display framebuffer setup by the UEFI XBL bootloader for simplefb */
28 framebuffer0: framebuffer@9d400000 {
29 compatible = "simple-framebuffer";
30 reg = <0x0 0x9d400000 0x0 0x2400000>;
33 stride = <(1080 * 4)>;
39 /* Bootloader display framebuffer region */
40 cont_splash_mem: memory@9d400000 {
41 reg = <0x0 0x9d400000 0x0 0x2400000>;
45 /* For getting crash logs using Android downstream kernels */
47 compatible = "ramoops";
48 reg = <0x0 0xac000000 0x0 0x200000>;
49 console-size = <0x80000>;
50 pmsg-size = <0x40000>;
51 record-size = <0x8000>;
52 ftrace-size = <0x20000>;
56 * The following memory regions on downstream are "dynamically allocated"
57 * but given the same addresses every time. Hard code them as these addresses
58 * are where the OnePlus signed firmware expects them to be.
60 ipa_fws_region: ipa@f6800000 {
61 compatible = "shared-dma-pool";
62 reg = <0x0 0xf6800000 0x0 0x5000>;
65 zap_shader_region: gpu@f6900000 {
66 compatible = "shared-dma-pool";
67 reg = <0x0 0xf6900000 0x0 0x2000>;
73 compatible = "gpio-keys";
74 label = "Volume buttons";
77 pinctrl-names = "default";
78 pinctrl-0 = <&vol_keys_default>;
81 label = "Volume down";
82 gpios = <&pm8998_gpio 5 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_VOLUMEDOWN>;
84 debounce-interval = <15>;
90 gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_VOLUMEUP>;
92 debounce-interval = <15>;
98 compatible = "gpio-keys";
99 label = "Hall effect sensor";
101 pinctrl-names = "default";
102 pinctrl-0 = <&hall_sensor_default>;
105 label = "Hall Effect Sensor";
106 gpios = <&tlmm 124 GPIO_ACTIVE_LOW>;
107 linux,input-type = <EV_SW>;
108 linux,code = <SW_LID>;
114 vph_pwr: vph-pwr-regulator {
115 compatible = "regulator-fixed";
116 regulator-name = "vph_pwr";
123 * OnePlus' ADSP firmware requires 30 MiB in total, so increase the adsp_mem
124 * region by 4 MiB to account for this while relocating the other now
125 * conflicting memory nodes accordingly.
128 reg = <0x0 0x8b200000 0x0 0x1e00000>;
131 reg = <0x0 0x8d000000 0x0 0x7000000>;
134 reg = <0x0 0x94000000 0x0 0x500000>;
137 reg = <0x0 0x94500000 0x0 0x200000>;
140 reg = <0x0 0x94700000 0x0 0xf00000>;
143 reg = <0x0 0x95600000 0x0 0x10000>;
146 reg = <0x0 0x95610000 0x0 0x5000>;
149 reg = <0x0 0x95615000 0x0 0x100000>;
152 reg = <0x0 0x95715000 0x0 0x100000>;
159 compatible = "syna,rmi4-i2c";
161 #address-cells = <1>;
164 interrupt-parent = <&tlmm>;
165 interrupts = <125 IRQ_TYPE_EDGE_FALLING>;
167 pinctrl-names = "default";
168 pinctrl-0 = <&ts_int_active &ts_reset_active>;
170 vdd-supply = <&vreg_l28_3p0>;
171 vio-supply = <&vreg_l6a_1p8>;
173 syna,reset-delay-ms = <20>;
174 syna,startup-delay-ms = <20>;
178 syna,nosleep-mode = <1>;
181 rmi4_f12: rmi4-f12@12 {
183 syna,rezero-wait-ms = <20>;
184 syna,sensor-type = <1>;
185 touchscreen-x-mm = <68>;
186 touchscreen-y-mm = <122>;
195 compatible = "qcom,wcn3990-bt";
197 vddio-supply = <&vreg_s4a_1p8>;
198 vddxo-supply = <&vreg_l7a_1p8>;
199 vddrf-supply = <&vreg_l17a_1p3>;
200 vddch0-supply = <&vreg_l25a_3p3>;
201 max-speed = <3200000>;
207 /delete-property/ bias-disable;
209 * Configure a pull-up on 46 (RX). This is needed to
210 * avoid garbage data when the TX pin of the Bluetooth
211 * module is in tri-state (module powered off or not
212 * driving the signal yet).
218 /delete-property/ bias-disable;
220 * Configure a pull-down on 47 (CTS) to match the pull
221 * of the Bluetooth module.
233 compatible = "qcom,pm8005-regulators";
235 vdd_s1-supply = <&vph_pwr>;
237 pm8005_s1: s1 { /* VDD_GFX supply */
238 regulator-min-microvolt = <524000>;
239 regulator-max-microvolt = <1100000>;
240 regulator-enable-ramp-delay = <500>;
242 /* hack until we rig up the gpu consumer */
249 vol_keys_default: vol-keys-default {
251 pins = "gpio5", "gpio6";
255 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
263 vdda-pll-supply = <&vreg_l12a_1p8>;
264 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
269 compatible = "qcom,rpm-pm8998-regulators";
271 vdd_s1-supply = <&vph_pwr>;
272 vdd_s2-supply = <&vph_pwr>;
273 vdd_s3-supply = <&vph_pwr>;
274 vdd_s4-supply = <&vph_pwr>;
275 vdd_s5-supply = <&vph_pwr>;
276 vdd_s6-supply = <&vph_pwr>;
277 vdd_s7-supply = <&vph_pwr>;
278 vdd_s8-supply = <&vph_pwr>;
279 vdd_s9-supply = <&vph_pwr>;
280 vdd_s10-supply = <&vph_pwr>;
281 vdd_s11-supply = <&vph_pwr>;
282 vdd_s12-supply = <&vph_pwr>;
283 vdd_s13-supply = <&vph_pwr>;
284 vdd_l1_l27-supply = <&vreg_s7a_1p025>;
285 vdd_l2_l8_l17-supply = <&vreg_s3a_1p35>;
286 vdd_l3_l11-supply = <&vreg_s7a_1p025>;
287 vdd_l4_l5-supply = <&vreg_s7a_1p025>;
288 vdd_l6-supply = <&vreg_s5a_2p04>;
289 vdd_l7_l12_l14_l15-supply = <&vreg_s5a_2p04>;
290 vdd_l9-supply = <&vreg_bob>;
291 vdd_l10_l23_l25-supply = <&vreg_bob>;
292 vdd_l13_l19_l21-supply = <&vreg_bob>;
293 vdd_l16_l28-supply = <&vreg_bob>;
294 vdd_l18_l22-supply = <&vreg_bob>;
295 vdd_l20_l24-supply = <&vreg_bob>;
296 vdd_l26-supply = <&vreg_s3a_1p35>;
297 vdd_lvs1_lvs2-supply = <&vreg_s4a_1p8>;
300 regulator-min-microvolt = <1352000>;
301 regulator-max-microvolt = <1352000>;
304 regulator-min-microvolt = <1800000>;
305 regulator-max-microvolt = <1800000>;
306 regulator-allow-set-load;
309 regulator-min-microvolt = <1904000>;
310 regulator-max-microvolt = <2040000>;
313 regulator-min-microvolt = <900000>;
314 regulator-max-microvolt = <1028000>;
317 regulator-min-microvolt = <880000>;
318 regulator-max-microvolt = <880000>;
321 regulator-min-microvolt = <1200000>;
322 regulator-max-microvolt = <1200000>;
325 regulator-min-microvolt = <1000000>;
326 regulator-max-microvolt = <1000000>;
329 regulator-min-microvolt = <800000>;
330 regulator-max-microvolt = <800000>;
333 regulator-min-microvolt = <1808000>;
334 regulator-max-microvolt = <1808000>;
337 regulator-min-microvolt = <1800000>;
338 regulator-max-microvolt = <1800000>;
341 regulator-min-microvolt = <1200000>;
342 regulator-max-microvolt = <1200000>;
345 regulator-min-microvolt = <1808000>;
346 regulator-max-microvolt = <2960000>;
349 regulator-min-microvolt = <1808000>;
350 regulator-max-microvolt = <2960000>;
353 regulator-min-microvolt = <1000000>;
354 regulator-max-microvolt = <1000000>;
357 regulator-min-microvolt = <1800000>;
358 regulator-max-microvolt = <1800000>;
360 vreg_l13a_2p95: l13 {
361 regulator-min-microvolt = <1808000>;
362 regulator-max-microvolt = <2960000>;
364 vreg_l14a_1p88: l14 {
365 regulator-min-microvolt = <1880000>;
366 regulator-max-microvolt = <1880000>;
369 regulator-min-microvolt = <1800000>;
370 regulator-max-microvolt = <1800000>;
373 regulator-min-microvolt = <2704000>;
374 regulator-max-microvolt = <2704000>;
377 regulator-min-microvolt = <1304000>;
378 regulator-max-microvolt = <1304000>;
381 regulator-min-microvolt = <2704000>;
382 regulator-max-microvolt = <2704000>;
385 regulator-min-microvolt = <3008000>;
386 regulator-max-microvolt = <3008000>;
388 vreg_l20a_2p95: l20 {
389 regulator-min-microvolt = <2960000>;
390 regulator-max-microvolt = <2960000>;
391 regulator-allow-set-load;
393 vreg_l21a_2p95: l21 {
394 regulator-min-microvolt = <2960000>;
395 regulator-max-microvolt = <2960000>;
396 regulator-allow-set-load;
397 regulator-system-load = <800000>;
399 vreg_l22a_2p85: l22 {
400 regulator-min-microvolt = <2864000>;
401 regulator-max-microvolt = <2864000>;
404 regulator-min-microvolt = <3312000>;
405 regulator-max-microvolt = <3312000>;
407 vreg_l24a_3p075: l24 {
408 regulator-min-microvolt = <3088000>;
409 regulator-max-microvolt = <3088000>;
412 regulator-min-microvolt = <3104000>;
413 regulator-max-microvolt = <3312000>;
416 regulator-min-microvolt = <1200000>;
417 regulator-max-microvolt = <1200000>;
418 regulator-allow-set-load;
421 regulator-min-microvolt = <3008000>;
422 regulator-max-microvolt = <3008000>;
424 vreg_lvs1a_1p8: lvs1 { };
425 vreg_lvs2a_1p8: lvs2 { };
429 compatible = "qcom,rpm-pmi8998-regulators";
431 vdd_bob-supply = <&vph_pwr>;
434 regulator-min-microvolt = <3312000>;
435 regulator-max-microvolt = <3600000>;
441 gpio-reserved-ranges = <0 4>, <81 4>;
443 hall_sensor_default: hall-sensor-default {
446 drive-strength = <2>;
451 ts_int_active: ts-int-active {
454 drive-strength = <8>;
458 ts_reset_active: ts-reset-active {
461 drive-strength = <8>;
469 vcc-supply = <&vreg_l20a_2p95>;
470 vccq-supply = <&vreg_l26a_1p2>;
471 vccq2-supply = <&vreg_s4a_1p8>;
472 vcc-max-microamp = <750000>;
473 vccq-max-microamp = <560000>;
474 vccq2-max-microamp = <750000>;
480 vdda-phy-supply = <&vreg_l1a_0p875>;
481 vdda-pll-supply = <&vreg_l2a_1p2>;
482 vddp-ref-clk-supply = <&vreg_l26a_1p2>;
483 vdda-phy-max-microamp = <51400>;
484 vdda-pll-max-microamp = <14600>;
485 vddp-ref-clk-max-microamp = <100>;
486 vddp-ref-clk-always-on;
492 /* Disable USB3 clock requirement as the device only supports USB2 */
493 qcom,select-utmi-as-pipe-clk;
497 /* Drop the unused USB 3 PHY */
499 phy-names = "usb2-phy";
501 /* Fastest mode for USB 2 */
502 maximum-speed = "high-speed";
504 /* Force to peripheral until we can switch modes */
505 dr_mode = "peripheral";
509 /* Leave disabled until MSS is functional */
510 vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
511 vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
512 vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
513 vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;