developer | 2cdaeb1 | 2022-10-04 20:25:05 +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 MT7988A DSA 10G SNFI-NAND RFB"; |
| 12 | compatible = "mediatek,mt7988a-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 | 2cdaeb1 | 2022-10-04 20:25:05 +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 = "okay"; |
| 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 { |
developer | 24ba51c | 2022-11-15 11:22:46 +0800 | [diff] [blame] | 122 | mdio0_pins: mdio0-pins { |
| 123 | mux { |
| 124 | function = "mdio"; |
| 125 | groups = "mdc_mdio0"; |
| 126 | }; |
| 127 | |
| 128 | conf { |
| 129 | groups = "mdc_mdio0"; |
developer | 7fe4c32 | 2023-06-06 15:44:11 +0800 | [diff] [blame] | 130 | drive-strength = <MTK_DRIVE_10mA>; |
developer | 24ba51c | 2022-11-15 11:22:46 +0800 | [diff] [blame] | 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 | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 162 | pcie0_pins: pcie0-pins { |
| 163 | mux { |
| 164 | function = "pcie"; |
| 165 | groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0", |
| 166 | "pcie_wake_n0_0"; |
| 167 | }; |
| 168 | }; |
| 169 | |
| 170 | pcie1_pins: pcie1-pins { |
| 171 | mux { |
| 172 | function = "pcie"; |
| 173 | groups = "pcie_2l_1_pereset", "pcie_clk_req_n1", |
| 174 | "pcie_wake_n1_0"; |
| 175 | }; |
| 176 | }; |
| 177 | |
| 178 | pcie2_pins: pcie2-pins { |
| 179 | mux { |
| 180 | function = "pcie"; |
| 181 | groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0", |
| 182 | "pcie_wake_n2_0"; |
| 183 | }; |
| 184 | }; |
| 185 | |
| 186 | pcie3_pins: pcie3-pins { |
| 187 | mux { |
| 188 | function = "pcie"; |
| 189 | groups = "pcie_1l_1_pereset", "pcie_clk_req_n3", |
| 190 | "pcie_wake_n3_0"; |
| 191 | }; |
| 192 | }; |
| 193 | |
| 194 | snfi_pins: snfi-pins { |
| 195 | mux { |
| 196 | function = "flash"; |
| 197 | groups = "snfi"; |
| 198 | }; |
| 199 | }; |
| 200 | |
| 201 | spic_pins: spi1-pins { |
| 202 | mux { |
| 203 | function = "spi"; |
developer | 1ceb26a | 2023-02-16 15:43:43 +0800 | [diff] [blame] | 204 | groups = "spi1"; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 205 | }; |
| 206 | }; |
| 207 | }; |
| 208 | |
| 209 | &watchdog { |
| 210 | status = "disabled"; |
| 211 | }; |
| 212 | |
| 213 | &snand { |
| 214 | pinctrl-names = "default"; |
| 215 | /* pin shared with spic */ |
| 216 | pinctrl-0 = <&snfi_pins>; |
| 217 | status = "okay"; |
| 218 | mediatek,quad-spi; |
| 219 | }; |
| 220 | |
| 221 | ð { |
developer | 24ba51c | 2022-11-15 11:22:46 +0800 | [diff] [blame] | 222 | pinctrl-names = "default"; |
developer | 941468f | 2023-04-10 15:21:02 +0800 | [diff] [blame] | 223 | pinctrl-0 = <&mdio0_pins>; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 224 | status = "okay"; |
| 225 | |
| 226 | gmac0: mac@0 { |
| 227 | compatible = "mediatek,eth-mac"; |
| 228 | reg = <0>; |
developer | 30e13e7 | 2022-11-03 10:21:24 +0800 | [diff] [blame] | 229 | mac-type = "xgdm"; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 230 | phy-mode = "10gbase-kr"; |
| 231 | |
| 232 | fixed-link { |
developer | f0145c9 | 2023-03-23 23:16:17 +0800 | [diff] [blame] | 233 | speed = <10000>; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 234 | full-duplex; |
| 235 | pause; |
| 236 | }; |
| 237 | }; |
| 238 | |
| 239 | gmac1: mac@1 { |
| 240 | compatible = "mediatek,eth-mac"; |
| 241 | reg = <1>; |
developer | 30e13e7 | 2022-11-03 10:21:24 +0800 | [diff] [blame] | 242 | mac-type = "xgdm"; |
developer | f0145c9 | 2023-03-23 23:16:17 +0800 | [diff] [blame] | 243 | phy-mode = "usxgmii"; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 244 | phy-handle = <&phy0>; |
| 245 | }; |
| 246 | |
| 247 | gmac2: mac@2 { |
| 248 | compatible = "mediatek,eth-mac"; |
| 249 | reg = <2>; |
developer | 30e13e7 | 2022-11-03 10:21:24 +0800 | [diff] [blame] | 250 | mac-type = "xgdm"; |
developer | f0145c9 | 2023-03-23 23:16:17 +0800 | [diff] [blame] | 251 | phy-mode = "usxgmii"; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 252 | phy-handle = <&phy1>; |
| 253 | }; |
| 254 | |
| 255 | mdio: mdio-bus { |
| 256 | #address-cells = <1>; |
| 257 | #size-cells = <0>; |
developer | c4d8da7 | 2023-03-16 14:37:28 +0800 | [diff] [blame] | 258 | clock-frequency = <10500000>; |
developer | 24ba51c | 2022-11-15 11:22:46 +0800 | [diff] [blame] | 259 | |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 260 | phy0: ethernet-phy@0 { |
| 261 | reg = <0>; |
| 262 | compatible = "ethernet-phy-ieee802.3-c45"; |
developer | 6067807 | 2022-11-23 15:52:54 +0800 | [diff] [blame] | 263 | reset-gpios = <&pio 72 1>; |
developer | 265607f | 2023-03-01 18:37:46 +0800 | [diff] [blame] | 264 | reset-assert-us = <100000>; |
| 265 | reset-deassert-us = <221000>; |
developer | 301205c | 2023-05-24 15:39:32 +0800 | [diff] [blame] | 266 | mdi-reversal = /bits/ 16 <1>; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 267 | }; |
| 268 | |
| 269 | phy1: ethernet-phy@8 { |
| 270 | reg = <8>; |
| 271 | compatible = "ethernet-phy-ieee802.3-c45"; |
developer | 6067807 | 2022-11-23 15:52:54 +0800 | [diff] [blame] | 272 | reset-gpios = <&pio 71 1>; |
developer | 265607f | 2023-03-01 18:37:46 +0800 | [diff] [blame] | 273 | reset-assert-us = <100000>; |
| 274 | reset-deassert-us = <221000>; |
developer | 301205c | 2023-05-24 15:39:32 +0800 | [diff] [blame] | 275 | mdi-reversal = /bits/ 16 <1>; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 276 | }; |
| 277 | |
| 278 | switch@0 { |
| 279 | compatible = "mediatek,mt7988"; |
| 280 | reg = <31>; |
| 281 | ports { |
| 282 | #address-cells = <1>; |
| 283 | #size-cells = <0>; |
| 284 | |
| 285 | port@0 { |
| 286 | reg = <0>; |
| 287 | label = "lan0"; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 288 | phy-mode = "gmii"; |
| 289 | phy-handle = <&sphy0>; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 290 | }; |
| 291 | |
| 292 | port@1 { |
| 293 | reg = <1>; |
| 294 | label = "lan1"; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 295 | phy-mode = "gmii"; |
| 296 | phy-handle = <&sphy1>; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 297 | }; |
| 298 | |
| 299 | port@2 { |
| 300 | reg = <2>; |
| 301 | label = "lan2"; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 302 | phy-mode = "gmii"; |
| 303 | phy-handle = <&sphy2>; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 304 | }; |
| 305 | |
| 306 | port@3 { |
| 307 | reg = <3>; |
| 308 | label = "lan3"; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 309 | phy-mode = "gmii"; |
| 310 | phy-handle = <&sphy3>; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 311 | }; |
| 312 | |
| 313 | port@6 { |
| 314 | reg = <6>; |
| 315 | label = "cpu"; |
| 316 | ethernet = <&gmac0>; |
| 317 | phy-mode = "10gbase-kr"; |
| 318 | |
| 319 | fixed-link { |
| 320 | speed = <10000>; |
| 321 | full-duplex; |
| 322 | pause; |
| 323 | }; |
| 324 | }; |
| 325 | }; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 326 | |
| 327 | mdio { |
| 328 | compatible = "mediatek,dsa-slave-mdio"; |
| 329 | #address-cells = <1>; |
| 330 | #size-cells = <0>; |
| 331 | |
| 332 | sphy0: switch_phy0@0 { |
| 333 | compatible = "ethernet-phy-id03a2.9481"; |
| 334 | reg = <0>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 335 | pinctrl-names = "gbe-led"; |
| 336 | pinctrl-0 = <&gbe0_led0_pins>; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 337 | nvmem-cells = <&phy_calibration_p0>; |
| 338 | nvmem-cell-names = "phy-cal-data"; |
| 339 | }; |
| 340 | |
| 341 | sphy1: switch_phy1@1 { |
| 342 | compatible = "ethernet-phy-id03a2.9481"; |
| 343 | reg = <1>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 344 | pinctrl-names = "gbe-led"; |
| 345 | pinctrl-0 = <&gbe1_led0_pins>; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 346 | nvmem-cells = <&phy_calibration_p1>; |
| 347 | nvmem-cell-names = "phy-cal-data"; |
| 348 | }; |
| 349 | |
| 350 | sphy2: switch_phy2@2 { |
| 351 | compatible = "ethernet-phy-id03a2.9481"; |
| 352 | reg = <2>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 353 | pinctrl-names = "gbe-led"; |
| 354 | pinctrl-0 = <&gbe2_led0_pins>; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 355 | nvmem-cells = <&phy_calibration_p2>; |
| 356 | nvmem-cell-names = "phy-cal-data"; |
| 357 | }; |
| 358 | |
| 359 | sphy3: switch_phy3@3 { |
| 360 | compatible = "ethernet-phy-id03a2.9481"; |
| 361 | reg = <3>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 362 | pinctrl-names = "gbe-led"; |
| 363 | pinctrl-0 = <&gbe3_led0_pins>; |
developer | a36549c | 2022-10-04 16:26:13 +0800 | [diff] [blame] | 364 | nvmem-cells = <&phy_calibration_p3>; |
| 365 | nvmem-cell-names = "phy-cal-data"; |
| 366 | }; |
| 367 | }; |
developer | 2cdaeb1 | 2022-10-04 20:25:05 +0800 | [diff] [blame] | 368 | }; |
| 369 | }; |
| 370 | }; |
| 371 | |
| 372 | &hnat { |
| 373 | mtketh-wan = "eth1"; |
| 374 | mtketh-lan = "lan"; |
| 375 | mtketh-lan2 = "eth2"; |
| 376 | mtketh-max-gmac = <3>; |
| 377 | status = "okay"; |
| 378 | }; |