1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2019, Linaro Ltd.
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
10 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11 #include <dt-bindings/sound/qcom,q6afe.h>
12 #include <dt-bindings/sound/qcom,q6asm.h>
13 #include "sdm845.dtsi"
14 #include "pm8998.dtsi"
15 #include "pmi8998.dtsi"
18 model = "Thundercomm Dragonboard 845c";
19 compatible = "thundercomm,db845c", "qcom,sdm845";
27 stdout-path = "serial0:115200n8";
30 dc12v: dc12v-regulator {
31 compatible = "regulator-fixed";
32 regulator-name = "DC12V";
33 regulator-min-microvolt = <12000000>;
34 regulator-max-microvolt = <12000000>;
39 compatible = "gpio-keys";
42 pinctrl-names = "default";
43 pinctrl-0 = <&vol_up_pin_a>;
47 linux,code = <KEY_VOLUMEUP>;
48 gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
53 compatible = "gpio-leds";
56 label = "green:user4";
57 gpios = <&pm8998_gpio 13 GPIO_ACTIVE_HIGH>;
58 linux,default-trigger = "panic-indicator";
59 default-state = "off";
63 label = "yellow:wlan";
64 gpios = <&pm8998_gpio 9 GPIO_ACTIVE_HIGH>;
65 linux,default-trigger = "phy0tx";
66 default-state = "off";
71 gpios = <&pm8998_gpio 5 GPIO_ACTIVE_HIGH>;
72 linux,default-trigger = "bluetooth-power";
73 default-state = "off";
77 lt9611_1v8: lt9611-vdd18-regulator {
78 compatible = "regulator-fixed";
79 regulator-name = "LT9611_1V8";
81 vin-supply = <&vdc_5v>;
82 regulator-min-microvolt = <1800000>;
83 regulator-max-microvolt = <1800000>;
85 gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
89 lt9611_3v3: lt9611-3v3 {
90 compatible = "regulator-fixed";
91 regulator-name = "LT9611_3V3";
93 vin-supply = <&vdc_3v3>;
94 regulator-min-microvolt = <3300000>;
95 regulator-max-microvolt = <3300000>;
97 // TODO: make it possible to drive same GPIO from two clients
98 // gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
99 // enable-active-high;
102 pcie0_1p05v: pcie-0-1p05v-regulator {
103 compatible = "regulator-fixed";
104 regulator-name = "PCIE0_1.05V";
106 vin-supply = <&vbat>;
107 regulator-min-microvolt = <1050000>;
108 regulator-max-microvolt = <1050000>;
110 // TODO: make it possible to drive same GPIO from two clients
111 // gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
112 // enable-active-high;
115 pcie0_3p3v_dual: vldo-3v3-regulator {
116 compatible = "regulator-fixed";
117 regulator-name = "VLDO_3V3";
119 vin-supply = <&vbat>;
120 regulator-min-microvolt = <3300000>;
121 regulator-max-microvolt = <3300000>;
123 gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
126 pinctrl-names = "default";
127 pinctrl-0 = <&pcie0_pwren_state>;
130 v5p0_hdmiout: v5p0-hdmiout-regulator {
131 compatible = "regulator-fixed";
132 regulator-name = "V5P0_HDMIOUT";
134 vin-supply = <&vdc_5v>;
135 regulator-min-microvolt = <500000>;
136 regulator-max-microvolt = <500000>;
138 // TODO: make it possible to drive same GPIO from two clients
139 // gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
140 // enable-active-high;
143 vbat: vbat-regulator {
144 compatible = "regulator-fixed";
145 regulator-name = "VBAT";
147 vin-supply = <&dc12v>;
148 regulator-min-microvolt = <4200000>;
149 regulator-max-microvolt = <4200000>;
153 vbat_som: vbat-som-regulator {
154 compatible = "regulator-fixed";
155 regulator-name = "VBAT_SOM";
157 vin-supply = <&dc12v>;
158 regulator-min-microvolt = <4200000>;
159 regulator-max-microvolt = <4200000>;
163 vdc_3v3: vdc-3v3-regulator {
164 compatible = "regulator-fixed";
165 regulator-name = "VDC_3V3";
166 vin-supply = <&dc12v>;
167 regulator-min-microvolt = <3300000>;
168 regulator-max-microvolt = <3300000>;
172 vdc_5v: vdc-5v-regulator {
173 compatible = "regulator-fixed";
174 regulator-name = "VDC_5V";
176 vin-supply = <&dc12v>;
177 regulator-min-microvolt = <500000>;
178 regulator-max-microvolt = <500000>;
182 vreg_s4a_1p8: vreg-s4a-1p8 {
183 compatible = "regulator-fixed";
184 regulator-name = "vreg_s4a_1p8";
186 regulator-min-microvolt = <1800000>;
187 regulator-max-microvolt = <1800000>;
191 vph_pwr: vph-pwr-regulator {
192 compatible = "regulator-fixed";
193 regulator-name = "vph_pwr";
195 vin-supply = <&vbat_som>;
202 firmware-name = "qcom/sdm845/adsp.mdt";
206 pm8998-rpmh-regulators {
207 compatible = "qcom,pm8998-rpmh-regulators";
209 vdd-s1-supply = <&vph_pwr>;
210 vdd-s2-supply = <&vph_pwr>;
211 vdd-s3-supply = <&vph_pwr>;
212 vdd-s4-supply = <&vph_pwr>;
213 vdd-s5-supply = <&vph_pwr>;
214 vdd-s6-supply = <&vph_pwr>;
215 vdd-s7-supply = <&vph_pwr>;
216 vdd-s8-supply = <&vph_pwr>;
217 vdd-s9-supply = <&vph_pwr>;
218 vdd-s10-supply = <&vph_pwr>;
219 vdd-s11-supply = <&vph_pwr>;
220 vdd-s12-supply = <&vph_pwr>;
221 vdd-s13-supply = <&vph_pwr>;
222 vdd-l1-l27-supply = <&vreg_s7a_1p025>;
223 vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
224 vdd-l3-l11-supply = <&vreg_s7a_1p025>;
225 vdd-l4-l5-supply = <&vreg_s7a_1p025>;
226 vdd-l6-supply = <&vph_pwr>;
227 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
228 vdd-l9-supply = <&vreg_bob>;
229 vdd-l10-l23-l25-supply = <&vreg_bob>;
230 vdd-l13-l19-l21-supply = <&vreg_bob>;
231 vdd-l16-l28-supply = <&vreg_bob>;
232 vdd-l18-l22-supply = <&vreg_bob>;
233 vdd-l20-l24-supply = <&vreg_bob>;
234 vdd-l26-supply = <&vreg_s3a_1p35>;
235 vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
237 vreg_s3a_1p35: smps3 {
238 regulator-min-microvolt = <1352000>;
239 regulator-max-microvolt = <1352000>;
242 vreg_s5a_2p04: smps5 {
243 regulator-min-microvolt = <1904000>;
244 regulator-max-microvolt = <2040000>;
247 vreg_s7a_1p025: smps7 {
248 regulator-min-microvolt = <900000>;
249 regulator-max-microvolt = <1028000>;
252 vreg_l1a_0p875: ldo1 {
253 regulator-min-microvolt = <880000>;
254 regulator-max-microvolt = <880000>;
255 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
259 regulator-min-microvolt = <800000>;
260 regulator-max-microvolt = <800000>;
261 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
264 vreg_l12a_1p8: ldo12 {
265 regulator-min-microvolt = <1800000>;
266 regulator-max-microvolt = <1800000>;
267 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
271 regulator-min-microvolt = <1800000>;
272 regulator-max-microvolt = <1800000>;
273 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
276 vreg_l13a_2p95: ldo13 {
277 regulator-min-microvolt = <1800000>;
278 regulator-max-microvolt = <2960000>;
279 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
282 vreg_l17a_1p3: ldo17 {
283 regulator-min-microvolt = <1304000>;
284 regulator-max-microvolt = <1304000>;
285 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
288 vreg_l20a_2p95: ldo20 {
289 regulator-min-microvolt = <2960000>;
290 regulator-max-microvolt = <2968000>;
291 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
294 vreg_l21a_2p95: ldo21 {
295 regulator-min-microvolt = <2960000>;
296 regulator-max-microvolt = <2968000>;
297 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
300 vreg_l24a_3p075: ldo24 {
301 regulator-min-microvolt = <3088000>;
302 regulator-max-microvolt = <3088000>;
303 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
306 vreg_l25a_3p3: ldo25 {
307 regulator-min-microvolt = <3300000>;
308 regulator-max-microvolt = <3312000>;
309 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
312 vreg_l26a_1p2: ldo26 {
313 regulator-min-microvolt = <1200000>;
314 regulator-max-microvolt = <1200000>;
315 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
318 vreg_lvs1a_1p8: lvs1 {
319 regulator-min-microvolt = <1800000>;
320 regulator-max-microvolt = <1800000>;
324 vreg_lvs2a_1p8: lvs2 {
325 regulator-min-microvolt = <1800000>;
326 regulator-max-microvolt = <1800000>;
331 pmi8998-rpmh-regulators {
332 compatible = "qcom,pmi8998-rpmh-regulators";
335 vdd-bob-supply = <&vph_pwr>;
338 regulator-min-microvolt = <3312000>;
339 regulator-max-microvolt = <3600000>;
340 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
341 regulator-allow-bypass;
348 firmware-name = "qcom/sdm845/cdsp.mdt";
352 protected-clocks = <GCC_QSPI_CORE_CLK>,
353 <GCC_QSPI_CORE_CLK_SRC>,
354 <GCC_QSPI_CNOC_PERIPH_AHB_CLK>;
359 memory-region = <&gpu_mem>;
360 firmware-name = "qcom/sdm845/a630_zap.mbn";
365 /* On Low speed expansion */
371 /* On Low speed expansion */
378 firmware-name = "qcom/sdm845/mba.mbn", "qcom/sdm845/modem.mbn";
383 perst-gpio = <&tlmm 35 GPIO_ACTIVE_LOW>;
384 enable-gpio = <&tlmm 134 GPIO_ACTIVE_HIGH>;
386 vddpe-3v3-supply = <&pcie0_3p3v_dual>;
388 pinctrl-names = "default";
389 pinctrl-0 = <&pcie0_default_state>;
395 vdda-phy-supply = <&vreg_l1a_0p875>;
396 vdda-pll-supply = <&vreg_l26a_1p2>;
401 perst-gpio = <&tlmm 102 GPIO_ACTIVE_LOW>;
403 pinctrl-names = "default";
404 pinctrl-0 = <&pcie1_default_state>;
410 vdda-phy-supply = <&vreg_l1a_0p875>;
411 vdda-pll-supply = <&vreg_l26a_1p2>;
415 vol_up_pin_a: vol-up-active {
420 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
426 compatible = "qcom,pm8941-resin";
427 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
430 linux,code = <KEY_VOLUMEDOWN>;
434 /* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */
438 qcom,sd-lines = <0 1 2 3>;
476 pinctrl-names = "default";
477 pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
479 vmmc-supply = <&vreg_l21a_2p95>;
480 vqmmc-supply = <&vreg_l13a_2p95>;
483 cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
487 compatible = "qcom,db845c-sndcard";
488 pinctrl-0 = <&quat_mi2s_active
489 &quat_mi2s_sd0_active
490 &quat_mi2s_sd1_active
491 &quat_mi2s_sd2_active
492 &quat_mi2s_sd3_active>;
493 pinctrl-names = "default";
497 "AMIC1", "MIC BIAS1",
498 "AMIC2", "MIC BIAS2",
499 "DMIC0", "MIC BIAS1",
500 "DMIC1", "MIC BIAS1",
501 "DMIC2", "MIC BIAS3",
502 "DMIC3", "MIC BIAS3",
503 "SpkrLeft IN", "SPK1 OUT",
504 "SpkrRight IN", "SPK2 OUT",
505 "MM_DL1", "MultiMedia1 Playback",
506 "MM_DL2", "MultiMedia2 Playback",
507 "MM_DL4", "MultiMedia4 Playback",
508 "MultiMedia3 Capture", "MM_UL3";
511 link-name = "MultiMedia1";
513 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
518 link-name = "MultiMedia2";
520 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
525 link-name = "MultiMedia3";
527 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
532 link-name = "MultiMedia4";
534 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
539 link-name = "SLIM Playback";
541 sound-dai = <&q6afedai SLIMBUS_0_RX>;
545 sound-dai = <&q6routing>;
549 sound-dai = <&left_spkr>, <&right_spkr>, <&swm 0>, <&wcd9340 0>;
554 link-name = "SLIM Capture";
556 sound-dai = <&q6afedai SLIMBUS_0_TX>;
560 sound-dai = <&q6routing>;
564 sound-dai = <&wcd9340 1>;
570 /* On Low speed expansion */
576 pcie0_default_state: pcie0-default {
587 drive-strength = <2>;
596 drive-strength = <2>;
601 pcie0_pwren_state: pcie0-pwren {
605 drive-strength = <2>;
609 pcie1_default_state: pcie1-default {
614 drive-strength = <16>;
628 drive-strength = <2>;
636 drive-strength = <16>;
642 sdc2_default_state: sdc2-default {
648 * It seems that mmc_test reports errors if drive
649 * strength is not 16 on clk, cmd, and data pins.
651 drive-strength = <16>;
657 drive-strength = <10>;
663 drive-strength = <10>;
667 sdc2_card_det_n: sd-card-det-n {
673 wcd_intr_default: wcd_intr_default {
679 drive-strength = <2>;
692 compatible = "qcom,wcn3990-bt";
694 vddio-supply = <&vreg_s4a_1p8>;
695 vddxo-supply = <&vreg_l7a_1p8>;
696 vddrf-supply = <&vreg_l17a_1p3>;
697 vddch0-supply = <&vreg_l25a_3p3>;
698 max-speed = <3200000>;
712 dr_mode = "peripheral";
718 vdd-supply = <&vreg_l1a_0p875>;
719 vdda-pll-supply = <&vreg_l12a_1p8>;
720 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
722 qcom,imp-res-offset-value = <8>;
723 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
724 qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
725 qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
731 vdda-phy-supply = <&vreg_l26a_1p2>;
732 vdda-pll-supply = <&vreg_l1a_0p875>;
746 vdd-supply = <&vreg_l1a_0p875>;
747 vdda-pll-supply = <&vreg_l12a_1p8>;
748 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
750 qcom,imp-res-offset-value = <8>;
751 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_22_8_MA>;
757 vdda-phy-supply = <&vreg_l26a_1p2>;
758 vdda-pll-supply = <&vreg_l1a_0p875>;
764 reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
766 vcc-supply = <&vreg_l20a_2p95>;
767 vcc-max-microamp = <800000>;
773 vdda-phy-supply = <&vreg_l1a_0p875>;
774 vdda-pll-supply = <&vreg_l26a_1p2>;
778 pinctrl-0 = <&wcd_intr_default>;
779 pinctrl-names = "default";
780 clock-names = "extclk";
781 clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
782 reset-gpios = <&tlmm 64 0>;
783 vdd-buck-supply = <&vreg_s4a_1p8>;
784 vdd-buck-sido-supply = <&vreg_s4a_1p8>;
785 vdd-tx-supply = <&vreg_s4a_1p8>;
786 vdd-rx-supply = <&vreg_s4a_1p8>;
787 vdd-io-supply = <&vreg_s4a_1p8>;
790 left_spkr: wsa8810-left{
791 compatible = "sdw10217201000";
793 powerdown-gpios = <&wcdgpio 2 GPIO_ACTIVE_HIGH>;
794 #thermal-sensor-cells = <0>;
795 sound-name-prefix = "SpkrLeft";
796 #sound-dai-cells = <0>;
799 right_spkr: wsa8810-right{
800 compatible = "sdw10217201000";
801 powerdown-gpios = <&wcdgpio 2 GPIO_ACTIVE_HIGH>;
803 #thermal-sensor-cells = <0>;
804 sound-name-prefix = "SpkrRight";
805 #sound-dai-cells = <0>;
813 vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
814 vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
815 vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
816 vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
818 qcom,snoc-host-cap-8bit-quirk;
821 /* PINCTRL - additions to nodes defined in sdm845.dtsi */
823 drive-strength = <16>;
828 pins = "gpio41", "gpio42", "gpio43", "gpio44";
835 pins = "gpio45", "gpio46", "gpio47", "gpio48";
845 pins = "gpio46", "gpio47";
846 drive-strength = <2>;
859 drive-strength = <2>;
865 drive-strength = <2>;