0048-net-next-mediatek-document-MediaTek-SoC-ethernet-bin.patch 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. From 6efc8d9081b70dcf71d7e8efd7b51d48ee2541be Mon Sep 17 00:00:00 2001
  2. From: John Crispin <blogic@openwrt.org>
  3. Date: Wed, 2 Mar 2016 07:18:52 +0100
  4. Subject: [PATCH 048/102] net-next: mediatek: document MediaTek SoC ethernet
  5. binding
  6. This adds the binding documentation for the MediaTek Ethernet
  7. controller.
  8. Signed-off-by: John Crispin <blogic@openwrt.org>
  9. Acked-by: Rob Herring <robh@kernel.org>
  10. Cc: devicetree@vger.kernel.org
  11. ---
  12. .../devicetree/bindings/net/mediatek-net.txt | 77 ++++++++++++++++++++
  13. 1 file changed, 77 insertions(+)
  14. create mode 100644 Documentation/devicetree/bindings/net/mediatek-net.txt
  15. --- /dev/null
  16. +++ b/Documentation/devicetree/bindings/net/mediatek-net.txt
  17. @@ -0,0 +1,77 @@
  18. +MediaTek Frame Engine Ethernet controller
  19. +=========================================
  20. +
  21. +The frame engine ethernet controller can be found on MediaTek SoCs. These SoCs
  22. +have dual GMAC each represented by a child node..
  23. +
  24. +* Ethernet controller node
  25. +
  26. +Required properties:
  27. +- compatible: Should be "mediatek,mt7623-eth"
  28. +- reg: Address and length of the register set for the device
  29. +- interrupts: Should contain the frame engines interrupt
  30. +- clocks: the clock used by the core
  31. +- clock-names: the names of the clock listed in the clocks property. These are
  32. + "ethif", "esw", "gp2", "gp1"
  33. +- power-domains: phandle to the power domain that the ethernet is part of
  34. +- resets: Should contain a phandle to the ethsys reset signal
  35. +- reset-names: Should contain the reset signal name "eth"
  36. +- mediatek,ethsys: phandle to the syscon node that handles the port setup
  37. +- mediatek,pctl: phandle to the syscon node that handles the ports slew rate
  38. + and driver current
  39. +
  40. +Optional properties:
  41. +- interrupt-parent: Should be the phandle for the interrupt controller
  42. + that services interrupts for this device
  43. +
  44. +
  45. +* Ethernet MAC node
  46. +
  47. +Required properties:
  48. +- compatible: Should be "mediatek,eth-mac"
  49. +- reg: The number of the MAC
  50. +- phy-handle: see ethernet.txt file in the same directory.
  51. +
  52. +Example:
  53. +
  54. +eth: ethernet@1b100000 {
  55. + compatible = "mediatek,mt7623-eth";
  56. + reg = <0 0x1b100000 0 0x20000>;
  57. + clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
  58. + <&ethsys CLK_ETHSYS_ESW>,
  59. + <&ethsys CLK_ETHSYS_GP2>,
  60. + <&ethsys CLK_ETHSYS_GP1>;
  61. + clock-names = "ethif", "esw", "gp2", "gp1";
  62. + interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_LOW>;
  63. + power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
  64. + resets = <&ethsys MT2701_ETHSYS_ETH_RST>;
  65. + reset-names = "eth";
  66. + mediatek,ethsys = <&ethsys>;
  67. + mediatek,pctl = <&syscfg_pctl_a>;
  68. + #address-cells = <1>;
  69. + #size-cells = <0>;
  70. +
  71. + gmac1: mac@0 {
  72. + compatible = "mediatek,eth-mac";
  73. + reg = <0>;
  74. + phy-handle = <&phy0>;
  75. + };
  76. +
  77. + gmac2: mac@1 {
  78. + compatible = "mediatek,eth-mac";
  79. + reg = <1>;
  80. + phy-handle = <&phy1>;
  81. + };
  82. +
  83. + mdio-bus {
  84. + phy0: ethernet-phy@0 {
  85. + reg = <0>;
  86. + phy-mode = "rgmii";
  87. + };
  88. +
  89. + phy1: ethernet-phy@1 {
  90. + reg = <1>;
  91. + phy-mode = "rgmii";
  92. + };
  93. + };
  94. +};