]> git.baikalelectronics.ru Git - uboot.git/commit
net: ti: cpsw-mdio: Add workaround for errata i2329
authorRavi Gunasekaran <r-gunasekaran@ti.com>
Thu, 22 Sep 2022 09:51:23 +0000 (15:21 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 7 Oct 2022 01:05:17 +0000 (21:05 -0400)
commitc8cfcfccacf3b049a6fe3c9001111aa8d2ab5758
tree8e6c38624ad4af2c276c0baa1735b49b58d3dc5c
parent0838d161b1ce23ac5731680954e836a0534f8e96
net: ti: cpsw-mdio: Add workaround for errata i2329

In certain TI SoCs, 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 provide software MDIO read and writes via MDIO bitbanging. Allow
the MDIO to be initialized based on the need for manual mode.

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/ti/am65-cpsw-nuss.c
drivers/net/ti/cpsw.c
drivers/net/ti/cpsw_mdio.c
drivers/net/ti/cpsw_mdio.h
drivers/net/ti/keystone_net.c