Dear,
I have tried to change ethernet phy chip (AR8031 --> Realtek 8211).
I added phy driver structure as below
====================================================================
.phy_id = 0x001cc912,
.name = "RTL8211B Gigabit Ethernet",
.phy_id_mask = 0x001fffff,
.features = PHY_GBIT_FEATURES,
.flags = PHY_HAS_INTERRUPT,
.config_aneg = &genphy_config_aneg,
.read_status = &genphy_read_status,
.ack_interrupt = &rtl821x_ack_interrupt,
.config_intr = &rtl8211b_config_intr,
.driver = { .owner = THIS_MODULE,},
====================================================================
But, my device cannot find eth0.
I looked through source code, and at "fec_enet_mii_probe", there is no phy_map information
=====================================================================
static int fec_enet_mii_probe(struct net_device *ndev)
{
struct fec_enet_private *fep = netdev_priv(ndev);
struct phy_device *phy_dev = NULL;
char mdio_bus_id[MII_BUS_ID_SIZE];
char phy_name[MII_BUS_ID_SIZE + 3];
int phy_id;
int dev_id = fep->pdev->id;
fep->phy_dev = NULL;
/* check for attached phy */
for (phy_id = 0; (phy_id < PHY_MAX_ADDR); phy_id++) {
if ((fep->mii_bus->phy_mask & (1 << phy_id)))
continue;
if (fep->mii_bus->phy_map[phy_id] == NULL)
continue;
if (fep->mii_bus->phy_map[phy_id]->phy_id == 0)
continue;
if (dev_id--)
continue;
strncpy(mdio_bus_id, fep->mii_bus->id, MII_BUS_ID_SIZE);
break;
}
.......
=====================================================================
what should I check to register phy_map?
In addition, where can I find AR8031 driver source code and how register information for AR8031 to platform?
(My base source code is mx6dl_sabreSD)
Hi kilsu
recommended to check with oscilloscope clock and data signals
and check them with datasheet, also below links gives descriptions
of possible issues with new phy
Using RGMII compatible PHY with i.MX6 (u-boot)
iMX6q RGMII back to back connection with FPGA
https://community.freescale.com/thread/289362
for ethernet sources one can look at attached linux manual
sect.44.2.2 Source Code Structure
Also AR8031 settings may be not fully compatible with
Realtek 8211, suggest to ask realtek support for driver for this chip.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------