mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 17:07:38 +00:00
9ea30ea66a
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>
18 lines
493 B
C
18 lines
493 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* CPSW MDIO generic driver API for TI AMxx/K2x/EMAC devices.
|
|
*
|
|
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
|
|
*/
|
|
|
|
#ifndef CPSW_MDIO_H_
|
|
#define CPSW_MDIO_H_
|
|
|
|
struct cpsw_mdio;
|
|
|
|
struct mii_dev *cpsw_mdio_init(const char *name, phys_addr_t mdio_base,
|
|
u32 bus_freq, int fck_freq, bool manual_mode);
|
|
void cpsw_mdio_free(struct mii_dev *bus);
|
|
u32 cpsw_mdio_get_alive(struct mii_dev *bus);
|
|
|
|
#endif /* CPSW_MDIO_H_ */
|