Inphi IN112525 PHY

2 messages, 2 authors, 2018-03-15 · open the first message on its own page

Inphi IN112525 PHY

From: Vicenţiu Galanopulo <hidden>
Date: 2018-03-15 13:19:30

Hi Everyone,

We have a new board which is to be released this year, which has a Inphi IN112525 PHY. We are currently developing under kernel 4.9 and using the xgmac_mdio driver for the MDIO bus. The long term plan is to have a Inphi kernel PHY driver upstream, but right now we want to make it work for 4.9.

Our problem is that:
The Inphi PHY has a vendor specific address space for accessing the C45 MDIO registers -  MMD30 address space - starting from 0x1E.
I noticed that during the probing of the MDIO bus, in phy_device.c, get_phy_c45_ids(), it first searches for non-zero Devices In package, with the dev_addr = 1.
After that, device zero (dev_addr = 0)   is probed ("Device zero is reserved for 802.3 c45 complied PHYs[.]") as a special case for Cortina CS4315/CS4340 PHY.
Since the dev_addr for our Inphi PHY is 0x1E, it never gets found and the PHY driver doesn't get registered.
My colleagues have proposed a solution in which another property could be added in the PHY device tree node, that would contain the device address (dev_addr). 
This would imply some minor changes in phy_device.c , in get_phy_c45_ids(), but the benefit of this would be that it should work for other PHY vendors which decide to have a non-standard MDIO register set address.
I have a patch ready for this, but we would like to know if this is right way to go about this.

Please share your thoughts on this.

All the best,
Vicentiu  

Re: Inphi IN112525 PHY

From: Andrew Lunn <andrew@lunn.ch>
Date: 2018-03-15 14:39:39

I have a patch ready for this, but we would like to know if this is right way to go about this.
Please post the patch, so we can review it.

What you are proposing sounds O.K, but we should also try to put some
pressure on vendors to conform to the standard. Have you asked them if
a firmware update can fix this?

       Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help