emac.txt 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. 4xx/Axon EMAC ethernet nodes
  2. The EMAC ethernet controller in IBM and AMCC 4xx chips, and also
  3. the Axon bridge. To operate this needs to interact with a this
  4. special McMAL DMA controller, and sometimes an RGMII or ZMII
  5. interface. In addition to the nodes and properties described
  6. below, the node for the OPB bus on which the EMAC sits must have a
  7. correct clock-frequency property.
  8. i) The EMAC node itself
  9. Required properties:
  10. - device_type : "network"
  11. - compatible : compatible list, contains 2 entries, first is
  12. "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,
  13. 405gp, Axon) and second is either "ibm,emac" or
  14. "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon",
  15. "ibm,emac4"
  16. - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ>
  17. - interrupt-parent : optional, if needed for interrupt mapping
  18. - reg : <registers mapping>
  19. - local-mac-address : 6 bytes, MAC address
  20. - mal-device : phandle of the associated McMAL node
  21. - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated
  22. with this EMAC
  23. - mal-rx-channel : 1 cell, index of the rx channel on McMAL associated
  24. with this EMAC
  25. - cell-index : 1 cell, hardware index of the EMAC cell on a given
  26. ASIC (typically 0x0 and 0x1 for EMAC0 and EMAC1 on
  27. each Axon chip)
  28. - max-frame-size : 1 cell, maximum frame size supported in bytes
  29. - rx-fifo-size : 1 cell, Rx fifo size in bytes for 10 and 100 Mb/sec
  30. operations.
  31. For Axon, 2048
  32. - tx-fifo-size : 1 cell, Tx fifo size in bytes for 10 and 100 Mb/sec
  33. operations.
  34. For Axon, 2048.
  35. - fifo-entry-size : 1 cell, size of a fifo entry (used to calculate
  36. thresholds).
  37. For Axon, 0x00000010
  38. - mal-burst-size : 1 cell, MAL burst size (used to calculate thresholds)
  39. in bytes.
  40. For Axon, 0x00000100 (I think ...)
  41. - phy-mode : string, mode of operations of the PHY interface.
  42. Supported values are: "mii", "rmii", "smii", "rgmii",
  43. "tbi", "gmii", rtbi", "sgmii".
  44. For Axon on CAB, it is "rgmii"
  45. - mdio-device : 1 cell, required iff using shared MDIO registers
  46. (440EP). phandle of the EMAC to use to drive the
  47. MDIO lines for the PHY used by this EMAC.
  48. - zmii-device : 1 cell, required iff connected to a ZMII. phandle of
  49. the ZMII device node
  50. - zmii-channel : 1 cell, required iff connected to a ZMII. Which ZMII
  51. channel or 0xffffffff if ZMII is only used for MDIO.
  52. - rgmii-device : 1 cell, required iff connected to an RGMII. phandle
  53. of the RGMII device node.
  54. For Axon: phandle of plb5/plb4/opb/rgmii
  55. - rgmii-channel : 1 cell, required iff connected to an RGMII. Which
  56. RGMII channel is used by this EMAC.
  57. Fox Axon: present, whatever value is appropriate for each
  58. EMAC, that is the content of the current (bogus) "phy-port"
  59. property.
  60. Optional properties:
  61. - phy-address : 1 cell, optional, MDIO address of the PHY. If absent,
  62. a search is performed.
  63. - phy-map : 1 cell, optional, bitmap of addresses to probe the PHY
  64. for, used if phy-address is absent. bit 0x00000001 is
  65. MDIO address 0.
  66. For Axon it can be absent, though my current driver
  67. doesn't handle phy-address yet so for now, keep
  68. 0x00ffffff in it.
  69. - rx-fifo-size-gige : 1 cell, Rx fifo size in bytes for 1000 Mb/sec
  70. operations (if absent the value is the same as
  71. rx-fifo-size). For Axon, either absent or 2048.
  72. - tx-fifo-size-gige : 1 cell, Tx fifo size in bytes for 1000 Mb/sec
  73. operations (if absent the value is the same as
  74. tx-fifo-size). For Axon, either absent or 2048.
  75. - tah-device : 1 cell, optional. If connected to a TAH engine for
  76. offload, phandle of the TAH device node.
  77. - tah-channel : 1 cell, optional. If appropriate, channel used on the
  78. TAH engine.
  79. Example:
  80. EMAC0: ethernet@40000800 {
  81. device_type = "network";
  82. compatible = "ibm,emac-440gp", "ibm,emac";
  83. interrupt-parent = <&UIC1>;
  84. interrupts = <1c 4 1d 4>;
  85. reg = <40000800 70>;
  86. local-mac-address = [00 04 AC E3 1B 1E];
  87. mal-device = <&MAL0>;
  88. mal-tx-channel = <0 1>;
  89. mal-rx-channel = <0>;
  90. cell-index = <0>;
  91. max-frame-size = <5dc>;
  92. rx-fifo-size = <1000>;
  93. tx-fifo-size = <800>;
  94. phy-mode = "rmii";
  95. phy-map = <00000001>;
  96. zmii-device = <&ZMII0>;
  97. zmii-channel = <0>;
  98. };
  99. ii) McMAL node
  100. Required properties:
  101. - device_type : "dma-controller"
  102. - compatible : compatible list, containing 2 entries, first is
  103. "ibm,mcmal-CHIP" where CHIP is the host ASIC (like
  104. emac) and the second is either "ibm,mcmal" or
  105. "ibm,mcmal2".
  106. For Axon, "ibm,mcmal-axon","ibm,mcmal2"
  107. - interrupts : <interrupt mapping for the MAL interrupts sources:
  108. 5 sources: tx_eob, rx_eob, serr, txde, rxde>.
  109. For Axon: This is _different_ from the current
  110. firmware. We use the "delayed" interrupts for txeob
  111. and rxeob. Thus we end up with mapping those 5 MPIC
  112. interrupts, all level positive sensitive: 10, 11, 32,
  113. 33, 34 (in decimal)
  114. - dcr-reg : < DCR registers range >
  115. - dcr-parent : if needed for dcr-reg
  116. - num-tx-chans : 1 cell, number of Tx channels
  117. - num-rx-chans : 1 cell, number of Rx channels
  118. iii) ZMII node
  119. Required properties:
  120. - compatible : compatible list, containing 2 entries, first is
  121. "ibm,zmii-CHIP" where CHIP is the host ASIC (like
  122. EMAC) and the second is "ibm,zmii".
  123. For Axon, there is no ZMII node.
  124. - reg : <registers mapping>
  125. iv) RGMII node
  126. Required properties:
  127. - compatible : compatible list, containing 2 entries, first is
  128. "ibm,rgmii-CHIP" where CHIP is the host ASIC (like
  129. EMAC) and the second is "ibm,rgmii".
  130. For Axon, "ibm,rgmii-axon","ibm,rgmii"
  131. - reg : <registers mapping>
  132. - revision : as provided by the RGMII new version register if
  133. available.
  134. For Axon: 0x0000012a