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