brcm,bcmgenet.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. * Broadcom BCM7xxx Ethernet Controller (GENET)
  2. Required properties:
  3. - compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2",
  4. "brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5".
  5. - reg: address and length of the register set for the device
  6. - interrupts and/or interrupts-extended: must be two cells, the first cell
  7. is the general purpose interrupt line, while the second cell is the
  8. interrupt for the ring RX and TX queues operating in ring mode. An
  9. optional third interrupt cell for Wake-on-LAN can be specified.
  10. See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
  11. for information on the property specifics.
  12. - phy-mode: see ethernet.txt file in the same directory
  13. - #address-cells: should be 1
  14. - #size-cells: should be 1
  15. Optional properties:
  16. - clocks: When provided, must be two phandles to the functional clocks nodes
  17. of the GENET block. The first phandle is the main GENET clock used during
  18. normal operation, while the second phandle is the Wake-on-LAN clock.
  19. - clock-names: When provided, names of the functional clock phandles, first
  20. name should be "enet" and second should be "enet-wol".
  21. - phy-handle: See ethernet.txt file in the same directory; used to describe
  22. configurations where a PHY (internal or external) is used.
  23. - fixed-link: When the GENET interface is connected to a MoCA hardware block or
  24. when operating in a RGMII to RGMII type of connection, or when the MDIO bus is
  25. voluntarily disabled, this property should be used to describe the "fixed link".
  26. See Documentation/devicetree/bindings/net/fixed-link.txt for information on
  27. the property specifics
  28. Required child nodes:
  29. - mdio bus node: this node should always be present regardless of the PHY
  30. configuration of the GENET instance
  31. MDIO bus node required properties:
  32. - compatible: should contain one of "brcm,genet-mdio-v1", "brcm,genet-mdio-v2"
  33. "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", "brcm,genet-mdio-v5", the version
  34. has to match the parent node compatible property (e.g: brcm,genet-v4 pairs
  35. with brcm,genet-mdio-v4)
  36. - reg: address and length relative to the parent node base register address
  37. - #address-cells: address cell for MDIO bus addressing, should be 1
  38. - #size-cells: size of the cells for MDIO bus addressing, should be 0
  39. Ethernet PHY node properties:
  40. See Documentation/devicetree/bindings/net/phy.txt for the list of required and
  41. optional properties.
  42. Internal Gigabit PHY example:
  43. ethernet@f0b60000 {
  44. phy-mode = "internal";
  45. phy-handle = <&phy1>;
  46. mac-address = [ 00 10 18 36 23 1a ];
  47. compatible = "brcm,genet-v4";
  48. #address-cells = <0x1>;
  49. #size-cells = <0x1>;
  50. reg = <0xf0b60000 0xfc4c>;
  51. interrupts = <0x0 0x14 0x0>, <0x0 0x15 0x0>;
  52. mdio@e14 {
  53. compatible = "brcm,genet-mdio-v4";
  54. #address-cells = <0x1>;
  55. #size-cells = <0x0>;
  56. reg = <0xe14 0x8>;
  57. phy1: ethernet-phy@1 {
  58. max-speed = <1000>;
  59. reg = <0x1>;
  60. compatible = "ethernet-phy-ieee802.3-c22";
  61. };
  62. };
  63. };
  64. MoCA interface / MAC to MAC example:
  65. ethernet@f0b80000 {
  66. phy-mode = "moca";
  67. fixed-link = <1 0 1000 0 0>;
  68. mac-address = [ 00 10 18 36 24 1a ];
  69. compatible = "brcm,genet-v4";
  70. #address-cells = <0x1>;
  71. #size-cells = <0x1>;
  72. reg = <0xf0b80000 0xfc4c>;
  73. interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>;
  74. mdio@e14 {
  75. compatible = "brcm,genet-mdio-v4";
  76. #address-cells = <0x1>;
  77. #size-cells = <0x0>;
  78. reg = <0xe14 0x8>;
  79. };
  80. };
  81. External MDIO-connected Gigabit PHY/switch:
  82. ethernet@f0ba0000 {
  83. phy-mode = "rgmii";
  84. phy-handle = <&phy0>;
  85. mac-address = [ 00 10 18 36 26 1a ];
  86. compatible = "brcm,genet-v4";
  87. #address-cells = <0x1>;
  88. #size-cells = <0x1>;
  89. reg = <0xf0ba0000 0xfc4c>;
  90. interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>;
  91. mdio@e14 {
  92. compatible = "brcm,genet-mdio-v4";
  93. #address-cells = <0x1>;
  94. #size-cells = <0x0>;
  95. reg = <0xe14 0x8>;
  96. phy0: ethernet-phy@0 {
  97. max-speed = <1000>;
  98. reg = <0x0>;
  99. compatible = "ethernet-phy-ieee802.3-c22";
  100. };
  101. };
  102. };