developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) |
| 2 | /* |
| 3 | * Copyright (C) 2021 MediaTek Inc. |
| 4 | * Author: Sam.Shih <sam.shih@mediatek.com> |
| 5 | */ |
| 6 | |
| 7 | /dts-v1/; |
| 8 | #include "mt7988.dtsi" |
| 9 | |
| 10 | / { |
| 11 | model = "MediaTek MT7988C DSA 10G SPIM-NAND RFB"; |
| 12 | compatible = "mediatek,mt7988c-dsa-10g-spim-snand", |
| 13 | /* Reserve this for DVFS if creating new dts */ |
| 14 | "mediatek,mt7988"; |
| 15 | |
| 16 | chosen { |
| 17 | bootargs = "console=ttyS0,115200n1 loglevel=8 \ |
| 18 | earlycon=uart8250,mmio32,0x11000000 \ |
| 19 | pci=pcie_bus_perf"; |
| 20 | }; |
| 21 | |
| 22 | memory { |
| 23 | reg = <0 0x40000000 0 0x10000000>; |
| 24 | }; |
| 25 | |
| 26 | nmbm_spim_nand { |
| 27 | compatible = "generic,nmbm"; |
| 28 | |
| 29 | #address-cells = <1>; |
| 30 | #size-cells = <1>; |
| 31 | |
| 32 | lower-mtd-device = <&spi_nand>; |
| 33 | forced-create; |
| 34 | |
| 35 | partitions { |
| 36 | compatible = "fixed-partitions"; |
| 37 | #address-cells = <1>; |
| 38 | #size-cells = <1>; |
| 39 | |
| 40 | partition@0 { |
| 41 | label = "BL2"; |
| 42 | reg = <0x00000 0x0100000>; |
| 43 | read-only; |
| 44 | }; |
| 45 | |
| 46 | partition@100000 { |
| 47 | label = "u-boot-env"; |
| 48 | reg = <0x0100000 0x0080000>; |
| 49 | }; |
| 50 | |
| 51 | factory: partition@180000 { |
| 52 | label = "Factory"; |
| 53 | reg = <0x180000 0x0400000>; |
| 54 | }; |
| 55 | |
| 56 | partition@580000 { |
| 57 | label = "FIP"; |
| 58 | reg = <0x580000 0x0200000>; |
| 59 | }; |
| 60 | |
| 61 | partition@780000 { |
| 62 | label = "ubi"; |
| 63 | reg = <0x780000 0x7080000>; |
| 64 | }; |
| 65 | }; |
| 66 | }; |
| 67 | |
| 68 | wsys_adie: wsys_adie@0 { |
| 69 | // fpga cases need to manual change adie_id / sku_type for dvt only |
| 70 | compatible = "mediatek,rebb-mt7988-adie"; |
| 71 | adie_id = <7976>; |
| 72 | sku_type = <3000>; |
| 73 | }; |
| 74 | |
| 75 | sound_wm8960 { |
| 76 | compatible = "mediatek,mt79xx-wm8960-machine"; |
| 77 | mediatek,platform = <&afe>; |
| 78 | audio-routing = "Headphone", "HP_L", |
| 79 | "Headphone", "HP_R", |
| 80 | "LINPUT1", "AMIC", |
| 81 | "RINPUT1", "AMIC"; |
| 82 | mediatek,audio-codec = <&wm8960>; |
| 83 | status = "disabled"; |
| 84 | }; |
| 85 | |
| 86 | sound_si3218x { |
| 87 | compatible = "mediatek,mt79xx-si3218x-machine"; |
| 88 | mediatek,platform = <&afe>; |
| 89 | mediatek,ext-codec = <&proslic_spi>; |
| 90 | status = "disabled"; |
| 91 | }; |
| 92 | }; |
| 93 | |
| 94 | &fan { |
| 95 | pwms = <&pwm 0 50000 0>; |
| 96 | status = "okay"; |
| 97 | }; |
| 98 | |
| 99 | &afe { |
| 100 | pinctrl-names = "default"; |
| 101 | pinctrl-0 = <&pcm_pins>; |
| 102 | status = "okay"; |
| 103 | }; |
| 104 | |
| 105 | &pwm { |
| 106 | status = "okay"; |
| 107 | }; |
| 108 | |
| 109 | &uart0 { |
| 110 | status = "okay"; |
| 111 | }; |
| 112 | |
| 113 | &i2c0 { |
| 114 | pinctrl-names = "default"; |
| 115 | pinctrl-0 = <&i2c0_pins>; |
| 116 | status = "okay"; |
| 117 | |
| 118 | rt5190a_64: rt5190a@64 { |
| 119 | compatible = "richtek,rt5190a"; |
| 120 | reg = <0x64>; |
| 121 | /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/ |
| 122 | vin2-supply = <&rt5190_buck1>; |
| 123 | vin3-supply = <&rt5190_buck1>; |
| 124 | vin4-supply = <&rt5190_buck1>; |
| 125 | |
| 126 | regulators { |
| 127 | rt5190_buck1: buck1 { |
| 128 | regulator-name = "rt5190a-buck1"; |
| 129 | regulator-min-microvolt = <5090000>; |
| 130 | regulator-max-microvolt = <5090000>; |
| 131 | regulator-allowed-modes = |
| 132 | <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>; |
| 133 | regulator-boot-on; |
| 134 | }; |
| 135 | buck2 { |
| 136 | regulator-name = "vcore"; |
| 137 | regulator-min-microvolt = <600000>; |
| 138 | regulator-max-microvolt = <1400000>; |
| 139 | regulator-boot-on; |
| 140 | }; |
| 141 | buck3 { |
| 142 | regulator-name = "proc"; |
| 143 | regulator-min-microvolt = <600000>; |
| 144 | regulator-max-microvolt = <1400000>; |
| 145 | regulator-boot-on; |
| 146 | }; |
| 147 | buck4 { |
| 148 | regulator-name = "rt5190a-buck4"; |
| 149 | regulator-min-microvolt = <850000>; |
| 150 | regulator-max-microvolt = <850000>; |
| 151 | regulator-allowed-modes = |
| 152 | <RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>; |
| 153 | regulator-boot-on; |
| 154 | }; |
| 155 | ldo { |
| 156 | regulator-name = "rt5190a-ldo"; |
| 157 | regulator-min-microvolt = <1200000>; |
| 158 | regulator-max-microvolt = <1200000>; |
| 159 | regulator-boot-on; |
| 160 | }; |
| 161 | }; |
| 162 | }; |
| 163 | }; |
| 164 | |
| 165 | &i2c1 { |
| 166 | pinctrl-names = "default"; |
| 167 | pinctrl-0 = <&i2c1_pins>; |
| 168 | status = "okay"; |
| 169 | |
| 170 | wm8960: wm8960@1a { |
| 171 | compatible = "wlf,wm8960"; |
| 172 | reg = <0x1a>; |
| 173 | }; |
| 174 | }; |
| 175 | |
| 176 | &spi0 { |
| 177 | pinctrl-names = "default"; |
| 178 | pinctrl-0 = <&spi0_flash_pins>; |
| 179 | status = "okay"; |
| 180 | |
| 181 | spi_nand: spi_nand@0 { |
| 182 | #address-cells = <1>; |
| 183 | #size-cells = <1>; |
| 184 | compatible = "spi-nand"; |
| 185 | spi-cal-enable; |
| 186 | spi-cal-mode = "read-data"; |
| 187 | spi-cal-datalen = <7>; |
| 188 | spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>; |
| 189 | spi-cal-addrlen = <5>; |
| 190 | spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>; |
| 191 | reg = <0>; |
| 192 | spi-max-frequency = <52000000>; |
| 193 | spi-tx-buswidth = <4>; |
| 194 | spi-rx-buswidth = <4>; |
| 195 | }; |
| 196 | }; |
| 197 | |
| 198 | &spi1 { |
| 199 | pinctrl-names = "default"; |
| 200 | /* pin shared with snfi */ |
| 201 | pinctrl-0 = <&spic_pins>; |
| 202 | status = "disabled"; |
| 203 | |
| 204 | proslic_spi: proslic_spi@0 { |
| 205 | compatible = "silabs,proslic_spi"; |
| 206 | reg = <0>; |
| 207 | spi-max-frequency = <10000000>; |
| 208 | spi-cpha = <1>; |
| 209 | spi-cpol = <1>; |
| 210 | channel_count = <1>; |
| 211 | debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */ |
| 212 | reset_gpio = <&pio 54 0>; |
| 213 | ig,enable-spi = <1>; /* 1: Enable, 0: Disable */ |
| 214 | }; |
| 215 | }; |
| 216 | |
| 217 | &pcie0 { |
| 218 | pinctrl-names = "default"; |
| 219 | pinctrl-0 = <&pcie0_pins>; |
| 220 | status = "okay"; |
| 221 | }; |
| 222 | |
| 223 | &pcie1 { |
| 224 | pinctrl-names = "default"; |
| 225 | pinctrl-0 = <&pcie1_pins>; |
| 226 | status = "disabled"; |
| 227 | }; |
| 228 | |
| 229 | &pcie2 { |
| 230 | pinctrl-names = "default"; |
| 231 | pinctrl-0 = <&pcie2_pins>; |
| 232 | status = "disabled"; |
| 233 | }; |
| 234 | |
| 235 | &pcie3 { |
| 236 | pinctrl-names = "default"; |
| 237 | pinctrl-0 = <&pcie3_pins>; |
| 238 | status = "okay"; |
| 239 | }; |
| 240 | |
| 241 | &pio { |
| 242 | mdio0_pins: mdio0-pins { |
| 243 | mux { |
| 244 | function = "mdio"; |
| 245 | groups = "mdc_mdio0"; |
| 246 | }; |
| 247 | |
| 248 | conf { |
| 249 | groups = "mdc_mdio0"; |
| 250 | drive-strength = <MTK_DRIVE_8mA>; |
| 251 | }; |
| 252 | }; |
| 253 | |
developer | 447cb00 | 2023-04-06 17:54:54 +0800 | [diff] [blame] | 254 | gbe_led0_pins: gbe-pins { |
| 255 | mux { |
| 256 | function = "led"; |
| 257 | groups = "gbe_led0"; |
| 258 | }; |
| 259 | }; |
| 260 | |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame^] | 261 | i2p5gbe_led0_pins: 2p5gbe-pins { |
| 262 | mux { |
| 263 | function = "led"; |
| 264 | groups = "2p5gbe_led0"; |
| 265 | }; |
| 266 | }; |
| 267 | |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 268 | i2c0_pins: i2c0-pins-g0 { |
| 269 | mux { |
| 270 | function = "i2c"; |
| 271 | groups = "i2c0_1"; |
| 272 | }; |
| 273 | }; |
| 274 | |
| 275 | pcie0_pins: pcie0-pins { |
| 276 | mux { |
| 277 | function = "pcie"; |
| 278 | groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0", |
| 279 | "pcie_wake_n0_0"; |
| 280 | }; |
| 281 | }; |
| 282 | |
| 283 | pcie1_pins: pcie1-pins { |
| 284 | mux { |
| 285 | function = "pcie"; |
| 286 | groups = "pcie_2l_1_pereset", "pcie_clk_req_n1", |
| 287 | "pcie_wake_n1_0"; |
| 288 | }; |
| 289 | }; |
| 290 | |
| 291 | pcie2_pins: pcie2-pins { |
| 292 | mux { |
| 293 | function = "pcie"; |
| 294 | groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0", |
| 295 | "pcie_wake_n2_0"; |
| 296 | }; |
| 297 | }; |
| 298 | |
| 299 | pcie3_pins: pcie3-pins { |
| 300 | mux { |
| 301 | function = "pcie"; |
| 302 | groups = "pcie_1l_1_pereset", "pcie_clk_req_n3", |
| 303 | "pcie_wake_n3_0"; |
| 304 | }; |
| 305 | }; |
| 306 | |
| 307 | spi0_flash_pins: spi0-pins { |
| 308 | mux { |
| 309 | function = "spi"; |
| 310 | groups = "spi0", "spi0_wp_hold"; |
| 311 | }; |
| 312 | }; |
| 313 | |
| 314 | spic_pins: spi1-pins { |
| 315 | mux { |
| 316 | function = "spi"; |
| 317 | groups = "spi1"; |
| 318 | }; |
| 319 | }; |
| 320 | |
| 321 | i2c1_pins: i2c1-pins { |
| 322 | mux { |
| 323 | function = "i2c"; |
| 324 | groups = "i2c1_0"; |
| 325 | }; |
| 326 | }; |
| 327 | |
| 328 | i2s_pins: i2s-pins { |
| 329 | mux { |
| 330 | function = "audio"; |
| 331 | groups = "i2s"; |
| 332 | }; |
| 333 | }; |
| 334 | |
| 335 | pcm_pins: pcm-pins { |
| 336 | mux { |
| 337 | function = "audio"; |
| 338 | groups = "pcm"; |
| 339 | }; |
| 340 | }; |
| 341 | }; |
| 342 | |
| 343 | &watchdog { |
| 344 | status = "disabled"; |
| 345 | }; |
| 346 | |
| 347 | ð { |
| 348 | pinctrl-names = "default"; |
developer | 941468f | 2023-04-10 15:21:02 +0800 | [diff] [blame] | 349 | pinctrl-0 = <&mdio0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 350 | status = "okay"; |
| 351 | |
| 352 | gmac0: mac@0 { |
| 353 | compatible = "mediatek,eth-mac"; |
| 354 | reg = <0>; |
| 355 | mac-type = "xgdm"; |
| 356 | phy-mode = "10gbase-kr"; |
| 357 | |
| 358 | fixed-link { |
developer | f0145c9 | 2023-03-23 23:16:17 +0800 | [diff] [blame] | 359 | speed = <10000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 360 | full-duplex; |
| 361 | pause; |
| 362 | }; |
| 363 | }; |
| 364 | |
| 365 | gmac1: mac@1 { |
| 366 | compatible = "mediatek,eth-mac"; |
| 367 | reg = <1>; |
| 368 | mac-type = "xgdm"; |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame^] | 369 | phy-mode = "xgmii"; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 370 | phy-handle = <&phy0>; |
| 371 | }; |
| 372 | |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame^] | 373 | gmac2: mac@2 { |
| 374 | compatible = "mediatek,eth-mac"; |
| 375 | reg = <2>; |
| 376 | mac-type = "xgdm"; |
| 377 | phy-mode = "usxgmii"; |
| 378 | phy-handle = <&phy1>; |
| 379 | }; |
| 380 | |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 381 | mdio: mdio-bus { |
| 382 | #address-cells = <1>; |
| 383 | #size-cells = <0>; |
developer | c4d8da7 | 2023-03-16 14:37:28 +0800 | [diff] [blame] | 384 | clock-frequency = <10500000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 385 | |
| 386 | phy0: ethernet-phy@0 { |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame^] | 387 | pinctrl-names = "default"; |
| 388 | pinctrl-0 = <&i2p5gbe_led0_pins>; |
| 389 | reg = <15>; |
| 390 | compatible = "ethernet-phy-ieee802.3-c45"; |
| 391 | phy-mode = "xgmii"; |
| 392 | }; |
| 393 | |
| 394 | phy1: ethernet-phy@8 { |
| 395 | reg = <8>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 396 | compatible = "ethernet-phy-ieee802.3-c45"; |
| 397 | reset-gpios = <&pio 3 1>; |
developer | 265607f | 2023-03-01 18:37:46 +0800 | [diff] [blame] | 398 | reset-assert-us = <100000>; |
| 399 | reset-deassert-us = <221000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 400 | }; |
| 401 | |
| 402 | switch@0 { |
| 403 | compatible = "mediatek,mt7988"; |
| 404 | reg = <31>; |
| 405 | ports { |
| 406 | #address-cells = <1>; |
| 407 | #size-cells = <0>; |
| 408 | |
| 409 | port@0 { |
| 410 | reg = <0>; |
| 411 | label = "lan0"; |
| 412 | phy-mode = "gmii"; |
| 413 | phy-handle = <&sphy0>; |
| 414 | }; |
| 415 | |
| 416 | port@1 { |
| 417 | reg = <1>; |
| 418 | label = "lan1"; |
| 419 | phy-mode = "gmii"; |
| 420 | phy-handle = <&sphy1>; |
| 421 | }; |
| 422 | |
| 423 | port@2 { |
| 424 | reg = <2>; |
| 425 | label = "lan2"; |
| 426 | phy-mode = "gmii"; |
| 427 | phy-handle = <&sphy2>; |
| 428 | }; |
| 429 | |
| 430 | port@3 { |
| 431 | reg = <3>; |
| 432 | label = "lan3"; |
| 433 | phy-mode = "gmii"; |
| 434 | phy-handle = <&sphy3>; |
| 435 | }; |
| 436 | |
| 437 | port@6 { |
| 438 | reg = <6>; |
| 439 | label = "cpu"; |
| 440 | ethernet = <&gmac0>; |
| 441 | phy-mode = "10gbase-kr"; |
| 442 | |
| 443 | fixed-link { |
| 444 | speed = <10000>; |
| 445 | full-duplex; |
| 446 | pause; |
| 447 | }; |
| 448 | }; |
| 449 | }; |
| 450 | |
| 451 | mdio { |
| 452 | compatible = "mediatek,dsa-slave-mdio"; |
| 453 | #address-cells = <1>; |
| 454 | #size-cells = <0>; |
developer | 941468f | 2023-04-10 15:21:02 +0800 | [diff] [blame] | 455 | pinctrl-names = "default"; |
| 456 | pinctrl-0 = <&gbe_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 457 | |
| 458 | sphy0: switch_phy0@0 { |
| 459 | compatible = "ethernet-phy-id03a2.9481"; |
| 460 | reg = <0>; |
| 461 | phy-mode = "gmii"; |
| 462 | rext = "efuse"; |
| 463 | tx_r50 = "efuse"; |
| 464 | nvmem-cells = <&phy_calibration_p0>; |
| 465 | nvmem-cell-names = "phy-cal-data"; |
| 466 | }; |
| 467 | |
| 468 | sphy1: switch_phy1@1 { |
| 469 | compatible = "ethernet-phy-id03a2.9481"; |
| 470 | reg = <1>; |
| 471 | phy-mode = "gmii"; |
| 472 | rext = "efuse"; |
| 473 | tx_r50 = "efuse"; |
| 474 | nvmem-cells = <&phy_calibration_p1>; |
| 475 | nvmem-cell-names = "phy-cal-data"; |
| 476 | }; |
| 477 | |
| 478 | sphy2: switch_phy2@2 { |
| 479 | compatible = "ethernet-phy-id03a2.9481"; |
| 480 | reg = <2>; |
| 481 | phy-mode = "gmii"; |
| 482 | rext = "efuse"; |
| 483 | tx_r50 = "efuse"; |
| 484 | nvmem-cells = <&phy_calibration_p2>; |
| 485 | nvmem-cell-names = "phy-cal-data"; |
| 486 | }; |
| 487 | |
| 488 | sphy3: switch_phy3@3 { |
| 489 | compatible = "ethernet-phy-id03a2.9481"; |
| 490 | reg = <3>; |
| 491 | phy-mode = "gmii"; |
| 492 | rext = "efuse"; |
| 493 | tx_r50 = "efuse"; |
| 494 | nvmem-cells = <&phy_calibration_p3>; |
| 495 | nvmem-cell-names = "phy-cal-data"; |
| 496 | }; |
| 497 | }; |
| 498 | }; |
| 499 | }; |
| 500 | }; |
| 501 | |
| 502 | &hnat { |
| 503 | mtketh-wan = "eth1"; |
| 504 | mtketh-lan = "lan"; |
| 505 | mtketh-lan2 = "eth2"; |
| 506 | mtketh-max-gmac = <3>; |
| 507 | status = "okay"; |
| 508 | }; |