From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
Heiner Kallweit <hkallweit1@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Madalin Bucur <madalin.bucur@nxp.com>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Camelia Groza <camelia.groza@nxp.com>,
Li Yang <leoyang.li@nxp.com>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor@kernel.org>,
Sean Anderson <sean.anderson@seco.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>
Subject: Re: [RFC PATCH v2 net-next 13/15] dt-bindings: lynx-pcs: add properties for backplane mode
Date: Mon, 2 Oct 2023 15:19:58 +0300 [thread overview]
Message-ID: <20231002121958.xybzovgjzldfiae2@skbuf> (raw)
In-Reply-To: <c31577ee-9d81-212b-42a6-e72a648f9276@linaro.org>
Hi Krzysztof,
On Sun, Sep 24, 2023 at 01:49:24PM +0200, Krzysztof Kozlowski wrote:
> On 23/09/2023 15:49, Vladimir Oltean wrote:
> > When the Lynx PCS is deployed on a copper backplane link, it must be
> > prepared to handle clause 73 autoneg and clause 72 link training, which
> > it can do using a dedicated AN/LT block. The latter doesn't need to be
> > described in the device tree, because it is discoverable from the SerDes
> > lanes.
> >
> > The media type that is deployed on the link is not discoverable though,
> > so the introduction of a fsl,backplane-mode boolean property appears
> > necessary to determine whether the AN/LT block should be employed, or
> > left bypassed.
> >
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> > ---
> > v1->v2: patch is new
> >
> > .../devicetree/bindings/net/pcs/fsl,lynx-pcs.yaml | 15 ++++++++++++++-
> > 1 file changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/pcs/fsl,lynx-pcs.yaml b/Documentation/devicetree/bindings/net/pcs/fsl,lynx-pcs.yaml
> > index fbedf696c555..40fbcd80ee2a 100644
> > --- a/Documentation/devicetree/bindings/net/pcs/fsl,lynx-pcs.yaml
> > +++ b/Documentation/devicetree/bindings/net/pcs/fsl,lynx-pcs.yaml
> > @@ -16,11 +16,24 @@ description: |
> >
> > properties:
> > compatible:
> > - const: fsl,lynx-pcs
> > + enum:
> > + - fsl,lx2160a-lynx-pcs
> > + - fsl,lynx-pcs
> >
> > reg:
> > maxItems: 1
> >
> > + phys:
> > + maxItems: 4
> > + description:
> > + phandle for the SerDes lanes that act as PMA/PMD layer when the PCS is
> > + part of a copper backplane PHY.
> > +
> > + fsl,backplane-mode:
> > + $ref: /schemas/types.yaml#/definitions/flag
> > + description:
> > + Indicates that the PCS is deployed over a copper backplane link.
> > +
>
> Please extend also existing example.
Ok. Snippet for attention (a dtsi I was working with - applies over fsl-lx2160a-qds.dts):
&dpmac2 {
phy-connection-type = "internal";
managed = "in-band-status";
/delete-property/ phys;
};
&pcs_mdio2 {
status = "okay";
};
&pcs2 {
fsl,backplane-mode;
phys = <&serdes_1 3>, /* lane D */
<&serdes_1 2>, /* lane C */
<&serdes_1 1>, /* lane B */
<&serdes_1 0>; /* lane A */
};
The thing is that the RFC v2 bindings are still very much WIP. For v3,
I will try to remove the "phys" property from the pcs node, and process
the ones from the MAC node (client of PCS).
For example, arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
has "phys" under &dpmac7:
&dpmac7 {
sfp = <&sfp0>;
managed = "in-band-status";
phys = <&serdes_1 3>;
};
but &dpmac7 also has pcs-handle = <&pcs7>; in fsl-lx2160a.dtsi.
Thus, if I'm able to pass the "phys" phandle from &dpmac7 to &pcs7
through code (argument to lynx_pcs_create_fwnode()), then the location
of the "phys" property could be the same regardless of use case
(backplane or not), and the dt-bindings of the lynx pcs would be simpler.
The only dilemma that has stopped me from doing it is that the dpmac node
may have other "phys" in the signal path (for example external redrivers/
retimers). With up to 4 SerDes lanes per MAC and with optional retimer
phys on each lane, it becomes a question of how can we distinguish the
SerDes phys from the other phys (the PCS wants the SerDes PHY)? Would it
be okay to add a phy-names property, and parse it for "serdes-%d" to
indicate a SerDes PHY, and anything else can be named in any other way
("retimer-%d")?
> If these do not apply to lynx-pcs, then they should be disallowed in
> allOf:if:then.
They do: the "fsl,lynx-pcs" compatible string + the bool "fsl,backplane-mode"
is supposed to instantiate a MTIP_MODEL_AUTODETECT backplane AN/LT block
(as opposed to LX2160A where it isn't autodetectable). It's just that I
didn't get to implement support for the other models yet.
next prev parent reply other threads:[~2023-10-02 12:20 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-23 13:48 [RFC PATCH v2 net-next 00/15] Add C72/C73 copper backplane support for LX2160 Vladimir Oltean
2023-09-23 13:48 ` [RFC PATCH v2 net-next 01/15] phy: introduce phy_get_status() and use it to report CDR lock Vladimir Oltean
2023-10-02 19:16 ` Florian Fainelli
2023-09-23 13:48 ` [RFC PATCH v2 net-next 02/15] phy: introduce the PHY_MODE_ETHTOOL mode for phy_set_mode_ext() Vladimir Oltean
2023-10-02 19:19 ` Florian Fainelli
2023-10-03 16:04 ` Vladimir Oltean
2023-09-23 13:48 ` [RFC PATCH v2 net-next 03/15] phy: ethernet: add configuration interface for copper backplane Ethernet PHYs Vladimir Oltean
2023-09-28 13:36 ` Simon Horman
2023-09-28 19:05 ` Simon Horman
2023-10-02 13:11 ` Vladimir Oltean
2023-10-02 17:20 ` Simon Horman
2023-09-23 13:48 ` [RFC PATCH v2 net-next 04/15] phy: allow querying the address of protocol converters through phy_get_status() Vladimir Oltean
2023-09-29 16:23 ` Vinod Koul
2023-10-02 10:09 ` Vladimir Oltean
2023-09-23 13:48 ` [RFC PATCH v2 net-next 05/15] net: add 25GBase-KR-S and 25GBase-CR-S to ethtool link mode UAPI Vladimir Oltean
2023-10-03 11:19 ` Russell King (Oracle)
2023-09-23 13:48 ` [RFC PATCH v2 net-next 06/15] net: mii: add C73 base page helpers Vladimir Oltean
2023-09-23 13:48 ` [RFC PATCH v2 net-next 07/15] net: phylink: centralize phy_interface_mode_is_8023z() && phylink_autoneg_inband() checks Vladimir Oltean
2023-09-28 13:38 ` Simon Horman
2023-10-03 11:27 ` Russell King (Oracle)
2023-10-03 21:03 ` Vladimir Oltean
2023-09-23 13:48 ` [RFC PATCH v2 net-next 08/15] net: phylink: allow PCS to handle C73 autoneg for phy-mode = "internal" Vladimir Oltean
2023-10-02 14:17 ` Vladimir Oltean
2023-10-03 11:06 ` Russell King (Oracle)
2023-10-03 15:00 ` Vladimir Oltean
2023-09-23 13:48 ` [RFC PATCH v2 net-next 09/15] net: ethtool: introduce ethtool_link_mode_str() Vladimir Oltean
2023-10-03 11:30 ` Russell King (Oracle)
2023-10-04 0:08 ` Florian Fainelli
2023-09-23 13:48 ` [RFC PATCH v2 net-next 10/15] net: phylink: support all ethtool port modes with inband modes Vladimir Oltean
2023-09-23 13:49 ` [RFC PATCH v2 net-next 11/15] net: phylink: support the 25GBase-KR-S and 25GBase-CR-S link modes too Vladimir Oltean
2023-10-03 11:31 ` Russell King (Oracle)
2023-10-03 16:24 ` Vladimir Oltean
2023-09-23 13:49 ` [RFC PATCH v2 net-next 12/15] net: phylink: add the 25G link modes to phylink_c73_priority_resolution[] Vladimir Oltean
2023-10-03 13:16 ` Russell King (Oracle)
2023-10-03 16:33 ` Vladimir Oltean
2023-09-23 13:49 ` [RFC PATCH v2 net-next 13/15] dt-bindings: lynx-pcs: add properties for backplane mode Vladimir Oltean
2023-09-24 11:49 ` Krzysztof Kozlowski
2023-10-02 12:19 ` Vladimir Oltean [this message]
2023-09-23 13:49 ` [RFC PATCH v2 net-next 14/15] net: pcs: mtip_backplane: add driver for MoreThanIP backplane AN/LT core Vladimir Oltean
2023-09-28 19:06 ` Simon Horman
2023-09-23 13:49 ` [RFC PATCH v2 net-next 15/15] net: pcs: lynx: use MTIP AN/LT block for copper backplanes Vladimir Oltean
2023-10-03 13:14 ` Russell King (Oracle)
2023-10-03 19:00 ` Vladimir Oltean
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=20231002121958.xybzovgjzldfiae2@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=camelia.groza@nxp.com \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=ioana.ciornei@nxp.com \
--cc=kishon@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=madalin.bucur@nxp.com \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=sean.anderson@seco.com \
--cc=vkoul@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox