2018-10-19 03:06:02 +08:00
|
|
|
Micrel KSZ9021/KSZ9031/KSZ9131 Gigabit Ethernet PHY
|
2014-05-06 15:40:16 +08:00
|
|
|
|
2015-12-10 02:39:03 +08:00
|
|
|
Some boards require special tuning values, particularly when it comes
|
|
|
|
to clock delays. You can specify clock delay values in the PHY OF
|
|
|
|
device node. Deprecated, but still supported, these properties can
|
|
|
|
also be added to an Ethernet OF device node.
|
2014-05-06 15:40:16 +08:00
|
|
|
|
|
|
|
Note that these settings are applied after any phy-specific fixup from
|
|
|
|
phy_fixup_list (see phy_init_hw() from drivers/net/phy/phy_device.c),
|
|
|
|
and therefore may overwrite them.
|
|
|
|
|
|
|
|
KSZ9021:
|
|
|
|
|
|
|
|
All skew control options are specified in picoseconds. The minimum
|
2019-09-14 00:46:35 +08:00
|
|
|
value is 0, the maximum value is 3000, and it can be specified in 200ps
|
|
|
|
steps, *but* these values are in not fact what you get because this chip's
|
|
|
|
skew values actually increase in 120ps steps, starting from -840ps. The
|
|
|
|
incorrect values came from an error in the original KSZ9021 datasheet
|
|
|
|
before it was corrected in revision 1.2 (Feb 2014), but it is too late to
|
|
|
|
change the driver now because of the many existing device trees that have
|
|
|
|
been created using values that go up in increments of 200.
|
|
|
|
|
|
|
|
The following table shows the actual skew delay you will get for each of the
|
|
|
|
possible devicetree values, and the number that will be programmed into the
|
|
|
|
corresponding pad skew register:
|
|
|
|
|
|
|
|
Device Tree Value Delay Pad Skew Register Value
|
|
|
|
-----------------------------------------------------
|
|
|
|
0 -840ps 0000
|
|
|
|
200 -720ps 0001
|
|
|
|
400 -600ps 0010
|
|
|
|
600 -480ps 0011
|
|
|
|
800 -360ps 0100
|
|
|
|
1000 -240ps 0101
|
|
|
|
1200 -120ps 0110
|
|
|
|
1400 0ps 0111
|
|
|
|
1600 120ps 1000
|
|
|
|
1800 240ps 1001
|
|
|
|
2000 360ps 1010
|
|
|
|
2200 480ps 1011
|
|
|
|
2400 600ps 1100
|
|
|
|
2600 720ps 1101
|
|
|
|
2800 840ps 1110
|
|
|
|
3000 960ps 1111
|
2014-05-06 15:40:16 +08:00
|
|
|
|
|
|
|
Optional properties:
|
|
|
|
|
|
|
|
- rxc-skew-ps : Skew control of RXC pad
|
|
|
|
- rxdv-skew-ps : Skew control of RX CTL pad
|
|
|
|
- txc-skew-ps : Skew control of TXC pad
|
|
|
|
- txen-skew-ps : Skew control of TX CTL pad
|
|
|
|
- rxd0-skew-ps : Skew control of RX data 0 pad
|
|
|
|
- rxd1-skew-ps : Skew control of RX data 1 pad
|
|
|
|
- rxd2-skew-ps : Skew control of RX data 2 pad
|
|
|
|
- rxd3-skew-ps : Skew control of RX data 3 pad
|
|
|
|
- txd0-skew-ps : Skew control of TX data 0 pad
|
|
|
|
- txd1-skew-ps : Skew control of TX data 1 pad
|
|
|
|
- txd2-skew-ps : Skew control of TX data 2 pad
|
|
|
|
- txd3-skew-ps : Skew control of TX data 3 pad
|
|
|
|
|
|
|
|
KSZ9031:
|
|
|
|
|
|
|
|
All skew control options are specified in picoseconds. The minimum
|
|
|
|
value is 0, and the maximum is property-dependent. The increment
|
2016-10-05 22:03:08 +08:00
|
|
|
step is 60ps. The default value is the neutral setting, so setting
|
|
|
|
rxc-skew-ps=<0> actually results in -900 picoseconds adjustment.
|
2014-05-06 15:40:16 +08:00
|
|
|
|
|
|
|
Optional properties:
|
|
|
|
|
2016-10-05 22:03:08 +08:00
|
|
|
Maximum value of 1860, default value 900:
|
2014-05-06 15:40:16 +08:00
|
|
|
|
|
|
|
- rxc-skew-ps : Skew control of RX clock pad
|
|
|
|
- txc-skew-ps : Skew control of TX clock pad
|
|
|
|
|
2016-10-05 22:03:08 +08:00
|
|
|
Maximum value of 900, default value 420:
|
2014-05-06 15:40:16 +08:00
|
|
|
|
|
|
|
- rxdv-skew-ps : Skew control of RX CTL pad
|
|
|
|
- txen-skew-ps : Skew control of TX CTL pad
|
|
|
|
- rxd0-skew-ps : Skew control of RX data 0 pad
|
|
|
|
- rxd1-skew-ps : Skew control of RX data 1 pad
|
|
|
|
- rxd2-skew-ps : Skew control of RX data 2 pad
|
|
|
|
- rxd3-skew-ps : Skew control of RX data 3 pad
|
|
|
|
- txd0-skew-ps : Skew control of TX data 0 pad
|
|
|
|
- txd1-skew-ps : Skew control of TX data 1 pad
|
|
|
|
- txd2-skew-ps : Skew control of TX data 2 pad
|
|
|
|
- txd3-skew-ps : Skew control of TX data 3 pad
|
|
|
|
|
2018-05-15 16:18:56 +08:00
|
|
|
- micrel,force-master:
|
|
|
|
Boolean, force phy to master mode. Only set this option if the phy
|
|
|
|
reference clock provided at CLK125_NDO pin is used as MAC reference
|
|
|
|
clock because the clock jitter in slave mode is to high (errata#2).
|
|
|
|
Attention: The link partner must be configurable as slave otherwise
|
|
|
|
no link will be established.
|
|
|
|
|
2018-10-19 03:06:02 +08:00
|
|
|
KSZ9131:
|
|
|
|
|
|
|
|
All skew control options are specified in picoseconds. The increment
|
|
|
|
step is 100ps. Unlike KSZ9031, the values represent picoseccond delays.
|
|
|
|
A negative value can be assigned as rxc-skew-psec = <(-100)>;.
|
|
|
|
|
|
|
|
Optional properties:
|
|
|
|
|
|
|
|
Range of the value -700 to 2400, default value 0:
|
|
|
|
|
|
|
|
- rxc-skew-psec : Skew control of RX clock pad
|
|
|
|
- txc-skew-psec : Skew control of TX clock pad
|
|
|
|
|
|
|
|
Range of the value -700 to 800, default value 0:
|
|
|
|
|
|
|
|
- rxdv-skew-psec : Skew control of RX CTL pad
|
|
|
|
- txen-skew-psec : Skew control of TX CTL pad
|
|
|
|
- rxd0-skew-psec : Skew control of RX data 0 pad
|
|
|
|
- rxd1-skew-psec : Skew control of RX data 1 pad
|
|
|
|
- rxd2-skew-psec : Skew control of RX data 2 pad
|
|
|
|
- rxd3-skew-psec : Skew control of RX data 3 pad
|
|
|
|
- txd0-skew-psec : Skew control of TX data 0 pad
|
|
|
|
- txd1-skew-psec : Skew control of TX data 1 pad
|
|
|
|
- txd2-skew-psec : Skew control of TX data 2 pad
|
|
|
|
- txd3-skew-psec : Skew control of TX data 3 pad
|
|
|
|
|
2014-05-06 15:40:16 +08:00
|
|
|
Examples:
|
|
|
|
|
|
|
|
mdio {
|
|
|
|
phy0: ethernet-phy@0 {
|
|
|
|
rxc-skew-ps = <3000>;
|
|
|
|
rxdv-skew-ps = <0>;
|
|
|
|
txc-skew-ps = <3000>;
|
|
|
|
txen-skew-ps = <0>;
|
|
|
|
reg = <0>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
ethernet@70000 {
|
|
|
|
phy = <&phy0>;
|
|
|
|
phy-mode = "rgmii-id";
|
|
|
|
};
|