diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-06-21 10:59:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-23 14:35:06 -0400 |
commit | 8c25c0cb5bb4e63170bb7760179ec294a3827694 (patch) | |
tree | 4d9772c1762802af126084c55206b7c307fd70b6 /Documentation/networking | |
parent | 08003d0b63a63bebaccca90e2f1d628dfd66cd4d (diff) |
doc: phy: document some PHY_INTERFACE_MODE_xxx settings
There seems to be some confusion surrounding three PHY interface modes,
specifically 1000BASE-X, 2500BASE-X and SGMII. Add some documentation
to phylib detailing precisely what these interface modes refer to.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
-rw-r--r-- | Documentation/networking/phy.rst | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/Documentation/networking/phy.rst b/Documentation/networking/phy.rst index 0dd90d7df5ec..a689966bc4be 100644 --- a/Documentation/networking/phy.rst +++ b/Documentation/networking/phy.rst | |||
@@ -202,7 +202,8 @@ the PHY/controller, of which the PHY needs to be aware. | |||
202 | 202 | ||
203 | *interface* is a u32 which specifies the connection type used | 203 | *interface* is a u32 which specifies the connection type used |
204 | between the controller and the PHY. Examples are GMII, MII, | 204 | between the controller and the PHY. Examples are GMII, MII, |
205 | RGMII, and SGMII. For a full list, see include/linux/phy.h | 205 | RGMII, and SGMII. See "PHY interface mode" below. For a full |
206 | list, see include/linux/phy.h | ||
206 | 207 | ||
207 | Now just make sure that phydev->supported and phydev->advertising have any | 208 | Now just make sure that phydev->supported and phydev->advertising have any |
208 | values pruned from them which don't make sense for your controller (a 10/100 | 209 | values pruned from them which don't make sense for your controller (a 10/100 |
@@ -225,6 +226,48 @@ When you want to disconnect from the network (even if just briefly), you call | |||
225 | phy_stop(phydev). This function also stops the phylib state machine and | 226 | phy_stop(phydev). This function also stops the phylib state machine and |
226 | disables PHY interrupts. | 227 | disables PHY interrupts. |
227 | 228 | ||
229 | PHY interface modes | ||
230 | =================== | ||
231 | |||
232 | The PHY interface mode supplied in the phy_connect() family of functions | ||
233 | defines the initial operating mode of the PHY interface. This is not | ||
234 | guaranteed to remain constant; there are PHYs which dynamically change | ||
235 | their interface mode without software interaction depending on the | ||
236 | negotiation results. | ||
237 | |||
238 | Some of the interface modes are described below: | ||
239 | |||
240 | ``PHY_INTERFACE_MODE_1000BASEX`` | ||
241 | This defines the 1000BASE-X single-lane serdes link as defined by the | ||
242 | 802.3 standard section 36. The link operates at a fixed bit rate of | ||
243 | 1.25Gbaud using a 10B/8B encoding scheme, resulting in an underlying | ||
244 | data rate of 1Gbps. Embedded in the data stream is a 16-bit control | ||
245 | word which is used to negotiate the duplex and pause modes with the | ||
246 | remote end. This does not include "up-clocked" variants such as 2.5Gbps | ||
247 | speeds (see below.) | ||
248 | |||
249 | ``PHY_INTERFACE_MODE_2500BASEX`` | ||
250 | This defines a variant of 1000BASE-X which is clocked 2.5 times faster, | ||
251 | than the 802.3 standard giving a fixed bit rate of 3.125Gbaud. | ||
252 | |||
253 | ``PHY_INTERFACE_MODE_SGMII`` | ||
254 | This is used for Cisco SGMII, which is a modification of 1000BASE-X | ||
255 | as defined by the 802.3 standard. The SGMII link consists of a single | ||
256 | serdes lane running at a fixed bit rate of 1.25Gbaud with 10B/8B | ||
257 | encoding. The underlying data rate is 1Gbps, with the slower speeds of | ||
258 | 100Mbps and 10Mbps being achieved through replication of each data symbol. | ||
259 | The 802.3 control word is re-purposed to send the negotiated speed and | ||
260 | duplex information from to the MAC, and for the MAC to acknowledge | ||
261 | receipt. This does not include "up-clocked" variants such as 2.5Gbps | ||
262 | speeds. | ||
263 | |||
264 | Note: mismatched SGMII vs 1000BASE-X configuration on a link can | ||
265 | successfully pass data in some circumstances, but the 16-bit control | ||
266 | word will not be correctly interpreted, which may cause mismatches in | ||
267 | duplex, pause or other settings. This is dependent on the MAC and/or | ||
268 | PHY behaviour. | ||
269 | |||
270 | |||
228 | Pause frames / flow control | 271 | Pause frames / flow control |
229 | =========================== | 272 | =========================== |
230 | 273 | ||