Skip to content

Commit

Permalink
net: dsa: mv88e6xxx: Update mv88e6393x serdes errata
Browse files Browse the repository at this point in the history
[ Upstream commit 3b0720b ]

In early erratas this issue only covered port 0 when changing from
[x]MII (rev A 3.6). In subsequent errata versions this errata changed to
cover the additional "Hardware reset in CPU managed mode" condition, and
removed the note specifying that it only applied to port 0.

In designs where the device is configured with CPU managed mode
(CPU_MGD), on reset all SERDES ports (p0, p9, p10) have a stuck power
down bit and require this initial power up procedure. As such apply this
errata to all three SERDES ports of the mv88e6393x.

Signed-off-by: Nathan Rossi <nathan.rossi@digi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Nathan Rossi authored and gregkh committed Sep 8, 2021
1 parent 9bf0c45 commit 2aad925
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/net/dsa/mv88e6xxx/serdes.c
Expand Up @@ -1277,15 +1277,16 @@ static int mv88e6393x_serdes_port_errata(struct mv88e6xxx_chip *chip, int lane)
int err;

/* mv88e6393x family errata 4.6:
* Cannot clear PwrDn bit on SERDES on port 0 if device is configured
* CPU_MGD mode or P0_mode is configured for [x]MII.
* Workaround: Set Port0 SERDES register 4.F002 bit 5=0 and bit 15=1.
* Cannot clear PwrDn bit on SERDES if device is configured CPU_MGD
* mode or P0_mode is configured for [x]MII.
* Workaround: Set SERDES register 4.F002 bit 5=0 and bit 15=1.
*
* It seems that after this workaround the SERDES is automatically
* powered up (the bit is cleared), so power it down.
*/
if (lane == MV88E6393X_PORT0_LANE) {
err = mv88e6390_serdes_read(chip, MV88E6393X_PORT0_LANE,
if (lane == MV88E6393X_PORT0_LANE || lane == MV88E6393X_PORT9_LANE ||
lane == MV88E6393X_PORT10_LANE) {
err = mv88e6390_serdes_read(chip, lane,
MDIO_MMD_PHYXS,
MV88E6393X_SERDES_POC, &reg);
if (err)
Expand Down

0 comments on commit 2aad925

Please sign in to comment.