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