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 | / { |
developer | 3f9a06c | 2023-05-23 15:16:44 +0800 | [diff] [blame^] | 11 | model = "MediaTek MT7988D DSA 10G eMMC RFB"; |
| 12 | compatible = "mediatek,mt7988d-dsa-10g-emmc", |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 13 | /* Reserve this for DVFS if creating new dts */ |
| 14 | "mediatek,mt7988"; |
| 15 | chosen { |
| 16 | bootargs = "console=ttyS0,115200n1 loglevel=8 \ |
| 17 | earlycon=uart8250,mmio32,0x11000000 \ |
| 18 | root=PARTLABEL=rootfs rootwait \ |
| 19 | rootfstype=squashfs,f2fs 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 | reg_1p8v: regulator-1p8v { |
| 34 | compatible = "regulator-fixed"; |
| 35 | regulator-name = "fixed-1.8V"; |
| 36 | regulator-min-microvolt = <1800000>; |
| 37 | regulator-max-microvolt = <1800000>; |
| 38 | regulator-boot-on; |
| 39 | regulator-always-on; |
| 40 | }; |
| 41 | |
| 42 | reg_3p3v: regulator-3p3v { |
| 43 | compatible = "regulator-fixed"; |
| 44 | regulator-name = "fixed-3.3V"; |
| 45 | regulator-min-microvolt = <3300000>; |
| 46 | regulator-max-microvolt = <3300000>; |
| 47 | regulator-boot-on; |
| 48 | regulator-always-on; |
| 49 | }; |
| 50 | }; |
| 51 | |
| 52 | &fan { |
| 53 | pwms = <&pwm 0 50000 0>; |
| 54 | status = "okay"; |
| 55 | }; |
| 56 | |
| 57 | &pwm { |
| 58 | status = "okay"; |
| 59 | }; |
| 60 | |
| 61 | &uart0 { |
| 62 | status = "okay"; |
| 63 | }; |
| 64 | |
| 65 | &spi1 { |
| 66 | pinctrl-names = "default"; |
| 67 | /* pin shared with snfi */ |
| 68 | pinctrl-0 = <&spic_pins>; |
| 69 | status = "disabled"; |
| 70 | }; |
| 71 | |
| 72 | &pcie0 { |
| 73 | pinctrl-names = "default"; |
| 74 | pinctrl-0 = <&pcie0_pins>; |
| 75 | status = "okay"; |
| 76 | }; |
| 77 | |
| 78 | &pcie1 { |
| 79 | pinctrl-names = "default"; |
| 80 | pinctrl-0 = <&pcie1_pins>; |
| 81 | status = "disabled"; |
| 82 | }; |
| 83 | |
| 84 | &pcie2 { |
| 85 | pinctrl-names = "default"; |
| 86 | pinctrl-0 = <&pcie2_pins>; |
| 87 | status = "disabled"; |
| 88 | }; |
| 89 | |
| 90 | &pcie3 { |
| 91 | pinctrl-names = "default"; |
| 92 | pinctrl-0 = <&pcie3_pins>; |
| 93 | status = "okay"; |
| 94 | }; |
| 95 | |
| 96 | &pio { |
| 97 | mdio0_pins: mdio0-pins { |
| 98 | mux { |
| 99 | function = "mdio"; |
| 100 | groups = "mdc_mdio0"; |
| 101 | }; |
| 102 | |
| 103 | conf { |
| 104 | groups = "mdc_mdio0"; |
| 105 | drive-strength = <MTK_DRIVE_8mA>; |
| 106 | }; |
| 107 | }; |
| 108 | |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 109 | gbe0_led0_pins: gbe0-pins { |
developer | 447cb00 | 2023-04-06 17:54:54 +0800 | [diff] [blame] | 110 | mux { |
| 111 | function = "led"; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 112 | groups = "gbe0_led0"; |
developer | 447cb00 | 2023-04-06 17:54:54 +0800 | [diff] [blame] | 113 | }; |
| 114 | }; |
| 115 | |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 116 | gbe1_led0_pins: gbe1-pins { |
| 117 | mux { |
| 118 | function = "led"; |
| 119 | groups = "gbe1_led0"; |
| 120 | }; |
| 121 | }; |
| 122 | |
| 123 | gbe2_led0_pins: gbe2-pins { |
| 124 | mux { |
| 125 | function = "led"; |
| 126 | groups = "gbe2_led0"; |
| 127 | }; |
| 128 | }; |
| 129 | |
| 130 | gbe3_led0_pins: gbe3-pins { |
| 131 | mux { |
| 132 | function = "led"; |
| 133 | groups = "gbe3_led0"; |
| 134 | }; |
| 135 | }; |
| 136 | |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 137 | i2p5gbe_led0_pins: 2p5gbe-pins { |
| 138 | mux { |
| 139 | function = "led"; |
| 140 | groups = "2p5gbe_led0"; |
| 141 | }; |
| 142 | }; |
| 143 | |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 144 | pcie0_pins: pcie0-pins { |
| 145 | mux { |
| 146 | function = "pcie"; |
| 147 | groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0", |
| 148 | "pcie_wake_n0_0"; |
| 149 | }; |
| 150 | }; |
| 151 | |
| 152 | pcie1_pins: pcie1-pins { |
| 153 | mux { |
| 154 | function = "pcie"; |
| 155 | groups = "pcie_2l_1_pereset", "pcie_clk_req_n1", |
| 156 | "pcie_wake_n1_0"; |
| 157 | }; |
| 158 | }; |
| 159 | |
| 160 | pcie2_pins: pcie2-pins { |
| 161 | mux { |
| 162 | function = "pcie"; |
| 163 | groups = "pcie_1l_0_pereset", "pcie_clk_req_n2_0", |
| 164 | "pcie_wake_n2_0"; |
| 165 | }; |
| 166 | }; |
| 167 | |
| 168 | pcie3_pins: pcie3-pins { |
| 169 | mux { |
| 170 | function = "pcie"; |
| 171 | groups = "pcie_1l_1_pereset", "pcie_clk_req_n3", |
| 172 | "pcie_wake_n3_0"; |
| 173 | }; |
| 174 | }; |
| 175 | |
| 176 | spic_pins: spi1-pins { |
| 177 | mux { |
| 178 | function = "spi"; |
developer | 1ceb26a | 2023-02-16 15:43:43 +0800 | [diff] [blame] | 179 | groups = "spi1"; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 180 | }; |
| 181 | }; |
| 182 | |
| 183 | mmc0_pins_default: mmc0-pins-default { |
| 184 | mux { |
| 185 | function = "flash"; |
| 186 | groups = "emmc_51"; |
| 187 | }; |
| 188 | }; |
| 189 | |
| 190 | mmc0_pins_uhs: mmc0-pins-uhs { |
| 191 | mux { |
| 192 | function = "flash"; |
| 193 | groups = "emmc_51"; |
| 194 | }; |
| 195 | }; |
| 196 | }; |
| 197 | |
| 198 | &watchdog { |
| 199 | status = "disabled"; |
| 200 | }; |
| 201 | |
| 202 | ð { |
| 203 | pinctrl-names = "default"; |
developer | 941468f | 2023-04-10 15:21:02 +0800 | [diff] [blame] | 204 | pinctrl-0 = <&mdio0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 205 | status = "okay"; |
| 206 | |
| 207 | gmac0: mac@0 { |
| 208 | compatible = "mediatek,eth-mac"; |
| 209 | reg = <0>; |
| 210 | mac-type = "xgdm"; |
| 211 | phy-mode = "10gbase-kr"; |
| 212 | |
| 213 | fixed-link { |
developer | f0145c9 | 2023-03-23 23:16:17 +0800 | [diff] [blame] | 214 | speed = <10000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 215 | full-duplex; |
| 216 | pause; |
| 217 | }; |
| 218 | }; |
| 219 | |
| 220 | gmac1: mac@1 { |
| 221 | compatible = "mediatek,eth-mac"; |
| 222 | reg = <1>; |
| 223 | mac-type = "xgdm"; |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 224 | phy-mode = "xgmii"; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 225 | phy-handle = <&phy0>; |
| 226 | }; |
| 227 | |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 228 | gmac2: mac@2 { |
| 229 | compatible = "mediatek,eth-mac"; |
| 230 | reg = <2>; |
| 231 | mac-type = "xgdm"; |
| 232 | phy-mode = "usxgmii"; |
| 233 | phy-handle = <&phy1>; |
| 234 | }; |
| 235 | |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 236 | mdio: mdio-bus { |
| 237 | #address-cells = <1>; |
| 238 | #size-cells = <0>; |
developer | c4d8da7 | 2023-03-16 14:37:28 +0800 | [diff] [blame] | 239 | clock-frequency = <10500000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 240 | |
| 241 | phy0: ethernet-phy@0 { |
developer | 813ffc4 | 2023-05-17 13:39:48 +0800 | [diff] [blame] | 242 | pinctrl-names = "i2p5gbe-led"; |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 243 | pinctrl-0 = <&i2p5gbe_led0_pins>; |
| 244 | reg = <15>; |
| 245 | compatible = "ethernet-phy-ieee802.3-c45"; |
| 246 | phy-mode = "xgmii"; |
| 247 | }; |
| 248 | |
| 249 | phy1: ethernet-phy@8 { |
| 250 | reg = <8>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 251 | compatible = "ethernet-phy-ieee802.3-c45"; |
developer | b4a8e1f | 2023-04-28 10:18:42 +0800 | [diff] [blame] | 252 | reset-gpios = <&pio 3 1>; |
developer | 265607f | 2023-03-01 18:37:46 +0800 | [diff] [blame] | 253 | reset-assert-us = <100000>; |
| 254 | reset-deassert-us = <221000>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 255 | }; |
| 256 | |
| 257 | switch@0 { |
| 258 | compatible = "mediatek,mt7988"; |
| 259 | reg = <31>; |
| 260 | ports { |
| 261 | #address-cells = <1>; |
| 262 | #size-cells = <0>; |
| 263 | |
| 264 | port@0 { |
| 265 | reg = <0>; |
| 266 | label = "lan0"; |
| 267 | phy-mode = "gmii"; |
| 268 | phy-handle = <&sphy0>; |
| 269 | }; |
| 270 | |
| 271 | port@1 { |
| 272 | reg = <1>; |
| 273 | label = "lan1"; |
| 274 | phy-mode = "gmii"; |
| 275 | phy-handle = <&sphy1>; |
| 276 | }; |
| 277 | |
| 278 | port@2 { |
| 279 | reg = <2>; |
| 280 | label = "lan2"; |
| 281 | phy-mode = "gmii"; |
| 282 | phy-handle = <&sphy2>; |
| 283 | }; |
| 284 | |
| 285 | port@3 { |
| 286 | reg = <3>; |
| 287 | label = "lan3"; |
| 288 | phy-mode = "gmii"; |
| 289 | phy-handle = <&sphy3>; |
| 290 | }; |
| 291 | |
| 292 | port@6 { |
| 293 | reg = <6>; |
| 294 | label = "cpu"; |
| 295 | ethernet = <&gmac0>; |
| 296 | phy-mode = "10gbase-kr"; |
| 297 | |
| 298 | fixed-link { |
| 299 | speed = <10000>; |
| 300 | full-duplex; |
| 301 | pause; |
| 302 | }; |
| 303 | }; |
| 304 | }; |
| 305 | |
| 306 | mdio { |
| 307 | compatible = "mediatek,dsa-slave-mdio"; |
| 308 | #address-cells = <1>; |
| 309 | #size-cells = <0>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 310 | |
| 311 | sphy0: switch_phy0@0 { |
| 312 | compatible = "ethernet-phy-id03a2.9481"; |
| 313 | reg = <0>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 314 | pinctrl-names = "gbe-led"; |
| 315 | pinctrl-0 = <&gbe0_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 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>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 323 | pinctrl-names = "gbe-led"; |
| 324 | pinctrl-0 = <&gbe1_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 325 | nvmem-cells = <&phy_calibration_p1>; |
| 326 | nvmem-cell-names = "phy-cal-data"; |
| 327 | }; |
| 328 | |
| 329 | sphy2: switch_phy2@2 { |
| 330 | compatible = "ethernet-phy-id03a2.9481"; |
| 331 | reg = <2>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 332 | pinctrl-names = "gbe-led"; |
| 333 | pinctrl-0 = <&gbe2_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 334 | nvmem-cells = <&phy_calibration_p2>; |
| 335 | nvmem-cell-names = "phy-cal-data"; |
| 336 | }; |
| 337 | |
| 338 | sphy3: switch_phy3@3 { |
| 339 | compatible = "ethernet-phy-id03a2.9481"; |
| 340 | reg = <3>; |
developer | caca1df | 2023-05-17 10:54:49 +0800 | [diff] [blame] | 341 | pinctrl-names = "gbe-led"; |
| 342 | pinctrl-0 = <&gbe3_led0_pins>; |
developer | c54ce9d | 2023-01-03 13:30:49 +0800 | [diff] [blame] | 343 | nvmem-cells = <&phy_calibration_p3>; |
| 344 | nvmem-cell-names = "phy-cal-data"; |
| 345 | }; |
| 346 | }; |
| 347 | }; |
| 348 | }; |
| 349 | }; |
| 350 | |
| 351 | &hnat { |
| 352 | mtketh-wan = "eth1"; |
| 353 | mtketh-lan = "lan"; |
| 354 | mtketh-lan2 = "eth2"; |
| 355 | mtketh-max-gmac = <3>; |
| 356 | status = "okay"; |
| 357 | }; |
| 358 | |
| 359 | &mmc0 { |
| 360 | pinctrl-names = "default", "state_uhs"; |
| 361 | pinctrl-0 = <&mmc0_pins_default>; |
| 362 | pinctrl-1 = <&mmc0_pins_uhs>; |
| 363 | bus-width = <8>; |
| 364 | max-frequency = <200000000>; |
| 365 | cap-mmc-highspeed; |
| 366 | mmc-hs200-1_8v; |
| 367 | mmc-hs400-1_8v; |
| 368 | hs400-ds-delay = <0x12814>; |
| 369 | vqmmc-supply = <®_1p8v>; |
| 370 | vmmc-supply = <®_3p3v>; |
| 371 | non-removable; |
| 372 | no-sd; |
| 373 | no-sdio; |
| 374 | status = "okay"; |
| 375 | }; |