1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2014 MediaTek Inc. 4 * Author: Eddie Huang <eddie.huang@mediatek.com> 5 */ 6 7/dts-v1/; 8#include <dt-bindings/gpio/gpio.h> 9#include "mt8173.dtsi" 10 11/ { 12 model = "MediaTek MT8173 evaluation board"; 13 chassis-type = "embedded"; 14 compatible = "mediatek,mt8173-evb", "mediatek,mt8173"; 15 16 aliases { 17 serial0 = &uart0; 18 serial1 = &uart1; 19 serial2 = &uart2; 20 serial3 = &uart3; 21 }; 22 23 memory@40000000 { 24 device_type = "memory"; 25 reg = <0 0x40000000 0 0x80000000>; 26 }; 27 28 chosen { }; 29 30 connector { 31 compatible = "hdmi-connector"; 32 label = "hdmi"; 33 type = "d"; 34 35 port { 36 hdmi_connector_in: endpoint { 37 remote-endpoint = <&hdmi0_out>; 38 }; 39 }; 40 }; 41 42 extcon_usb: extcon_iddig { 43 compatible = "linux,extcon-usb-gpio"; 44 id-gpio = <&pio 16 GPIO_ACTIVE_HIGH>; 45 }; 46 47 usb_p1_vbus: regulator-usb-p1 { 48 compatible = "regulator-fixed"; 49 regulator-name = "usb_vbus"; 50 regulator-min-microvolt = <5000000>; 51 regulator-max-microvolt = <5000000>; 52 gpio = <&pio 130 GPIO_ACTIVE_HIGH>; 53 enable-active-high; 54 }; 55 56 usb_p0_vbus: regulator-usb-p0 { 57 compatible = "regulator-fixed"; 58 regulator-name = "vbus"; 59 regulator-min-microvolt = <5000000>; 60 regulator-max-microvolt = <5000000>; 61 gpio = <&pio 9 GPIO_ACTIVE_HIGH>; 62 enable-active-high; 63 }; 64}; 65 66&mfg_async { 67 domain-supply = <&da9211_vgpu_reg>; 68}; 69 70&cec { 71 status = "okay"; 72}; 73 74&cpu0 { 75 proc-supply = <&mt6397_vpca15_reg>; 76}; 77 78&cpu1 { 79 proc-supply = <&mt6397_vpca15_reg>; 80}; 81 82&cpu2 { 83 proc-supply = <&da9211_vcpu_reg>; 84 sram-supply = <&mt6397_vsramca7_reg>; 85}; 86 87&cpu3 { 88 proc-supply = <&da9211_vcpu_reg>; 89 sram-supply = <&mt6397_vsramca7_reg>; 90}; 91 92&dpi0 { 93 status = "okay"; 94}; 95 96&hdmi_phy { 97 status = "okay"; 98}; 99 100&hdmi0 { 101 status = "okay"; 102 103 ports { 104 port@1 { 105 reg = <1>; 106 107 hdmi0_out: endpoint { 108 remote-endpoint = <&hdmi_connector_in>; 109 }; 110 }; 111 }; 112}; 113 114&i2c1 { 115 status = "okay"; 116 117 buck: da9211@68 { 118 compatible = "dlg,da9211"; 119 reg = <0x68>; 120 121 regulators { 122 da9211_vcpu_reg: BUCKA { 123 regulator-name = "VBUCKA"; 124 regulator-min-microvolt = < 700000>; 125 regulator-max-microvolt = <1310000>; 126 regulator-min-microamp = <2000000>; 127 regulator-max-microamp = <4400000>; 128 regulator-ramp-delay = <10000>; 129 regulator-always-on; 130 }; 131 132 da9211_vgpu_reg: BUCKB { 133 regulator-name = "VBUCKB"; 134 regulator-min-microvolt = < 700000>; 135 regulator-max-microvolt = <1310000>; 136 regulator-min-microamp = <2000000>; 137 regulator-max-microamp = <3000000>; 138 regulator-ramp-delay = <10000>; 139 }; 140 }; 141 }; 142}; 143 144&mmc0 { 145 status = "okay"; 146 pinctrl-names = "default", "state_uhs"; 147 pinctrl-0 = <&mmc0_pins_default>; 148 pinctrl-1 = <&mmc0_pins_uhs>; 149 bus-width = <8>; 150 max-frequency = <50000000>; 151 cap-mmc-highspeed; 152 mediatek,hs200-cmd-int-delay = <26>; 153 mediatek,hs400-cmd-int-delay = <14>; 154 mediatek,hs400-cmd-resp-sel-rising; 155 vmmc-supply = <&mt6397_vemc_3v3_reg>; 156 vqmmc-supply = <&mt6397_vio18_reg>; 157 non-removable; 158}; 159 160&mmc1 { 161 status = "okay"; 162 pinctrl-names = "default", "state_uhs"; 163 pinctrl-0 = <&mmc1_pins_default>; 164 pinctrl-1 = <&mmc1_pins_uhs>; 165 bus-width = <4>; 166 max-frequency = <50000000>; 167 cap-sd-highspeed; 168 sd-uhs-sdr25; 169 cd-gpios = <&pio 132 0>; 170 vmmc-supply = <&mt6397_vmch_reg>; 171 vqmmc-supply = <&mt6397_vmc_reg>; 172}; 173 174&pio { 175 disp_pwm0_pins: disp_pwm0_pins { 176 pins1 { 177 pinmux = <MT8173_PIN_87_DISP_PWM0__FUNC_DISP_PWM0>; 178 output-low; 179 }; 180 }; 181 182 mmc0_pins_default: mmc0default { 183 pins_cmd_dat { 184 pinmux = <MT8173_PIN_57_MSDC0_DAT0__FUNC_MSDC0_DAT0>, 185 <MT8173_PIN_58_MSDC0_DAT1__FUNC_MSDC0_DAT1>, 186 <MT8173_PIN_59_MSDC0_DAT2__FUNC_MSDC0_DAT2>, 187 <MT8173_PIN_60_MSDC0_DAT3__FUNC_MSDC0_DAT3>, 188 <MT8173_PIN_61_MSDC0_DAT4__FUNC_MSDC0_DAT4>, 189 <MT8173_PIN_62_MSDC0_DAT5__FUNC_MSDC0_DAT5>, 190 <MT8173_PIN_63_MSDC0_DAT6__FUNC_MSDC0_DAT6>, 191 <MT8173_PIN_64_MSDC0_DAT7__FUNC_MSDC0_DAT7>, 192 <MT8173_PIN_66_MSDC0_CMD__FUNC_MSDC0_CMD>; 193 input-enable; 194 bias-pull-up; 195 }; 196 197 pins_clk { 198 pinmux = <MT8173_PIN_65_MSDC0_CLK__FUNC_MSDC0_CLK>; 199 bias-pull-down; 200 }; 201 202 pins_rst { 203 pinmux = <MT8173_PIN_68_MSDC0_RST___FUNC_MSDC0_RSTB>; 204 bias-pull-up; 205 }; 206 }; 207 208 mmc1_pins_default: mmc1default { 209 pins_cmd_dat { 210 pinmux = <MT8173_PIN_73_MSDC1_DAT0__FUNC_MSDC1_DAT0>, 211 <MT8173_PIN_74_MSDC1_DAT1__FUNC_MSDC1_DAT1>, 212 <MT8173_PIN_75_MSDC1_DAT2__FUNC_MSDC1_DAT2>, 213 <MT8173_PIN_76_MSDC1_DAT3__FUNC_MSDC1_DAT3>, 214 <MT8173_PIN_78_MSDC1_CMD__FUNC_MSDC1_CMD>; 215 input-enable; 216 drive-strength = <MTK_DRIVE_4mA>; 217 bias-pull-up = <MTK_PUPD_SET_R1R0_10>; 218 }; 219 220 pins_clk { 221 pinmux = <MT8173_PIN_77_MSDC1_CLK__FUNC_MSDC1_CLK>; 222 bias-pull-down; 223 drive-strength = <MTK_DRIVE_4mA>; 224 }; 225 226 pins_insert { 227 pinmux = <MT8173_PIN_132_I2S0_DATA1__FUNC_GPIO132>; 228 bias-pull-up; 229 }; 230 }; 231 232 mmc0_pins_uhs: mmc0 { 233 pins_cmd_dat { 234 pinmux = <MT8173_PIN_57_MSDC0_DAT0__FUNC_MSDC0_DAT0>, 235 <MT8173_PIN_58_MSDC0_DAT1__FUNC_MSDC0_DAT1>, 236 <MT8173_PIN_59_MSDC0_DAT2__FUNC_MSDC0_DAT2>, 237 <MT8173_PIN_60_MSDC0_DAT3__FUNC_MSDC0_DAT3>, 238 <MT8173_PIN_61_MSDC0_DAT4__FUNC_MSDC0_DAT4>, 239 <MT8173_PIN_62_MSDC0_DAT5__FUNC_MSDC0_DAT5>, 240 <MT8173_PIN_63_MSDC0_DAT6__FUNC_MSDC0_DAT6>, 241 <MT8173_PIN_64_MSDC0_DAT7__FUNC_MSDC0_DAT7>, 242 <MT8173_PIN_66_MSDC0_CMD__FUNC_MSDC0_CMD>; 243 input-enable; 244 drive-strength = <MTK_DRIVE_2mA>; 245 bias-pull-up = <MTK_PUPD_SET_R1R0_01>; 246 }; 247 248 pins_clk { 249 pinmux = <MT8173_PIN_65_MSDC0_CLK__FUNC_MSDC0_CLK>; 250 drive-strength = <MTK_DRIVE_2mA>; 251 bias-pull-down = <MTK_PUPD_SET_R1R0_01>; 252 }; 253 254 pins_rst { 255 pinmux = <MT8173_PIN_68_MSDC0_RST___FUNC_MSDC0_RSTB>; 256 bias-pull-up; 257 }; 258 }; 259 260 mmc1_pins_uhs: mmc1 { 261 pins_cmd_dat { 262 pinmux = <MT8173_PIN_73_MSDC1_DAT0__FUNC_MSDC1_DAT0>, 263 <MT8173_PIN_74_MSDC1_DAT1__FUNC_MSDC1_DAT1>, 264 <MT8173_PIN_75_MSDC1_DAT2__FUNC_MSDC1_DAT2>, 265 <MT8173_PIN_76_MSDC1_DAT3__FUNC_MSDC1_DAT3>, 266 <MT8173_PIN_78_MSDC1_CMD__FUNC_MSDC1_CMD>; 267 input-enable; 268 drive-strength = <MTK_DRIVE_4mA>; 269 bias-pull-up = <MTK_PUPD_SET_R1R0_10>; 270 }; 271 272 pins_clk { 273 pinmux = <MT8173_PIN_77_MSDC1_CLK__FUNC_MSDC1_CLK>; 274 drive-strength = <MTK_DRIVE_4mA>; 275 bias-pull-down = <MTK_PUPD_SET_R1R0_10>; 276 }; 277 }; 278 279 usb_id_pins_float: usb_iddig_pull_up { 280 pins_iddig { 281 pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>; 282 bias-pull-up; 283 }; 284 }; 285 286 usb_id_pins_ground: usb_iddig_pull_down { 287 pins_iddig { 288 pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>; 289 bias-pull-down; 290 }; 291 }; 292}; 293 294&pwm0 { 295 pinctrl-names = "default"; 296 pinctrl-0 = <&disp_pwm0_pins>; 297 status = "okay"; 298}; 299 300&pwrap { 301 /* Only MT8173 E1 needs USB power domain */ 302 power-domains = <&spm MT8173_POWER_DOMAIN_USB>; 303 304 pmic: pmic { 305 compatible = "mediatek,mt6397"; 306 interrupt-parent = <&pio>; 307 interrupts = <11 IRQ_TYPE_LEVEL_HIGH>; 308 interrupt-controller; 309 #interrupt-cells = <2>; 310 311 regulators { 312 compatible = "mediatek,mt6397-regulator"; 313 314 mt6397_vpca15_reg: buck_vpca15 { 315 regulator-name = "vpca15"; 316 regulator-min-microvolt = < 700000>; 317 regulator-max-microvolt = <1350000>; 318 regulator-ramp-delay = <12500>; 319 regulator-always-on; 320 }; 321 322 mt6397_vpca7_reg: buck_vpca7 { 323 regulator-name = "vpca7"; 324 regulator-min-microvolt = < 700000>; 325 regulator-max-microvolt = <1350000>; 326 regulator-ramp-delay = <12500>; 327 regulator-enable-ramp-delay = <115>; 328 }; 329 330 mt6397_vsramca15_reg: buck_vsramca15 { 331 regulator-name = "vsramca15"; 332 regulator-min-microvolt = < 700000>; 333 regulator-max-microvolt = <1350000>; 334 regulator-ramp-delay = <12500>; 335 regulator-always-on; 336 }; 337 338 mt6397_vsramca7_reg: buck_vsramca7 { 339 regulator-name = "vsramca7"; 340 regulator-min-microvolt = < 700000>; 341 regulator-max-microvolt = <1350000>; 342 regulator-ramp-delay = <12500>; 343 regulator-always-on; 344 }; 345 346 mt6397_vcore_reg: buck_vcore { 347 regulator-name = "vcore"; 348 regulator-min-microvolt = < 700000>; 349 regulator-max-microvolt = <1350000>; 350 regulator-ramp-delay = <12500>; 351 regulator-always-on; 352 }; 353 354 mt6397_vgpu_reg: buck_vgpu { 355 regulator-name = "vgpu"; 356 regulator-min-microvolt = < 700000>; 357 regulator-max-microvolt = <1350000>; 358 regulator-ramp-delay = <12500>; 359 regulator-enable-ramp-delay = <115>; 360 }; 361 362 mt6397_vdrm_reg: buck_vdrm { 363 regulator-name = "vdrm"; 364 regulator-min-microvolt = <1200000>; 365 regulator-max-microvolt = <1400000>; 366 regulator-ramp-delay = <12500>; 367 regulator-always-on; 368 }; 369 370 mt6397_vio18_reg: buck_vio18 { 371 regulator-name = "vio18"; 372 regulator-min-microvolt = <1620000>; 373 regulator-max-microvolt = <1980000>; 374 regulator-ramp-delay = <12500>; 375 regulator-always-on; 376 }; 377 378 mt6397_vtcxo_reg: ldo_vtcxo { 379 regulator-name = "vtcxo"; 380 regulator-always-on; 381 }; 382 383 mt6397_va28_reg: ldo_va28 { 384 regulator-name = "va28"; 385 regulator-always-on; 386 }; 387 388 mt6397_vcama_reg: ldo_vcama { 389 regulator-name = "vcama"; 390 regulator-min-microvolt = <1500000>; 391 regulator-max-microvolt = <2800000>; 392 regulator-enable-ramp-delay = <218>; 393 }; 394 395 mt6397_vio28_reg: ldo_vio28 { 396 regulator-name = "vio28"; 397 regulator-always-on; 398 }; 399 400 mt6397_vusb_reg: ldo_vusb { 401 regulator-name = "vusb"; 402 }; 403 404 mt6397_vmc_reg: ldo_vmc { 405 regulator-name = "vmc"; 406 regulator-min-microvolt = <1800000>; 407 regulator-max-microvolt = <3300000>; 408 regulator-enable-ramp-delay = <218>; 409 }; 410 411 mt6397_vmch_reg: ldo_vmch { 412 regulator-name = "vmch"; 413 regulator-min-microvolt = <3000000>; 414 regulator-max-microvolt = <3300000>; 415 regulator-enable-ramp-delay = <218>; 416 }; 417 418 mt6397_vemc_3v3_reg: ldo_vemc3v3 { 419 regulator-name = "vemc_3v3"; 420 regulator-min-microvolt = <3000000>; 421 regulator-max-microvolt = <3300000>; 422 regulator-enable-ramp-delay = <218>; 423 }; 424 425 mt6397_vgp1_reg: ldo_vgp1 { 426 regulator-name = "vcamd"; 427 regulator-min-microvolt = <1220000>; 428 regulator-max-microvolt = <3300000>; 429 regulator-enable-ramp-delay = <240>; 430 }; 431 432 mt6397_vgp2_reg: ldo_vgp2 { 433 regulator-name = "vcamio"; 434 regulator-min-microvolt = <1000000>; 435 regulator-max-microvolt = <3300000>; 436 regulator-enable-ramp-delay = <218>; 437 }; 438 439 mt6397_vgp3_reg: ldo_vgp3 { 440 regulator-name = "vcamaf"; 441 regulator-min-microvolt = <1200000>; 442 regulator-max-microvolt = <3300000>; 443 regulator-enable-ramp-delay = <218>; 444 }; 445 446 mt6397_vgp4_reg: ldo_vgp4 { 447 regulator-name = "vgp4"; 448 regulator-min-microvolt = <1200000>; 449 regulator-max-microvolt = <3300000>; 450 regulator-enable-ramp-delay = <218>; 451 }; 452 453 mt6397_vgp5_reg: ldo_vgp5 { 454 regulator-name = "vgp5"; 455 regulator-min-microvolt = <1200000>; 456 regulator-max-microvolt = <3000000>; 457 regulator-enable-ramp-delay = <218>; 458 }; 459 460 mt6397_vgp6_reg: ldo_vgp6 { 461 regulator-name = "vgp6"; 462 regulator-min-microvolt = <1200000>; 463 regulator-max-microvolt = <3300000>; 464 regulator-enable-ramp-delay = <218>; 465 }; 466 467 mt6397_vibr_reg: ldo_vibr { 468 regulator-name = "vibr"; 469 regulator-min-microvolt = <1300000>; 470 regulator-max-microvolt = <3300000>; 471 regulator-enable-ramp-delay = <218>; 472 }; 473 }; 474 }; 475}; 476 477&pio { 478 spi_pins_a: spi0 { 479 pins_spi { 480 pinmux = <MT8173_PIN_69_SPI_CK__FUNC_SPI_CK_0_>, 481 <MT8173_PIN_70_SPI_MI__FUNC_SPI_MI_0_>, 482 <MT8173_PIN_71_SPI_MO__FUNC_SPI_MO_0_>, 483 <MT8173_PIN_72_SPI_CS__FUNC_SPI_CS_0_>; 484 }; 485 }; 486}; 487 488&spi { 489 pinctrl-names = "default"; 490 pinctrl-0 = <&spi_pins_a>; 491 mediatek,pad-select = <0>; 492 status = "okay"; 493}; 494 495&ssusb { 496 vusb33-supply = <&mt6397_vusb_reg>; 497 vbus-supply = <&usb_p0_vbus>; 498 extcon = <&extcon_usb>; 499 dr_mode = "otg"; 500 wakeup-source; 501 pinctrl-names = "default"; 502 pinctrl-0 = <&usb_id_pins_float>; 503 status = "okay"; 504}; 505 506&uart0 { 507 status = "okay"; 508}; 509 510&usb_host { 511 vusb33-supply = <&mt6397_vusb_reg>; 512 vbus-supply = <&usb_p1_vbus>; 513 status = "okay"; 514}; 515