]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: dp83867: Recover from "port mirroring" N/A MODE4
authorLukasz Majewski <lukma@denx.de>
Tue, 7 Feb 2017 05:20:24 +0000 (06:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 18:59:27 +0000 (13:59 -0500)
commitde2af8ef7739de1cad09d7044162f9a51ca60626
tree559b0039d832be0016c2f200e4376299ef7a5ced
parent8f288d9662295eef037f0b942b922aaa269033c1
net: phy: dp83867: Recover from "port mirroring" N/A MODE4

The DP83867 when not properly bootstrapped - especially with LED_0 pin -
can enter N/A MODE4 for "port mirroring" feature.

To provide normal operation of the PHY, one needs not only to explicitly
disable the port mirroring feature, but as well stop some IC internal
testing (which disables RGMII communication).

To do that the STRAP_STS1 (0x006E) register must be read and RESERVED bit
11 examined. When it is set, the another RESERVED bit (11) at PHYCR
(0x0010) register must be clear to disable testing mode and enable RGMII
communication.

Thorough explanation of the problem can be found at following e2e thread:
"DP83867IR: Problem with RESERVED bits in PHY Control Register (PHYCR) -
Linux driver"

https://e2e.ti.com/support/interface/ethernet/f/903/p/571313/2096954#2096954

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/dp83867.c