From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Rob Herring <robh@kernel.org>,
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>,
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>,
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 net-next 8/8] dt-bindings: net: fsl,backplane-anlt: new binding document
Date: Wed, 6 Sep 2023 17:02:10 +0300 [thread overview]
Message-ID: <20230906140210.sfyiohp3cxf3epuc@skbuf> (raw)
In-Reply-To: <36bb7d51-2fca-4d06-b78d-e411f67ecf56@lunn.ch>
Hi Andrew and phylib/phylink maintainers in general,
On Tue, Aug 22, 2023 at 04:10:45PM +0200, Andrew Lunn wrote:
> For C22 PHYs, the ID registers are only used to ask user space to load
> a driver which supports that ID, and then used to match a device to a
> driver. We often say that if the ID registers don't actually contain
> an ID, or the wrong ID, use ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$
> to let the subsystem know the correct ID.
>
> The device you are trying to support has the same problem, invalid
> IDs, but its C45.
>
> C45 IDs however work slightly differently. An C45 package can have
> multiple devices in it, up to 32. Each device has its own ID
> registers. So there can be up to 32 different IDs for one package. The
> core will try to determine which of the 32 devices are actually in the
> package, and if they are, what the ID is. It then asks user space to
> load a driver for all the IDs it finds. And when matching devices to
> drivers, it sees if any of the ID of the package matches the IDs the
> driver says it supports. If a match is found, that one driver is
> expected to drive all the devices in that one package.
>
> I don't see a need for ethernet-phy-ieee802.3-c45-idXXXX.XXXX,
> ethernet-phy-ieee802.3-idXXXX.XXXX should be sufficient, since all you
> are doing it matching the ID against the driver. That matching does
> not differ between C22 and C45.
>
> Saying "ethernet-phy-ieee802.3-c45" might be useful, because at the
> moment we have a mixup between C45 register space and C45 bus
> transactions. The drive is free to access C22 and/or C45 registers,
> since it should know what the device actually has. But some of the
> core might get the wrong idea without "ethernet-phy-ieee802.3-c45".
>
> O.K, that the background now:
>
> > First: Compatible strings per C45 MMD? Drivers per C45 MMD
>
> So far, nobody has needed that. All current drivers are package
> drivers, they drive all the devices in the package. At least for a
> PHY, there is close integration between devices in a package. Russell
> has commented that the Marvell 10G PHY does appear to contain a number
> of licensed devices, but so far, we have not noticed the same licensed
> device used by multiple vendors. So there has not been any need to
> reuse code.
>
> However, it sounds like the package you are trying to support does
> contain multiple independent devices. So from an architecture
> perspective, having multiple drivers would make sense, even if there
> is no reuse. But are the devices PHY? Everything i've said so far
> applies to PHYs. It does not apply to a PCS, etc.
>
> Andrew
I don't know if the devices qualify as phy_device structures according
to the opinion of the maintainers, and that is one of the fundamental
aspects I would like this RFC to clarify, before I proceed to request
NXP to allocate a new PHY ID that I can put in the compatible string.
If the backplane AN/LT block is not a phy_device structure, my
imagination will need a bit of help on how to integrate it, as a raw
mdio_device, with phylink or with the consumer MAC drivers directly.
prev parent reply other threads:[~2023-09-06 14:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 15:06 [RFC PATCH net-next 0/8] Add C72/C73 copper backplane support for LX2160 Vladimir Oltean
2023-08-17 15:06 ` [RFC PATCH net-next 1/8] phy: introduce the phy_check_cdr_lock() function Vladimir Oltean
2023-08-17 15:06 ` [RFC PATCH net-next 2/8] phy: introduce the PHY_MODE_ETHERNET_PHY mode for phy_set_mode_ext() Vladimir Oltean
2023-08-21 17:30 ` Sean Anderson
2023-08-21 18:13 ` Vladimir Oltean
2023-08-21 19:40 ` Sean Anderson
2023-08-21 18:14 ` Russell King (Oracle)
2023-08-21 18:15 ` Vladimir Oltean
2023-08-17 15:06 ` [RFC PATCH net-next 3/8] phy: xgkr: add configuration interface for copper backplane Ethernet PHYs Vladimir Oltean
2023-08-17 15:06 ` [RFC PATCH net-next 4/8] net: phy: add C73 base page helpers Vladimir Oltean
2023-08-17 15:06 ` [RFC PATCH net-next 5/8] net: phy: balance calls to ->suspend() and ->resume() Vladimir Oltean
2023-08-17 15:06 ` [RFC PATCH net-next 6/8] net: phy: initialize phydev->master_slave_set to MASTER_SLAVE_CFG_UNKNOWN Vladimir Oltean
2023-08-17 15:06 ` [RFC PATCH net-next 7/8] net: phy: mtip_backplane: add driver for MoreThanIP backplane AN/LT core Vladimir Oltean
2023-08-17 15:06 ` [RFC PATCH net-next 8/8] dt-bindings: net: fsl,backplane-anlt: new binding document Vladimir Oltean
2023-08-21 19:58 ` Rob Herring
2023-08-21 20:11 ` Vladimir Oltean
2023-08-21 20:20 ` Andrew Lunn
2023-08-21 20:34 ` Vladimir Oltean
2023-08-21 21:10 ` Andrew Lunn
2023-08-21 21:55 ` Vladimir Oltean
2023-08-22 14:10 ` Andrew Lunn
2023-09-06 14:02 ` Vladimir Oltean [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=20230906140210.sfyiohp3cxf3epuc@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=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@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;
as well as URLs for NNTP newsgroup(s).