Netdev List
 help / color / mirror / Atom feed
* Inphi IN112525 PHY
@ 2018-03-15 13:19 Vicenţiu Galanopulo
  2018-03-15 14:39 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Vicenţiu Galanopulo @ 2018-03-15 13:19 UTC (permalink / raw)
  To: netdev@vger.kernel.org

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  

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-15 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-15 13:19 Inphi IN112525 PHY Vicenţiu Galanopulo
2018-03-15 14:39 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox