> &gem0 { > status = "okay"; > phy-mode = "rgmii-id"; > phy-handle = <&phy0>; > fixed-link { > speed = <1000>; > full-duplex; > }; > > > The diagram you showed had gem0 connected directly to the switch. So > > this phy-handle is wrong. Or the diagram is wrong. > The diagram is correct. I have commented the phy-mode and phy-handle in > 'gem0' definition and got error: > 'macb e000b000.ethernet eth0: no PHY found'
/* based on au1000_eth. c*/ static int macb_mii_probe(struct net_device *dev) { struct macb *bp = netdev_priv(dev); struct phy_device *phydev; struct device_node *np; int ret, i; np = bp->pdev->dev.of_node; ret = 0; if (np) { if (of_phy_is_fixed_link(np)) { bp->phy_node = of_node_get(np); } else { ... if (bp->phy_node) { phydev = of_phy_connect(dev, bp->phy_node, &macb_handle_link_change, 0, bp->phy_interface); if (!phydev) return -ENODEV; } else { phydev = phy_find_first(bp->mii_bus); if (!phydev) { netdev_err(dev, "no PHY found\n"); return -ENXIO; } So either of_phy_is_fixed_link(np) is returning false, or of_node_get(np) returns NULL. You need to do some debugging and figure out which and why. Also, note that this code has changed a lot since v5.4. You might want to try v5.9, or v5.10-rc2. Andrew