From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Rob Herring <robh+dt@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH devicetree 2/2] MIPS: mscc: ocelot: mark the phy-mode for internal PHY ports
Date: Thu, 19 Aug 2021 19:58:47 +0200 [thread overview]
Message-ID: <YR6b15zKkjWFoM1X@piout.net> (raw)
In-Reply-To: <20210819171704.z3avr2b5jur6dohl@skbuf>
On 19/08/2021 17:17:05+0000, Vladimir Oltean wrote:
> On Thu, Aug 19, 2021 at 08:04:16PM +0300, Vladimir Oltean wrote:
> > The ocelot driver was converted to phylink, and that expects a valid
> > phy_interface_t. Without a phy-mode, of_get_phy_mode returns
> > PHY_INTERFACE_MODE_NA, which is not ideal because phylink rejects that.
> >
> > The ocelot driver was patched to treat PHY_INTERFACE_MODE_NA as
> > PHY_INTERFACE_MODE_INTERNAL to work with the broken DT blobs, but we
> > should fix the device trees and specify the phy-mode too.
> >
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> > ---
>
> Please note that the pre-phylink driver has this check:
>
> switch (ocelot_port->phy_mode) {
> case PHY_INTERFACE_MODE_NA:
> (...)
> case PHY_INTERFACE_MODE_SGMII:
> (...)
> case PHY_INTERFACE_MODE_QSGMII:
> (...)
> default:
> dev_err(ocelot->dev,
> "invalid phy mode for port%d, (Q)SGMII only\n",
> port);
> of_node_put(portnp);
> err = -EINVAL;
> goto out_teardown;
> }
>
> So it does not actually expect PHY_INTERFACE_MODE_INTERNAL and will
> error out.
>
> Are we okay with the new device tree blobs breaking the old kernel?
From my point of view, newer device trees are not required to work on
older kernel, this would impose an unreasonable limitation and the use
case is very limited.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2021-08-19 17:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 17:04 [PATCH devicetree 1/2] MIPS: mscc: ocelot: disable all switch ports by default Vladimir Oltean
2021-08-19 17:04 ` [PATCH devicetree 2/2] MIPS: mscc: ocelot: mark the phy-mode for internal PHY ports Vladimir Oltean
2021-08-19 17:17 ` Vladimir Oltean
2021-08-19 17:58 ` Alexandre Belloni [this message]
2021-08-21 8:42 ` Thomas Bogendoerfer
2021-08-21 8:41 ` [PATCH devicetree 1/2] MIPS: mscc: ocelot: disable all switch ports by default Thomas Bogendoerfer
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=YR6b15zKkjWFoM1X@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=horatiu.vultur@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=vladimir.oltean@nxp.com \
/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).