0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003 * Copyright (c) 2014 MediaTek Inc.
0004 * Author: Eddie Huang <eddie.huang@mediatek.com>
0005 */
0006
0007 /dts-v1/;
0008 #include <dt-bindings/gpio/gpio.h>
0009 #include "mt8173.dtsi"
0010
0011 / {
0012 model = "MediaTek MT8173 evaluation board";
0013 compatible = "mediatek,mt8173-evb", "mediatek,mt8173";
0014
0015 aliases {
0016 serial0 = &uart0;
0017 serial1 = &uart1;
0018 serial2 = &uart2;
0019 serial3 = &uart3;
0020 };
0021
0022 memory@40000000 {
0023 device_type = "memory";
0024 reg = <0 0x40000000 0 0x80000000>;
0025 };
0026
0027 chosen { };
0028
0029 connector {
0030 compatible = "hdmi-connector";
0031 label = "hdmi";
0032 type = "d";
0033
0034 port {
0035 hdmi_connector_in: endpoint {
0036 remote-endpoint = <&hdmi0_out>;
0037 };
0038 };
0039 };
0040
0041 extcon_usb: extcon_iddig {
0042 compatible = "linux,extcon-usb-gpio";
0043 id-gpio = <&pio 16 GPIO_ACTIVE_HIGH>;
0044 };
0045
0046 usb_p1_vbus: regulator@0 {
0047 compatible = "regulator-fixed";
0048 regulator-name = "usb_vbus";
0049 regulator-min-microvolt = <5000000>;
0050 regulator-max-microvolt = <5000000>;
0051 gpio = <&pio 130 GPIO_ACTIVE_HIGH>;
0052 enable-active-high;
0053 };
0054
0055 usb_p0_vbus: regulator@1 {
0056 compatible = "regulator-fixed";
0057 regulator-name = "vbus";
0058 regulator-min-microvolt = <5000000>;
0059 regulator-max-microvolt = <5000000>;
0060 gpio = <&pio 9 GPIO_ACTIVE_HIGH>;
0061 enable-active-high;
0062 };
0063 };
0064
0065 &mfg_async {
0066 domain-supply = <&da9211_vgpu_reg>;
0067 };
0068
0069 &cec {
0070 status = "okay";
0071 };
0072
0073 &cpu0 {
0074 proc-supply = <&mt6397_vpca15_reg>;
0075 };
0076
0077 &cpu1 {
0078 proc-supply = <&mt6397_vpca15_reg>;
0079 };
0080
0081 &cpu2 {
0082 proc-supply = <&da9211_vcpu_reg>;
0083 sram-supply = <&mt6397_vsramca7_reg>;
0084 };
0085
0086 &cpu3 {
0087 proc-supply = <&da9211_vcpu_reg>;
0088 sram-supply = <&mt6397_vsramca7_reg>;
0089 };
0090
0091 &dpi0 {
0092 status = "okay";
0093 };
0094
0095 &hdmi_phy {
0096 status = "okay";
0097 };
0098
0099 &hdmi0 {
0100 status = "okay";
0101
0102 ports {
0103 port@1 {
0104 reg = <1>;
0105
0106 hdmi0_out: endpoint {
0107 remote-endpoint = <&hdmi_connector_in>;
0108 };
0109 };
0110 };
0111 };
0112
0113 &i2c1 {
0114 status = "okay";
0115
0116 buck: da9211@68 {
0117 compatible = "dlg,da9211";
0118 reg = <0x68>;
0119
0120 regulators {
0121 da9211_vcpu_reg: BUCKA {
0122 regulator-name = "VBUCKA";
0123 regulator-min-microvolt = < 700000>;
0124 regulator-max-microvolt = <1310000>;
0125 regulator-min-microamp = <2000000>;
0126 regulator-max-microamp = <4400000>;
0127 regulator-ramp-delay = <10000>;
0128 regulator-always-on;
0129 };
0130
0131 da9211_vgpu_reg: BUCKB {
0132 regulator-name = "VBUCKB";
0133 regulator-min-microvolt = < 700000>;
0134 regulator-max-microvolt = <1310000>;
0135 regulator-min-microamp = <2000000>;
0136 regulator-max-microamp = <3000000>;
0137 regulator-ramp-delay = <10000>;
0138 };
0139 };
0140 };
0141 };
0142
0143 &mmc0 {
0144 status = "okay";
0145 pinctrl-names = "default", "state_uhs";
0146 pinctrl-0 = <&mmc0_pins_default>;
0147 pinctrl-1 = <&mmc0_pins_uhs>;
0148 bus-width = <8>;
0149 max-frequency = <50000000>;
0150 cap-mmc-highspeed;
0151 mediatek,hs200-cmd-int-delay = <26>;
0152 mediatek,hs400-cmd-int-delay = <14>;
0153 mediatek,hs400-cmd-resp-sel-rising;
0154 vmmc-supply = <&mt6397_vemc_3v3_reg>;
0155 vqmmc-supply = <&mt6397_vio18_reg>;
0156 non-removable;
0157 };
0158
0159 &mmc1 {
0160 status = "okay";
0161 pinctrl-names = "default", "state_uhs";
0162 pinctrl-0 = <&mmc1_pins_default>;
0163 pinctrl-1 = <&mmc1_pins_uhs>;
0164 bus-width = <4>;
0165 max-frequency = <50000000>;
0166 cap-sd-highspeed;
0167 sd-uhs-sdr25;
0168 cd-gpios = <&pio 132 0>;
0169 vmmc-supply = <&mt6397_vmch_reg>;
0170 vqmmc-supply = <&mt6397_vmc_reg>;
0171 };
0172
0173 &pio {
0174 disp_pwm0_pins: disp_pwm0_pins {
0175 pins1 {
0176 pinmux = <MT8173_PIN_87_DISP_PWM0__FUNC_DISP_PWM0>;
0177 output-low;
0178 };
0179 };
0180
0181 mmc0_pins_default: mmc0default {
0182 pins_cmd_dat {
0183 pinmux = <MT8173_PIN_57_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
0184 <MT8173_PIN_58_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
0185 <MT8173_PIN_59_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
0186 <MT8173_PIN_60_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
0187 <MT8173_PIN_61_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
0188 <MT8173_PIN_62_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
0189 <MT8173_PIN_63_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
0190 <MT8173_PIN_64_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
0191 <MT8173_PIN_66_MSDC0_CMD__FUNC_MSDC0_CMD>;
0192 input-enable;
0193 bias-pull-up;
0194 };
0195
0196 pins_clk {
0197 pinmux = <MT8173_PIN_65_MSDC0_CLK__FUNC_MSDC0_CLK>;
0198 bias-pull-down;
0199 };
0200
0201 pins_rst {
0202 pinmux = <MT8173_PIN_68_MSDC0_RST___FUNC_MSDC0_RSTB>;
0203 bias-pull-up;
0204 };
0205 };
0206
0207 mmc1_pins_default: mmc1default {
0208 pins_cmd_dat {
0209 pinmux = <MT8173_PIN_73_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
0210 <MT8173_PIN_74_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
0211 <MT8173_PIN_75_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
0212 <MT8173_PIN_76_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
0213 <MT8173_PIN_78_MSDC1_CMD__FUNC_MSDC1_CMD>;
0214 input-enable;
0215 drive-strength = <MTK_DRIVE_4mA>;
0216 bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
0217 };
0218
0219 pins_clk {
0220 pinmux = <MT8173_PIN_77_MSDC1_CLK__FUNC_MSDC1_CLK>;
0221 bias-pull-down;
0222 drive-strength = <MTK_DRIVE_4mA>;
0223 };
0224
0225 pins_insert {
0226 pinmux = <MT8173_PIN_132_I2S0_DATA1__FUNC_GPIO132>;
0227 bias-pull-up;
0228 };
0229 };
0230
0231 mmc0_pins_uhs: mmc0 {
0232 pins_cmd_dat {
0233 pinmux = <MT8173_PIN_57_MSDC0_DAT0__FUNC_MSDC0_DAT0>,
0234 <MT8173_PIN_58_MSDC0_DAT1__FUNC_MSDC0_DAT1>,
0235 <MT8173_PIN_59_MSDC0_DAT2__FUNC_MSDC0_DAT2>,
0236 <MT8173_PIN_60_MSDC0_DAT3__FUNC_MSDC0_DAT3>,
0237 <MT8173_PIN_61_MSDC0_DAT4__FUNC_MSDC0_DAT4>,
0238 <MT8173_PIN_62_MSDC0_DAT5__FUNC_MSDC0_DAT5>,
0239 <MT8173_PIN_63_MSDC0_DAT6__FUNC_MSDC0_DAT6>,
0240 <MT8173_PIN_64_MSDC0_DAT7__FUNC_MSDC0_DAT7>,
0241 <MT8173_PIN_66_MSDC0_CMD__FUNC_MSDC0_CMD>;
0242 input-enable;
0243 drive-strength = <MTK_DRIVE_2mA>;
0244 bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
0245 };
0246
0247 pins_clk {
0248 pinmux = <MT8173_PIN_65_MSDC0_CLK__FUNC_MSDC0_CLK>;
0249 drive-strength = <MTK_DRIVE_2mA>;
0250 bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
0251 };
0252
0253 pins_rst {
0254 pinmux = <MT8173_PIN_68_MSDC0_RST___FUNC_MSDC0_RSTB>;
0255 bias-pull-up;
0256 };
0257 };
0258
0259 mmc1_pins_uhs: mmc1 {
0260 pins_cmd_dat {
0261 pinmux = <MT8173_PIN_73_MSDC1_DAT0__FUNC_MSDC1_DAT0>,
0262 <MT8173_PIN_74_MSDC1_DAT1__FUNC_MSDC1_DAT1>,
0263 <MT8173_PIN_75_MSDC1_DAT2__FUNC_MSDC1_DAT2>,
0264 <MT8173_PIN_76_MSDC1_DAT3__FUNC_MSDC1_DAT3>,
0265 <MT8173_PIN_78_MSDC1_CMD__FUNC_MSDC1_CMD>;
0266 input-enable;
0267 drive-strength = <MTK_DRIVE_4mA>;
0268 bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
0269 };
0270
0271 pins_clk {
0272 pinmux = <MT8173_PIN_77_MSDC1_CLK__FUNC_MSDC1_CLK>;
0273 drive-strength = <MTK_DRIVE_4mA>;
0274 bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
0275 };
0276 };
0277
0278 usb_id_pins_float: usb_iddig_pull_up {
0279 pins_iddig {
0280 pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>;
0281 bias-pull-up;
0282 };
0283 };
0284
0285 usb_id_pins_ground: usb_iddig_pull_down {
0286 pins_iddig {
0287 pinmux = <MT8173_PIN_16_IDDIG__FUNC_IDDIG>;
0288 bias-pull-down;
0289 };
0290 };
0291 };
0292
0293 &pwm0 {
0294 pinctrl-names = "default";
0295 pinctrl-0 = <&disp_pwm0_pins>;
0296 status = "okay";
0297 };
0298
0299 &pwrap {
0300 /* Only MT8173 E1 needs USB power domain */
0301 power-domains = <&spm MT8173_POWER_DOMAIN_USB>;
0302
0303 pmic: mt6397 {
0304 compatible = "mediatek,mt6397";
0305 interrupt-parent = <&pio>;
0306 interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
0307 interrupt-controller;
0308 #interrupt-cells = <2>;
0309
0310 mt6397regulator: mt6397regulator {
0311 compatible = "mediatek,mt6397-regulator";
0312
0313 mt6397_vpca15_reg: buck_vpca15 {
0314 regulator-compatible = "buck_vpca15";
0315 regulator-name = "vpca15";
0316 regulator-min-microvolt = < 700000>;
0317 regulator-max-microvolt = <1350000>;
0318 regulator-ramp-delay = <12500>;
0319 regulator-always-on;
0320 };
0321
0322 mt6397_vpca7_reg: buck_vpca7 {
0323 regulator-compatible = "buck_vpca7";
0324 regulator-name = "vpca7";
0325 regulator-min-microvolt = < 700000>;
0326 regulator-max-microvolt = <1350000>;
0327 regulator-ramp-delay = <12500>;
0328 regulator-enable-ramp-delay = <115>;
0329 };
0330
0331 mt6397_vsramca15_reg: buck_vsramca15 {
0332 regulator-compatible = "buck_vsramca15";
0333 regulator-name = "vsramca15";
0334 regulator-min-microvolt = < 700000>;
0335 regulator-max-microvolt = <1350000>;
0336 regulator-ramp-delay = <12500>;
0337 regulator-always-on;
0338 };
0339
0340 mt6397_vsramca7_reg: buck_vsramca7 {
0341 regulator-compatible = "buck_vsramca7";
0342 regulator-name = "vsramca7";
0343 regulator-min-microvolt = < 700000>;
0344 regulator-max-microvolt = <1350000>;
0345 regulator-ramp-delay = <12500>;
0346 regulator-always-on;
0347 };
0348
0349 mt6397_vcore_reg: buck_vcore {
0350 regulator-compatible = "buck_vcore";
0351 regulator-name = "vcore";
0352 regulator-min-microvolt = < 700000>;
0353 regulator-max-microvolt = <1350000>;
0354 regulator-ramp-delay = <12500>;
0355 regulator-always-on;
0356 };
0357
0358 mt6397_vgpu_reg: buck_vgpu {
0359 regulator-compatible = "buck_vgpu";
0360 regulator-name = "vgpu";
0361 regulator-min-microvolt = < 700000>;
0362 regulator-max-microvolt = <1350000>;
0363 regulator-ramp-delay = <12500>;
0364 regulator-enable-ramp-delay = <115>;
0365 };
0366
0367 mt6397_vdrm_reg: buck_vdrm {
0368 regulator-compatible = "buck_vdrm";
0369 regulator-name = "vdrm";
0370 regulator-min-microvolt = <1200000>;
0371 regulator-max-microvolt = <1400000>;
0372 regulator-ramp-delay = <12500>;
0373 regulator-always-on;
0374 };
0375
0376 mt6397_vio18_reg: buck_vio18 {
0377 regulator-compatible = "buck_vio18";
0378 regulator-name = "vio18";
0379 regulator-min-microvolt = <1620000>;
0380 regulator-max-microvolt = <1980000>;
0381 regulator-ramp-delay = <12500>;
0382 regulator-always-on;
0383 };
0384
0385 mt6397_vtcxo_reg: ldo_vtcxo {
0386 regulator-compatible = "ldo_vtcxo";
0387 regulator-name = "vtcxo";
0388 regulator-always-on;
0389 };
0390
0391 mt6397_va28_reg: ldo_va28 {
0392 regulator-compatible = "ldo_va28";
0393 regulator-name = "va28";
0394 regulator-always-on;
0395 };
0396
0397 mt6397_vcama_reg: ldo_vcama {
0398 regulator-compatible = "ldo_vcama";
0399 regulator-name = "vcama";
0400 regulator-min-microvolt = <1500000>;
0401 regulator-max-microvolt = <2800000>;
0402 regulator-enable-ramp-delay = <218>;
0403 };
0404
0405 mt6397_vio28_reg: ldo_vio28 {
0406 regulator-compatible = "ldo_vio28";
0407 regulator-name = "vio28";
0408 regulator-always-on;
0409 };
0410
0411 mt6397_vusb_reg: ldo_vusb {
0412 regulator-compatible = "ldo_vusb";
0413 regulator-name = "vusb";
0414 };
0415
0416 mt6397_vmc_reg: ldo_vmc {
0417 regulator-compatible = "ldo_vmc";
0418 regulator-name = "vmc";
0419 regulator-min-microvolt = <1800000>;
0420 regulator-max-microvolt = <3300000>;
0421 regulator-enable-ramp-delay = <218>;
0422 };
0423
0424 mt6397_vmch_reg: ldo_vmch {
0425 regulator-compatible = "ldo_vmch";
0426 regulator-name = "vmch";
0427 regulator-min-microvolt = <3000000>;
0428 regulator-max-microvolt = <3300000>;
0429 regulator-enable-ramp-delay = <218>;
0430 };
0431
0432 mt6397_vemc_3v3_reg: ldo_vemc3v3 {
0433 regulator-compatible = "ldo_vemc3v3";
0434 regulator-name = "vemc_3v3";
0435 regulator-min-microvolt = <3000000>;
0436 regulator-max-microvolt = <3300000>;
0437 regulator-enable-ramp-delay = <218>;
0438 };
0439
0440 mt6397_vgp1_reg: ldo_vgp1 {
0441 regulator-compatible = "ldo_vgp1";
0442 regulator-name = "vcamd";
0443 regulator-min-microvolt = <1220000>;
0444 regulator-max-microvolt = <3300000>;
0445 regulator-enable-ramp-delay = <240>;
0446 };
0447
0448 mt6397_vgp2_reg: ldo_vgp2 {
0449 regulator-compatible = "ldo_vgp2";
0450 regulator-name = "vcamio";
0451 regulator-min-microvolt = <1000000>;
0452 regulator-max-microvolt = <3300000>;
0453 regulator-enable-ramp-delay = <218>;
0454 };
0455
0456 mt6397_vgp3_reg: ldo_vgp3 {
0457 regulator-compatible = "ldo_vgp3";
0458 regulator-name = "vcamaf";
0459 regulator-min-microvolt = <1200000>;
0460 regulator-max-microvolt = <3300000>;
0461 regulator-enable-ramp-delay = <218>;
0462 };
0463
0464 mt6397_vgp4_reg: ldo_vgp4 {
0465 regulator-compatible = "ldo_vgp4";
0466 regulator-name = "vgp4";
0467 regulator-min-microvolt = <1200000>;
0468 regulator-max-microvolt = <3300000>;
0469 regulator-enable-ramp-delay = <218>;
0470 };
0471
0472 mt6397_vgp5_reg: ldo_vgp5 {
0473 regulator-compatible = "ldo_vgp5";
0474 regulator-name = "vgp5";
0475 regulator-min-microvolt = <1200000>;
0476 regulator-max-microvolt = <3000000>;
0477 regulator-enable-ramp-delay = <218>;
0478 };
0479
0480 mt6397_vgp6_reg: ldo_vgp6 {
0481 regulator-compatible = "ldo_vgp6";
0482 regulator-name = "vgp6";
0483 regulator-min-microvolt = <1200000>;
0484 regulator-max-microvolt = <3300000>;
0485 regulator-enable-ramp-delay = <218>;
0486 };
0487
0488 mt6397_vibr_reg: ldo_vibr {
0489 regulator-compatible = "ldo_vibr";
0490 regulator-name = "vibr";
0491 regulator-min-microvolt = <1300000>;
0492 regulator-max-microvolt = <3300000>;
0493 regulator-enable-ramp-delay = <218>;
0494 };
0495 };
0496 };
0497 };
0498
0499 &pio {
0500 spi_pins_a: spi0 {
0501 pins_spi {
0502 pinmux = <MT8173_PIN_69_SPI_CK__FUNC_SPI_CK_0_>,
0503 <MT8173_PIN_70_SPI_MI__FUNC_SPI_MI_0_>,
0504 <MT8173_PIN_71_SPI_MO__FUNC_SPI_MO_0_>,
0505 <MT8173_PIN_72_SPI_CS__FUNC_SPI_CS_0_>;
0506 };
0507 };
0508 };
0509
0510 &spi {
0511 pinctrl-names = "default";
0512 pinctrl-0 = <&spi_pins_a>;
0513 mediatek,pad-select = <0>;
0514 status = "okay";
0515 };
0516
0517 &ssusb {
0518 vusb33-supply = <&mt6397_vusb_reg>;
0519 vbus-supply = <&usb_p0_vbus>;
0520 extcon = <&extcon_usb>;
0521 dr_mode = "otg";
0522 wakeup-source;
0523 pinctrl-names = "default";
0524 pinctrl-0 = <&usb_id_pins_float>;
0525 status = "okay";
0526 };
0527
0528 &uart0 {
0529 status = "okay";
0530 };
0531
0532 &usb_host {
0533 vusb33-supply = <&mt6397_vusb_reg>;
0534 vbus-supply = <&usb_p1_vbus>;
0535 status = "okay";
0536 };