From: Johan Hovold <johan@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Johan Hovold <johan@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 19/22] dt/bindings: add micrel,rmii_ref_clk_sel_25_mhz to eth-phy binding
Date: Fri, 14 Nov 2014 12:21:57 +0100 [thread overview]
Message-ID: <20141114112157.GC18285@localhost> (raw)
In-Reply-To: <20141113080927.GP30369@pengutronix.de>
On Thu, Nov 13, 2014 at 09:09:27AM +0100, Sascha Hauer wrote:
> On Wed, Nov 12, 2014 at 10:19:20AM +0100, Johan Hovold wrote:
> > On Wed, Nov 12, 2014 at 08:01:27AM +0100, Sascha Hauer wrote:
> > > On Tue, Nov 11, 2014 at 07:18:25PM +0100, Johan Hovold wrote:
> > > > On Tue, Nov 11, 2014 at 05:57:42PM +0000, Mark Rutland wrote:
> > > > > On Tue, Nov 11, 2014 at 05:37:37PM +0000, Johan Hovold wrote:
> > > > > > Add "micrel,rmii_ref_clk_sel_25_mhz" to Micrel ethernet PHY binding
> > > > > > documentation.
> > > > > >
> > > > > > Cc: devicetree@vger.kernel.org
> > > > > > Signed-off-by: Johan Hovold <johan@kernel.org>
> > > > > > ---
> > > > > > Documentation/devicetree/bindings/net/micrel.txt | 5 +++++
> > > > > > 1 file changed, 5 insertions(+)
> > > > > >
> > > > > > diff --git a/Documentation/devicetree/bindings/net/micrel.txt b/Documentation/devicetree/bindings/net/micrel.txt
> > > > > > index a1bab5eaae02..9b08dd6551dd 100644
> > > > > > --- a/Documentation/devicetree/bindings/net/micrel.txt
> > > > > > +++ b/Documentation/devicetree/bindings/net/micrel.txt
> > > > > > @@ -19,6 +19,11 @@ Optional properties:
> > > > > >
> > > > > > See the respective PHY datasheet for the mode values.
> > > > > >
> > > > > > + - micrel,rmii_ref_clk_sel_25_mhz: rmii_ref_clk_sel bit selects 25 MHz mode
> > > > > > +
> > > > > > + Whether 25 MHz (rather than 50 Mhz) clock mode is selected
> > > > > > + when the rmii_ref_clk_sel bit is set.
> > > > >
> > > > > s/_/-/ in property names please.
> > > >
> > > > Ouch, copied from variable name, sorry.
> > > >
> > > > > That said, I don't follow the meaning. Does this cause the kernel to do
> > > > > something different, or is is simply that a 25MHz ref clock is wired up?
> > > >
> > > > Yes, the driver currently sets this configuration bit based on a common
> > > > clock binding.
> > > >
> > > > However, it turns out the meaning of the bit is reversed on some PHY
> > > > variants. On most PHYs 50 MHz mode is selected by setting this bit,
> > > > whereas on the PHYs that need this new property, setting it selects 25
> > > > MHz mode instead.
> > >
> > > Maybe rename the property to something like rmii-ref-clk-25mhz-active-high
> > > then? Also you should probably make it more explicit that this is a
> > > hardware property and not for adjusting the clock.
> >
> > You're right, but how about calling it
> >
> > micrel,rmii-reference-clock-select-inverted
> >
> > Then no one will set it believing it will change the clock mode and
> > without reading the binding doc first.
> >
> > The description could then read something like
> >
> > micrel,rmii-reference-clock-select-inverted: RMII Reference
> > Clock Select bit is inverted
> >
> > The RMII Reference Clock Select bit is inverted so that setting
> > it selects 25 MHz rather than 50 MHz clock mode.
> >
> > Note that this is only needed for PHY variants that has this bit
> > inverted and that a clock reference ("rmii-ref" below) is always
> > needed to select the actual mode.
>
> "Inverted" only has a meaning when everybody agrees what's the normal
> case. Since that not the case I really prefer talking about
> "active-high" or "active-low".
Yes, but I'm reluctant to using "active-high" and "active-low" as this
is not a signal (or IO pin) we're dealing with.
It's a configuration bit, which (if set) selects 25 MHz mode. Hence I
still think something like
micrel,rmii_ref_clk_sel_25_mhz
or
micrel,rmii_reference_clock_select_selects_25_mhz
is preferred. The binding documentation will still make it clear that a
clocks reference is also needed.
Johan
prev parent reply other threads:[~2014-11-14 11:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1415727460-20417-1-git-send-email-johan@kernel.org>
[not found] ` <1415727460-20417-1-git-send-email-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-11-11 17:37 ` [PATCH 01/22] dt/bindings: fix documentation of ethernet-phy compatible property Johan Hovold
2014-11-11 17:37 ` [PATCH 19/22] dt/bindings: add micrel,rmii_ref_clk_sel_25_mhz to eth-phy binding Johan Hovold
2014-11-11 17:57 ` Mark Rutland
2014-11-11 18:18 ` Johan Hovold
2014-11-12 7:01 ` Sascha Hauer
2014-11-12 9:19 ` Johan Hovold
2014-11-13 8:09 ` Sascha Hauer
2014-11-14 11:21 ` Johan Hovold [this message]
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=20141114112157.GC18285@localhost \
--to=johan@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=s.hauer@pengutronix.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;
as well as URLs for NNTP newsgroup(s).