.. | .. |
---|
1 | 1 | #include <dt-bindings/interrupt-controller/mips-gic.h> |
---|
| 2 | +#include <dt-bindings/gpio/gpio.h> |
---|
2 | 3 | |
---|
3 | 4 | / { |
---|
4 | 5 | #address-cells = <1>; |
---|
.. | .. |
---|
40 | 41 | |
---|
41 | 42 | /* This is normally 1/4 of cpuclock */ |
---|
42 | 43 | clock-frequency = <220000000>; |
---|
| 44 | + }; |
---|
| 45 | + |
---|
| 46 | + mmc_clock: mmc_clock@0 { |
---|
| 47 | + #clock-cells = <0>; |
---|
| 48 | + compatible = "fixed-clock"; |
---|
| 49 | + clock-frequency = <48000000>; |
---|
| 50 | + }; |
---|
| 51 | + |
---|
| 52 | + mmc_fixed_3v3: fixedregulator@0 { |
---|
| 53 | + compatible = "regulator-fixed"; |
---|
| 54 | + regulator-name = "mmc_power"; |
---|
| 55 | + regulator-min-microvolt = <3300000>; |
---|
| 56 | + regulator-max-microvolt = <3300000>; |
---|
| 57 | + enable-active-high; |
---|
| 58 | + regulator-always-on; |
---|
| 59 | + }; |
---|
| 60 | + |
---|
| 61 | + mmc_fixed_1v8_io: fixedregulator@1 { |
---|
| 62 | + compatible = "regulator-fixed"; |
---|
| 63 | + regulator-name = "mmc_io"; |
---|
| 64 | + regulator-min-microvolt = <1800000>; |
---|
| 65 | + regulator-max-microvolt = <1800000>; |
---|
| 66 | + enable-active-high; |
---|
| 67 | + regulator-always-on; |
---|
43 | 68 | }; |
---|
44 | 69 | |
---|
45 | 70 | palmbus: palmbus@1E000000 { |
---|
.. | .. |
---|
113 | 138 | |
---|
114 | 139 | memc: memc@5000 { |
---|
115 | 140 | compatible = "mtk,mt7621-memc"; |
---|
116 | | - reg = <0x300 0x100>; |
---|
| 141 | + reg = <0x5000 0x1000>; |
---|
117 | 142 | }; |
---|
118 | 143 | |
---|
119 | 144 | cpc: cpc@1fbf0000 { |
---|
.. | .. |
---|
202 | 227 | state_default: pinctrl0 { |
---|
203 | 228 | }; |
---|
204 | 229 | |
---|
205 | | - i2c_pins: i2c { |
---|
206 | | - i2c { |
---|
207 | | - group = "i2c"; |
---|
| 230 | + i2c_pins: i2c0 { |
---|
| 231 | + i2c0 { |
---|
| 232 | + groups = "i2c"; |
---|
208 | 233 | function = "i2c"; |
---|
209 | 234 | }; |
---|
210 | 235 | }; |
---|
211 | 236 | |
---|
212 | | - spi_pins: spi { |
---|
213 | | - spi { |
---|
214 | | - group = "spi"; |
---|
| 237 | + spi_pins: spi0 { |
---|
| 238 | + spi0 { |
---|
| 239 | + groups = "spi"; |
---|
215 | 240 | function = "spi"; |
---|
216 | 241 | }; |
---|
217 | 242 | }; |
---|
218 | 243 | |
---|
219 | 244 | uart1_pins: uart1 { |
---|
220 | 245 | uart1 { |
---|
221 | | - group = "uart1"; |
---|
| 246 | + groups = "uart1"; |
---|
222 | 247 | function = "uart1"; |
---|
223 | 248 | }; |
---|
224 | 249 | }; |
---|
225 | 250 | |
---|
226 | 251 | uart2_pins: uart2 { |
---|
227 | 252 | uart2 { |
---|
228 | | - group = "uart2"; |
---|
| 253 | + groups = "uart2"; |
---|
229 | 254 | function = "uart2"; |
---|
230 | 255 | }; |
---|
231 | 256 | }; |
---|
232 | 257 | |
---|
233 | 258 | uart3_pins: uart3 { |
---|
234 | 259 | uart3 { |
---|
235 | | - group = "uart3"; |
---|
| 260 | + groups = "uart3"; |
---|
236 | 261 | function = "uart3"; |
---|
237 | 262 | }; |
---|
238 | 263 | }; |
---|
239 | 264 | |
---|
240 | 265 | rgmii1_pins: rgmii1 { |
---|
241 | 266 | rgmii1 { |
---|
242 | | - group = "rgmii1"; |
---|
| 267 | + groups = "rgmii1"; |
---|
243 | 268 | function = "rgmii1"; |
---|
244 | 269 | }; |
---|
245 | 270 | }; |
---|
246 | 271 | |
---|
247 | 272 | rgmii2_pins: rgmii2 { |
---|
248 | 273 | rgmii2 { |
---|
249 | | - group = "rgmii2"; |
---|
| 274 | + groups = "rgmii2"; |
---|
250 | 275 | function = "rgmii2"; |
---|
251 | 276 | }; |
---|
252 | 277 | }; |
---|
253 | 278 | |
---|
254 | | - mdio_pins: mdio { |
---|
255 | | - mdio { |
---|
256 | | - group = "mdio"; |
---|
| 279 | + mdio_pins: mdio0 { |
---|
| 280 | + mdio0 { |
---|
| 281 | + groups = "mdio"; |
---|
257 | 282 | function = "mdio"; |
---|
258 | 283 | }; |
---|
259 | 284 | }; |
---|
260 | 285 | |
---|
261 | | - pcie_pins: pcie { |
---|
262 | | - pcie { |
---|
263 | | - group = "pcie"; |
---|
264 | | - function = "pcie rst"; |
---|
| 286 | + pcie_pins: pcie0 { |
---|
| 287 | + pcie0 { |
---|
| 288 | + groups = "pcie"; |
---|
| 289 | + function = "gpio"; |
---|
265 | 290 | }; |
---|
266 | 291 | }; |
---|
267 | 292 | |
---|
268 | | - nand_pins: nand { |
---|
| 293 | + nand_pins: nand0 { |
---|
269 | 294 | spi-nand { |
---|
270 | | - group = "spi"; |
---|
| 295 | + groups = "spi"; |
---|
271 | 296 | function = "nand1"; |
---|
272 | 297 | }; |
---|
273 | 298 | |
---|
274 | 299 | sdhci-nand { |
---|
275 | | - group = "sdhci"; |
---|
| 300 | + groups = "sdhci"; |
---|
276 | 301 | function = "nand2"; |
---|
277 | 302 | }; |
---|
278 | 303 | }; |
---|
279 | 304 | |
---|
280 | | - sdhci_pins: sdhci { |
---|
281 | | - sdhci { |
---|
282 | | - group = "sdhci"; |
---|
| 305 | + sdhci_pins: sdhci0 { |
---|
| 306 | + sdhci0 { |
---|
| 307 | + groups = "sdhci"; |
---|
283 | 308 | function = "sdhci"; |
---|
284 | 309 | }; |
---|
285 | 310 | }; |
---|
.. | .. |
---|
298 | 323 | sdhci: sdhci@1E130000 { |
---|
299 | 324 | status = "disabled"; |
---|
300 | 325 | |
---|
301 | | - compatible = "ralink,mt7620-sdhci"; |
---|
| 326 | + compatible = "mediatek,mt7620-mmc"; |
---|
302 | 327 | reg = <0x1E130000 0x4000>; |
---|
| 328 | + |
---|
| 329 | + bus-width = <4>; |
---|
| 330 | + max-frequency = <48000000>; |
---|
| 331 | + cap-sd-highspeed; |
---|
| 332 | + cap-mmc-highspeed; |
---|
| 333 | + vmmc-supply = <&mmc_fixed_3v3>; |
---|
| 334 | + vqmmc-supply = <&mmc_fixed_1v8_io>; |
---|
| 335 | + disable-wp; |
---|
| 336 | + |
---|
| 337 | + pinctrl-names = "default", "state_uhs"; |
---|
| 338 | + pinctrl-0 = <&sdhci_pins>; |
---|
| 339 | + pinctrl-1 = <&sdhci_pins>; |
---|
| 340 | + |
---|
| 341 | + clocks = <&mmc_clock &mmc_clock>; |
---|
| 342 | + clock-names = "source", "hclk"; |
---|
303 | 343 | |
---|
304 | 344 | interrupt-parent = <&gic>; |
---|
305 | 345 | interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>; |
---|
.. | .. |
---|
372 | 412 | |
---|
373 | 413 | mediatek,ethsys = <ðsys>; |
---|
374 | 414 | |
---|
375 | | - mediatek,switch = <&gsw>; |
---|
| 415 | + pinctrl-names = "default"; |
---|
| 416 | + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>, <&rgmii2_pins>; |
---|
| 417 | + |
---|
| 418 | + gmac0: mac@0 { |
---|
| 419 | + compatible = "mediatek,eth-mac"; |
---|
| 420 | + reg = <0>; |
---|
| 421 | + phy-mode = "rgmii"; |
---|
| 422 | + |
---|
| 423 | + fixed-link { |
---|
| 424 | + speed = <1000>; |
---|
| 425 | + full-duplex; |
---|
| 426 | + pause; |
---|
| 427 | + }; |
---|
| 428 | + }; |
---|
| 429 | + |
---|
| 430 | + gmac1: mac@1 { |
---|
| 431 | + compatible = "mediatek,eth-mac"; |
---|
| 432 | + reg = <1>; |
---|
| 433 | + status = "off"; |
---|
| 434 | + phy-mode = "rgmii-rxid"; |
---|
| 435 | + }; |
---|
376 | 436 | |
---|
377 | 437 | mdio-bus { |
---|
378 | 438 | #address-cells = <1>; |
---|
379 | 439 | #size-cells = <0>; |
---|
380 | 440 | |
---|
381 | | - phy1f: ethernet-phy@1f { |
---|
382 | | - reg = <0x1f>; |
---|
383 | | - phy-mode = "rgmii"; |
---|
| 441 | + switch0: switch0@0 { |
---|
| 442 | + compatible = "mediatek,mt7621"; |
---|
| 443 | + #address-cells = <1>; |
---|
| 444 | + #size-cells = <0>; |
---|
| 445 | + reg = <0>; |
---|
| 446 | + mediatek,mcm; |
---|
| 447 | + resets = <&rstctrl 2>; |
---|
| 448 | + reset-names = "mcm"; |
---|
| 449 | + |
---|
| 450 | + ports { |
---|
| 451 | + #address-cells = <1>; |
---|
| 452 | + #size-cells = <0>; |
---|
| 453 | + reg = <0>; |
---|
| 454 | + |
---|
| 455 | + port@0 { |
---|
| 456 | + status = "off"; |
---|
| 457 | + reg = <0>; |
---|
| 458 | + label = "lan0"; |
---|
| 459 | + }; |
---|
| 460 | + |
---|
| 461 | + port@1 { |
---|
| 462 | + status = "off"; |
---|
| 463 | + reg = <1>; |
---|
| 464 | + label = "lan1"; |
---|
| 465 | + }; |
---|
| 466 | + |
---|
| 467 | + port@2 { |
---|
| 468 | + status = "off"; |
---|
| 469 | + reg = <2>; |
---|
| 470 | + label = "lan2"; |
---|
| 471 | + }; |
---|
| 472 | + |
---|
| 473 | + port@3 { |
---|
| 474 | + status = "off"; |
---|
| 475 | + reg = <3>; |
---|
| 476 | + label = "lan3"; |
---|
| 477 | + }; |
---|
| 478 | + |
---|
| 479 | + port@4 { |
---|
| 480 | + status = "off"; |
---|
| 481 | + reg = <4>; |
---|
| 482 | + label = "lan4"; |
---|
| 483 | + }; |
---|
| 484 | + |
---|
| 485 | + port@6 { |
---|
| 486 | + reg = <6>; |
---|
| 487 | + label = "cpu"; |
---|
| 488 | + ethernet = <&gmac0>; |
---|
| 489 | + phy-mode = "trgmii"; |
---|
| 490 | + |
---|
| 491 | + fixed-link { |
---|
| 492 | + speed = <1000>; |
---|
| 493 | + full-duplex; |
---|
| 494 | + }; |
---|
| 495 | + }; |
---|
| 496 | + }; |
---|
384 | 497 | }; |
---|
385 | 498 | }; |
---|
386 | 499 | }; |
---|
.. | .. |
---|
398 | 511 | 0x1e142000 0x100 /* pcie port 0 RC control registers */ |
---|
399 | 512 | 0x1e143000 0x100 /* pcie port 1 RC control registers */ |
---|
400 | 513 | 0x1e144000 0x100>; /* pcie port 2 RC control registers */ |
---|
401 | | - |
---|
402 | 514 | #address-cells = <3>; |
---|
403 | 515 | #size-cells = <2>; |
---|
404 | 516 | |
---|
.. | .. |
---|
413 | 525 | 0x01000000 0 0x00000000 0x1e160000 0 0x00010000 /* io space */ |
---|
414 | 526 | >; |
---|
415 | 527 | |
---|
416 | | - #interrupt-cells = <1>; |
---|
417 | | - interrupt-map-mask = <0xF0000 0 0 1>; |
---|
418 | | - interrupt-map = <0x10000 0 0 1 &gic GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>, |
---|
419 | | - <0x20000 0 0 1 &gic GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>, |
---|
420 | | - <0x30000 0 0 1 &gic GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>; |
---|
| 528 | + interrupt-parent = <&gic>; |
---|
| 529 | + interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH |
---|
| 530 | + GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH |
---|
| 531 | + GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>; |
---|
421 | 532 | |
---|
422 | 533 | status = "disabled"; |
---|
423 | 534 | |
---|
.. | .. |
---|
425 | 536 | reset-names = "pcie0", "pcie1", "pcie2"; |
---|
426 | 537 | clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>; |
---|
427 | 538 | clock-names = "pcie0", "pcie1", "pcie2"; |
---|
| 539 | + phys = <&pcie0_phy 1>, <&pcie2_phy 0>; |
---|
| 540 | + phy-names = "pcie-phy0", "pcie-phy2"; |
---|
| 541 | + |
---|
| 542 | + reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>; |
---|
428 | 543 | |
---|
429 | 544 | pcie@0,0 { |
---|
430 | 545 | reg = <0x0000 0 0 0 0>; |
---|
.. | .. |
---|
450 | 565 | bus-range = <0x00 0xff>; |
---|
451 | 566 | }; |
---|
452 | 567 | }; |
---|
| 568 | + |
---|
| 569 | + pcie0_phy: pcie-phy@1e149000 { |
---|
| 570 | + compatible = "mediatek,mt7621-pci-phy"; |
---|
| 571 | + reg = <0x1e149000 0x0700>; |
---|
| 572 | + #phy-cells = <1>; |
---|
| 573 | + }; |
---|
| 574 | + |
---|
| 575 | + pcie2_phy: pcie-phy@1e14a000 { |
---|
| 576 | + compatible = "mediatek,mt7621-pci-phy"; |
---|
| 577 | + reg = <0x1e14a000 0x0700>; |
---|
| 578 | + #phy-cells = <1>; |
---|
| 579 | + }; |
---|
453 | 580 | }; |
---|