0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003 * Copyright (c) 2019, Linaro Ltd.
0004 */
0005
0006 /dts-v1/;
0007
0008 #include <dt-bindings/leds/common.h>
0009 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
0010 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
0011 #include <dt-bindings/sound/qcom,q6afe.h>
0012 #include <dt-bindings/sound/qcom,q6asm.h>
0013 #include "sdm845.dtsi"
0014 #include "pm8998.dtsi"
0015 #include "pmi8998.dtsi"
0016
0017 / {
0018 model = "Thundercomm Dragonboard 845c";
0019 compatible = "thundercomm,db845c", "qcom,sdm845";
0020 qcom,msm-id = <341 0x20001>;
0021 qcom,board-id = <8 0>;
0022
0023 aliases {
0024 serial0 = &uart9;
0025 hsuart0 = &uart6;
0026 };
0027
0028 chosen {
0029 stdout-path = "serial0:115200n8";
0030 };
0031
0032 /* Fixed crystal oscillator dedicated to MCP2517FD */
0033 clk40M: can-clock {
0034 compatible = "fixed-clock";
0035 #clock-cells = <0>;
0036 clock-frequency = <40000000>;
0037 };
0038
0039 dc12v: dc12v-regulator {
0040 compatible = "regulator-fixed";
0041 regulator-name = "DC12V";
0042 regulator-min-microvolt = <12000000>;
0043 regulator-max-microvolt = <12000000>;
0044 regulator-always-on;
0045 };
0046
0047 gpio-keys {
0048 compatible = "gpio-keys";
0049 autorepeat;
0050
0051 pinctrl-names = "default";
0052 pinctrl-0 = <&vol_up_pin_a>;
0053
0054 key-vol-up {
0055 label = "Volume Up";
0056 linux,code = <KEY_VOLUMEUP>;
0057 gpios = <&pm8998_gpio 6 GPIO_ACTIVE_LOW>;
0058 };
0059 };
0060
0061 leds {
0062 compatible = "gpio-leds";
0063
0064 led-0 {
0065 label = "green:user4";
0066 function = LED_FUNCTION_INDICATOR;
0067 color = <LED_COLOR_ID_GREEN>;
0068 gpios = <&pm8998_gpio 13 GPIO_ACTIVE_HIGH>;
0069 linux,default-trigger = "panic-indicator";
0070 default-state = "off";
0071 };
0072
0073 led-1 {
0074 label = "yellow:wlan";
0075 function = LED_FUNCTION_WLAN;
0076 color = <LED_COLOR_ID_YELLOW>;
0077 gpios = <&pm8998_gpio 9 GPIO_ACTIVE_HIGH>;
0078 linux,default-trigger = "phy0tx";
0079 default-state = "off";
0080 };
0081
0082 led-2 {
0083 label = "blue:bt";
0084 function = LED_FUNCTION_BLUETOOTH;
0085 color = <LED_COLOR_ID_BLUE>;
0086 gpios = <&pm8998_gpio 5 GPIO_ACTIVE_HIGH>;
0087 linux,default-trigger = "bluetooth-power";
0088 default-state = "off";
0089 };
0090 };
0091
0092 hdmi-out {
0093 compatible = "hdmi-connector";
0094 type = "a";
0095
0096 port {
0097 hdmi_con: endpoint {
0098 remote-endpoint = <<9611_out>;
0099 };
0100 };
0101 };
0102
0103 lt9611_1v8: lt9611-vdd18-regulator {
0104 compatible = "regulator-fixed";
0105 regulator-name = "LT9611_1V8";
0106
0107 vin-supply = <&vdc_5v>;
0108 regulator-min-microvolt = <1800000>;
0109 regulator-max-microvolt = <1800000>;
0110
0111 gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
0112 enable-active-high;
0113 };
0114
0115 lt9611_3v3: lt9611-3v3 {
0116 compatible = "regulator-fixed";
0117 regulator-name = "LT9611_3V3";
0118
0119 vin-supply = <&vdc_3v3>;
0120 regulator-min-microvolt = <3300000>;
0121 regulator-max-microvolt = <3300000>;
0122
0123 // TODO: make it possible to drive same GPIO from two clients
0124 // gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
0125 // enable-active-high;
0126 };
0127
0128 pcie0_1p05v: pcie-0-1p05v-regulator {
0129 compatible = "regulator-fixed";
0130 regulator-name = "PCIE0_1.05V";
0131
0132 vin-supply = <&vbat>;
0133 regulator-min-microvolt = <1050000>;
0134 regulator-max-microvolt = <1050000>;
0135
0136 // TODO: make it possible to drive same GPIO from two clients
0137 // gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
0138 // enable-active-high;
0139 };
0140
0141 cam0_dvdd_1v2: reg_cam0_dvdd_1v2 {
0142 compatible = "regulator-fixed";
0143 regulator-name = "CAM0_DVDD_1V2";
0144 regulator-min-microvolt = <1200000>;
0145 regulator-max-microvolt = <1200000>;
0146 enable-active-high;
0147 gpio = <&pm8998_gpio 12 GPIO_ACTIVE_HIGH>;
0148 pinctrl-names = "default";
0149 pinctrl-0 = <&cam0_dvdd_1v2_en_default>;
0150 vin-supply = <&vbat>;
0151 };
0152
0153 cam0_avdd_2v8: reg_cam0_avdd_2v8 {
0154 compatible = "regulator-fixed";
0155 regulator-name = "CAM0_AVDD_2V8";
0156 regulator-min-microvolt = <2800000>;
0157 regulator-max-microvolt = <2800000>;
0158 enable-active-high;
0159 gpio = <&pm8998_gpio 10 GPIO_ACTIVE_HIGH>;
0160 pinctrl-names = "default";
0161 pinctrl-0 = <&cam0_avdd_2v8_en_default>;
0162 vin-supply = <&vbat>;
0163 };
0164
0165 /* This regulator is enabled when the VREG_LVS1A_1P8 trace is enabled */
0166 cam3_avdd_2v8: reg_cam3_avdd_2v8 {
0167 compatible = "regulator-fixed";
0168 regulator-name = "CAM3_AVDD_2V8";
0169 regulator-min-microvolt = <2800000>;
0170 regulator-max-microvolt = <2800000>;
0171 regulator-always-on;
0172 vin-supply = <&vbat>;
0173 };
0174
0175 pcie0_3p3v_dual: vldo-3v3-regulator {
0176 compatible = "regulator-fixed";
0177 regulator-name = "VLDO_3V3";
0178
0179 vin-supply = <&vbat>;
0180 regulator-min-microvolt = <3300000>;
0181 regulator-max-microvolt = <3300000>;
0182
0183 gpio = <&tlmm 90 GPIO_ACTIVE_HIGH>;
0184 enable-active-high;
0185
0186 pinctrl-names = "default";
0187 pinctrl-0 = <&pcie0_pwren_state>;
0188 };
0189
0190 v5p0_hdmiout: v5p0-hdmiout-regulator {
0191 compatible = "regulator-fixed";
0192 regulator-name = "V5P0_HDMIOUT";
0193
0194 vin-supply = <&vdc_5v>;
0195 regulator-min-microvolt = <500000>;
0196 regulator-max-microvolt = <500000>;
0197
0198 // TODO: make it possible to drive same GPIO from two clients
0199 // gpio = <&tlmm 89 GPIO_ACTIVE_HIGH>;
0200 // enable-active-high;
0201 };
0202
0203 vbat: vbat-regulator {
0204 compatible = "regulator-fixed";
0205 regulator-name = "VBAT";
0206
0207 vin-supply = <&dc12v>;
0208 regulator-min-microvolt = <4200000>;
0209 regulator-max-microvolt = <4200000>;
0210 regulator-always-on;
0211 };
0212
0213 vbat_som: vbat-som-regulator {
0214 compatible = "regulator-fixed";
0215 regulator-name = "VBAT_SOM";
0216
0217 vin-supply = <&dc12v>;
0218 regulator-min-microvolt = <4200000>;
0219 regulator-max-microvolt = <4200000>;
0220 regulator-always-on;
0221 };
0222
0223 vdc_3v3: vdc-3v3-regulator {
0224 compatible = "regulator-fixed";
0225 regulator-name = "VDC_3V3";
0226 vin-supply = <&dc12v>;
0227 regulator-min-microvolt = <3300000>;
0228 regulator-max-microvolt = <3300000>;
0229 regulator-always-on;
0230 };
0231
0232 vdc_5v: vdc-5v-regulator {
0233 compatible = "regulator-fixed";
0234 regulator-name = "VDC_5V";
0235
0236 vin-supply = <&dc12v>;
0237 regulator-min-microvolt = <500000>;
0238 regulator-max-microvolt = <500000>;
0239 regulator-always-on;
0240 };
0241
0242 vreg_s4a_1p8: vreg-s4a-1p8 {
0243 compatible = "regulator-fixed";
0244 regulator-name = "vreg_s4a_1p8";
0245
0246 regulator-min-microvolt = <1800000>;
0247 regulator-max-microvolt = <1800000>;
0248 regulator-always-on;
0249 };
0250
0251 vph_pwr: vph-pwr-regulator {
0252 compatible = "regulator-fixed";
0253 regulator-name = "vph_pwr";
0254
0255 vin-supply = <&vbat_som>;
0256 };
0257 };
0258
0259 &adsp_pas {
0260 status = "okay";
0261
0262 firmware-name = "qcom/sdm845/adsp.mbn";
0263 };
0264
0265 &apps_rsc {
0266 pm8998-rpmh-regulators {
0267 compatible = "qcom,pm8998-rpmh-regulators";
0268 qcom,pmic-id = "a";
0269 vdd-s1-supply = <&vph_pwr>;
0270 vdd-s2-supply = <&vph_pwr>;
0271 vdd-s3-supply = <&vph_pwr>;
0272 vdd-s4-supply = <&vph_pwr>;
0273 vdd-s5-supply = <&vph_pwr>;
0274 vdd-s6-supply = <&vph_pwr>;
0275 vdd-s7-supply = <&vph_pwr>;
0276 vdd-s8-supply = <&vph_pwr>;
0277 vdd-s9-supply = <&vph_pwr>;
0278 vdd-s10-supply = <&vph_pwr>;
0279 vdd-s11-supply = <&vph_pwr>;
0280 vdd-s12-supply = <&vph_pwr>;
0281 vdd-s13-supply = <&vph_pwr>;
0282 vdd-l1-l27-supply = <&vreg_s7a_1p025>;
0283 vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
0284 vdd-l3-l11-supply = <&vreg_s7a_1p025>;
0285 vdd-l4-l5-supply = <&vreg_s7a_1p025>;
0286 vdd-l6-supply = <&vph_pwr>;
0287 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
0288 vdd-l9-supply = <&vreg_bob>;
0289 vdd-l10-l23-l25-supply = <&vreg_bob>;
0290 vdd-l13-l19-l21-supply = <&vreg_bob>;
0291 vdd-l16-l28-supply = <&vreg_bob>;
0292 vdd-l18-l22-supply = <&vreg_bob>;
0293 vdd-l20-l24-supply = <&vreg_bob>;
0294 vdd-l26-supply = <&vreg_s3a_1p35>;
0295 vin-lvs-1-2-supply = <&vreg_s4a_1p8>;
0296
0297 vreg_s3a_1p35: smps3 {
0298 regulator-min-microvolt = <1352000>;
0299 regulator-max-microvolt = <1352000>;
0300 };
0301
0302 vreg_s5a_2p04: smps5 {
0303 regulator-min-microvolt = <1904000>;
0304 regulator-max-microvolt = <2040000>;
0305 };
0306
0307 vreg_s7a_1p025: smps7 {
0308 regulator-min-microvolt = <900000>;
0309 regulator-max-microvolt = <1028000>;
0310 };
0311
0312 vreg_l1a_0p875: ldo1 {
0313 regulator-min-microvolt = <880000>;
0314 regulator-max-microvolt = <880000>;
0315 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0316 };
0317
0318 vreg_l5a_0p8: ldo5 {
0319 regulator-min-microvolt = <800000>;
0320 regulator-max-microvolt = <800000>;
0321 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0322 };
0323
0324 vreg_l12a_1p8: ldo12 {
0325 regulator-min-microvolt = <1800000>;
0326 regulator-max-microvolt = <1800000>;
0327 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0328 };
0329
0330 vreg_l7a_1p8: ldo7 {
0331 regulator-min-microvolt = <1800000>;
0332 regulator-max-microvolt = <1800000>;
0333 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0334 };
0335
0336 vreg_l13a_2p95: ldo13 {
0337 regulator-min-microvolt = <1800000>;
0338 regulator-max-microvolt = <2960000>;
0339 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0340 };
0341
0342 vreg_l17a_1p3: ldo17 {
0343 regulator-min-microvolt = <1304000>;
0344 regulator-max-microvolt = <1304000>;
0345 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0346 };
0347
0348 vreg_l20a_2p95: ldo20 {
0349 regulator-min-microvolt = <2960000>;
0350 regulator-max-microvolt = <2968000>;
0351 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0352 };
0353
0354 vreg_l21a_2p95: ldo21 {
0355 regulator-min-microvolt = <2960000>;
0356 regulator-max-microvolt = <2968000>;
0357 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0358 };
0359
0360 vreg_l24a_3p075: ldo24 {
0361 regulator-min-microvolt = <3088000>;
0362 regulator-max-microvolt = <3088000>;
0363 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0364 };
0365
0366 vreg_l25a_3p3: ldo25 {
0367 regulator-min-microvolt = <3300000>;
0368 regulator-max-microvolt = <3312000>;
0369 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0370 };
0371
0372 vreg_l26a_1p2: ldo26 {
0373 regulator-min-microvolt = <1200000>;
0374 regulator-max-microvolt = <1200000>;
0375 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0376 };
0377
0378 vreg_lvs1a_1p8: lvs1 {
0379 regulator-min-microvolt = <1800000>;
0380 regulator-max-microvolt = <1800000>;
0381 regulator-always-on;
0382 };
0383
0384 vreg_lvs2a_1p8: lvs2 {
0385 regulator-min-microvolt = <1800000>;
0386 regulator-max-microvolt = <1800000>;
0387 regulator-always-on;
0388 };
0389 };
0390
0391 pmi8998-rpmh-regulators {
0392 compatible = "qcom,pmi8998-rpmh-regulators";
0393 qcom,pmic-id = "b";
0394
0395 vdd-bob-supply = <&vph_pwr>;
0396
0397 vreg_bob: bob {
0398 regulator-min-microvolt = <3312000>;
0399 regulator-max-microvolt = <3600000>;
0400 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
0401 regulator-allow-bypass;
0402 };
0403 };
0404 };
0405
0406 &cdsp_pas {
0407 status = "okay";
0408 firmware-name = "qcom/sdm845/cdsp.mbn";
0409 };
0410
0411 &dsi0 {
0412 status = "okay";
0413 vdda-supply = <&vreg_l26a_1p2>;
0414
0415 ports {
0416 port@1 {
0417 endpoint {
0418 remote-endpoint = <<9611_a>;
0419 data-lanes = <0 1 2 3>;
0420 };
0421 };
0422 };
0423 };
0424
0425 &dsi0_phy {
0426 status = "okay";
0427 vdds-supply = <&vreg_l1a_0p875>;
0428 };
0429
0430 &gcc {
0431 protected-clocks = <GCC_QSPI_CORE_CLK>,
0432 <GCC_QSPI_CORE_CLK_SRC>,
0433 <GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
0434 <GCC_LPASS_Q6_AXI_CLK>,
0435 <GCC_LPASS_SWAY_CLK>;
0436 };
0437
0438 &gmu {
0439 status = "okay";
0440 };
0441
0442 &gpi_dma0 {
0443 status = "okay";
0444 };
0445
0446 &gpi_dma1 {
0447 status = "okay";
0448 };
0449
0450 &gpu {
0451 status = "okay";
0452 zap-shader {
0453 memory-region = <&gpu_mem>;
0454 firmware-name = "qcom/sdm845/a630_zap.mbn";
0455 };
0456 };
0457
0458 &i2c10 {
0459 status = "okay";
0460 clock-frequency = <400000>;
0461
0462 lt9611_codec: hdmi-bridge@3b {
0463 compatible = "lontium,lt9611";
0464 reg = <0x3b>;
0465 #sound-dai-cells = <1>;
0466
0467 interrupts-extended = <&tlmm 84 IRQ_TYPE_EDGE_FALLING>;
0468
0469 reset-gpios = <&tlmm 128 GPIO_ACTIVE_HIGH>;
0470
0471 vdd-supply = <<9611_1v8>;
0472 vcc-supply = <<9611_3v3>;
0473
0474 pinctrl-names = "default";
0475 pinctrl-0 = <<9611_irq_pin>, <&dsi_sw_sel>;
0476
0477 ports {
0478 #address-cells = <1>;
0479 #size-cells = <0>;
0480
0481 port@0 {
0482 reg = <0>;
0483
0484 lt9611_a: endpoint {
0485 remote-endpoint = <&dsi0_out>;
0486 };
0487 };
0488
0489 port@2 {
0490 reg = <2>;
0491
0492 lt9611_out: endpoint {
0493 remote-endpoint = <&hdmi_con>;
0494 };
0495 };
0496 };
0497 };
0498 };
0499
0500 &i2c11 {
0501 /* On Low speed expansion */
0502 clock-frequency = <100000>;
0503 label = "LS-I2C1";
0504 status = "okay";
0505 };
0506
0507 &i2c14 {
0508 /* On Low speed expansion */
0509 clock-frequency = <100000>;
0510 label = "LS-I2C0";
0511 status = "okay";
0512 };
0513
0514 &mdss {
0515 status = "okay";
0516 };
0517
0518 &mss_pil {
0519 status = "okay";
0520 firmware-name = "qcom/sdm845/mba.mbn", "qcom/sdm845/modem.mbn";
0521 };
0522
0523 &pcie0 {
0524 status = "okay";
0525 perst-gpio = <&tlmm 35 GPIO_ACTIVE_LOW>;
0526 enable-gpio = <&tlmm 134 GPIO_ACTIVE_HIGH>;
0527
0528 vddpe-3v3-supply = <&pcie0_3p3v_dual>;
0529
0530 pinctrl-names = "default";
0531 pinctrl-0 = <&pcie0_default_state>;
0532 };
0533
0534 &pcie0_phy {
0535 status = "okay";
0536
0537 vdda-phy-supply = <&vreg_l1a_0p875>;
0538 vdda-pll-supply = <&vreg_l26a_1p2>;
0539 };
0540
0541 &pcie1 {
0542 status = "okay";
0543 perst-gpio = <&tlmm 102 GPIO_ACTIVE_LOW>;
0544
0545 pinctrl-names = "default";
0546 pinctrl-0 = <&pcie1_default_state>;
0547 };
0548
0549 &pcie1_phy {
0550 status = "okay";
0551
0552 vdda-phy-supply = <&vreg_l1a_0p875>;
0553 vdda-pll-supply = <&vreg_l26a_1p2>;
0554 };
0555
0556 &pm8998_gpio {
0557 gpio-line-names =
0558 "NC",
0559 "NC",
0560 "WLAN_SW_CTRL",
0561 "NC",
0562 "PM_GPIO5_BLUE_BT_LED",
0563 "VOL_UP_N",
0564 "NC",
0565 "ADC_IN1",
0566 "PM_GPIO9_YEL_WIFI_LED",
0567 "CAM0_AVDD_EN",
0568 "NC",
0569 "CAM0_DVDD_EN",
0570 "PM_GPIO13_GREEN_U4_LED",
0571 "DIV_CLK2",
0572 "NC",
0573 "NC",
0574 "NC",
0575 "SMB_STAT",
0576 "NC",
0577 "NC",
0578 "ADC_IN2",
0579 "OPTION1",
0580 "WCSS_PWR_REQ",
0581 "PM845_GPIO24",
0582 "OPTION2",
0583 "PM845_SLB";
0584
0585 cam0_dvdd_1v2_en_default: cam0-dvdd-1v2-en-state {
0586 pins = "gpio12";
0587 function = "normal";
0588
0589 bias-pull-up;
0590 drive-push-pull;
0591 qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
0592 };
0593
0594 cam0_avdd_2v8_en_default: cam0-avdd-2v8-en-state {
0595 pins = "gpio10";
0596 function = "normal";
0597
0598 bias-pull-up;
0599 drive-push-pull;
0600 qcom,drive-strength = <PMIC_GPIO_STRENGTH_HIGH>;
0601 };
0602
0603 vol_up_pin_a: vol-up-active-state {
0604 pins = "gpio6";
0605 function = "normal";
0606 input-enable;
0607 bias-pull-up;
0608 qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
0609 };
0610 };
0611
0612 &pm8998_pon {
0613 resin {
0614 compatible = "qcom,pm8941-resin";
0615 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
0616 debounce = <15625>;
0617 bias-pull-up;
0618 linux,code = <KEY_VOLUMEDOWN>;
0619 };
0620 };
0621
0622 &pmi8998_lpg {
0623 status = "okay";
0624
0625 qcom,power-source = <1>;
0626
0627 led@3 {
0628 reg = <3>;
0629 color = <LED_COLOR_ID_GREEN>;
0630 function = LED_FUNCTION_HEARTBEAT;
0631 function-enumerator = <3>;
0632
0633 linux,default-trigger = "heartbeat";
0634 default-state = "on";
0635 };
0636
0637 led@4 {
0638 reg = <4>;
0639 color = <LED_COLOR_ID_GREEN>;
0640 function = LED_FUNCTION_INDICATOR;
0641 function-enumerator = <2>;
0642 };
0643
0644 led@5 {
0645 reg = <5>;
0646 color = <LED_COLOR_ID_GREEN>;
0647 function = LED_FUNCTION_INDICATOR;
0648 function-enumerator = <1>;
0649 };
0650 };
0651
0652 /* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */
0653 &q6afedai {
0654 qi2s@22 {
0655 reg = <QUATERNARY_MI2S_RX>;
0656 qcom,sd-lines = <0 1 2 3>;
0657 };
0658 };
0659
0660 &q6asmdai {
0661 dai@0 {
0662 reg = <0>;
0663 };
0664
0665 dai@1 {
0666 reg = <1>;
0667 };
0668
0669 dai@2 {
0670 reg = <2>;
0671 };
0672
0673 dai@3 {
0674 reg = <3>;
0675 direction = <2>;
0676 is-compress-dai;
0677 };
0678 };
0679
0680 &qupv3_id_0 {
0681 status = "okay";
0682 };
0683
0684 &qupv3_id_1 {
0685 status = "okay";
0686 };
0687
0688 &sdhc_2 {
0689 status = "okay";
0690
0691 pinctrl-names = "default";
0692 pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>;
0693
0694 vmmc-supply = <&vreg_l21a_2p95>;
0695 vqmmc-supply = <&vreg_l13a_2p95>;
0696
0697 bus-width = <4>;
0698 cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>;
0699 };
0700
0701 &sound {
0702 compatible = "qcom,db845c-sndcard";
0703 pinctrl-0 = <&quat_mi2s_active
0704 &quat_mi2s_sd0_active
0705 &quat_mi2s_sd1_active
0706 &quat_mi2s_sd2_active
0707 &quat_mi2s_sd3_active>;
0708 pinctrl-names = "default";
0709 model = "DB845c";
0710 audio-routing =
0711 "RX_BIAS", "MCLK",
0712 "AMIC1", "MIC BIAS1",
0713 "AMIC2", "MIC BIAS2",
0714 "DMIC0", "MIC BIAS1",
0715 "DMIC1", "MIC BIAS1",
0716 "DMIC2", "MIC BIAS3",
0717 "DMIC3", "MIC BIAS3",
0718 "SpkrLeft IN", "SPK1 OUT",
0719 "SpkrRight IN", "SPK2 OUT",
0720 "MM_DL1", "MultiMedia1 Playback",
0721 "MM_DL2", "MultiMedia2 Playback",
0722 "MM_DL4", "MultiMedia4 Playback",
0723 "MultiMedia3 Capture", "MM_UL3";
0724
0725 mm1-dai-link {
0726 link-name = "MultiMedia1";
0727 cpu {
0728 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
0729 };
0730 };
0731
0732 mm2-dai-link {
0733 link-name = "MultiMedia2";
0734 cpu {
0735 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
0736 };
0737 };
0738
0739 mm3-dai-link {
0740 link-name = "MultiMedia3";
0741 cpu {
0742 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
0743 };
0744 };
0745
0746 mm4-dai-link {
0747 link-name = "MultiMedia4";
0748 cpu {
0749 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
0750 };
0751 };
0752
0753 hdmi-dai-link {
0754 link-name = "HDMI Playback";
0755 cpu {
0756 sound-dai = <&q6afedai QUATERNARY_MI2S_RX>;
0757 };
0758
0759 platform {
0760 sound-dai = <&q6routing>;
0761 };
0762
0763 codec {
0764 sound-dai = <<9611_codec 0>;
0765 };
0766 };
0767
0768 slim-dai-link {
0769 link-name = "SLIM Playback";
0770 cpu {
0771 sound-dai = <&q6afedai SLIMBUS_0_RX>;
0772 };
0773
0774 platform {
0775 sound-dai = <&q6routing>;
0776 };
0777
0778 codec {
0779 sound-dai = <&left_spkr>, <&right_spkr>, <&swm 0>, <&wcd9340 0>;
0780 };
0781 };
0782
0783 slimcap-dai-link {
0784 link-name = "SLIM Capture";
0785 cpu {
0786 sound-dai = <&q6afedai SLIMBUS_0_TX>;
0787 };
0788
0789 platform {
0790 sound-dai = <&q6routing>;
0791 };
0792
0793 codec {
0794 sound-dai = <&wcd9340 1>;
0795 };
0796 };
0797 };
0798
0799 &spi0 {
0800 status = "okay";
0801 pinctrl-names = "default";
0802 pinctrl-0 = <&qup_spi0_default>;
0803 cs-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>;
0804
0805 can@0 {
0806 compatible = "microchip,mcp2517fd";
0807 reg = <0>;
0808 clocks = <&clk40M>;
0809 interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
0810 spi-max-frequency = <10000000>;
0811 vdd-supply = <&vdc_5v>;
0812 xceiver-supply = <&vdc_5v>;
0813 };
0814 };
0815
0816 &spi2 {
0817 /* On Low speed expansion */
0818 label = "LS-SPI0";
0819 status = "okay";
0820 };
0821
0822 &tlmm {
0823 cam0_default: cam0_default {
0824 rst {
0825 pins = "gpio9";
0826 function = "gpio";
0827
0828 drive-strength = <16>;
0829 bias-disable;
0830 };
0831
0832 mclk0 {
0833 pins = "gpio13";
0834 function = "cam_mclk";
0835
0836 drive-strength = <16>;
0837 bias-disable;
0838 };
0839 };
0840
0841 cam3_default: cam3_default {
0842 rst {
0843 function = "gpio";
0844 pins = "gpio21";
0845
0846 drive-strength = <16>;
0847 bias-disable;
0848 };
0849
0850 mclk3 {
0851 function = "cam_mclk";
0852 pins = "gpio16";
0853
0854 drive-strength = <16>;
0855 bias-disable;
0856 };
0857 };
0858
0859 dsi_sw_sel: dsi-sw-sel {
0860 pins = "gpio120";
0861 function = "gpio";
0862
0863 drive-strength = <2>;
0864 bias-disable;
0865 output-high;
0866 };
0867
0868 lt9611_irq_pin: lt9611-irq {
0869 pins = "gpio84";
0870 function = "gpio";
0871 bias-disable;
0872 };
0873
0874 pcie0_default_state: pcie0-default {
0875 clkreq {
0876 pins = "gpio36";
0877 function = "pci_e0";
0878 bias-pull-up;
0879 };
0880
0881 reset-n {
0882 pins = "gpio35";
0883 function = "gpio";
0884
0885 drive-strength = <2>;
0886 output-low;
0887 bias-pull-down;
0888 };
0889
0890 wake-n {
0891 pins = "gpio37";
0892 function = "gpio";
0893
0894 drive-strength = <2>;
0895 bias-pull-up;
0896 };
0897 };
0898
0899 pcie0_pwren_state: pcie0-pwren {
0900 pins = "gpio90";
0901 function = "gpio";
0902
0903 drive-strength = <2>;
0904 bias-disable;
0905 };
0906
0907 pcie1_default_state: pcie1-default {
0908 perst-n {
0909 pins = "gpio102";
0910 function = "gpio";
0911
0912 drive-strength = <16>;
0913 bias-disable;
0914 };
0915
0916 clkreq {
0917 pins = "gpio103";
0918 function = "pci_e1";
0919 bias-pull-up;
0920 };
0921
0922 wake-n {
0923 pins = "gpio11";
0924 function = "gpio";
0925
0926 drive-strength = <2>;
0927 bias-pull-up;
0928 };
0929
0930 reset-n {
0931 pins = "gpio75";
0932 function = "gpio";
0933
0934 drive-strength = <16>;
0935 bias-pull-up;
0936 output-high;
0937 };
0938 };
0939
0940 sdc2_default_state: sdc2-default {
0941 clk {
0942 pins = "sdc2_clk";
0943 bias-disable;
0944
0945 /*
0946 * It seems that mmc_test reports errors if drive
0947 * strength is not 16 on clk, cmd, and data pins.
0948 */
0949 drive-strength = <16>;
0950 };
0951
0952 cmd {
0953 pins = "sdc2_cmd";
0954 bias-pull-up;
0955 drive-strength = <10>;
0956 };
0957
0958 data {
0959 pins = "sdc2_data";
0960 bias-pull-up;
0961 drive-strength = <10>;
0962 };
0963 };
0964
0965 sdc2_card_det_n: sd-card-det-n {
0966 pins = "gpio126";
0967 function = "gpio";
0968 bias-pull-up;
0969 };
0970
0971 wcd_intr_default: wcd_intr_default {
0972 pins = <54>;
0973 function = "gpio";
0974
0975 input-enable;
0976 bias-pull-down;
0977 drive-strength = <2>;
0978 };
0979 };
0980
0981 &uart3 {
0982 label = "LS-UART0";
0983 status = "disabled";
0984 };
0985
0986 &uart6 {
0987 status = "okay";
0988
0989 bluetooth {
0990 compatible = "qcom,wcn3990-bt";
0991
0992 vddio-supply = <&vreg_s4a_1p8>;
0993 vddxo-supply = <&vreg_l7a_1p8>;
0994 vddrf-supply = <&vreg_l17a_1p3>;
0995 vddch0-supply = <&vreg_l25a_3p3>;
0996 max-speed = <3200000>;
0997 };
0998 };
0999
1000 &uart9 {
1001 label = "LS-UART1";
1002 status = "okay";
1003 };
1004
1005 &usb_1 {
1006 status = "okay";
1007 };
1008
1009 &usb_1_dwc3 {
1010 dr_mode = "peripheral";
1011 };
1012
1013 &usb_1_hsphy {
1014 status = "okay";
1015
1016 vdd-supply = <&vreg_l1a_0p875>;
1017 vdda-pll-supply = <&vreg_l12a_1p8>;
1018 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
1019
1020 qcom,imp-res-offset-value = <8>;
1021 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>;
1022 qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>;
1023 qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
1024 };
1025
1026 &usb_1_qmpphy {
1027 status = "okay";
1028
1029 vdda-phy-supply = <&vreg_l26a_1p2>;
1030 vdda-pll-supply = <&vreg_l1a_0p875>;
1031 };
1032
1033 &usb_2 {
1034 status = "okay";
1035 };
1036
1037 &usb_2_dwc3 {
1038 dr_mode = "host";
1039 };
1040
1041 &usb_2_hsphy {
1042 status = "okay";
1043
1044 vdd-supply = <&vreg_l1a_0p875>;
1045 vdda-pll-supply = <&vreg_l12a_1p8>;
1046 vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
1047
1048 qcom,imp-res-offset-value = <8>;
1049 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_22_8_MA>;
1050 };
1051
1052 &usb_2_qmpphy {
1053 status = "okay";
1054
1055 vdda-phy-supply = <&vreg_l26a_1p2>;
1056 vdda-pll-supply = <&vreg_l1a_0p875>;
1057 };
1058
1059 &ufs_mem_hc {
1060 status = "okay";
1061
1062 reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
1063
1064 vcc-supply = <&vreg_l20a_2p95>;
1065 vcc-max-microamp = <800000>;
1066 };
1067
1068 &ufs_mem_phy {
1069 status = "okay";
1070
1071 vdda-phy-supply = <&vreg_l1a_0p875>;
1072 vdda-pll-supply = <&vreg_l26a_1p2>;
1073 };
1074
1075 &venus {
1076 status = "okay";
1077 };
1078
1079 &wcd9340{
1080 pinctrl-0 = <&wcd_intr_default>;
1081 pinctrl-names = "default";
1082 clock-names = "extclk";
1083 clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
1084 reset-gpios = <&tlmm 64 0>;
1085 vdd-buck-supply = <&vreg_s4a_1p8>;
1086 vdd-buck-sido-supply = <&vreg_s4a_1p8>;
1087 vdd-tx-supply = <&vreg_s4a_1p8>;
1088 vdd-rx-supply = <&vreg_s4a_1p8>;
1089 vdd-io-supply = <&vreg_s4a_1p8>;
1090
1091 swm: swm@c85 {
1092 left_spkr: wsa8810-left{
1093 compatible = "sdw10217201000";
1094 reg = <0 1>;
1095 powerdown-gpios = <&wcdgpio 1 GPIO_ACTIVE_HIGH>;
1096 #thermal-sensor-cells = <0>;
1097 sound-name-prefix = "SpkrLeft";
1098 #sound-dai-cells = <0>;
1099 };
1100
1101 right_spkr: wsa8810-right{
1102 compatible = "sdw10217201000";
1103 powerdown-gpios = <&wcdgpio 1 GPIO_ACTIVE_HIGH>;
1104 reg = <0 2>;
1105 #thermal-sensor-cells = <0>;
1106 sound-name-prefix = "SpkrRight";
1107 #sound-dai-cells = <0>;
1108 };
1109 };
1110 };
1111
1112 &wifi {
1113 status = "okay";
1114
1115 vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
1116 vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
1117 vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
1118 vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
1119
1120 qcom,snoc-host-cap-8bit-quirk;
1121 qcom,ath10k-calibration-variant = "Thundercomm_DB845C";
1122 };
1123
1124 /* PINCTRL - additions to nodes defined in sdm845.dtsi */
1125 &qup_spi2_default {
1126 drive-strength = <16>;
1127 };
1128
1129 &qup_uart3_default{
1130 pinmux {
1131 pins = "gpio41", "gpio42", "gpio43", "gpio44";
1132 function = "qup3";
1133 };
1134 };
1135
1136 &qup_i2c10_default {
1137 pinconf {
1138 pins = "gpio55", "gpio56";
1139 drive-strength = <2>;
1140 bias-disable;
1141 };
1142 };
1143
1144 &qup_uart6_default {
1145 pinmux {
1146 pins = "gpio45", "gpio46", "gpio47", "gpio48";
1147 function = "qup6";
1148 };
1149
1150 cts {
1151 pins = "gpio45";
1152 bias-disable;
1153 };
1154
1155 rts-tx {
1156 pins = "gpio46", "gpio47";
1157 drive-strength = <2>;
1158 bias-disable;
1159 };
1160
1161 rx {
1162 pins = "gpio48";
1163 bias-pull-up;
1164 };
1165 };
1166
1167 &qup_uart9_default {
1168 pinconf-tx {
1169 pins = "gpio4";
1170 drive-strength = <2>;
1171 bias-disable;
1172 };
1173
1174 pinconf-rx {
1175 pins = "gpio5";
1176 drive-strength = <2>;
1177 bias-pull-up;
1178 };
1179 };
1180
1181 &pm8998_gpio {
1182
1183 };
1184
1185 &cci {
1186 status = "okay";
1187 };
1188
1189 &camss {
1190 vdda-phy-supply = <&vreg_l1a_0p875>;
1191 vdda-pll-supply = <&vreg_l26a_1p2>;
1192
1193 status = "ok";
1194
1195 ports {
1196 #address-cells = <1>;
1197 #size-cells = <0>;
1198 port@0 {
1199 reg = <0>;
1200 csiphy0_ep: endpoint {
1201 data-lanes = <0 1 2 3>;
1202 remote-endpoint = <&ov8856_ep>;
1203 };
1204 };
1205 };
1206 };
1207
1208 &cci_i2c0 {
1209 camera@10 {
1210 compatible = "ovti,ov8856";
1211 reg = <0x10>;
1212
1213 // CAM0_RST_N
1214 reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
1215 pinctrl-names = "default";
1216 pinctrl-0 = <&cam0_default>;
1217 gpios = <&tlmm 13 0>,
1218 <&tlmm 9 GPIO_ACTIVE_LOW>;
1219
1220 clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
1221 clock-names = "xvclk";
1222 clock-frequency = <19200000>;
1223
1224 /* The &vreg_s4a_1p8 trace is powered on as a,
1225 * so it is represented by a fixed regulator.
1226 *
1227 * The 2.8V vdda-supply and 1.2V vddd-supply regulators
1228 * both have to be enabled through the power management
1229 * gpios.
1230 */
1231 power-domains = <&clock_camcc TITAN_TOP_GDSC>;
1232
1233 dovdd-supply = <&vreg_lvs1a_1p8>;
1234 avdd-supply = <&cam0_avdd_2v8>;
1235 dvdd-supply = <&cam0_dvdd_1v2>;
1236
1237 status = "ok";
1238
1239 port {
1240 ov8856_ep: endpoint {
1241 link-frequencies = /bits/ 64
1242 <360000000 180000000>;
1243 data-lanes = <1 2 3 4>;
1244 remote-endpoint = <&csiphy0_ep>;
1245 };
1246 };
1247 };
1248 };
1249
1250 &cci_i2c1 {
1251 camera@60 {
1252 compatible = "ovti,ov7251";
1253
1254 // I2C address as per ov7251.txt linux documentation
1255 reg = <0x60>;
1256
1257 // CAM3_RST_N
1258 enable-gpios = <&tlmm 21 0>;
1259 pinctrl-names = "default";
1260 pinctrl-0 = <&cam3_default>;
1261 gpios = <&tlmm 16 0>,
1262 <&tlmm 21 0>;
1263
1264 clocks = <&clock_camcc CAM_CC_MCLK3_CLK>;
1265 clock-names = "xclk";
1266 clock-frequency = <24000000>;
1267
1268 /* The &vreg_s4a_1p8 trace always powered on.
1269 *
1270 * The 2.8V vdda-supply regulator is enabled when the
1271 * vreg_s4a_1p8 trace is pulled high.
1272 * It too is represented by a fixed regulator.
1273 *
1274 * No 1.2V vddd-supply regulator is used.
1275 */
1276 power-domains = <&clock_camcc TITAN_TOP_GDSC>;
1277
1278 vdddo-supply = <&vreg_lvs1a_1p8>;
1279 vdda-supply = <&cam3_avdd_2v8>;
1280
1281 status = "disable";
1282
1283 port {
1284 ov7251_ep: endpoint {
1285 data-lanes = <0 1>;
1286 // remote-endpoint = <&csiphy3_ep>;
1287 };
1288 };
1289 };
1290 };
1291
1292 /* PINCTRL - additions to nodes defined in sdm845.dtsi */
1293 &qup_spi0_default {
1294 config {
1295 drive-strength = <6>;
1296 bias-disable;
1297 };
1298 };