1 // SPDX-License-Identifier: GPL-2.0+
3 * LSI ET1011C PHY Driver for TI DaVinci(TMS320DM6467) board.
5 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
11 #include <asm/arch/emac_defs.h>
12 #include "../../../drivers/net/davinci_emac.h"
14 #ifdef CONFIG_DRIVER_TI_EMAC
18 /* LSI PHYSICAL LAYER TRANSCEIVER ET1011C */
20 #define MII_PHY_CONFIG_REG 22
23 #define PHY_SYS_CLK_EN (1 << 4)
25 int et1011c_get_link_speed(int phy_addr)
29 if (davinci_eth_phy_read(phy_addr, MII_STATUS_REG, &data) && (data & 0x04)) {
30 davinci_eth_phy_read(phy_addr, MII_PHY_CONFIG_REG, &data);
31 /* Enable 125MHz clock sourced from PHY */
32 davinci_eth_phy_write(phy_addr, MII_PHY_CONFIG_REG,
33 data | PHY_SYS_CLK_EN);
39 #endif /* CONFIG_CMD_NET */
41 #endif /* CONFIG_DRIVER_ETHER */