1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Lenovo Yoga C630 4 * 5 * Copyright (c) 2019, Linaro Ltd. 6 */ 7 8/dts-v1/; 9 10#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 11#include "sdm845.dtsi" 12#include "pm8998.dtsi" 13 14/ { 15 model = "Lenovo Yoga C630"; 16 compatible = "lenovo,yoga-c630", "qcom,sdm845"; 17 18 aliases { 19 hsuart0 = &uart6; 20 }; 21}; 22 23&adsp_pas { 24 firmware-name = "qcom/LENOVO/81JL/qcadsp850.mbn"; 25 status = "okay"; 26}; 27 28&apps_rsc { 29 pm8998-rpmh-regulators { 30 compatible = "qcom,pm8998-rpmh-regulators"; 31 qcom,pmic-id = "a"; 32 33 vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>; 34 vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>; 35 36 vreg_s2a_1p125: smps2 { 37 }; 38 39 vreg_s3a_1p35: smps3 { 40 regulator-min-microvolt = <1352000>; 41 regulator-max-microvolt = <1352000>; 42 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 43 }; 44 45 vreg_s4a_1p8: smps4 { 46 regulator-min-microvolt = <1800000>; 47 regulator-max-microvolt = <1800000>; 48 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 49 }; 50 51 vreg_s5a_2p04: smps5 { 52 regulator-min-microvolt = <2040000>; 53 regulator-max-microvolt = <2040000>; 54 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 55 }; 56 57 vreg_s7a_1p025: smps7 { 58 }; 59 60 vdd_qusb_hs0: 61 vdda_hp_pcie_core: 62 vdda_mipi_csi0_0p9: 63 vdda_mipi_csi1_0p9: 64 vdda_mipi_csi2_0p9: 65 vdda_mipi_dsi0_pll: 66 vdda_mipi_dsi1_pll: 67 vdda_qlink_lv: 68 vdda_qlink_lv_ck: 69 vdda_qrefs_0p875: 70 vdda_pcie_core: 71 vdda_pll_cc_ebi01: 72 vdda_pll_cc_ebi23: 73 vdda_sp_sensor: 74 vdda_ufs1_core: 75 vdda_ufs2_core: 76 vdda_usb1_ss_core: 77 vdda_usb2_ss_core: 78 vreg_l1a_0p875: ldo1 { 79 regulator-min-microvolt = <880000>; 80 regulator-max-microvolt = <880000>; 81 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 82 }; 83 84 vddpx_10: 85 vreg_l2a_1p2: ldo2 { 86 regulator-min-microvolt = <1200000>; 87 regulator-max-microvolt = <1200000>; 88 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 89 regulator-always-on; 90 }; 91 92 vreg_l3a_1p0: ldo3 { 93 }; 94 95 vdd_wcss_cx: 96 vdd_wcss_mx: 97 vdda_wcss_pll: 98 vreg_l5a_0p8: ldo5 { 99 regulator-min-microvolt = <800000>; 100 regulator-max-microvolt = <800000>; 101 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 102 }; 103 104 vddpx_13: 105 vreg_l6a_1p8: ldo6 { 106 regulator-min-microvolt = <1800000>; 107 regulator-max-microvolt = <1800000>; 108 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 109 }; 110 111 vreg_l7a_1p8: ldo7 { 112 regulator-min-microvolt = <1800000>; 113 regulator-max-microvolt = <1800000>; 114 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 115 }; 116 117 vreg_l8a_1p2: ldo8 { 118 }; 119 120 vreg_l9a_1p8: ldo9 { 121 }; 122 123 vreg_l10a_1p8: ldo10 { 124 }; 125 126 vreg_l11a_1p0: ldo11 { 127 }; 128 129 vdd_qfprom: 130 vdd_qfprom_sp: 131 vdda_apc1_cs_1p8: 132 vdda_gfx_cs_1p8: 133 vdda_qrefs_1p8: 134 vdda_qusb_hs0_1p8: 135 vddpx_11: 136 vreg_l12a_1p8: ldo12 { 137 regulator-min-microvolt = <1800000>; 138 regulator-max-microvolt = <1800000>; 139 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 140 }; 141 142 vddpx_2: 143 vreg_l13a_2p95: ldo13 { 144 }; 145 146 vreg_l14a_1p88: ldo14 { 147 regulator-min-microvolt = <1880000>; 148 regulator-max-microvolt = <1880000>; 149 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 150 regulator-always-on; 151 }; 152 153 vreg_l15a_1p8: ldo15 { 154 }; 155 156 vreg_l16a_2p7: ldo16 { 157 }; 158 159 vreg_l17a_1p3: ldo17 { 160 regulator-min-microvolt = <1304000>; 161 regulator-max-microvolt = <1304000>; 162 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 163 }; 164 165 vreg_l18a_2p7: ldo18 { 166 }; 167 168 vreg_l19a_3p0: ldo19 { 169 regulator-min-microvolt = <3100000>; 170 regulator-max-microvolt = <3108000>; 171 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 172 }; 173 174 vreg_l20a_2p95: ldo20 { 175 regulator-min-microvolt = <2960000>; 176 regulator-max-microvolt = <2960000>; 177 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 178 }; 179 180 vreg_l21a_2p95: ldo21 { 181 }; 182 183 vreg_l22a_2p85: ldo22 { 184 }; 185 186 vreg_l23a_3p3: ldo23 { 187 }; 188 189 vdda_qusb_hs0_3p1: 190 vreg_l24a_3p075: ldo24 { 191 regulator-min-microvolt = <3075000>; 192 regulator-max-microvolt = <3083000>; 193 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 194 }; 195 196 vreg_l25a_3p3: ldo25 { 197 regulator-min-microvolt = <3104000>; 198 regulator-max-microvolt = <3112000>; 199 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 200 }; 201 202 vdda_hp_pcie_1p2: 203 vdda_hv_ebi0: 204 vdda_hv_ebi1: 205 vdda_hv_ebi2: 206 vdda_hv_ebi3: 207 vdda_mipi_csi_1p25: 208 vdda_mipi_dsi0_1p2: 209 vdda_mipi_dsi1_1p2: 210 vdda_pcie_1p2: 211 vdda_ufs1_1p2: 212 vdda_ufs2_1p2: 213 vdda_usb1_ss_1p2: 214 vdda_usb2_ss_1p2: 215 vreg_l26a_1p2: ldo26 { 216 regulator-min-microvolt = <1200000>; 217 regulator-max-microvolt = <1208000>; 218 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 219 }; 220 221 vreg_l28a_3p0: ldo28 { 222 }; 223 224 vreg_lvs1a_1p8: lvs1 { 225 }; 226 227 vreg_lvs2a_1p8: lvs2 { 228 }; 229 }; 230}; 231 232&apps_smmu { 233 /* TODO: Figure out how to survive booting with this enabled */ 234 status = "disabled"; 235}; 236 237&cdsp_pas { 238 firmware-name = "qcom/LENOVO/81JL/qccdsp850.mbn"; 239 status = "okay"; 240}; 241 242&gcc { 243 protected-clocks = <GCC_QSPI_CORE_CLK>, 244 <GCC_QSPI_CORE_CLK_SRC>, 245 <GCC_QSPI_CNOC_PERIPH_AHB_CLK>; 246}; 247 248&gpu { 249 zap-shader { 250 memory-region = <&gpu_mem>; 251 firmware-name = "qcom/LENOVO/81JL/qcdxkmsuc850.mbn"; 252 }; 253}; 254 255&i2c1 { 256 status = "okay"; 257 clock-frequency = <400000>; 258}; 259 260&i2c3 { 261 status = "okay"; 262 clock-frequency = <400000>; 263 264 hid@15 { 265 compatible = "hid-over-i2c"; 266 reg = <0x15>; 267 hid-descr-addr = <0x1>; 268 269 interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_RISING>; 270 }; 271 272 hid@2c { 273 compatible = "hid-over-i2c"; 274 reg = <0x2c>; 275 hid-descr-addr = <0x20>; 276 277 interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_RISING>; 278 279 pinctrl-names = "default"; 280 pinctrl-0 = <&i2c2_hid_active>; 281 }; 282}; 283 284&i2c5 { 285 status = "okay"; 286 clock-frequency = <400000>; 287 288 hid@10 { 289 compatible = "hid-over-i2c"; 290 reg = <0x10>; 291 hid-descr-addr = <0x1>; 292 293 interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>; 294 295 pinctrl-names = "default"; 296 pinctrl-0 = <&i2c6_hid_active>; 297 }; 298}; 299 300&i2c11 { 301 status = "okay"; 302 clock-frequency = <400000>; 303 304 hid@5c { 305 compatible = "hid-over-i2c"; 306 reg = <0x5c>; 307 hid-descr-addr = <0x1>; 308 309 interrupts-extended = <&tlmm 92 IRQ_TYPE_LEVEL_LOW>; 310 311 pinctrl-names = "default"; 312 pinctrl-0 = <&i2c12_hid_active>; 313 }; 314}; 315 316&mss_pil { 317 firmware-name = "qcom/LENOVO/81JL/qcdsp1v2850.mbn", "qcom/LENOVO/81JL/qcdsp2850.mbn"; 318}; 319 320&qup_i2c12_default { 321 drive-strength = <2>; 322 bias-disable; 323}; 324 325&qup_uart6_default { 326 pinmux { 327 pins = "gpio45", "gpio46", "gpio47", "gpio48"; 328 function = "qup6"; 329 }; 330 331 cts { 332 pins = "gpio45"; 333 bias-pull-down; 334 }; 335 336 rts-tx { 337 pins = "gpio46", "gpio47"; 338 drive-strength = <2>; 339 bias-disable; 340 }; 341 342 rx { 343 pins = "gpio48"; 344 bias-pull-up; 345 }; 346}; 347 348&qupv3_id_0 { 349 status = "okay"; 350}; 351 352&qupv3_id_1 { 353 status = "okay"; 354}; 355 356&tlmm { 357 gpio-reserved-ranges = <0 4>, <81 4>; 358 359 i2c2_hid_active: i2c2-hid-active { 360 pins = <37>; 361 function = "gpio"; 362 363 input-enable; 364 bias-pull-up; 365 drive-strength = <2>; 366 }; 367 368 i2c6_hid_active: i2c6-hid-active { 369 pins = <125>; 370 function = "gpio"; 371 372 input-enable; 373 bias-pull-up; 374 drive-strength = <2>; 375 }; 376 377 i2c12_hid_active: i2c12-hid-active { 378 pins = <92>; 379 function = "gpio"; 380 381 input-enable; 382 bias-pull-up; 383 drive-strength = <2>; 384 }; 385}; 386 387&uart6 { 388 status = "okay"; 389 390 bluetooth { 391 compatible = "qcom,wcn3990-bt"; 392 393 vddio-supply = <&vreg_s4a_1p8>; 394 vddxo-supply = <&vreg_l7a_1p8>; 395 vddrf-supply = <&vreg_l17a_1p3>; 396 vddch0-supply = <&vreg_l25a_3p3>; 397 max-speed = <3200000>; 398 }; 399}; 400 401&ufs_mem_hc { 402 status = "okay"; 403 404 vcc-supply = <&vreg_l20a_2p95>; 405 vcc-max-microamp = <600000>; 406}; 407 408&ufs_mem_phy { 409 status = "okay"; 410 411 vdda-phy-supply = <&vdda_ufs1_core>; 412 vdda-pll-supply = <&vdda_ufs1_1p2>; 413}; 414 415&usb_1 { 416 status = "okay"; 417}; 418 419&usb_1_dwc3 { 420 dr_mode = "host"; 421}; 422 423&usb_1_hsphy { 424 status = "okay"; 425 426 vdd-supply = <&vdda_usb1_ss_core>; 427 vdda-pll-supply = <&vdda_qusb_hs0_1p8>; 428 vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>; 429 430 qcom,imp-res-offset-value = <8>; 431 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_21_6_MA>; 432 qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_5_PERCENT>; 433 qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>; 434}; 435 436&usb_1_qmpphy { 437 status = "okay"; 438 439 vdda-phy-supply = <&vdda_usb1_ss_1p2>; 440 vdda-pll-supply = <&vdda_usb1_ss_core>; 441}; 442 443&usb_2 { 444 status = "okay"; 445}; 446 447&usb_2_dwc3 { 448 dr_mode = "host"; 449}; 450 451&usb_2_hsphy { 452 status = "okay"; 453 454 vdd-supply = <&vdda_usb2_ss_core>; 455 vdda-pll-supply = <&vdda_qusb_hs0_1p8>; 456 vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>; 457 458 qcom,imp-res-offset-value = <8>; 459 qcom,hstx-trim-value = <QUSB2_V2_HSTX_TRIM_22_8_MA>; 460}; 461 462&usb_2_qmpphy { 463 status = "okay"; 464 465 vdda-phy-supply = <&vdda_usb2_ss_1p2>; 466 vdda-pll-supply = <&vdda_usb2_ss_core>; 467}; 468