Using fixed_phy with gianfar

Vitaly Bordug vbordug at
Thu Jan 11 00:11:45 EST 2007

On Tue, 09 Jan 2007 18:23:58 -0500
Ben Warren wrote:

> Hello,
> My custom board has a couple of Ethernet switches attached via RvMII
> to the 'Gianfar' controllers of an MPC8349 CPU.  We're using SPI
> instead of MDIO for control of the switches, and it looked like the
> 'fixed.c' PHY driver was the right thing to use.  BTW, I'm using a
> 2.6.19 kernel.
> When I 'ifconfig up' one of the interfaces, the Gianfar driver tries
> to find a device on the MDIO bus of the variety bus_id:phy_id, where
> both bus_id and phy_id are numeric (defined in fsl_devices.h).  The
> Fixed PHY driver creates devices on the MDIO bus with a bus_id that
> is a string, for example "fixed_1 at 100:1".  Obviously, these will
> never match up.  The very crude hack I made to get things working was
> to modify the Gianfar driver to match the "fixed" string.  
> I'm sure I'm missing something, and am wondering what the correct way
> to do this is.  Should I have board-specific code that creates PHY
> devices conforming to the Gianfar expectations instead of calling
> 'fixed_mdio_register_device()', or something else?
No, you do not miss - this is an issue. In fact MDIO bus was changed for numeric for gianfar-stuff, and has been remaining string for fs_enet. I think it makes sense to average this up, and will try to do that once will get 8349-mitx which is gianfar+ fixed user.

The point is that fixed should be updated to numeric MDIO address encoding. This has to come through netdev, so I'll try to get it fixed by the next merge window.

Sincerely, Vitaly
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 

More information about the Linuxppc-embedded mailing list