LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Serge Semin <fancer.lancer@gmail.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Vladimir Oltean <olteanv@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Serge Semin <Sergey.Semin@t-platforms.ru>,
netdev <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only
Date: Wed, 8 May 2019 03:48:10 +0300 [thread overview]
Message-ID: <20190508004809.qhiz4bpqtxe34276@mobilestation> (raw)
In-Reply-To: <CAFBinCC14+b_nnAMLf0RAET440jGMGz2KRheioffjM+-ftifRQ@mail.gmail.com>
Hello folks
On Tue, Apr 30, 2019 at 10:44:00PM +0200, Martin Blumenstingl wrote:
> Hello Vladimir,
>
> On Tue, Apr 30, 2019 at 12:37 AM Vladimir Oltean <olteanv@gmail.com> wrote:
> [...]
> > Moreover, RGMII *always* needs clock skew. As a fact, all delays
> > applied on RX and RX, by the PHY, MAC or traces, should always amount
> > to a logical "rgmii-id". There's nothing that needs to be described
> > about that. Everybody knows it.
> thank you for mentioning this - I didn't know about it. I thought that
> the delays have to be added in "some cases" only (without knowing the
> definition of "some cases").
>
> > What Linux gets told through the phy-mode property for RGMII is where
> > there's extra stuff to do, and where there's nothing to do. There are
> > also unwritten rules about whose job it is to apply the clock skew
> > (MAC or PHY).That is 100% configuration and 0% description.
> the phy-mode property is documented here [0] and the rgmii modes have
> a short explanation about the delays.
> that said: the documentation currently ignores the fact that a PCB
> designer might have added a delay
>
> > > Then in accordance with the phy-mode property value MAC and PHY drivers
> > > determine which way the MAC and PHY are connected to each other and how
> > > their settings are supposed to be customized to comply with it. This
> > > interpretation perfectly fits with the "DT is the hardware description"
> > > rule.
> > >
> >
> > Most of the phy-mode properties really mean nothing. I changed the
> > phy-mode from "sgmii" to "rgmii" on a PHY binding I had at hand and
> > nothing happened (traffic still runs normally). I think this behavior
> > is 100% within expectation.
> the PHY drivers I know of don't complain if the phy-mode is not supported.
> however, there are MAC drivers which complain in this case, see [1]
> for one example
>
>
> Martin
>
>
> [0] https://github.com/torvalds/linux/blob/bf3bd966dfd7d9582f50e9bd08b15922197cd277/Documentation/devicetree/bindings/net/ethernet.txt#L17
> [1] https://github.com/torvalds/linux/blob/bf3bd966dfd7d9582f50e9bd08b15922197cd277/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c#L187
So as far as I can conclude from the whole discussion, we don't really
want the realtek driver to return an error in case if any unsupported
mode is passed to the config_init method including the RGMII_RXID one,
which in some cases could be enabled via RXDLY pin strapping (like on
rtl8211F). The reason is quite justified: even though there is no
known way to alter the RX-delay on the rtl8211F PHY side, the delay
can be enabled via external pin. In this case rgmii-rxid mode can be
enabled in dts and should be considered a correct error-less PHY node
property.
In order to have this all summed up, I'll shortly send a v3 patchset with
alterations based on the discussion results. Maintainers then will be able
to post their comments in reply to it.
Cheers.
-Sergey
next prev parent reply other threads:[~2019-05-08 0:48 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 9:30 [PATCH] net: phy: realtek: Add rtl8211e rx/tx delays config Serge Semin
2019-04-26 13:28 ` Andrew Lunn
2019-04-26 19:19 ` Serge Semin
2019-04-26 20:05 ` Andrew Lunn
2019-04-26 20:28 ` Serge Semin
2019-04-26 17:17 ` Heiner Kallweit
2019-04-26 20:26 ` Serge Semin
2019-04-26 21:21 ` [PATCH v2 1/2] " Serge Semin
2019-04-26 21:40 ` Andrew Lunn
2019-04-26 23:45 ` Serge Semin
2019-04-27 3:11 ` Florian Fainelli
2019-04-27 7:44 ` Serge Semin
2019-04-27 15:21 ` Andrew Lunn
2019-04-28 19:19 ` Serge Semin
2019-04-27 19:20 ` Florian Fainelli
2019-05-08 1:29 ` [PATCH v3 0/2] net: phy: realtek: Fix RGMII TX/RX-delays initial config of rtl8211(e|f) Serge Semin
2019-05-08 1:29 ` [PATCH v3 1/2] net: phy: realtek: Add rtl8211e rx/tx delays config Serge Semin
2019-05-08 1:29 ` [PATCH v3 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only Serge Semin
2019-05-08 16:37 ` [PATCH v3 0/2] net: phy: realtek: Fix RGMII TX/RX-delays initial config of rtl8211(e|f) David Miller
2019-05-08 21:51 ` [PATCH v4 " Serge Semin
2019-05-08 21:51 ` [PATCH v4 1/2] net: phy: realtek: Add rtl8211e rx/tx delays config Serge Semin
2019-05-08 21:51 ` [PATCH v4 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only Serge Semin
2019-05-08 23:31 ` [PATCH v4 0/2] net: phy: realtek: Fix RGMII TX/RX-delays initial config of rtl8211(e|f) David Miller
2019-05-13 5:41 ` [PATCH v2 1/2] net: phy: realtek: Add rtl8211e rx/tx delays config Guenter Roeck
2019-05-13 10:37 ` Serge Semin
2019-04-26 21:21 ` [PATCH v2 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only Serge Semin
2019-04-26 21:46 ` Andrew Lunn
2019-04-26 23:35 ` Serge Semin
2019-04-29 17:37 ` Florian Fainelli
2019-04-29 18:29 ` Vladimir Oltean
2019-04-29 21:12 ` Serge Semin
2019-04-29 22:36 ` Vladimir Oltean
2019-04-30 12:54 ` Serge Semin
2019-04-30 20:44 ` Martin Blumenstingl
2019-05-08 0:48 ` Serge Semin [this message]
2019-04-30 21:16 ` Martin Blumenstingl
2019-05-01 23:03 ` Vladimir Oltean
2019-05-03 17:29 ` Martin Blumenstingl
2019-05-06 14:39 ` Serge Semin
2019-05-06 17:21 ` Martin Blumenstingl
2019-05-07 17:37 ` Heiner Kallweit
2019-05-07 20:09 ` Martin Blumenstingl
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=20190508004809.qhiz4bpqtxe34276@mobilestation \
--to=fancer.lancer@gmail.com \
--cc=Sergey.Semin@t-platforms.ru \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--subject='Re: [PATCH v2 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only' \
/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
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).