mediatek-net.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. MediaTek Frame Engine Ethernet controller
  2. =========================================
  3. The frame engine ethernet controller can be found on MediaTek SoCs. These SoCs
  4. have dual GMAC each represented by a child node..
  5. * Ethernet controller node
  6. Required properties:
  7. - compatible: Should be "mediatek,mt2701-eth"
  8. - reg: Address and length of the register set for the device
  9. - interrupts: Should contain the three frame engines interrupts in numeric
  10. order. These are fe_int0, fe_int1 and fe_int2.
  11. - clocks: the clock used by the core
  12. - clock-names: the names of the clock listed in the clocks property. These are
  13. "ethif", "esw", "gp2", "gp1"
  14. - power-domains: phandle to the power domain that the ethernet is part of
  15. - resets: Should contain a phandle to the ethsys reset signal
  16. - reset-names: Should contain the reset signal name "eth"
  17. - mediatek,ethsys: phandle to the syscon node that handles the port setup
  18. - mediatek,pctl: phandle to the syscon node that handles the ports slew rate
  19. and driver current
  20. Optional properties:
  21. - interrupt-parent: Should be the phandle for the interrupt controller
  22. that services interrupts for this device
  23. * Ethernet MAC node
  24. Required properties:
  25. - compatible: Should be "mediatek,eth-mac"
  26. - reg: The number of the MAC
  27. - phy-handle: see ethernet.txt file in the same directory and
  28. the phy-mode "trgmii" required being provided when reg
  29. is equal to 0 and the MAC uses fixed-link to connect
  30. with internal switch such as MT7530.
  31. Example:
  32. eth: ethernet@1b100000 {
  33. compatible = "mediatek,mt7623-eth";
  34. reg = <0 0x1b100000 0 0x20000>;
  35. clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
  36. <&ethsys CLK_ETHSYS_ESW>,
  37. <&ethsys CLK_ETHSYS_GP2>,
  38. <&ethsys CLK_ETHSYS_GP1>;
  39. clock-names = "ethif", "esw", "gp2", "gp1";
  40. interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_LOW
  41. GIC_SPI 199 IRQ_TYPE_LEVEL_LOW
  42. GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
  43. power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
  44. resets = <&ethsys MT2701_ETHSYS_ETH_RST>;
  45. reset-names = "eth";
  46. mediatek,ethsys = <&ethsys>;
  47. mediatek,pctl = <&syscfg_pctl_a>;
  48. #address-cells = <1>;
  49. #size-cells = <0>;
  50. gmac1: mac@0 {
  51. compatible = "mediatek,eth-mac";
  52. reg = <0>;
  53. phy-handle = <&phy0>;
  54. };
  55. gmac2: mac@1 {
  56. compatible = "mediatek,eth-mac";
  57. reg = <1>;
  58. phy-handle = <&phy1>;
  59. };
  60. mdio-bus {
  61. phy0: ethernet-phy@0 {
  62. reg = <0>;
  63. phy-mode = "rgmii";
  64. };
  65. phy1: ethernet-phy@1 {
  66. reg = <1>;
  67. phy-mode = "rgmii";
  68. };
  69. };
  70. };