0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * sc7280 Qcard device tree source
0004 *
0005 * Qcard PCB has the processor, RAM, eMMC (if stuffed), and eDP connector (if
0006 * stuffed) on it. This device tree tries to encapsulate all the things that
0007 * all boards using Qcard will have in common. Given that there are stuffing
0008 * options, some things may be left with status "disabled" and enabled in
0009 * the actual board device tree files.
0010 *
0011 * Copyright 2022 Google LLC.
0012 */
0013
0014 #include <dt-bindings/iio/qcom,spmi-adc7-pmk8350.h>
0015 #include <dt-bindings/iio/qcom,spmi-adc7-pmr735a.h>
0016 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
0017 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
0018
0019 #include "sc7280.dtsi"
0020
0021 /* PMICs depend on spmi_bus label and so must come after SoC */
0022 #include "pm7325.dtsi"
0023 #include "pm8350c.dtsi"
0024 #include "pmk8350.dtsi"
0025
0026 / {
0027 aliases {
0028 bluetooth0 = &bluetooth;
0029 serial0 = &uart5;
0030 serial1 = &uart7;
0031 };
0032
0033 pm8350c_pwm_backlight: backlight {
0034 compatible = "pwm-backlight";
0035 status = "disabled";
0036
0037 enable-gpios = <&pm8350c_gpios 7 GPIO_ACTIVE_HIGH>;
0038 pinctrl-names = "default";
0039 pinctrl-0 = <&pmic_edp_bl_en>;
0040 pwms = <&pm8350c_pwm 3 65535>;
0041 };
0042 };
0043
0044 &apps_rsc {
0045 /*
0046 * Regulators are given labels corresponding to the various names
0047 * they are referred to on schematics. They are also given labels
0048 * corresponding to named voltage inputs on the SoC or components
0049 * bundled with the SoC (like radio companion chips). We totally
0050 * ignore it when one regulator is the input to another regulator.
0051 * That's handled automatically by the initial config given to
0052 * RPMH by the firmware.
0053 *
0054 * Regulators that the HLOS (High Level OS) doesn't touch at all
0055 * are left out of here since they are managed elsewhere.
0056 */
0057
0058 pm7325-regulators {
0059 compatible = "qcom,pm7325-rpmh-regulators";
0060 qcom,pmic-id = "b";
0061
0062 vdd19_pmu_pcie_i:
0063 vdd19_pmu_rfa_i:
0064 vreg_s1b_1p856: smps1 {
0065 regulator-min-microvolt = <1856000>;
0066 regulator-max-microvolt = <2040000>;
0067 };
0068
0069 vdd_pmu_aon_i:
0070 vdd09_pmu_rfa_i:
0071 vdd095_mx_pmu:
0072 vdd095_pmu:
0073 vreg_s7b_0p952: smps7 {
0074 regulator-min-microvolt = <535000>;
0075 regulator-max-microvolt = <1120000>;
0076 };
0077
0078 vdd13_pmu_rfa_i:
0079 vdd13_pmu_pcie_i:
0080 vreg_s8b_1p256: smps8 {
0081 regulator-min-microvolt = <1256000>;
0082 regulator-max-microvolt = <1500000>;
0083 };
0084
0085 vdd_a_usbssdp_0_core:
0086 vreg_l1b_0p912: ldo1 {
0087 regulator-min-microvolt = <825000>;
0088 regulator-max-microvolt = <925000>;
0089 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0090 };
0091
0092 vdd_a_usbhs_3p1:
0093 vreg_l2b_3p072: ldo2 {
0094 regulator-min-microvolt = <2700000>;
0095 regulator-max-microvolt = <3544000>;
0096 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0097 };
0098
0099 vdd_a_csi_0_1_1p2:
0100 vdd_a_csi_2_3_1p2:
0101 vdd_a_csi_4_1p2:
0102 vdd_a_dsi_0_1p2:
0103 vdd_a_edp_0_1p2:
0104 vdd_a_qlink_0_1p2:
0105 vdd_a_qlink_1_1p2:
0106 vdd_a_pcie_0_1p2:
0107 vdd_a_pcie_1_1p2:
0108 vdd_a_ufs_0_1p2:
0109 vdd_a_usbssdp_0_1p2:
0110 vreg_l6b_1p2: ldo6 {
0111 regulator-min-microvolt = <1140000>;
0112 regulator-max-microvolt = <1260000>;
0113 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0114 };
0115
0116 /*
0117 * Despite the fact that this is named to be 2.5V on the
0118 * schematic, it powers eMMC which doesn't accept 2.5V
0119 */
0120 vreg_l7b_2p5: ldo7 {
0121 regulator-min-microvolt = <2960000>;
0122 regulator-max-microvolt = <2960000>;
0123 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0124 };
0125
0126 vreg_l17b_1p8: ldo17 {
0127 regulator-min-microvolt = <1700000>;
0128 regulator-max-microvolt = <1900000>;
0129 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0130 };
0131
0132 vdd_px_wcd9385:
0133 vdd_txrx:
0134 vddpx_0:
0135 vddpx_3:
0136 vddpx_7:
0137 vreg_l18b_1p8: ldo18 {
0138 regulator-min-microvolt = <1800000>;
0139 regulator-max-microvolt = <2000000>;
0140 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0141 };
0142
0143 vdd_1p8:
0144 vdd_px_sdr735:
0145 vdd_pxm:
0146 vdd18_io:
0147 vddio_px_1:
0148 vddio_px_2:
0149 vddio_px_3:
0150 vddpx_ts:
0151 vddpx_wl4otp:
0152 vreg_l19b_1p8: ldo19 {
0153 regulator-min-microvolt = <1800000>;
0154 regulator-max-microvolt = <1800000>;
0155 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0156 };
0157 };
0158
0159 pm8350c-regulators {
0160 compatible = "qcom,pm8350c-rpmh-regulators";
0161 qcom,pmic-id = "c";
0162
0163 vdd22_wlbtpa_ch0:
0164 vdd22_wlbtpa_ch1:
0165 vdd22_wlbtppa_ch0:
0166 vdd22_wlbtppa_ch1:
0167 vdd22_wlpa5g_ch0:
0168 vdd22_wlpa5g_ch1:
0169 vdd22_wlppa5g_ch0:
0170 vdd22_wlppa5g_ch1:
0171 vreg_s1c_2p2: smps1 {
0172 regulator-min-microvolt = <2190000>;
0173 regulator-max-microvolt = <2210000>;
0174 };
0175
0176 lp4_vdd2_1p052:
0177 vreg_s9c_0p676: smps9 {
0178 regulator-min-microvolt = <1010000>;
0179 regulator-max-microvolt = <1170000>;
0180 };
0181
0182 vdda_apc_cs_1p8:
0183 vdda_gfx_cs_1p8:
0184 vdda_turing_q6_cs_1p8:
0185 vdd_a_cxo_1p8:
0186 vdd_a_qrefs_1p8:
0187 vdd_a_usbhs_1p8:
0188 vdd_qfprom:
0189 vreg_l1c_1p8: ldo1 {
0190 regulator-min-microvolt = <1800000>;
0191 regulator-max-microvolt = <1980000>;
0192 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0193 };
0194
0195 vreg_l2c_1p8: ldo2 {
0196 regulator-min-microvolt = <1620000>;
0197 regulator-max-microvolt = <1980000>;
0198 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0199 };
0200
0201 vreg_l3c_3p0: ldo3 {
0202 regulator-min-microvolt = <2800000>;
0203 regulator-max-microvolt = <3540000>;
0204 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0205 };
0206
0207 vddpx_5:
0208 vreg_l4c_1p8_3p0: ldo4 {
0209 regulator-min-microvolt = <1620000>;
0210 regulator-max-microvolt = <3300000>;
0211 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0212 };
0213
0214 vddpx_6:
0215 vreg_l5c_1p8_3p0: ldo5 {
0216 regulator-min-microvolt = <1620000>;
0217 regulator-max-microvolt = <3300000>;
0218 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0219 };
0220
0221 vddpx_2:
0222 vreg_l6c_2p96: ldo6 {
0223 regulator-min-microvolt = <1800000>;
0224 regulator-max-microvolt = <2950000>;
0225 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0226 };
0227
0228 vreg_l7c_3p0: ldo7 {
0229 regulator-min-microvolt = <3000000>;
0230 regulator-max-microvolt = <3544000>;
0231 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0232 };
0233
0234 vreg_l8c_1p8: ldo8 {
0235 regulator-min-microvolt = <1620000>;
0236 regulator-max-microvolt = <2000000>;
0237 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0238 };
0239
0240 vreg_l9c_2p96: ldo9 {
0241 regulator-min-microvolt = <2960000>;
0242 regulator-max-microvolt = <2960000>;
0243 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0244 };
0245
0246 vdd_a_csi_0_1_0p9:
0247 vdd_a_csi_2_3_0p9:
0248 vdd_a_csi_4_0p9:
0249 vdd_a_dsi_0_0p9:
0250 vdd_a_dsi_0_pll_0p9:
0251 vdd_a_edp_0_0p9:
0252 vdd_a_gnss_0p9:
0253 vdd_a_pcie_0_core:
0254 vdd_a_pcie_1_core:
0255 vdd_a_qlink_0_0p9:
0256 vdd_a_qlink_0_0p9_ck:
0257 vdd_a_qlink_1_0p9:
0258 vdd_a_qlink_1_0p9_ck:
0259 vdd_a_qrefs_0p875_0:
0260 vdd_a_qrefs_0p875_1:
0261 vdd_a_qrefs_0p875_2:
0262 vdd_a_qrefs_0p875_3:
0263 vdd_a_qrefs_0p875_4_5:
0264 vdd_a_qrefs_0p875_6:
0265 vdd_a_qrefs_0p875_7:
0266 vdd_a_qrefs_0p875_8:
0267 vdd_a_qrefs_0p875_9:
0268 vdd_a_ufs_0_core:
0269 vdd_a_usbhs_core:
0270 vreg_l10c_0p88: ldo10 {
0271 regulator-min-microvolt = <720000>;
0272 regulator-max-microvolt = <1050000>;
0273 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0274 };
0275
0276 vreg_l11c_2p8: ldo11 {
0277 regulator-min-microvolt = <2800000>;
0278 regulator-max-microvolt = <3544000>;
0279 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0280 };
0281
0282 vreg_l12c_1p8: ldo12 {
0283 regulator-min-microvolt = <1650000>;
0284 regulator-max-microvolt = <2000000>;
0285 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0286 };
0287
0288 vreg_l13c_3p0: ldo13 {
0289 regulator-min-microvolt = <2700000>;
0290 regulator-max-microvolt = <3544000>;
0291 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
0292 };
0293
0294 vdd_flash:
0295 vdd_iris_rgb:
0296 vdd_mic_bias:
0297 vreg_bob: bob {
0298 regulator-min-microvolt = <3008000>;
0299 regulator-max-microvolt = <3960000>;
0300 regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
0301 };
0302 };
0303 };
0304
0305 /* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */
0306
0307 &ipa {
0308 status = "okay";
0309 modem-init;
0310 };
0311
0312 /* NOTE: Not all Qcards have eDP connector stuffed */
0313 &mdss_edp {
0314 aux-bus {
0315 edp_panel: panel {
0316 compatible = "edp-panel";
0317
0318 backlight = <&pm8350c_pwm_backlight>;
0319
0320 ports {
0321 #address-cells = <1>;
0322 #size-cells = <0>;
0323 port@0 {
0324 reg = <0>;
0325 edp_panel_in: endpoint {
0326 remote-endpoint = <&mdss_edp_out>;
0327 };
0328 };
0329 };
0330 };
0331 };
0332 };
0333
0334 &mdss_edp_out {
0335 remote-endpoint = <&edp_panel_in>;
0336 };
0337
0338 &mdss_edp_phy {
0339 vdda-pll-supply = <&vdd_a_edp_0_0p9>;
0340 vdda-phy-supply = <&vdd_a_edp_0_1p2>;
0341 };
0342
0343 &pcie1_phy {
0344 vdda-phy-supply = <&vreg_l10c_0p88>;
0345 vdda-pll-supply = <&vreg_l6b_1p2>;
0346 };
0347
0348 &pm8350c_pwm {
0349 pinctrl-names = "default";
0350 pinctrl-0 = <&pmic_edp_bl_pwm>;
0351 };
0352
0353 &pmk8350_vadc {
0354 pmk8350-die-temp@3 {
0355 reg = <PMK8350_ADC7_DIE_TEMP>;
0356 label = "pmk8350_die_temp";
0357 qcom,pre-scaling = <1 1>;
0358 };
0359
0360 pmr735a-die-temp@403 {
0361 reg = <PMR735A_ADC7_DIE_TEMP>;
0362 label = "pmr735a_die_temp";
0363 qcom,pre-scaling = <1 1>;
0364 };
0365 };
0366
0367 &qfprom {
0368 vcc-supply = <&vdd_qfprom>;
0369 };
0370
0371 /* For eMMC. NOTE: not all Qcards have eMMC stuffed */
0372 &sdhc_1 {
0373 vmmc-supply = <&vreg_l7b_2p5>;
0374 vqmmc-supply = <&vreg_l19b_1p8>;
0375
0376 non-removable;
0377 no-sd;
0378 no-sdio;
0379 };
0380
0381 uart_dbg: &uart5 {
0382 compatible = "qcom,geni-debug-uart";
0383 status = "okay";
0384 };
0385
0386 mos_bt_uart: &uart7 {
0387 status = "okay";
0388
0389 /delete-property/ interrupts;
0390 interrupts-extended = <&intc GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>,
0391 <&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
0392 pinctrl-names = "default", "sleep";
0393 pinctrl-1 = <&qup_uart7_sleep_cts>, <&qup_uart7_sleep_rts>, <&qup_uart7_sleep_tx>, <&qup_uart7_sleep_rx>;
0394
0395 bluetooth: bluetooth {
0396 compatible = "qcom,wcn6750-bt";
0397 pinctrl-names = "default";
0398 pinctrl-0 = <&mos_bt_en>;
0399 enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
0400 swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
0401 vddaon-supply = <&vreg_s7b_0p952>;
0402 vddbtcxmx-supply = <&vreg_s7b_0p952>;
0403 vddrfacmn-supply = <&vreg_s7b_0p952>;
0404 vddrfa0p8-supply = <&vreg_s7b_0p952>;
0405 vddrfa1p7-supply = <&vdd19_pmu_rfa_i>;
0406 vddrfa1p2-supply = <&vdd13_pmu_rfa_i>;
0407 vddrfa2p2-supply = <&vreg_s1c_2p2>;
0408 vddasd-supply = <&vreg_l11c_2p8>;
0409 vddio-supply = <&vreg_l18b_1p8>;
0410 max-speed = <3200000>;
0411 };
0412 };
0413
0414 &usb_1_hsphy {
0415 vdda-pll-supply = <&vdd_a_usbhs_core>;
0416 vdda33-supply = <&vdd_a_usbhs_3p1>;
0417 vdda18-supply = <&vdd_a_usbhs_1p8>;
0418 };
0419
0420 &usb_1_qmpphy {
0421 vdda-phy-supply = <&vdd_a_usbssdp_0_1p2>;
0422 vdda-pll-supply = <&vdd_a_usbssdp_0_core>;
0423 };
0424
0425 &usb_2_hsphy {
0426 vdda-pll-supply = <&vdd_a_usbhs_core>;
0427 vdda33-supply = <&vdd_a_usbhs_3p1>;
0428 vdda18-supply = <&vdd_a_usbhs_1p8>;
0429 };
0430
0431 /*
0432 * PINCTRL - ADDITIONS TO NODES IN PARENT DEVICE TREE FILES
0433 *
0434 * NOTE: In general if pins leave the Qcard then the pinctrl goes in the
0435 * baseboard or board device tree, not here.
0436 */
0437
0438 /* No external pull for eDP HPD, so set the internal one. */
0439 &edp_hot_plug_det {
0440 bias-pull-down;
0441 };
0442
0443 /*
0444 * For ts_i2c
0445 *
0446 * Technically this i2c bus actually leaves the Qcard, but it leaves directly
0447 * via the eDP connector (it doesn't hit the baseboard). The external pulls
0448 * are on Qcard.
0449 */
0450 &qup_i2c13_data_clk {
0451 /* Has external pull */
0452 bias-disable;
0453 drive-strength = <2>;
0454 };
0455
0456 /* For mos_bt_uart */
0457 &qup_uart7_cts {
0458 /*
0459 * Configure a bias-bus-hold on CTS to lower power
0460 * usage when Bluetooth is turned off. Bus hold will
0461 * maintain a low power state regardless of whether
0462 * the Bluetooth module drives the pin in either
0463 * direction or leaves the pin fully unpowered.
0464 */
0465 bias-bus-hold;
0466 };
0467
0468 /* For mos_bt_uart */
0469 &qup_uart7_rts {
0470 /* We'll drive RTS, so no pull */
0471 bias-disable;
0472 drive-strength = <2>;
0473 };
0474
0475 /* For mos_bt_uart */
0476 &qup_uart7_tx {
0477 /* We'll drive TX, so no pull */
0478 bias-disable;
0479 drive-strength = <2>;
0480 };
0481
0482 /* For mos_bt_uart */
0483 &qup_uart7_rx {
0484 /*
0485 * Configure a pull-up on RX. This is needed to avoid
0486 * garbage data when the TX pin of the Bluetooth module is
0487 * in tri-state (module powered off or not driving the
0488 * signal yet).
0489 */
0490 bias-pull-up;
0491 };
0492
0493 /* eMMC, if stuffed, is straight on the Qcard */
0494 &sdc1_clk {
0495 bias-disable;
0496 drive-strength = <16>;
0497 };
0498
0499 &sdc1_cmd {
0500 bias-pull-up;
0501 drive-strength = <10>;
0502 };
0503
0504 &sdc1_data {
0505 bias-pull-up;
0506 drive-strength = <10>;
0507 };
0508
0509 &sdc1_rclk {
0510 bias-pull-down;
0511 };
0512
0513 /*
0514 * PINCTRL - QCARD
0515 *
0516 * This has entries that are defined by Qcard even if they go to the main
0517 * board. In cases where the pulls may be board dependent we defer those
0518 * settings to the board device tree. Drive strengths tend to be assinged here
0519 * but could conceivably be overwridden by board device trees.
0520 */
0521
0522 &pm8350c_gpios {
0523 pmic_edp_bl_en: pmic-edp-bl-en-state {
0524 pins = "gpio7";
0525 function = "normal";
0526 bias-disable;
0527 qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0528
0529 /* Force backlight to be disabled to match state at boot. */
0530 output-low;
0531 };
0532
0533 pmic_edp_bl_pwm: pmic-edp-bl-pwm-state {
0534 pins = "gpio8";
0535 function = "func1";
0536 bias-disable;
0537 qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
0538 output-low;
0539 power-source = <0>;
0540 };
0541 };
0542
0543 &tlmm {
0544 mos_bt_en: mos-bt-en {
0545 pins = "gpio85";
0546 function = "gpio";
0547 drive-strength = <2>;
0548 output-low;
0549 };
0550
0551 /* For mos_bt_uart */
0552 qup_uart7_sleep_cts: qup-uart7-sleep-cts {
0553 pins = "gpio28";
0554 function = "gpio";
0555 /*
0556 * Configure a bias-bus-hold on CTS to lower power
0557 * usage when Bluetooth is turned off. Bus hold will
0558 * maintain a low power state regardless of whether
0559 * the Bluetooth module drives the pin in either
0560 * direction or leaves the pin fully unpowered.
0561 */
0562 bias-bus-hold;
0563 };
0564
0565 /* For mos_bt_uart */
0566 qup_uart7_sleep_rts: qup-uart7-sleep-rts {
0567 pins = "gpio29";
0568 function = "gpio";
0569 /*
0570 * Configure pull-down on RTS. As RTS is active low
0571 * signal, pull it low to indicate the BT SoC that it
0572 * can wakeup the system anytime from suspend state by
0573 * pulling RX low (by sending wakeup bytes).
0574 */
0575 bias-pull-down;
0576 };
0577
0578 /* For mos_bt_uart */
0579 qup_uart7_sleep_rx: qup-uart7-sleep-rx {
0580 pins = "gpio31";
0581 function = "gpio";
0582 /*
0583 * Configure a pull-up on RX. This is needed to avoid
0584 * garbage data when the TX pin of the Bluetooth module
0585 * is floating which may cause spurious wakeups.
0586 */
0587 bias-pull-up;
0588 };
0589
0590 /* For mos_bt_uart */
0591 qup_uart7_sleep_tx: qup-uart7-sleep-tx {
0592 pins = "gpio30";
0593 function = "gpio";
0594 /*
0595 * Configure pull-up on TX when it isn't actively driven
0596 * to prevent BT SoC from receiving garbage during sleep.
0597 */
0598 bias-pull-up;
0599 };
0600
0601 ts_int_conn: ts-int-conn {
0602 pins = "gpio55";
0603 function = "gpio";
0604 bias-pull-up;
0605 };
0606
0607 ts_rst_conn: ts-rst-conn {
0608 pins = "gpio54";
0609 function = "gpio";
0610 drive-strength = <2>;
0611 };
0612 };