From: Andrew Lunn <andrew@lunn.ch>
To: Timur Tabi <timur@codeaurora.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>, netdev@vger.kernel.org
Subject: Re: Need help with mdiobus_register and phy
Date: Sat, 15 Oct 2016 20:02:19 +0200 [thread overview]
Message-ID: <20161015180219.GB6918@lunn.ch> (raw)
In-Reply-To: <58023F90.5070302@codeaurora.org>
On Sat, Oct 15, 2016 at 09:39:12AM -0500, Timur Tabi wrote:
> Florian Fainelli wrote:
> >After reading the spec again, it does not appear to me that a PHY
> >with PDOWN set is guaranteed or even required to respond to other
> >register reads such as MII_PHYID1/2, in which case we may have to
> >implement a MDIO bus reset routine which clears PDOWN for all PHYs
> >that we detect(ed), or as Andrew suggested, utilize the matching by
> >compatible string with the PHY OUI in it.
>
> The 8031 does respond normally when PDOWN is set. However, the ID
> registers are not available when the SerDes bus is also powered
> down. I'll call this PDOWN+. This is a special power-down sequence
> that the at803x driver does on suspend. See my other email for
> details.
So we appear to have two ways to go:
1) Take the SerDes power down out of the suspend code for the at803x.
2) Assume MII_PHYID1/2 registers are not guaranteed to be available
when the PHY is powered down. So get_phy_id should first read
MII_BMCR. If it gets 0xffff, assume there is no PHY there. If the
PDOWN bit is set, power up the PHY. Then reading the ID registers.
Andrew
next prev parent reply other threads:[~2016-10-15 18:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-13 23:15 Need help with mdiobus_register and phy Timur Tabi
2016-10-14 4:06 ` Andrew Lunn
2016-10-14 11:38 ` Timur Tabi
2016-10-14 12:06 ` Andrew Lunn
2016-10-14 12:39 ` Timur Tabi
2016-10-14 12:49 ` Andrew Lunn
2016-10-14 12:49 ` Timur Tabi
2016-10-14 12:57 ` Andrew Lunn
2016-10-14 13:03 ` Timur Tabi
2016-10-14 13:18 ` Andrew Lunn
2016-10-14 13:28 ` Timur Tabi
2016-10-14 16:57 ` Timur Tabi
2016-10-14 17:25 ` Andrew Lunn
2016-10-14 18:30 ` Timur Tabi
2016-10-15 10:19 ` Florian Fainelli
2016-10-15 14:39 ` Timur Tabi
2016-10-15 18:02 ` Andrew Lunn [this message]
2016-10-15 18:28 ` Timur Tabi
2016-10-17 9:05 ` Zefir Kurtisi
2016-10-17 20:53 ` Timur Tabi
2016-10-18 10:31 ` Zefir Kurtisi
2016-10-18 12:40 ` Timur Tabi
2016-10-19 8:55 ` Zefir Kurtisi
2016-10-19 12:16 ` Timur Tabi
2016-10-20 12:55 ` Zefir Kurtisi
2016-10-21 7:44 ` Zefir Kurtisi
2016-10-21 11:19 ` Timur Tabi
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=20161015180219.GB6918@lunn.ch \
--to=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=timur@codeaurora.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.