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>;
473 pinctrl-names = "default";
474 pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
476 vmmc-supply = <&vreg_l21a_2p95>;
477 vqmmc-supply = <&vreg_l13a_2p95>;
480 cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
484 compatible = "qcom,db845c-sndcard";
485 pinctrl-0 = <&quat_mi2s_active
486 &quat_mi2s_sd0_active
487 &quat_mi2s_sd1_active
488 &quat_mi2s_sd2_active
489 &quat_mi2s_sd3_active>;
490 pinctrl-names = "default";
494 "AMIC1", "MIC BIAS1",
495 "AMIC2", "MIC BIAS2",
496 "DMIC0", "MIC BIAS1",
497 "DMIC1", "MIC BIAS1",
498 "DMIC2", "MIC BIAS3",
499 "DMIC3", "MIC BIAS3",
500 "SpkrLeft IN", "SPK1 OUT",
501 "SpkrRight IN", "SPK2 OUT",
502 "MM_DL1", "MultiMedia1 Playback",
503 "MM_DL2", "MultiMedia2 Playback",
504 "MM_DL4", "MultiMedia4 Playback",
505 "MultiMedia3 Capture", "MM_UL3";
508 link-name = "MultiMedia1";
510 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
515 link-name = "MultiMedia2";
517 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
522 link-name = "MultiMedia3";
524 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
529 link-name = "MultiMedia4";
531 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
536 link-name = "SLIM Playback";
538 sound-dai = <&q6afedai SLIMBUS_0_RX>;
542 sound-dai = <&q6routing>;
546 sound-dai = <&left_spkr>, <&right_spkr>, <&swm 0>, <&wcd9340 0>;
551 link-name = "SLIM Capture";
553 sound-dai = <&q6afedai SLIMBUS_0_TX>;
557 sound-dai = <&q6routing>;
561 sound-dai = <&wcd9340 1>;
567 /* On Low speed expansion */
573 pcie0_default_state: pcie0-default {
584 drive-strength = <2>;
593 drive-strength = <2>;
598 pcie0_pwren_state: pcie0-pwren {
602 drive-strength = <2>;
606 pcie1_default_state: pcie1-default {
611 drive-strength = <16>;
625 drive-strength = <2>;
633 drive-strength = <16>;
639 sdc2_default_state: sdc2-default {
645 * It seems that mmc_test reports errors if drive
646 * strength is not 16 on clk, cmd, and data pins.
648 drive-strength = <16>;
654 drive-strength = <10>;
660 drive-strength = <10>;
664 sdc2_card_det_n: sd-card-det-n {
670 wcd_intr_default: wcd_intr_default {
676 drive-strength = <2>;
689 compatible = "qcom,wcn3990-bt";
691 vddio-supply = <&vreg_s4a_1p8>;
692 vddxo-supply = <&vreg_l7a_1p8>;
693 vddrf-supply = <&vreg_l17a_1p3>;
694 vddch0-supply = <&vreg_l25a_3p3>;
695 max-speed = <3200000>;
709 dr_mode = "peripheral";
715 vdd-supply = <&vreg_l1a_0p875>;
716 vdda-pll-supply = <&vreg_l12a_1p8>;
717 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
719 qcom,imp-res-offset-value = <8>;
720 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
721 qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
722 qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
728 vdda-phy-supply = <&vreg_l26a_1p2>;
729 vdda-pll-supply = <&vreg_l1a_0p875>;
743 vdd-supply = <&vreg_l1a_0p875>;
744 vdda-pll-supply = <&vreg_l12a_1p8>;
745 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
747 qcom,imp-res-offset-value = <8>;
748 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_22_8_MA>;
754 vdda-phy-supply = <&vreg_l26a_1p2>;
755 vdda-pll-supply = <&vreg_l1a_0p875>;
761 reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
763 vcc-supply = <&vreg_l20a_2p95>;
764 vcc-max-microamp = <800000>;
770 vdda-phy-supply = <&vreg_l1a_0p875>;
771 vdda-pll-supply = <&vreg_l26a_1p2>;
775 pinctrl-0 = <&wcd_intr_default>;
776 pinctrl-names = "default";
777 clock-names = "extclk";
778 clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
779 reset-gpios = <&tlmm 64 0>;
780 vdd-buck-supply = <&vreg_s4a_1p8>;
781 vdd-buck-sido-supply = <&vreg_s4a_1p8>;
782 vdd-tx-supply = <&vreg_s4a_1p8>;
783 vdd-rx-supply = <&vreg_s4a_1p8>;
784 vdd-io-supply = <&vreg_s4a_1p8>;
787 left_spkr: wsa8810-left{
788 compatible = "sdw10217201000";
790 powerdown-gpios = <&wcdgpio 2 GPIO_ACTIVE_HIGH>;
791 #thermal-sensor-cells = <0>;
792 sound-name-prefix = "SpkrLeft";
793 #sound-dai-cells = <0>;
796 right_spkr: wsa8810-right{
797 compatible = "sdw10217201000";
798 powerdown-gpios = <&wcdgpio 2 GPIO_ACTIVE_HIGH>;
800 #thermal-sensor-cells = <0>;
801 sound-name-prefix = "SpkrRight";
802 #sound-dai-cells = <0>;
810 vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
811 vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
812 vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
813 vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
815 qcom,snoc-host-cap-8bit-quirk;
818 /* PINCTRL - additions to nodes defined in sdm845.dtsi */
820 drive-strength = <16>;
825 pins = "gpio41", "gpio42", "gpio43", "gpio44";
832 pins = "gpio45", "gpio46", "gpio47", "gpio48";
842 pins = "gpio46", "gpio47";
843 drive-strength = <2>;
856 drive-strength = <2>;
862 drive-strength = <2>;