micrel-ksz90x1.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. Micrel KSZ9021/KSZ9031 Gigabit Ethernet PHY
  2. Some boards require special tuning values, particularly when it comes to
  3. clock delays. You can specify clock delay values by adding
  4. micrel-specific properties to an Ethernet OF device node.
  5. Note that these settings are applied after any phy-specific fixup from
  6. phy_fixup_list (see phy_init_hw() from drivers/net/phy/phy_device.c),
  7. and therefore may overwrite them.
  8. KSZ9021:
  9. All skew control options are specified in picoseconds. The minimum
  10. value is 0, the maximum value is 1800, and it is incremented by 120ps
  11. steps.
  12. The KSZ9021 hardware supports a range of skew values from negative to
  13. positive, where the specific range is property dependent. All values
  14. specified in the devicetree are offset by the minimum value so they
  15. can be represented as positive integers in the devicetree since it's
  16. difficult to represent a negative number in the devictree.
  17. The following 4-bit values table applies to all the skew properties:
  18. Pad Skew Value Delay (ps) Devicetree Value
  19. ------------------------------------------------------
  20. 0000 -840ps 0
  21. 0001 -720ps 120
  22. 0010 -600ps 240
  23. 0011 -480ps 360
  24. 0100 -360ps 480
  25. 0101 -240ps 600
  26. 0110 -120ps 720
  27. 0111 0ps 840
  28. 1000 120ps 960
  29. 1001 240ps 1080
  30. 1010 360ps 1200
  31. 1011 480ps 1320
  32. 1100 600ps 1440
  33. 1101 720ps 1560
  34. 1110 840ps 1680
  35. 1111 960ps 1800
  36. Optional properties:
  37. - rxc-skew-ps : Skew control of RXC pad
  38. - rxdv-skew-ps : Skew control of RX CTL pad
  39. - txc-skew-ps : Skew control of TXC pad
  40. - txen-skew-ps : Skew control of TX CTL pad
  41. - rxd0-skew-ps : Skew control of RX data 0 pad
  42. - rxd1-skew-ps : Skew control of RX data 1 pad
  43. - rxd2-skew-ps : Skew control of RX data 2 pad
  44. - rxd3-skew-ps : Skew control of RX data 3 pad
  45. - txd0-skew-ps : Skew control of TX data 0 pad
  46. - txd1-skew-ps : Skew control of TX data 1 pad
  47. - txd2-skew-ps : Skew control of TX data 2 pad
  48. - txd3-skew-ps : Skew control of TX data 3 pad
  49. KSZ9031:
  50. All skew control options are specified in picoseconds. The minimum
  51. value is 0, and the maximum is property-dependent. The increment
  52. step is 60ps.
  53. The KSZ9031 hardware supports a range of skew values from negative to
  54. positive, where the specific range is property dependent. All values
  55. specified in the devicetree are offset by the minimum value so they
  56. can be represented as positive integers in the devicetree since it's
  57. difficult to represent a negative number in the devictree.
  58. The following 5-bit values table apply to rxc-skew-ps and txc-skew-ps.
  59. Pad Skew Value Delay (ps) Devicetree Value
  60. ------------------------------------------------------
  61. 0_0000 -900ps 0
  62. 0_0001 -840ps 60
  63. 0_0010 -780ps 120
  64. 0_0011 -720ps 180
  65. 0_0100 -660ps 240
  66. 0_0101 -600ps 300
  67. 0_0110 -540ps 360
  68. 0_0111 -480ps 420
  69. 0_1000 -420ps 480
  70. 0_1001 -360ps 540
  71. 0_1010 -300ps 600
  72. 0_1011 -240ps 660
  73. 0_1100 -180ps 720
  74. 0_1101 -120ps 780
  75. 0_1110 -60ps 840
  76. 0_1111 0ps 900
  77. 1_0000 60ps 960
  78. 1_0001 120ps 1020
  79. 1_0010 180ps 1080
  80. 1_0011 240ps 1140
  81. 1_0100 300ps 1200
  82. 1_0101 360ps 1260
  83. 1_0110 420ps 1320
  84. 1_0111 480ps 1380
  85. 1_1000 540ps 1440
  86. 1_1001 600ps 1500
  87. 1_1010 660ps 1560
  88. 1_1011 720ps 1620
  89. 1_1100 780ps 1680
  90. 1_1101 840ps 1740
  91. 1_1110 900ps 1800
  92. 1_1111 960ps 1860
  93. The following 4-bit values table apply to the txdX-skew-ps, rxdX-skew-ps
  94. data pads, and the rxdv-skew-ps, txen-skew-ps control pads.
  95. Pad Skew Value Delay (ps) Devicetree Value
  96. ------------------------------------------------------
  97. 0000 -420ps 0
  98. 0001 -360ps 60
  99. 0010 -300ps 120
  100. 0011 -240ps 180
  101. 0100 -180ps 240
  102. 0101 -120ps 300
  103. 0110 -60ps 360
  104. 0111 0ps 420
  105. 1000 60ps 480
  106. 1001 120ps 540
  107. 1010 180ps 600
  108. 1011 240ps 660
  109. 1100 300ps 720
  110. 1101 360ps 780
  111. 1110 420ps 840
  112. 1111 480ps 900
  113. Optional properties:
  114. Maximum value of 1860:
  115. - rxc-skew-ps : Skew control of RX clock pad
  116. - txc-skew-ps : Skew control of TX clock pad
  117. Maximum value of 900:
  118. - rxdv-skew-ps : Skew control of RX CTL pad
  119. - txen-skew-ps : Skew control of TX CTL pad
  120. - rxd0-skew-ps : Skew control of RX data 0 pad
  121. - rxd1-skew-ps : Skew control of RX data 1 pad
  122. - rxd2-skew-ps : Skew control of RX data 2 pad
  123. - rxd3-skew-ps : Skew control of RX data 3 pad
  124. - txd0-skew-ps : Skew control of TX data 0 pad
  125. - txd1-skew-ps : Skew control of TX data 1 pad
  126. - txd2-skew-ps : Skew control of TX data 2 pad
  127. - txd3-skew-ps : Skew control of TX data 3 pad
  128. Examples:
  129. /* Attach to an Ethernet device with autodetected PHY */
  130. &enet {
  131. rxc-skew-ps = <1800>;
  132. rxdv-skew-ps = <0>;
  133. txc-skew-ps = <1800>;
  134. txen-skew-ps = <0>;
  135. status = "okay";
  136. };
  137. /* Attach to an explicitly-specified PHY */
  138. mdio {
  139. phy0: ethernet-phy@0 {
  140. rxc-skew-ps = <1800>;
  141. rxdv-skew-ps = <0>;
  142. txc-skew-ps = <1800>;
  143. txen-skew-ps = <0>;
  144. reg = <0>;
  145. };
  146. };
  147. ethernet@70000 {
  148. status = "okay";
  149. phy = <&phy0>;
  150. phy-mode = "rgmii-id";
  151. };
  152. References
  153. Micrel ksz9021rl/rn Data Sheet, Revision 1.2. Dated 2/13/2014.
  154. http://www.micrel.com/_PDF/Ethernet/datasheets/ksz9021rl-rn_ds.pdf
  155. Micrel ksz9031rnx Data Sheet, Revision 2.1. Dated 11/20/2014.
  156. http://www.micrel.com/_PDF/Ethernet/datasheets/KSZ9031RNX.pdf
  157. Notes:
  158. Note that a previous version of the Micrel ksz9021rl/rn Data Sheet
  159. was missing extended register 106 (transmit data pad skews), and
  160. incorrectly specified the ps per step as 200ps/step instead of
  161. 120ps/step. The latest update to this document reflects the latest
  162. revision of the Micrel specification even though usage in the kernel
  163. still reflects that incorrect document.