micrel-ksz90x1.txt 4.9 KB

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