public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] phy device driver issues
@ 2012-10-10  8:10 Aaron Williams
  0 siblings, 0 replies; only message in thread
From: Aaron Williams @ 2012-10-10  8:10 UTC (permalink / raw)
  To: u-boot

Hi,

I haven't been following the list closely for a while but I have run 
into some issues when writing some drivers for some non-standard PHY 
devices.

One PHY I am supporting is the Cortina CS4321 device. This PHY can be 
configured in various modes such as XAUI, RXAUI, SGMII, and several FC 
implementations. My problem is that this PHY does not follow any of the 
standards as far as register usage and it requires a significant amount 
of configuration to make it work, including downloading firmware into 
the device.

One problem I have is that phy_connect ends up calling the probe 
function before phy_device has had the dev field connected. This is a 
problem because the easiest way for me to tell is by looking at 
information associated with the Ethernet device which we pull from the 
device tree. I reordered the code in phy_connect so it hooks up the 
Ethernet device to phy_device before calling reset, though ideally that 
information should be present when probe is called.

  In my driver, I created a call-back function in order to determine 
what mode the PHY should operate in, but in order for the callback 
function to know it needs to know what Ethernet device it is connected to.

Both probe and reset are called before this information is available.

Another issue I have is that since the Cortina CS4321 uses non-standard 
registers, get_phy_id() does not work. In our tree I just declared the 
function as weak but I don't think this is a good long-term solution.

Ideally device tree support should be integrated more deeply into U-Boot 
so each PHY device would have its node offset stored like in the Linux 
driver.

-Aaron

-- 
Aaron Williams
Software Engineer
Cavium, Inc.
(408) 943-7198  (510) 789-8988 (cell)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-10  8:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10  8:10 [U-Boot] phy device driver issues Aaron Williams

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