stmmac.txt 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. * STMicroelectronics 10/100/1000/2500/10000 Ethernet (GMAC/XGMAC)
  2. Required properties:
  3. - compatible: Should be "snps,dwmac-<ip_version>", "snps,dwmac" or
  4. "snps,dwxgmac-<ip_version>", "snps,dwxgmac".
  5. For backwards compatibility: "st,spear600-gmac" is also supported.
  6. - reg: Address and length of the register set for the device
  7. - interrupts: Should contain the STMMAC interrupts
  8. - interrupt-names: Should contain a list of interrupt names corresponding to
  9. the interrupts in the interrupts property, if available.
  10. Valid interrupt names are:
  11. - "macirq" (combined signal for various interrupt events)
  12. - "eth_wake_irq" (the interrupt to manage the remote wake-up packet detection)
  13. - "eth_lpi" (the interrupt that occurs when Rx exits the LPI state)
  14. - phy-mode: See ethernet.txt file in the same directory.
  15. - snps,reset-gpio gpio number for phy reset.
  16. - snps,reset-active-low boolean flag to indicate if phy reset is active low.
  17. - snps,reset-delays-us is triplet of delays
  18. The 1st cell is reset pre-delay in micro seconds.
  19. The 2nd cell is reset pulse in micro seconds.
  20. The 3rd cell is reset post-delay in micro seconds.
  21. Optional properties:
  22. - resets: Should contain a phandle to the STMMAC reset signal, if any
  23. - reset-names: Should contain the reset signal name "stmmaceth", if a
  24. reset phandle is given
  25. - max-frame-size: See ethernet.txt file in the same directory
  26. - clocks: If present, the first clock should be the GMAC main clock and
  27. the second clock should be peripheral's register interface clock. Further
  28. clocks may be specified in derived bindings.
  29. - clock-names: One name for each entry in the clocks property, the
  30. first one should be "stmmaceth" and the second one should be "pclk".
  31. - ptp_ref: this is the PTP reference clock; in case of the PTP is available
  32. this clock is used for programming the Timestamp Addend Register. If not
  33. passed then the system clock will be used and this is fine on some
  34. platforms.
  35. - tx-fifo-depth: See ethernet.txt file in the same directory
  36. - rx-fifo-depth: See ethernet.txt file in the same directory
  37. - snps,pbl Programmable Burst Length (tx and rx)
  38. - snps,txpbl Tx Programmable Burst Length. Only for GMAC and newer.
  39. If set, DMA tx will use this value rather than snps,pbl.
  40. - snps,rxpbl Rx Programmable Burst Length. Only for GMAC and newer.
  41. If set, DMA rx will use this value rather than snps,pbl.
  42. - snps,no-pbl-x8 Don't multiply the pbl/txpbl/rxpbl values by 8.
  43. For core rev < 3.50, don't multiply the values by 4.
  44. - snps,aal Address-Aligned Beats
  45. - snps,fixed-burst Program the DMA to use the fixed burst mode
  46. - snps,mixed-burst Program the DMA to use the mixed burst mode
  47. - snps,force_thresh_dma_mode Force DMA to use the threshold mode for
  48. both tx and rx
  49. - snps,force_sf_dma_mode Force DMA to use the Store and Forward
  50. mode for both tx and rx. This flag is
  51. ignored if force_thresh_dma_mode is set.
  52. - snps,en-tx-lpi-clockgating Enable gating of the MAC TX clock during
  53. TX low-power mode
  54. - snps,multicast-filter-bins: Number of multicast filter hash bins
  55. supported by this device instance
  56. - snps,perfect-filter-entries: Number of perfect filter entries supported
  57. by this device instance
  58. - snps,ps-speed: port selection speed that can be passed to the core when
  59. PCS is supported. For example, this is used in case of SGMII
  60. and MAC2MAC connection.
  61. - snps,tso: this enables the TSO feature otherwise it will be managed by
  62. MAC HW capability register. Only for GMAC4 and newer.
  63. - AXI BUS Mode parameters: below the list of all the parameters to program the
  64. AXI register inside the DMA module:
  65. - snps,lpi_en: enable Low Power Interface
  66. - snps,xit_frm: unlock on WoL
  67. - snps,wr_osr_lmt: max write outstanding req. limit
  68. - snps,rd_osr_lmt: max read outstanding req. limit
  69. - snps,kbbe: do not cross 1KiB boundary.
  70. - snps,blen: this is a vector of supported burst length.
  71. - snps,fb: fixed-burst
  72. - snps,mb: mixed-burst
  73. - snps,rb: rebuild INCRx Burst
  74. - mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus.
  75. - Multiple RX Queues parameters: below the list of all the parameters to
  76. configure the multiple RX queues:
  77. - snps,rx-queues-to-use: number of RX queues to be used in the driver
  78. - Choose one of these RX scheduling algorithms:
  79. - snps,rx-sched-sp: Strict priority
  80. - snps,rx-sched-wsp: Weighted Strict priority
  81. - For each RX queue
  82. - Choose one of these modes:
  83. - snps,dcb-algorithm: Queue to be enabled as DCB
  84. - snps,avb-algorithm: Queue to be enabled as AVB
  85. - snps,map-to-dma-channel: Channel to map
  86. - Specifiy specific packet routing:
  87. - snps,route-avcp: AV Untagged Control packets
  88. - snps,route-ptp: PTP Packets
  89. - snps,route-dcbcp: DCB Control Packets
  90. - snps,route-up: Untagged Packets
  91. - snps,route-multi-broad: Multicast & Broadcast Packets
  92. - snps,priority: RX queue priority (Range: 0x0 to 0xF)
  93. - Multiple TX Queues parameters: below the list of all the parameters to
  94. configure the multiple TX queues:
  95. - snps,tx-queues-to-use: number of TX queues to be used in the driver
  96. - Choose one of these TX scheduling algorithms:
  97. - snps,tx-sched-wrr: Weighted Round Robin
  98. - snps,tx-sched-wfq: Weighted Fair Queuing
  99. - snps,tx-sched-dwrr: Deficit Weighted Round Robin
  100. - snps,tx-sched-sp: Strict priority
  101. - For each TX queue
  102. - snps,weight: TX queue weight (if using a DCB weight algorithm)
  103. - Choose one of these modes:
  104. - snps,dcb-algorithm: TX queue will be working in DCB
  105. - snps,avb-algorithm: TX queue will be working in AVB
  106. [Attention] Queue 0 is reserved for legacy traffic
  107. and so no AVB is available in this queue.
  108. - Configure Credit Base Shaper (if AVB Mode selected):
  109. - snps,send_slope: enable Low Power Interface
  110. - snps,idle_slope: unlock on WoL
  111. - snps,high_credit: max write outstanding req. limit
  112. - snps,low_credit: max read outstanding req. limit
  113. - snps,priority: TX queue priority (Range: 0x0 to 0xF)
  114. Examples:
  115. stmmac_axi_setup: stmmac-axi-config {
  116. snps,wr_osr_lmt = <0xf>;
  117. snps,rd_osr_lmt = <0xf>;
  118. snps,blen = <256 128 64 32 0 0 0>;
  119. };
  120. mtl_rx_setup: rx-queues-config {
  121. snps,rx-queues-to-use = <1>;
  122. snps,rx-sched-sp;
  123. queue0 {
  124. snps,dcb-algorithm;
  125. snps,map-to-dma-channel = <0x0>;
  126. snps,priority = <0x0>;
  127. };
  128. };
  129. mtl_tx_setup: tx-queues-config {
  130. snps,tx-queues-to-use = <2>;
  131. snps,tx-sched-wrr;
  132. queue0 {
  133. snps,weight = <0x10>;
  134. snps,dcb-algorithm;
  135. snps,priority = <0x0>;
  136. };
  137. queue1 {
  138. snps,avb-algorithm;
  139. snps,send_slope = <0x1000>;
  140. snps,idle_slope = <0x1000>;
  141. snps,high_credit = <0x3E800>;
  142. snps,low_credit = <0xFFC18000>;
  143. snps,priority = <0x1>;
  144. };
  145. };
  146. gmac0: ethernet@e0800000 {
  147. compatible = "st,spear600-gmac";
  148. reg = <0xe0800000 0x8000>;
  149. interrupt-parent = <&vic1>;
  150. interrupts = <24 23 22>;
  151. interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
  152. mac-address = [000000000000]; /* Filled in by U-Boot */
  153. max-frame-size = <3800>;
  154. phy-mode = "gmii";
  155. snps,multicast-filter-bins = <256>;
  156. snps,perfect-filter-entries = <128>;
  157. rx-fifo-depth = <16384>;
  158. tx-fifo-depth = <16384>;
  159. clocks = <&clock>;
  160. clock-names = "stmmaceth";
  161. snps,axi-config = <&stmmac_axi_setup>;
  162. mdio0 {
  163. #address-cells = <1>;
  164. #size-cells = <0>;
  165. compatible = "snps,dwmac-mdio";
  166. phy1: ethernet-phy@0 {
  167. };
  168. };
  169. snps,mtl-rx-config = <&mtl_rx_setup>;
  170. snps,mtl-tx-config = <&mtl_tx_setup>;
  171. };