]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: davinci_mdio: Add workaround for errata i2329
authorRavi Gunasekaran <r-gunasekaran@ti.com>
Wed, 17 Aug 2022 09:44:06 +0000 (15:14 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Aug 2022 11:52:06 +0000 (12:52 +0100)
commitcccfc3cdc0fb6d056fc9497e533d51c75eed4a48
tree1c30356601348ea029c9bd15b4cb265e1f5fadfe
parentaf649f84dd3a2112e2d80bd86fa9074c509622f7
net: ethernet: ti: davinci_mdio: Add workaround for errata i2329

On the CPSW and ICSS peripherals, there is a possibility that the MDIO
interface returns corrupt data on MDIO reads or writes incorrect data
on MDIO writes. There is also a possibility for the MDIO interface to
become unavailable until the next peripheral reset.

The workaround is to configure the MDIO in manual mode and disable the
MDIO state machine and emulate the MDIO protocol by reading and writing
appropriate fields in MDIO_MANUAL_IF_REG register of the MDIO controller
to manipulate the MDIO clock and data pins.

More details about the errata i2329 and the workaround is available in:
https://www.ti.com/lit/er/sprz487a/sprz487a.pdf

Add implementation to disable MDIO state machine, configure MDIO in manual
mode and achieve MDIO read and writes via MDIO Bitbanging

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_mdio.c