1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2022, Linaro Limited 5 */ 6 7/dts-v1/; 8 9#include <dt-bindings/gpio/gpio.h> 10#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 11 12#include "sc8280xp.dtsi" 13#include "sc8280xp-pmics.dtsi" 14 15/ { 16 model = "Qualcomm SC8280XP CRD"; 17 compatible = "qcom,sc8280xp-crd", "qcom,sc8280xp"; 18 19 aliases { 20 serial0 = &qup2_uart17; 21 }; 22 23 backlight { 24 compatible = "pwm-backlight"; 25 pwms = <&pmc8280c_lpg 3 1000000>; 26 enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>; 27 power-supply = <&vreg_edp_bl>; 28 29 pinctrl-names = "default"; 30 pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; 31 }; 32 33 chosen { 34 stdout-path = "serial0:115200n8"; 35 }; 36 37 vreg_edp_bl: regulator-edp-bl { 38 compatible = "regulator-fixed"; 39 40 regulator-name = "VREG_EDP_BL"; 41 regulator-min-microvolt = <3600000>; 42 regulator-max-microvolt = <3600000>; 43 44 gpio = <&pmc8280_1_gpios 9 GPIO_ACTIVE_HIGH>; 45 enable-active-high; 46 47 pinctrl-names = "default"; 48 pinctrl-0 = <&edp_bl_reg_en>; 49 50 regulator-boot-on; 51 }; 52 53 vreg_misc_3p3: regulator-misc-3p3 { 54 compatible = "regulator-fixed"; 55 56 regulator-name = "VREG_MISC_3P3"; 57 regulator-min-microvolt = <3300000>; 58 regulator-max-microvolt = <3300000>; 59 60 gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>; 61 enable-active-high; 62 63 pinctrl-names = "default"; 64 pinctrl-0 = <&misc_3p3_reg_en>; 65 66 regulator-boot-on; 67 regulator-always-on; 68 }; 69}; 70 71&apps_rsc { 72 pmc8280-1-rpmh-regulators { 73 compatible = "qcom,pm8350-rpmh-regulators"; 74 qcom,pmic-id = "b"; 75 76 vdd-l3-l5-supply = <&vreg_s11b>; 77 78 vreg_s11b: smps11 { 79 regulator-name = "vreg_s11b"; 80 regulator-min-microvolt = <1272000>; 81 regulator-max-microvolt = <1272000>; 82 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 83 }; 84 85 vreg_l3b: ldo3 { 86 regulator-name = "vreg_l3b"; 87 regulator-min-microvolt = <1200000>; 88 regulator-max-microvolt = <1200000>; 89 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 90 regulator-boot-on; 91 regulator-always-on; 92 }; 93 94 vreg_l4b: ldo4 { 95 regulator-name = "vreg_l4b"; 96 regulator-min-microvolt = <912000>; 97 regulator-max-microvolt = <912000>; 98 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 99 }; 100 101 vreg_l6b: ldo6 { 102 regulator-name = "vreg_l6b"; 103 regulator-min-microvolt = <880000>; 104 regulator-max-microvolt = <880000>; 105 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 106 regulator-boot-on; 107 }; 108 }; 109 110 pmc8280c-rpmh-regulators { 111 compatible = "qcom,pm8350c-rpmh-regulators"; 112 qcom,pmic-id = "c"; 113 114 vreg_l1c: ldo1 { 115 regulator-name = "vreg_l1c"; 116 regulator-min-microvolt = <1800000>; 117 regulator-max-microvolt = <1800000>; 118 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 119 }; 120 121 vreg_l7c: ldo7 { 122 regulator-name = "vreg_l7c"; 123 regulator-min-microvolt = <2504000>; 124 regulator-max-microvolt = <2504000>; 125 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 126 regulator-allow-set-load; 127 regulator-allowed-modes = 128 <RPMH_REGULATOR_MODE_LPM 129 RPMH_REGULATOR_MODE_HPM>; 130 }; 131 132 vreg_l13c: ldo13 { 133 regulator-name = "vreg_l13c"; 134 regulator-min-microvolt = <3072000>; 135 regulator-max-microvolt = <3072000>; 136 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 137 }; 138 }; 139 140 pmc8280-2-rpmh-regulators { 141 compatible = "qcom,pm8350-rpmh-regulators"; 142 qcom,pmic-id = "d"; 143 144 vdd-l1-l4-supply = <&vreg_s11b>; 145 146 vreg_l3d: ldo3 { 147 regulator-name = "vreg_l3d"; 148 regulator-min-microvolt = <1200000>; 149 regulator-max-microvolt = <1200000>; 150 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 151 regulator-allow-set-load; 152 regulator-allowed-modes = 153 <RPMH_REGULATOR_MODE_LPM 154 RPMH_REGULATOR_MODE_HPM>; 155 }; 156 157 vreg_l4d: ldo4 { 158 regulator-name = "vreg_l4d"; 159 regulator-min-microvolt = <1200000>; 160 regulator-max-microvolt = <1200000>; 161 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 162 }; 163 164 vreg_l6d: ldo6 { 165 regulator-name = "vreg_l6d"; 166 regulator-min-microvolt = <880000>; 167 regulator-max-microvolt = <880000>; 168 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 169 }; 170 171 vreg_l7d: ldo7 { 172 regulator-name = "vreg_l7d"; 173 regulator-min-microvolt = <3072000>; 174 regulator-max-microvolt = <3072000>; 175 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 176 }; 177 178 vreg_l9d: ldo9 { 179 regulator-name = "vreg_l9d"; 180 regulator-min-microvolt = <912000>; 181 regulator-max-microvolt = <912000>; 182 regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 183 }; 184 }; 185}; 186 187&pmc8280c_lpg { 188 status = "okay"; 189}; 190 191&pmk8280_pon_pwrkey { 192 status = "okay"; 193}; 194 195&qup0 { 196 status = "okay"; 197}; 198 199&qup0_i2c4 { 200 clock-frequency = <400000>; 201 202 pinctrl-names = "default"; 203 pinctrl-0 = <&qup0_i2c4_default>; 204 205 status = "okay"; 206 207 touchscreen@10 { 208 compatible = "hid-over-i2c"; 209 reg = <0x10>; 210 211 hid-descr-addr = <0x1>; 212 interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>; 213 vdd-supply = <&vreg_misc_3p3>; 214 215 pinctrl-names = "default"; 216 pinctrl-0 = <&ts0_default>; 217 }; 218}; 219 220&qup1 { 221 status = "okay"; 222}; 223 224&qup2 { 225 status = "okay"; 226}; 227 228&qup2_i2c5 { 229 clock-frequency = <400000>; 230 231 pinctrl-names = "default"; 232 pinctrl-0 = <&qup2_i2c5_default>; 233 234 status = "okay"; 235 236 touchpad@15 { 237 compatible = "hid-over-i2c"; 238 reg = <0x15>; 239 240 hid-descr-addr = <0x1>; 241 interrupts-extended = <&tlmm 182 IRQ_TYPE_LEVEL_LOW>; 242 vdd-supply = <&vreg_misc_3p3>; 243 244 pinctrl-names = "default"; 245 pinctrl-0 = <&tpad_default>; 246 247 wakeup-source; 248 }; 249 250 keyboard@68 { 251 compatible = "hid-over-i2c"; 252 reg = <0x68>; 253 254 hid-descr-addr = <0x1>; 255 interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>; 256 vdd-supply = <&vreg_misc_3p3>; 257 258 pinctrl-names = "default"; 259 pinctrl-0 = <&kybd_default>; 260 261 wakeup-source; 262 }; 263}; 264 265&qup2_uart17 { 266 compatible = "qcom,geni-debug-uart"; 267 268 status = "okay"; 269}; 270 271&remoteproc_adsp { 272 firmware-name = "qcom/sc8280xp/qcadsp8280.mbn"; 273 274 status = "okay"; 275}; 276 277&remoteproc_nsp0 { 278 firmware-name = "qcom/sc8280xp/qccdsp8280.mbn"; 279 280 status = "okay"; 281}; 282 283&ufs_mem_hc { 284 reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>; 285 286 vcc-supply = <&vreg_l7c>; 287 vcc-max-microamp = <800000>; 288 vccq-supply = <&vreg_l3d>; 289 vccq-max-microamp = <900000>; 290 291 status = "okay"; 292}; 293 294&ufs_mem_phy { 295 vdda-phy-supply = <&vreg_l6b>; 296 vdda-pll-supply = <&vreg_l3b>; 297 298 status = "okay"; 299}; 300 301&usb_0 { 302 status = "okay"; 303}; 304 305&usb_0_dwc3 { 306 /* TODO: Define USB-C connector properly */ 307 dr_mode = "host"; 308}; 309 310&usb_0_hsphy { 311 vdda-pll-supply = <&vreg_l9d>; 312 vdda18-supply = <&vreg_l1c>; 313 vdda33-supply = <&vreg_l7d>; 314 315 status = "okay"; 316}; 317 318&usb_0_qmpphy { 319 vdda-phy-supply = <&vreg_l9d>; 320 vdda-pll-supply = <&vreg_l4d>; 321 322 status = "okay"; 323}; 324 325&usb_1 { 326 status = "okay"; 327}; 328 329&usb_1_dwc3 { 330 /* TODO: Define USB-C connector properly */ 331 dr_mode = "host"; 332}; 333 334&usb_1_hsphy { 335 vdda-pll-supply = <&vreg_l4b>; 336 vdda18-supply = <&vreg_l1c>; 337 vdda33-supply = <&vreg_l13c>; 338 339 status = "okay"; 340}; 341 342&usb_1_qmpphy { 343 vdda-phy-supply = <&vreg_l4b>; 344 vdda-pll-supply = <&vreg_l3b>; 345 346 status = "okay"; 347}; 348 349&xo_board_clk { 350 clock-frequency = <38400000>; 351}; 352 353/* PINCTRL - additions to nodes defined in sc8280xp.dtsi */ 354 355&pmc8280_1_gpios { 356 edp_bl_en: edp-bl-en-state { 357 pins = "gpio8"; 358 function = "normal"; 359 }; 360 361 edp_bl_reg_en: edp-bl-reg-en-state { 362 pins = "gpio9"; 363 function = "normal"; 364 }; 365 366 misc_3p3_reg_en: misc-3p3-reg-en-state { 367 pins = "gpio1"; 368 function = "normal"; 369 }; 370}; 371 372&pmc8280c_gpios { 373 edp_bl_pwm: edp-bl-pwm-state { 374 pins = "gpio8"; 375 function = "func1"; 376 }; 377}; 378 379&tlmm { 380 gpio-reserved-ranges = <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; 381 382 kybd_default: kybd-default-state { 383 disable { 384 pins = "gpio102"; 385 function = "gpio"; 386 output-low; 387 }; 388 389 int-n { 390 pins = "gpio104"; 391 function = "gpio"; 392 bias-disable; 393 }; 394 395 reset { 396 pins = "gpio105"; 397 function = "gpio"; 398 bias-disable; 399 }; 400 }; 401 402 qup0_i2c4_default: qup0-i2c4-default-state { 403 pins = "gpio171", "gpio172"; 404 function = "qup4"; 405 406 bias-disable; 407 drive-strength = <16>; 408 }; 409 410 qup2_i2c5_default: qup2-i2c5-default-state { 411 pins = "gpio81", "gpio82"; 412 function = "qup21"; 413 414 bias-disable; 415 drive-strength = <16>; 416 }; 417 418 tpad_default: tpad-default-state { 419 int-n { 420 pins = "gpio182"; 421 function = "gpio"; 422 bias-disable; 423 }; 424 }; 425 426 ts0_default: ts0-default-state { 427 int-n { 428 pins = "gpio175"; 429 function = "gpio"; 430 bias-disable; 431 }; 432 433 reset-n { 434 pins = "gpio99"; 435 function = "gpio"; 436 output-high; 437 drive-strength = <16>; 438 }; 439 }; 440}; 441