ibm,emac.txt 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. - reg : <registers mapping>
  18. - local-mac-address : 6 bytes, MAC address
  19. - mal-device : phandle of the associated McMAL node
  20. - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated
  21. with this EMAC
  22. - mal-rx-channel : 1 cell, index of the rx channel on McMAL associated
  23. with this EMAC
  24. - cell-index : 1 cell, hardware index of the EMAC cell on a given
  25. ASIC (typically 0x0 and 0x1 for EMAC0 and EMAC1 on
  26. each Axon chip)
  27. - max-frame-size : 1 cell, maximum frame size supported in bytes
  28. - rx-fifo-size : 1 cell, Rx fifo size in bytes for 10 and 100 Mb/sec
  29. operations.
  30. For Axon, 2048
  31. - tx-fifo-size : 1 cell, Tx fifo size in bytes for 10 and 100 Mb/sec
  32. operations.
  33. For Axon, 2048.
  34. - fifo-entry-size : 1 cell, size of a fifo entry (used to calculate
  35. thresholds).
  36. For Axon, 0x00000010
  37. - mal-burst-size : 1 cell, MAL burst size (used to calculate thresholds)
  38. in bytes.
  39. For Axon, 0x00000100 (I think ...)
  40. - phy-mode : string, mode of operations of the PHY interface.
  41. Supported values are: "mii", "rmii", "smii", "rgmii",
  42. "tbi", "gmii", rtbi", "sgmii".
  43. For Axon on CAB, it is "rgmii"
  44. - mdio-device : 1 cell, required iff using shared MDIO registers
  45. (440EP). phandle of the EMAC to use to drive the
  46. MDIO lines for the PHY used by this EMAC.
  47. - zmii-device : 1 cell, required iff connected to a ZMII. phandle of
  48. the ZMII device node
  49. - zmii-channel : 1 cell, required iff connected to a ZMII. Which ZMII
  50. channel or 0xffffffff if ZMII is only used for MDIO.
  51. - rgmii-device : 1 cell, required iff connected to an RGMII. phandle
  52. of the RGMII device node.
  53. For Axon: phandle of plb5/plb4/opb/rgmii
  54. - rgmii-channel : 1 cell, required iff connected to an RGMII. Which
  55. RGMII channel is used by this EMAC.
  56. Fox Axon: present, whatever value is appropriate for each
  57. EMAC, that is the content of the current (bogus) "phy-port"
  58. property.
  59. Optional properties:
  60. - phy-address : 1 cell, optional, MDIO address of the PHY. If absent,
  61. a search is performed.
  62. - phy-map : 1 cell, optional, bitmap of addresses to probe the PHY
  63. for, used if phy-address is absent. bit 0x00000001 is
  64. MDIO address 0.
  65. For Axon it can be absent, though my current driver
  66. doesn't handle phy-address yet so for now, keep
  67. 0x00ffffff in it.
  68. - phy-handle : Used to describe configurations where a external PHY
  69. is used. Please refer to:
  70. Documentation/devicetree/bindings/net/ethernet.txt
  71. - rx-fifo-size-gige : 1 cell, Rx fifo size in bytes for 1000 Mb/sec
  72. operations (if absent the value is the same as
  73. rx-fifo-size). For Axon, either absent or 2048.
  74. - tx-fifo-size-gige : 1 cell, Tx fifo size in bytes for 1000 Mb/sec
  75. operations (if absent the value is the same as
  76. tx-fifo-size). For Axon, either absent or 2048.
  77. - tah-device : 1 cell, optional. If connected to a TAH engine for
  78. offload, phandle of the TAH device node.
  79. - tah-channel : 1 cell, optional. If appropriate, channel used on the
  80. TAH engine.
  81. - fixed-link : Fixed-link subnode describing a link to a non-MDIO
  82. managed entity. See
  83. Documentation/devicetree/bindings/net/fixed-link.txt
  84. for details.
  85. - mdio subnode : When the EMAC has a phy connected to its local
  86. mdio, which us supported by the kernel's network
  87. PHY library in drivers/net/phy, there must be device
  88. tree subnode with the following required properties:
  89. - #address-cells: Must be <1>.
  90. - #size-cells: Must be <0>.
  91. For PHY definitions: Please refer to
  92. Documentation/devicetree/bindings/net/phy.txt and
  93. Documentation/devicetree/bindings/net/ethernet.txt
  94. Examples:
  95. EMAC0: ethernet@40000800 {
  96. device_type = "network";
  97. compatible = "ibm,emac-440gp", "ibm,emac";
  98. interrupt-parent = <&UIC1>;
  99. interrupts = <1c 4 1d 4>;
  100. reg = <40000800 70>;
  101. local-mac-address = [00 04 AC E3 1B 1E];
  102. mal-device = <&MAL0>;
  103. mal-tx-channel = <0 1>;
  104. mal-rx-channel = <0>;
  105. cell-index = <0>;
  106. max-frame-size = <5dc>;
  107. rx-fifo-size = <1000>;
  108. tx-fifo-size = <800>;
  109. phy-mode = "rmii";
  110. phy-map = <00000001>;
  111. zmii-device = <&ZMII0>;
  112. zmii-channel = <0>;
  113. };
  114. EMAC1: ethernet@ef600c00 {
  115. device_type = "network";
  116. compatible = "ibm,emac-apm821xx", "ibm,emac4sync";
  117. interrupt-parent = <&EMAC1>;
  118. interrupts = <0 1>;
  119. #interrupt-cells = <1>;
  120. #address-cells = <0>;
  121. #size-cells = <0>;
  122. interrupt-map = <0 &UIC2 0x10 IRQ_TYPE_LEVEL_HIGH /* Status */
  123. 1 &UIC2 0x14 IRQ_TYPE_LEVEL_HIGH /* Wake */>;
  124. reg = <0xef600c00 0x000000c4>;
  125. local-mac-address = [000000000000]; /* Filled in by U-Boot */
  126. mal-device = <&MAL0>;
  127. mal-tx-channel = <0>;
  128. mal-rx-channel = <0>;
  129. cell-index = <0>;
  130. max-frame-size = <9000>;
  131. rx-fifo-size = <16384>;
  132. tx-fifo-size = <2048>;
  133. fifo-entry-size = <10>;
  134. phy-mode = "rgmii";
  135. phy-handle = <&phy0>;
  136. phy-map = <0x00000000>;
  137. rgmii-device = <&RGMII0>;
  138. rgmii-channel = <0>;
  139. tah-device = <&TAH0>;
  140. tah-channel = <0>;
  141. has-inverted-stacr-oc;
  142. has-new-stacr-staopc;
  143. mdio {
  144. #address-cells = <1>;
  145. #size-cells = <0>;
  146. phy0: ethernet-phy@0 {
  147. compatible = "ethernet-phy-ieee802.3-c22";
  148. reg = <0>;
  149. };
  150. };
  151. };
  152. ii) McMAL node
  153. Required properties:
  154. - device_type : "dma-controller"
  155. - compatible : compatible list, containing 2 entries, first is
  156. "ibm,mcmal-CHIP" where CHIP is the host ASIC (like
  157. emac) and the second is either "ibm,mcmal" or
  158. "ibm,mcmal2".
  159. For Axon, "ibm,mcmal-axon","ibm,mcmal2"
  160. - interrupts : <interrupt mapping for the MAL interrupts sources:
  161. 5 sources: tx_eob, rx_eob, serr, txde, rxde>.
  162. For Axon: This is _different_ from the current
  163. firmware. We use the "delayed" interrupts for txeob
  164. and rxeob. Thus we end up with mapping those 5 MPIC
  165. interrupts, all level positive sensitive: 10, 11, 32,
  166. 33, 34 (in decimal)
  167. - dcr-reg : < DCR registers range >
  168. - dcr-parent : if needed for dcr-reg
  169. - num-tx-chans : 1 cell, number of Tx channels
  170. - num-rx-chans : 1 cell, number of Rx channels
  171. iii) ZMII node
  172. Required properties:
  173. - compatible : compatible list, containing 2 entries, first is
  174. "ibm,zmii-CHIP" where CHIP is the host ASIC (like
  175. EMAC) and the second is "ibm,zmii".
  176. For Axon, there is no ZMII node.
  177. - reg : <registers mapping>
  178. iv) RGMII node
  179. Required properties:
  180. - compatible : compatible list, containing 2 entries, first is
  181. "ibm,rgmii-CHIP" where CHIP is the host ASIC (like
  182. EMAC) and the second is "ibm,rgmii".
  183. For Axon, "ibm,rgmii-axon","ibm,rgmii"
  184. - reg : <registers mapping>
  185. - revision : as provided by the RGMII new version register if
  186. available.
  187. For Axon: 0x0000012a