meson-dwmac.txt 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. * Amlogic Meson DWMAC Ethernet controller
  2. The device inherits all the properties of the dwmac/stmmac devices
  3. described in the file stmmac.txt in the current directory with the
  4. following changes.
  5. Required properties on all platforms:
  6. - compatible: Depending on the platform this should be one of:
  7. - "amlogic,meson6-dwmac"
  8. - "amlogic,meson8b-dwmac"
  9. - "amlogic,meson8m2-dwmac"
  10. - "amlogic,meson-gxbb-dwmac"
  11. - "amlogic,meson-axg-dwmac"
  12. Additionally "snps,dwmac" and any applicable more
  13. detailed version number described in net/stmmac.txt
  14. should be used.
  15. - reg: The first register range should be the one of the DWMAC
  16. controller. The second range is is for the Amlogic specific
  17. configuration (for example the PRG_ETHERNET register range
  18. on Meson8b and newer)
  19. Required properties on Meson8b, Meson8m2, GXBB and newer:
  20. - clock-names: Should contain the following:
  21. - "stmmaceth" - see stmmac.txt
  22. - "clkin0" - first parent clock of the internal mux
  23. - "clkin1" - second parent clock of the internal mux
  24. Optional properties on Meson8b, Meson8m2, GXBB and newer:
  25. - amlogic,tx-delay-ns: The internal RGMII TX clock delay (provided
  26. by this driver) in nanoseconds. Allowed values
  27. are: 0ns, 2ns, 4ns, 6ns.
  28. When phy-mode is set to "rgmii" then the TX
  29. delay should be explicitly configured. When
  30. not configured a fallback of 2ns is used.
  31. When the phy-mode is set to either "rgmii-id"
  32. or "rgmii-txid" the TX clock delay is already
  33. provided by the PHY. In that case this
  34. property should be set to 0ns (which disables
  35. the TX clock delay in the MAC to prevent the
  36. clock from going off because both PHY and MAC
  37. are adding a delay).
  38. Any configuration is ignored when the phy-mode
  39. is set to "rmii".
  40. Example for Meson6:
  41. ethmac: ethernet@c9410000 {
  42. compatible = "amlogic,meson6-dwmac", "snps,dwmac";
  43. reg = <0xc9410000 0x10000
  44. 0xc1108108 0x4>;
  45. interrupts = <0 8 1>;
  46. interrupt-names = "macirq";
  47. clocks = <&clk81>;
  48. clock-names = "stmmaceth";
  49. }
  50. Example for GXBB:
  51. ethmac: ethernet@c9410000 {
  52. compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac";
  53. reg = <0x0 0xc9410000 0x0 0x10000>,
  54. <0x0 0xc8834540 0x0 0x8>;
  55. interrupts = <0 8 1>;
  56. interrupt-names = "macirq";
  57. clocks = <&clkc CLKID_ETH>,
  58. <&clkc CLKID_FCLK_DIV2>,
  59. <&clkc CLKID_MPLL2>;
  60. clock-names = "stmmaceth", "clkin0", "clkin1";
  61. phy-mode = "rgmii";
  62. };