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 SNFI-NAND RFB"; |
| 12 | compatible = "mediatek,mt7988c-dsa-10g-snfi-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_snfi { |
| 27 | compatible = "generic,nmbm"; |
| 28 | |
| 29 | #address-cells = <1>; |
| 30 | #size-cells = <1>; |
| 31 | |
| 32 | lower-mtd-device = <&snand>; |
| 33 | forced-create; |
| 34 | empty-page-ecc-protected; |
| 35 | |
| 36 | partitions { |
| 37 | compatible = "fixed-partitions"; |
| 38 | #address-cells = <1>; |
| 39 | #size-cells = <1>; |
| 40 | |
| 41 | partition@0 { |
| 42 | label = "BL2"; |
| 43 | reg = <0x00000 0x0100000>; |
| 44 | read-only; |
| 45 | }; |
| 46 | |
| 47 | partition@100000 { |
| 48 | label = "u-boot-env"; |
| 49 | reg = <0x0100000 0x0080000>; |
| 50 | }; |
| 51 | |
| 52 | factory: partition@180000 { |
| 53 | label = "Factory"; |
| 54 | reg = <0x180000 0x0400000>; |
| 55 | }; |
| 56 | |
| 57 | partition@580000 { |
| 58 | label = "FIP"; |
| 59 | reg = <0x580000 0x0200000>; |
| 60 | }; |
| 61 | |
| 62 | partition@780000 { |
| 63 | label = "ubi"; |
developer | ba03dd7 | 2023-04-28 10:12:23 +0800 | [diff] [blame] | 64 | reg = <0x780000 0x7080000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 65 | }; |
| 66 | }; |
| 67 | }; |
| 68 | |
| 69 | wsys_adie: wsys_adie@0 { |
| 70 | // fpga cases need to manual change adie_id / sku_type for dvt only |
| 71 | compatible = "mediatek,rebb-mt7988-adie"; |
| 72 | adie_id = <7976>; |
| 73 | sku_type = <3000>; |
| 74 | }; |
| 75 | }; |
| 76 | |
| 77 | &fan { |
| 78 | pwms = <&pwm 0 50000 0>; |
| 79 | status = "okay"; |
| 80 | }; |
| 81 | |
| 82 | &pwm { |
| 83 | status = "okay"; |
| 84 | }; |
| 85 | |
| 86 | &uart0 { |
| 87 | status = "okay"; |
| 88 | }; |
| 89 | |
| 90 | &spi1 { |
| 91 | pinctrl-names = "default"; |
| 92 | /* pin shared with snfi */ |
| 93 | pinctrl-0 = <&spic_pins>; |
| 94 | status = "disabled"; |
| 95 | }; |
| 96 | |
| 97 | &pcie0 { |
| 98 | pinctrl-names = "default"; |
| 99 | pinctrl-0 = <&pcie0_pins>; |
| 100 | status = "okay"; |
| 101 | }; |
| 102 | |
| 103 | &pcie1 { |
| 104 | pinctrl-names = "default"; |
| 105 | pinctrl-0 = <&pcie1_pins>; |
| 106 | status = "disabled"; |
| 107 | }; |
| 108 | |
| 109 | &pcie2 { |
| 110 | pinctrl-names = "default"; |
| 111 | pinctrl-0 = <&pcie2_pins>; |
| 112 | status = "disabled"; |
| 113 | }; |
| 114 | |
| 115 | &pcie3 { |
| 116 | pinctrl-names = "default"; |
| 117 | pinctrl-0 = <&pcie3_pins>; |
| 118 | status = "okay"; |
| 119 | }; |
| 120 | |
| 121 | &pio { |
| 122 | mdio0_pins: mdio0-pins { |
| 123 | mux { |
| 124 | function = "mdio"; |
| 125 | groups = "mdc_mdio0"; |
| 126 | }; |
| 127 | |
| 128 | conf { |
| 129 | groups = "mdc_mdio0"; |
| 130 | drive-strength = <MTK_DRIVE_8mA>; |
| 131 | }; |
| 132 | }; |
| 133 | |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame^] | 134 | gbe0_led0_pins: gbe0-pins { |
developer | 447cb00 | 2023-04-06 17:54:54 +0800 | [diff] [blame] | 135 | mux { |
| 136 | function = "led"; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame^] | 137 | groups = "gbe0_led0"; |
developer | 447cb00 | 2023-04-06 17:54:54 +0800 | [diff] [blame] | 138 | }; |
| 139 | }; |
| 140 | |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame^] | 141 | gbe1_led0_pins: gbe1-pins { |
| 142 | mux { |
| 143 | function = "led"; |
| 144 | groups = "gbe1_led0"; |
| 145 | }; |
| 146 | }; |
| 147 | |
| 148 | gbe2_led0_pins: gbe2-pins { |
| 149 | mux { |
| 150 | function = "led"; |
| 151 | groups = "gbe2_led0"; |
| 152 | }; |
| 153 | }; |
| 154 | |
| 155 | gbe3_led0_pins: gbe3-pins { |
| 156 | mux { |
| 157 | function = "led"; |
| 158 | groups = "gbe3_led0"; |
| 159 | }; |
| 160 | }; |
| 161 | |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 162 | i2p5gbe_led0_pins: 2p5gbe-pins { |
| 163 | mux { |
| 164 | function = "led"; |
| 165 | groups = "2p5gbe_led0"; |
| 166 | }; |
| 167 | }; |
| 168 | |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 169 | pcie0_pins: pcie0-pins { |
| 170 | mux { |
| 171 | function = "pcie"; |
| 172 | groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0", |
| 173 | "pcie_wake_n0_0"; |
| 174 | }; |
| 175 | }; |
| 176 | |
| 177 | pcie1_pins: pcie1-pins { |
| 178 | mux { |
| 179 | function = "pcie"; |
| 180 | groups = "pcie_2l_1_pereset", "pcie_clk_req_n1", |
| 181 | "pcie_wake_n1_0"; |
| 182 | }; |
| 183 | }; |
| 184 | |
| 185 | pcie2_pins: pcie2-pins { |
| 186 | mux { |
| 187 | function = "pcie"; |
| 188 | groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0", |
| 189 | "pcie_wake_n2_0"; |
| 190 | }; |
| 191 | }; |
| 192 | |
| 193 | pcie3_pins: pcie3-pins { |
| 194 | mux { |
| 195 | function = "pcie"; |
| 196 | groups = "pcie_1l_1_pereset", "pcie_clk_req_n3", |
| 197 | "pcie_wake_n3_0"; |
| 198 | }; |
| 199 | }; |
| 200 | |
| 201 | snfi_pins: snfi-pins { |
| 202 | mux { |
| 203 | function = "flash"; |
| 204 | groups = "snfi"; |
| 205 | }; |
| 206 | }; |
| 207 | |
| 208 | spic_pins: spi1-pins { |
| 209 | mux { |
| 210 | function = "spi"; |
developer | 1ceb26a | 2023-02-16 15:43:43 +0800 | [diff] [blame] | 211 | groups = "spi1"; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 212 | }; |
| 213 | }; |
| 214 | }; |
| 215 | |
| 216 | &watchdog { |
| 217 | status = "disabled"; |
| 218 | }; |
| 219 | |
| 220 | &snand { |
| 221 | pinctrl-names = "default"; |
| 222 | /* pin shared with spic */ |
| 223 | pinctrl-0 = <&snfi_pins>; |
| 224 | status = "okay"; |
| 225 | mediatek,quad-spi; |
| 226 | }; |
| 227 | |
| 228 | ð { |
| 229 | pinctrl-names = "default"; |
developer | 941468f | 2023-04-10 15:21:02 +0800 | [diff] [blame] | 230 | pinctrl-0 = <&mdio0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 231 | status = "okay"; |
| 232 | |
| 233 | gmac0: mac@0 { |
| 234 | compatible = "mediatek,eth-mac"; |
| 235 | reg = <0>; |
| 236 | mac-type = "xgdm"; |
| 237 | phy-mode = "10gbase-kr"; |
| 238 | |
| 239 | fixed-link { |
developer | f0145c9 | 2023-03-23 23:16:17 +0800 | [diff] [blame] | 240 | speed = <10000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 241 | full-duplex; |
| 242 | pause; |
| 243 | }; |
| 244 | }; |
| 245 | |
| 246 | gmac1: mac@1 { |
| 247 | compatible = "mediatek,eth-mac"; |
| 248 | reg = <1>; |
| 249 | mac-type = "xgdm"; |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 250 | phy-mode = "xgmii"; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 251 | phy-handle = <&phy0>; |
| 252 | }; |
| 253 | |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 254 | gmac2: mac@2 { |
| 255 | compatible = "mediatek,eth-mac"; |
| 256 | reg = <2>; |
| 257 | mac-type = "xgdm"; |
| 258 | phy-mode = "usxgmii"; |
| 259 | phy-handle = <&phy1>; |
| 260 | }; |
| 261 | |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 262 | mdio: mdio-bus { |
| 263 | #address-cells = <1>; |
| 264 | #size-cells = <0>; |
developer | c4d8da7 | 2023-03-16 14:37:28 +0800 | [diff] [blame] | 265 | clock-frequency = <10500000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 266 | |
| 267 | phy0: ethernet-phy@0 { |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 268 | pinctrl-names = "default"; |
| 269 | pinctrl-0 = <&i2p5gbe_led0_pins>; |
| 270 | reg = <15>; |
| 271 | compatible = "ethernet-phy-ieee802.3-c45"; |
| 272 | phy-mode = "xgmii"; |
| 273 | }; |
| 274 | |
| 275 | phy1: ethernet-phy@8 { |
| 276 | reg = <8>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 277 | compatible = "ethernet-phy-ieee802.3-c45"; |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 278 | reset-gpios = <&pio 3 1>; |
developer | 265607f | 2023-03-01 18:37:46 +0800 | [diff] [blame] | 279 | reset-assert-us = <100000>; |
| 280 | reset-deassert-us = <221000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 281 | }; |
| 282 | |
| 283 | switch@0 { |
| 284 | compatible = "mediatek,mt7988"; |
| 285 | reg = <31>; |
| 286 | ports { |
| 287 | #address-cells = <1>; |
| 288 | #size-cells = <0>; |
| 289 | |
| 290 | port@0 { |
| 291 | reg = <0>; |
| 292 | label = "lan0"; |
| 293 | phy-mode = "gmii"; |
| 294 | phy-handle = <&sphy0>; |
| 295 | }; |
| 296 | |
| 297 | port@1 { |
| 298 | reg = <1>; |
| 299 | label = "lan1"; |
| 300 | phy-mode = "gmii"; |
| 301 | phy-handle = <&sphy1>; |
| 302 | }; |
| 303 | |
| 304 | port@2 { |
| 305 | reg = <2>; |
| 306 | label = "lan2"; |
| 307 | phy-mode = "gmii"; |
| 308 | phy-handle = <&sphy2>; |
| 309 | }; |
| 310 | |
| 311 | port@3 { |
| 312 | reg = <3>; |
| 313 | label = "lan3"; |
| 314 | phy-mode = "gmii"; |
| 315 | phy-handle = <&sphy3>; |
| 316 | }; |
| 317 | |
| 318 | port@6 { |
| 319 | reg = <6>; |
| 320 | label = "cpu"; |
| 321 | ethernet = <&gmac0>; |
| 322 | phy-mode = "10gbase-kr"; |
| 323 | |
| 324 | fixed-link { |
| 325 | speed = <10000>; |
| 326 | full-duplex; |
| 327 | pause; |
| 328 | }; |
| 329 | }; |
| 330 | }; |
| 331 | |
| 332 | mdio { |
| 333 | compatible = "mediatek,dsa-slave-mdio"; |
| 334 | #address-cells = <1>; |
| 335 | #size-cells = <0>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 336 | |
| 337 | sphy0: switch_phy0@0 { |
| 338 | compatible = "ethernet-phy-id03a2.9481"; |
| 339 | reg = <0>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame^] | 340 | pinctrl-names = "gbe-led"; |
| 341 | pinctrl-0 = <&gbe0_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 342 | nvmem-cells = <&phy_calibration_p0>; |
| 343 | nvmem-cell-names = "phy-cal-data"; |
| 344 | }; |
| 345 | |
| 346 | sphy1: switch_phy1@1 { |
| 347 | compatible = "ethernet-phy-id03a2.9481"; |
| 348 | reg = <1>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame^] | 349 | pinctrl-names = "gbe-led"; |
| 350 | pinctrl-0 = <&gbe1_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 351 | nvmem-cells = <&phy_calibration_p1>; |
| 352 | nvmem-cell-names = "phy-cal-data"; |
| 353 | }; |
| 354 | |
| 355 | sphy2: switch_phy2@2 { |
| 356 | compatible = "ethernet-phy-id03a2.9481"; |
| 357 | reg = <2>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame^] | 358 | pinctrl-names = "gbe-led"; |
| 359 | pinctrl-0 = <&gbe2_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 360 | nvmem-cells = <&phy_calibration_p2>; |
| 361 | nvmem-cell-names = "phy-cal-data"; |
| 362 | }; |
| 363 | |
| 364 | sphy3: switch_phy3@3 { |
| 365 | compatible = "ethernet-phy-id03a2.9481"; |
| 366 | reg = <3>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame^] | 367 | pinctrl-names = "gbe-led"; |
| 368 | pinctrl-0 = <&gbe3_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 369 | nvmem-cells = <&phy_calibration_p3>; |
| 370 | nvmem-cell-names = "phy-cal-data"; |
| 371 | }; |
| 372 | }; |
| 373 | }; |
| 374 | }; |
| 375 | }; |
| 376 | |
| 377 | &hnat { |
| 378 | mtketh-wan = "eth1"; |
| 379 | mtketh-lan = "lan"; |
| 380 | mtketh-lan2 = "eth2"; |
| 381 | mtketh-max-gmac = <3>; |
| 382 | status = "okay"; |
| 383 | }; |