1 // SPDX-License-Identifier: GPL-2.0
3 * SDM845 OnePlus 6(T) (enchilada / fajita) common device tree source
5 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
10 #include <dt-bindings/input/linux-event-codes.h>
11 #include <dt-bindings/leds/common.h>
12 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
13 #include <dt-bindings/sound/qcom,q6afe.h>
14 #include <dt-bindings/sound/qcom,q6asm.h>
16 #include "sdm845.dtsi"
17 #include "sdm845-wcd9340.dtsi"
18 #include "pm8998.dtsi"
19 #include "pmi8998.dtsi"
21 /delete-node/ &rmtfs_mem;
30 stdout-path = "serial0:115200n8";
34 compatible = "gpio-keys";
35 label = "Hall effect sensor";
37 pinctrl-0 = <&hall_sensor_default>;
38 pinctrl-names = "default";
41 gpios = <&tlmm 124 GPIO_ACTIVE_LOW>;
42 label = "Hall Effect Sensor";
43 linux,input-type = <EV_SW>;
44 linux,code = <SW_LID>;
51 compatible = "gpio-keys";
52 label = "Volume keys";
55 pinctrl-names = "default";
56 pinctrl-0 = <&volume_down_gpio &volume_up_gpio>;
59 label = "Volume down";
60 linux,code = <KEY_VOLUMEDOWN>;
61 gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
62 debounce-interval = <15>;
67 linux,code = <KEY_VOLUMEUP>;
68 gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
69 debounce-interval = <15>;
75 * The rmtfs_mem needs to be guarded due to "XPU limitations"
76 * it is otherwise possible for an allocation adjacent to the
77 * rmtfs_mem region to trigger an XPU violation, causing a crash.
79 rmtfs_lower_guard: rmtfs-lower-guard@f5b00000 {
81 reg = <0 0xf5b00000 0 0x1000>;
84 * The rmtfs memory region in downstream is 'dynamically allocated'
85 * but given the same address every time. Hard code it as this address is
86 * where the modem firmware expects it to be.
88 rmtfs_mem: rmtfs-mem@f5b01000 {
89 compatible = "qcom,rmtfs-mem";
90 reg = <0 0xf5b01000 0 0x200000>;
94 qcom,vmid = <QCOM_SCM_VMID_MSS_MSA>;
96 rmtfs_upper_guard: rmtfs-upper-guard@f5d01000 {
98 reg = <0 0xf5d01000 0 0x1000>;
102 * It seems like reserving the old rmtfs_mem region is also needed to prevent
103 * random crashes which are most likely modem related, more testing needed.
105 removed_region: removed-region@88f00000 {
107 reg = <0 0x88f00000 0 0x1c00000>;
110 ramoops: ramoops@ac300000 {
111 compatible = "ramoops";
112 reg = <0 0xac300000 0 0x400000>;
113 record-size = <0x40000>;
114 console-size = <0x40000>;
115 ftrace-size = <0x40000>;
116 pmsg-size = <0x200000>;
121 vph_pwr: vph-pwr-regulator {
122 compatible = "regulator-fixed";
123 regulator-name = "vph_pwr";
124 regulator-min-microvolt = <3700000>;
125 regulator-max-microvolt = <3700000>;
129 * Apparently RPMh does not provide support for PM8998 S4 because it
130 * is always-on; model it as a fixed regulator.
132 vreg_s4a_1p8: pm8998-smps4 {
133 compatible = "regulator-fixed";
134 regulator-name = "vreg_s4a_1p8";
136 regulator-min-microvolt = <1800000>;
137 regulator-max-microvolt = <1800000>;
142 vin-supply = <&vph_pwr>;
146 * The touchscreen regulator seems to be controlled somehow by a gpio.
147 * Model it as a fixed regulator and keep it on. Without schematics we
148 * don't know how this is actually wired up...
150 ts_1p8_supply: ts-1p8-regulator {
151 compatible = "regulator-fixed";
152 regulator-name = "ts_1p8_supply";
154 regulator-min-microvolt = <1800000>;
155 regulator-max-microvolt = <1800000>;
165 firmware-name = "qcom/sdm845/oneplus6/adsp.mbn";
170 compatible = "qcom,pm8998-rpmh-regulators";
173 vdd-s1-supply = <&vph_pwr>;
174 vdd-s2-supply = <&vph_pwr>;
175 vdd-s3-supply = <&vph_pwr>;
176 vdd-s4-supply = <&vph_pwr>;
177 vdd-s5-supply = <&vph_pwr>;
178 vdd-s6-supply = <&vph_pwr>;
179 vdd-s7-supply = <&vph_pwr>;
180 vdd-s8-supply = <&vph_pwr>;
181 vdd-s9-supply = <&vph_pwr>;
182 vdd-s10-supply = <&vph_pwr>;
183 vdd-s11-supply = <&vph_pwr>;
184 vdd-s12-supply = <&vph_pwr>;
185 vdd-s13-supply = <&vph_pwr>;
186 vdd-l1-l27-supply = <&vreg_s7a_1p025>;
187 vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
188 vdd-l3-l11-supply = <&vreg_s7a_1p025>;
189 vdd-l4-l5-supply = <&vreg_s7a_1p025>;
190 vdd-l6-supply = <&vph_pwr>;
191 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
192 vdd-l9-supply = <&vreg_bob>;
193 vdd-l10-l23-l25-supply = <&vreg_bob>;
194 vdd-l13-l19-l21-supply = <&vreg_bob>;
195 vdd-l16-l28-supply = <&vreg_bob>;
196 vdd-l18-l22-supply = <&vreg_bob>;
197 vdd-l20-l24-supply = <&vreg_bob>;
198 vdd-l26-supply = <&vreg_s3a_1p35>;
199 vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
201 vreg_s3a_1p35: smps3 {
202 regulator-min-microvolt = <1352000>;
203 regulator-max-microvolt = <1352000>;
206 vreg_s5a_2p04: smps5 {
207 regulator-min-microvolt = <1904000>;
208 regulator-max-microvolt = <2040000>;
211 vreg_s7a_1p025: smps7 {
212 regulator-min-microvolt = <900000>;
213 regulator-max-microvolt = <1028000>;
220 vreg_l1a_0p875: ldo1 {
221 regulator-min-microvolt = <880000>;
222 regulator-max-microvolt = <880000>;
223 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
227 regulator-min-microvolt = <1200000>;
228 regulator-max-microvolt = <1200000>;
229 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
234 regulator-min-microvolt = <800000>;
235 regulator-max-microvolt = <800000>;
236 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
240 regulator-min-microvolt = <1800000>;
241 regulator-max-microvolt = <1800000>;
242 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
246 vreg_l12a_1p8: ldo12 {
247 regulator-min-microvolt = <1800000>;
248 regulator-max-microvolt = <1800000>;
249 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
252 vreg_l14a_1p88: ldo14 {
253 regulator-min-microvolt = <1800000>;
254 regulator-max-microvolt = <1800000>;
255 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
259 vreg_l17a_1p3: ldo17 {
260 regulator-min-microvolt = <1304000>;
261 regulator-max-microvolt = <1304000>;
262 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
265 vreg_l20a_2p95: ldo20 {
266 regulator-min-microvolt = <2704000>;
267 regulator-max-microvolt = <2960000>;
268 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
271 vreg_l23a_3p3: ldo23 {
272 regulator-min-microvolt = <3300000>;
273 regulator-max-microvolt = <3312000>;
274 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
278 vreg_l24a_3p075: ldo24 {
279 regulator-min-microvolt = <3088000>;
280 regulator-max-microvolt = <3088000>;
281 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
284 vreg_l25a_3p3: ldo25 {
285 regulator-min-microvolt = <3300000>;
286 regulator-max-microvolt = <3312000>;
287 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
292 vreg_l26a_1p2: ldo26 {
293 regulator-min-microvolt = <1200000>;
294 regulator-max-microvolt = <1200000>;
295 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
298 vreg_l28a_3p0: ldo28 {
299 regulator-min-microvolt = <2856000>;
300 regulator-max-microvolt = <3008000>;
301 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
306 compatible = "qcom,pmi8998-rpmh-regulators";
309 vdd-bob-supply = <&vph_pwr>;
312 regulator-min-microvolt = <3312000>;
313 regulator-max-microvolt = <3600000>;
314 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
315 regulator-allow-bypass;
320 compatible = "qcom,pm8005-rpmh-regulators";
323 vdd-s1-supply = <&vph_pwr>;
324 vdd-s2-supply = <&vph_pwr>;
325 vdd-s3-supply = <&vph_pwr>;
326 vdd-s4-supply = <&vph_pwr>;
328 vreg_s3c_0p6: smps3 {
329 regulator-min-microvolt = <600000>;
330 regulator-max-microvolt = <600000>;
337 firmware-name = "qcom/sdm845/oneplus6/cdsp.mbn";
341 protected-clocks = <GCC_QSPI_CORE_CLK>,
342 <GCC_QSPI_CORE_CLK_SRC>,
343 <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
344 <GCC_LPASS_Q6_AXI_CLK>,
345 <GCC_LPASS_SWAY_CLK>;
356 memory-region = <&gpu_mem>;
357 firmware-name = "qcom/sdm845/oneplus6/a630_zap.mbn";
363 clock-frequency = <100000>;
365 bq27441_fg: bq27441-battery@55 {
366 compatible = "ti,bq27411";
374 clock-frequency = <400000>;
376 synaptics-rmi4-i2c@20 {
377 compatible = "syna,rmi4-i2c";
379 #address-cells = <1>;
381 interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>;
383 pinctrl-names = "default";
384 pinctrl-0 = <&ts_default_pins>;
386 vdd-supply = <&vreg_l28a_3p0>;
387 vio-supply = <&ts_1p8_supply>;
389 syna,reset-delay-ms = <200>;
390 syna,startup-delay-ms = <200>;
394 syna,nosleep-mode = <1>;
397 rmi4_f12: rmi4-f12@12 {
399 touchscreen-x-mm = <68>;
400 touchscreen-y-mm = <144>;
401 syna,sensor-type = <1>;
402 syna,rezero-wait-ms = <200>;
408 qcom,gsi-loader = "self";
409 memory-region = <&ipa_fw_mem>;
410 firmware-name = "qcom/sdm845/oneplus6/ipa_fws.mbn";
420 vdda-supply = <&vdda_mipi_dsi0_1p2>;
423 * Both devices use different panels but all other properties
424 * are common. Compatible line is declared in device dts.
426 display_panel: panel@0 {
431 vddio-supply = <&vreg_l14a_1p88>;
433 reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
435 pinctrl-names = "default";
436 pinctrl-0 = <&panel_reset_pins &panel_te_pin &panel_esd_pin>;
440 remote-endpoint = <&mdss_dsi0_out>;
447 remote-endpoint = <&panel_in>;
448 data-lanes = <0 1 2 3>;
453 vdds-supply = <&vdda_mipi_dsi0_pll>;
459 firmware-name = "qcom/sdm845/oneplus6/mba.mbn", "qcom/sdm845/oneplus6/modem.mbn";
463 volume_down_gpio: pm8998-gpio5-state {
469 qcom,drive-strength = <0>;
473 volume_up_gpio: pm8998-gpio6-state {
479 qcom,drive-strength = <0>;
492 function = LED_FUNCTION_FLASH;
493 color = <LED_COLOR_ID_WHITE>;
495 led-max-microamp = <500000>;
496 flash-max-microamp = <1500000>;
497 flash-max-timeout-us = <1280000>;
501 function = LED_FUNCTION_FLASH;
502 color = <LED_COLOR_ID_YELLOW>;
504 led-max-microamp = <500000>;
505 flash-max-microamp = <1500000>;
506 flash-max-timeout-us = <1280000>;
512 reg = <QUATERNARY_MI2S_RX>;
517 reg = <QUATERNARY_MI2S_TX>;
557 drive-strength = <2>;
562 drive-strength = <2>;
567 drive-strength = <2>;
572 drive-strength = <2>;
577 firmware-name = "qcom/sdm845/oneplus6/slpi.mbn";
582 compatible = "qcom,sdm845-sndcard";
583 pinctrl-0 = <&quat_mi2s_active &quat_mi2s_sd0_active &quat_mi2s_sd1_active>;
584 pinctrl-names = "default";
588 link-name = "MultiMedia1";
590 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
595 link-name = "MultiMedia2";
597 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
602 link-name = "MultiMedia3";
604 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
609 link-name = "MultiMedia4";
611 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
616 link-name = "MultiMedia5";
618 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>;
623 link-name = "MultiMedia6";
625 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>;
629 speaker_playback_dai: speaker-dai-link {
630 link-name = "Speaker Playback";
632 sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
636 sound-dai = <&q6routing>;
641 link-name = "SLIM Playback 1";
643 sound-dai = <&q6afedai SLIMBUS_0_RX>;
647 sound-dai = <&q6routing>;
651 sound-dai = <&wcd9340 0>;
656 link-name = "SLIM Capture 1";
658 sound-dai = <&q6afedai SLIMBUS_0_TX>;
662 sound-dai = <&q6routing>;
666 sound-dai = <&wcd9340 1>;
671 link-name = "SLIM Playback 2";
673 sound-dai = <&q6afedai SLIMBUS_1_RX>;
677 sound-dai = <&q6routing>;
681 sound-dai = <&wcd9340 2>; /* AIF2_PB */
686 link-name = "SLIM Capture 2";
688 sound-dai = <&q6afedai SLIMBUS_1_TX>;
692 sound-dai = <&q6routing>;
696 sound-dai = <&wcd9340 3>; /* AIF2_CAP */
701 link-name = "SLIM Capture 3";
703 sound-dai = <&q6afedai SLIMBUS_2_TX>;
707 sound-dai = <&q6routing>;
711 sound-dai = <&wcd9340 5>; /* AIF3_CAP */
719 pinctrl-0 = <&qup_uart6_4pin>;
722 compatible = "qcom,wcn3990-bt";
725 * This path is relative to the qca/
726 * subdir under lib/firmware.
728 firmware-name = "oneplus6/crnv21.bin";
730 vddio-supply = <&vreg_s4a_1p8>;
731 vddxo-supply = <&vreg_l7a_1p8>;
732 vddrf-supply = <&vreg_l17a_1p3>;
733 vddch0-supply = <&vreg_l25a_3p3>;
734 max-speed = <3200000>;
746 reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
748 vcc-supply = <&vreg_l20a_2p95>;
749 vcc-max-microamp = <600000>;
755 vdda-phy-supply = <&vdda_ufs1_core>;
756 vdda-pll-supply = <&vdda_ufs1_1p2>;
763 * disable USB3 clock requirement as the device only supports
766 qcom,select-utmi-as-pipe-clk;
771 * We don't have the capability to switch modes yet.
773 dr_mode = "peripheral";
775 /* fastest mode for USB 2 */
776 maximum-speed = "high-speed";
778 /* Remove USB3 phy as it's unused on this device. */
779 phys = <&usb_1_hsphy>;
780 phy-names = "usb2-phy";
786 vdd-supply = <&vdda_usb1_ss_core>;
787 vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
788 vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
790 qcom,imp-res-offset-value = <8>;
791 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
792 qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
793 qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
797 gpio-reserved-ranges = <0 4>, <81 4>;
799 hall_sensor_default: hall-sensor-default-state {
802 drive-strength = <2>;
806 tri_state_key_default: tri-state-key-default-state {
807 pins = "gpio40", "gpio42", "gpio26";
809 drive-strength = <2>;
813 ts_default_pins: ts-int-state {
814 pins = "gpio99", "gpio125";
816 drive-strength = <16>;
820 panel_reset_pins: panel-reset-state {
821 pins = "gpio6", "gpio25", "gpio26";
823 drive-strength = <8>;
827 panel_te_pin: panel-te-state {
829 function = "mdp_vsync";
830 drive-strength = <2>;
834 panel_esd_pin: panel-esd-state {
837 drive-strength = <2>;
841 speaker_default: speaker-default-state {
844 drive-strength = <16>;
852 firmware-name = "qcom/sdm845/oneplus6/venus.mbn";
856 pinctrl-0 = <&wcd_intr_default>;
857 pinctrl-names = "default";
858 reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
859 vdd-buck-supply = <&vreg_s4a_1p8>;
860 vdd-buck-sido-supply = <&vreg_s4a_1p8>;
861 vdd-tx-supply = <&vreg_s4a_1p8>;
862 vdd-rx-supply = <&vreg_s4a_1p8>;
863 vdd-io-supply = <&vreg_s4a_1p8>;
868 vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
869 vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
870 vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
871 vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
872 vdd-3.3-ch1-supply = <&vreg_l23a_3p3>;
874 qcom,snoc-host-cap-8bit-quirk;