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-NOR RFB"; |
| 12 | compatible = "mediatek,mt7988c-dsa-10g-spim-nor", |
| 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 | wsys_adie: wsys_adie@0 { |
| 27 | // fpga cases need to manual change adie_id / sku_type for dvt only |
| 28 | compatible = "mediatek,rebb-mt7988-adie"; |
| 29 | adie_id = <7976>; |
| 30 | sku_type = <3000>; |
| 31 | }; |
| 32 | }; |
| 33 | |
| 34 | &fan { |
| 35 | pwms = <&pwm 0 50000 0>; |
| 36 | status = "okay"; |
| 37 | }; |
| 38 | |
| 39 | &pwm { |
| 40 | status = "okay"; |
| 41 | }; |
| 42 | |
| 43 | &uart0 { |
| 44 | status = "okay"; |
| 45 | }; |
| 46 | |
| 47 | &spi1 { |
| 48 | pinctrl-names = "default"; |
| 49 | /* pin shared with snfi */ |
| 50 | pinctrl-0 = <&spic_pins>; |
| 51 | status = "disabled"; |
| 52 | }; |
| 53 | |
| 54 | &spi2 { |
| 55 | pinctrl-names = "default"; |
| 56 | pinctrl-0 = <&spi2_flash_pins>; |
| 57 | status = "okay"; |
| 58 | spi_nor@0 { |
| 59 | #address-cells = <1>; |
| 60 | #size-cells = <1>; |
| 61 | compatible = "jedec,spi-nor"; |
| 62 | spi-cal-enable; |
| 63 | spi-cal-mode = "read-data"; |
| 64 | spi-cal-datalen = <7>; |
| 65 | spi-cal-data = /bits/ 8 < |
| 66 | 0x53 0x46 0x5F 0x42 0x4F 0x4F 0x54>; /* SF_BOOT */ |
| 67 | spi-cal-addrlen = <1>; |
| 68 | spi-cal-addr = /bits/ 32 <0x0>; |
| 69 | reg = <0>; |
| 70 | spi-max-frequency = <52000000>; |
developer | 1e51a74 | 2023-03-14 15:16:01 +0800 | [diff] [blame] | 71 | spi-tx-bus-width = <4>; |
| 72 | spi-rx-bus-width = <4>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 73 | |
| 74 | partition@00000 { |
| 75 | label = "BL2"; |
| 76 | reg = <0x00000 0x0040000>; |
| 77 | }; |
| 78 | partition@40000 { |
| 79 | label = "u-boot-env"; |
| 80 | reg = <0x40000 0x0010000>; |
| 81 | }; |
| 82 | factory: partition@50000 { |
| 83 | label = "Factory"; |
developer | 8f434cd | 2023-02-07 10:29:26 +0800 | [diff] [blame] | 84 | reg = <0x50000 0x0200000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 85 | }; |
developer | 8f434cd | 2023-02-07 10:29:26 +0800 | [diff] [blame] | 86 | partition@250000 { |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 87 | label = "FIP"; |
developer | 8f434cd | 2023-02-07 10:29:26 +0800 | [diff] [blame] | 88 | reg = <0x250000 0x0080000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 89 | }; |
developer | 8f434cd | 2023-02-07 10:29:26 +0800 | [diff] [blame] | 90 | partition@2D0000 { |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 91 | label = "firmware"; |
developer | 8f434cd | 2023-02-07 10:29:26 +0800 | [diff] [blame] | 92 | reg = <0x2D0000 0x1D30000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 93 | }; |
| 94 | }; |
| 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 | 447cb00 | 2023-04-06 17:54:54 +0800 | [diff] [blame] | 134 | gbe_led0_pins: gbe-pins { |
| 135 | mux { |
| 136 | function = "led"; |
| 137 | groups = "gbe_led0"; |
| 138 | }; |
| 139 | }; |
| 140 | |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 141 | i2p5gbe_led0_pins: 2p5gbe-pins { |
| 142 | mux { |
| 143 | function = "led"; |
| 144 | groups = "2p5gbe_led0"; |
| 145 | }; |
| 146 | }; |
| 147 | |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 148 | pcie0_pins: pcie0-pins { |
| 149 | mux { |
| 150 | function = "pcie"; |
| 151 | groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0", |
| 152 | "pcie_wake_n0_0"; |
| 153 | }; |
| 154 | }; |
| 155 | |
| 156 | pcie1_pins: pcie1-pins { |
| 157 | mux { |
| 158 | function = "pcie"; |
| 159 | groups = "pcie_2l_1_pereset", "pcie_clk_req_n1", |
| 160 | "pcie_wake_n1_0"; |
| 161 | }; |
| 162 | }; |
| 163 | |
| 164 | pcie2_pins: pcie2-pins { |
| 165 | mux { |
| 166 | function = "pcie"; |
| 167 | groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0", |
| 168 | "pcie_wake_n2_0"; |
| 169 | }; |
| 170 | }; |
| 171 | |
| 172 | pcie3_pins: pcie3-pins { |
| 173 | mux { |
| 174 | function = "pcie"; |
| 175 | groups = "pcie_1l_1_pereset", "pcie_clk_req_n3", |
| 176 | "pcie_wake_n3_0"; |
| 177 | }; |
| 178 | }; |
| 179 | |
| 180 | spic_pins: spi1-pins { |
| 181 | mux { |
| 182 | function = "spi"; |
developer | 1ceb26a | 2023-02-16 15:43:43 +0800 | [diff] [blame] | 183 | groups = "spi1"; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 184 | }; |
| 185 | }; |
| 186 | |
| 187 | spi2_flash_pins: spi2-pins { |
| 188 | mux { |
| 189 | function = "spi"; |
| 190 | groups = "spi2", "spi2_wp_hold"; |
| 191 | }; |
| 192 | }; |
| 193 | }; |
| 194 | |
| 195 | &watchdog { |
| 196 | status = "disabled"; |
| 197 | }; |
| 198 | |
| 199 | ð { |
| 200 | pinctrl-names = "default"; |
developer | 941468f | 2023-04-10 15:21:02 +0800 | [diff] [blame] | 201 | pinctrl-0 = <&mdio0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 202 | status = "okay"; |
| 203 | |
| 204 | gmac0: mac@0 { |
| 205 | compatible = "mediatek,eth-mac"; |
| 206 | reg = <0>; |
| 207 | mac-type = "xgdm"; |
| 208 | phy-mode = "10gbase-kr"; |
| 209 | |
| 210 | fixed-link { |
developer | f0145c9 | 2023-03-23 23:16:17 +0800 | [diff] [blame] | 211 | speed = <10000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 212 | full-duplex; |
| 213 | pause; |
| 214 | }; |
| 215 | }; |
| 216 | |
| 217 | gmac1: mac@1 { |
| 218 | compatible = "mediatek,eth-mac"; |
| 219 | reg = <1>; |
| 220 | mac-type = "xgdm"; |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 221 | phy-mode = "xgmii"; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 222 | phy-handle = <&phy0>; |
| 223 | }; |
| 224 | |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 225 | gmac2: mac@2 { |
| 226 | compatible = "mediatek,eth-mac"; |
| 227 | reg = <2>; |
| 228 | mac-type = "xgdm"; |
| 229 | phy-mode = "usxgmii"; |
| 230 | phy-handle = <&phy1>; |
| 231 | }; |
| 232 | |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 233 | mdio: mdio-bus { |
| 234 | #address-cells = <1>; |
| 235 | #size-cells = <0>; |
developer | c4d8da7 | 2023-03-16 14:37:28 +0800 | [diff] [blame] | 236 | clock-frequency = <10500000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 237 | |
| 238 | phy0: ethernet-phy@0 { |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 239 | pinctrl-names = "default"; |
| 240 | pinctrl-0 = <&i2p5gbe_led0_pins>; |
| 241 | reg = <15>; |
| 242 | compatible = "ethernet-phy-ieee802.3-c45"; |
| 243 | phy-mode = "xgmii"; |
| 244 | }; |
| 245 | |
| 246 | phy1: ethernet-phy@8 { |
| 247 | reg = <8>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 248 | compatible = "ethernet-phy-ieee802.3-c45"; |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 249 | reset-gpios = <&pio 3 1>; |
developer | 265607f | 2023-03-01 18:37:46 +0800 | [diff] [blame] | 250 | reset-assert-us = <100000>; |
| 251 | reset-deassert-us = <221000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 252 | }; |
| 253 | |
| 254 | switch@0 { |
| 255 | compatible = "mediatek,mt7988"; |
| 256 | reg = <31>; |
| 257 | ports { |
| 258 | #address-cells = <1>; |
| 259 | #size-cells = <0>; |
| 260 | |
| 261 | port@0 { |
| 262 | reg = <0>; |
| 263 | label = "lan0"; |
| 264 | phy-mode = "gmii"; |
| 265 | phy-handle = <&sphy0>; |
| 266 | }; |
| 267 | |
| 268 | port@1 { |
| 269 | reg = <1>; |
| 270 | label = "lan1"; |
| 271 | phy-mode = "gmii"; |
| 272 | phy-handle = <&sphy1>; |
| 273 | }; |
| 274 | |
| 275 | port@2 { |
| 276 | reg = <2>; |
| 277 | label = "lan2"; |
| 278 | phy-mode = "gmii"; |
| 279 | phy-handle = <&sphy2>; |
| 280 | }; |
| 281 | |
| 282 | port@3 { |
| 283 | reg = <3>; |
| 284 | label = "lan3"; |
| 285 | phy-mode = "gmii"; |
| 286 | phy-handle = <&sphy3>; |
| 287 | }; |
| 288 | |
| 289 | port@6 { |
| 290 | reg = <6>; |
| 291 | label = "cpu"; |
| 292 | ethernet = <&gmac0>; |
| 293 | phy-mode = "10gbase-kr"; |
| 294 | |
| 295 | fixed-link { |
| 296 | speed = <10000>; |
| 297 | full-duplex; |
| 298 | pause; |
| 299 | }; |
| 300 | }; |
| 301 | }; |
| 302 | |
| 303 | mdio { |
| 304 | compatible = "mediatek,dsa-slave-mdio"; |
| 305 | #address-cells = <1>; |
| 306 | #size-cells = <0>; |
developer | 941468f | 2023-04-10 15:21:02 +0800 | [diff] [blame] | 307 | pinctrl-names = "default"; |
| 308 | pinctrl-0 = <&gbe_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 309 | |
| 310 | sphy0: switch_phy0@0 { |
| 311 | compatible = "ethernet-phy-id03a2.9481"; |
| 312 | reg = <0>; |
| 313 | phy-mode = "gmii"; |
| 314 | rext = "efuse"; |
| 315 | tx_r50 = "efuse"; |
| 316 | nvmem-cells = <&phy_calibration_p0>; |
| 317 | nvmem-cell-names = "phy-cal-data"; |
| 318 | }; |
| 319 | |
| 320 | sphy1: switch_phy1@1 { |
| 321 | compatible = "ethernet-phy-id03a2.9481"; |
| 322 | reg = <1>; |
| 323 | phy-mode = "gmii"; |
| 324 | rext = "efuse"; |
| 325 | tx_r50 = "efuse"; |
| 326 | nvmem-cells = <&phy_calibration_p1>; |
| 327 | nvmem-cell-names = "phy-cal-data"; |
| 328 | }; |
| 329 | |
| 330 | sphy2: switch_phy2@2 { |
| 331 | compatible = "ethernet-phy-id03a2.9481"; |
| 332 | reg = <2>; |
| 333 | phy-mode = "gmii"; |
| 334 | rext = "efuse"; |
| 335 | tx_r50 = "efuse"; |
| 336 | nvmem-cells = <&phy_calibration_p2>; |
| 337 | nvmem-cell-names = "phy-cal-data"; |
| 338 | }; |
| 339 | |
| 340 | sphy3: switch_phy3@3 { |
| 341 | compatible = "ethernet-phy-id03a2.9481"; |
| 342 | reg = <3>; |
| 343 | phy-mode = "gmii"; |
| 344 | rext = "efuse"; |
| 345 | tx_r50 = "efuse"; |
| 346 | nvmem-cells = <&phy_calibration_p3>; |
| 347 | nvmem-cell-names = "phy-cal-data"; |
| 348 | }; |
| 349 | }; |
| 350 | }; |
| 351 | }; |
| 352 | }; |
| 353 | |
| 354 | &hnat { |
| 355 | mtketh-wan = "eth1"; |
| 356 | mtketh-lan = "lan"; |
| 357 | mtketh-lan2 = "eth2"; |
| 358 | mtketh-max-gmac = <3>; |
| 359 | status = "okay"; |
| 360 | }; |
| 361 | |
| 362 | &wed { |
| 363 | dy_txbm_enable = "true"; |
| 364 | dy_txbm_budge = <8>; |
| 365 | txbm_init_sz = <10>; |
| 366 | status = "okay"; |
| 367 | }; |