From: Aaron Williams <Aaron.Williams@cavium.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] phy device driver issues
Date: Wed, 10 Oct 2012 01:10:53 -0700 [thread overview]
Message-ID: <50752D8D.5020509@cavium.com> (raw)
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)
reply other threads:[~2012-10-10 8:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50752D8D.5020509@cavium.com \
--to=aaron.williams@cavium.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox