1 Micrel KSZ9021/KSZ9031/KSZ9131 Gigabit Ethernet PHY
3 Some boards require special tuning values, particularly when it comes
4 to clock delays. You can specify clock delay values in the PHY OF
5 device node. Deprecated, but still supported, these properties can
6 also be added to an Ethernet OF device node.
8 Note that these settings are applied after any phy-specific fixup from
9 phy_fixup_list (see phy_init_hw() from drivers/net/phy/phy_device.c),
10 and therefore may overwrite them.
14 All skew control options are specified in picoseconds. The minimum
15 value is 0, the maximum value is 3000, and it can be specified in 200ps
16 steps, *but* these values are in not fact what you get because this chip's
17 skew values actually increase in 120ps steps, starting from -840ps. The
18 incorrect values came from an error in the original KSZ9021 datasheet
19 before it was corrected in revision 1.2 (Feb 2014), but it is too late to
20 change the driver now because of the many existing device trees that have
21 been created using values that go up in increments of 200.
23 The following table shows the actual skew delay you will get for each of the
24 possible devicetree values, and the number that will be programmed into the
25 corresponding pad skew register:
27 Device Tree Value Delay Pad Skew Register Value
28 -----------------------------------------------------
48 - rxc-skew-ps : Skew control of RXC pad
49 - rxdv-skew-ps : Skew control of RX CTL pad
50 - txc-skew-ps : Skew control of TXC pad
51 - txen-skew-ps : Skew control of TX CTL pad
52 - rxd0-skew-ps : Skew control of RX data 0 pad
53 - rxd1-skew-ps : Skew control of RX data 1 pad
54 - rxd2-skew-ps : Skew control of RX data 2 pad
55 - rxd3-skew-ps : Skew control of RX data 3 pad
56 - txd0-skew-ps : Skew control of TX data 0 pad
57 - txd1-skew-ps : Skew control of TX data 1 pad
58 - txd2-skew-ps : Skew control of TX data 2 pad
59 - txd3-skew-ps : Skew control of TX data 3 pad
63 All skew control options are specified in picoseconds. The minimum
64 value is 0, and the maximum is property-dependent. The increment
65 step is 60ps. The default value is the neutral setting, so setting
66 rxc-skew-ps=<0> actually results in -900 picoseconds adjustment.
68 The KSZ9031 hardware supports a range of skew values from negative to
69 positive, where the specific range is property dependent. All values
70 specified in the devicetree are offset by the minimum value so they
71 can be represented as positive integers in the devicetree since it's
72 difficult to represent a negative number in the devictree.
74 The following 5-bit values table apply to rxc-skew-ps and txc-skew-ps.
76 Pad Skew Value Delay (ps) Devicetree Value
77 ------------------------------------------------------
111 The following 4-bit values table apply to the txdX-skew-ps, rxdX-skew-ps
112 data pads, and the rxdv-skew-ps, txen-skew-ps control pads.
114 Pad Skew Value Delay (ps) Devicetree Value
115 ------------------------------------------------------
135 Maximum value of 1860, default value 900:
137 - rxc-skew-ps : Skew control of RX clock pad
138 - txc-skew-ps : Skew control of TX clock pad
140 Maximum value of 900, default value 420:
142 - rxdv-skew-ps : Skew control of RX CTL pad
143 - txen-skew-ps : Skew control of TX CTL pad
144 - rxd0-skew-ps : Skew control of RX data 0 pad
145 - rxd1-skew-ps : Skew control of RX data 1 pad
146 - rxd2-skew-ps : Skew control of RX data 2 pad
147 - rxd3-skew-ps : Skew control of RX data 3 pad
148 - txd0-skew-ps : Skew control of TX data 0 pad
149 - txd1-skew-ps : Skew control of TX data 1 pad
150 - txd2-skew-ps : Skew control of TX data 2 pad
151 - txd3-skew-ps : Skew control of TX data 3 pad
153 - micrel,force-master:
154 Boolean, force phy to master mode. Only set this option if the phy
155 reference clock provided at CLK125_NDO pin is used as MAC reference
156 clock because the clock jitter in slave mode is to high (errata#2).
157 Attention: The link partner must be configurable as slave otherwise
158 no link will be established.
162 All skew control options are specified in picoseconds. The increment
163 step is 100ps. Unlike KSZ9031, the values represent picoseccond delays.
164 A negative value can be assigned as rxc-skew-psec = <(-100)>;.
168 Range of the value -700 to 2400, default value 0:
170 - rxc-skew-psec : Skew control of RX clock pad
171 - txc-skew-psec : Skew control of TX clock pad
173 Range of the value -700 to 800, default value 0:
175 - rxdv-skew-psec : Skew control of RX CTL pad
176 - txen-skew-psec : Skew control of TX CTL pad
177 - rxd0-skew-psec : Skew control of RX data 0 pad
178 - rxd1-skew-psec : Skew control of RX data 1 pad
179 - rxd2-skew-psec : Skew control of RX data 2 pad
180 - rxd3-skew-psec : Skew control of RX data 3 pad
181 - txd0-skew-psec : Skew control of TX data 0 pad
182 - txd1-skew-psec : Skew control of TX data 1 pad
183 - txd2-skew-psec : Skew control of TX data 2 pad
184 - txd3-skew-psec : Skew control of TX data 3 pad
188 /* Attach to an Ethernet device with autodetected PHY */
190 rxc-skew-ps = <1800>;
192 txc-skew-ps = <1800>;
197 /* Attach to an explicitly-specified PHY */
199 phy0: ethernet-phy@0 {
200 rxc-skew-ps = <1800>;
202 txc-skew-ps = <1800>;
209 phy-mode = "rgmii-id";
214 Micrel ksz9021rl/rn Data Sheet, Revision 1.2. Dated 2/13/2014.
215 http://www.micrel.com/_PDF/Ethernet/datasheets/ksz9021rl-rn_ds.pdf
217 Micrel ksz9031rnx Data Sheet, Revision 2.1. Dated 11/20/2014.
218 http://www.micrel.com/_PDF/Ethernet/datasheets/KSZ9031RNX.pdf
222 Note that a previous version of the Micrel ksz9021rl/rn Data Sheet
223 was missing extended register 106 (transmit data pad skews), and
224 incorrectly specified the ps per step as 200ps/step instead of
225 120ps/step. The latest update to this document reflects the latest
226 revision of the Micrel specification even though usage in the kernel
227 still reflects that incorrect document.