From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Madalin Bucur <madalin.bucur@nxp.com>,
Eric Dumazet <edumazet@google.com>,
Paul Mackerras <paulus@samba.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
Frank Rowand <frowand.list@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Saravana Kannan <saravanak@google.com>,
Sean Anderson <sean.anderson@seco.com>,
Russell King <linux@armlinux.org.uk>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Rob Herring <robh+dt@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux -kernel@vger.kernel.org>,
Leo Li <leoyang.li@nxp.com>, Vladimir Oltean <olteanv@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH net-next v2 00/11] net: pcs: Add support for devices probed in the "usual" manner
Date: Thu, 10 Nov 2022 16:32:38 +0000 [thread overview]
Message-ID: <20221110163237.vigulusm2c5bepp3@skbuf> (raw)
In-Reply-To: <Y20gXppMemnHSTG9@lunn.ch>
On Thu, Nov 10, 2022 at 05:01:34PM +0100, Andrew Lunn wrote:
> On Thu, Nov 10, 2022 at 03:29:26PM +0000, Vladimir Oltean wrote:
> > On Thu, Nov 10, 2022 at 09:55:32AM -0500, Sean Anderson wrote:
> > > On 11/9/22 17:41, Vladimir Oltean wrote:
> > > > On Thu, Nov 03, 2022 at 05:06:39PM -0400, Sean Anderson wrote:
> > > >> Several (later) patches in this series cannot be applied until a stable
> > > >> release has occured containing the dts updates.
> > > >
> > > > New kernels must remain compatible with old device trees.
> > >
> > > Well, this binding is not present in older device trees, so it needs to
> > > be added before these patches can be applied. It also could be possible
> > > to manually bind the driver using e.g. a helper function (like what is
> > > done with lynx_pcs_create_on_bus). Of course this would be tricky,
> > > because we would need to unbind any generic phy driver attached, but
> > > avoid unbinding an existing Lynx PCS driver.
> >
> > If you know the value of the MII_PHYSID1 and MII_PHYSID2 registers for
> > these PCS devices, would it be possible to probe them in a generic way
> > as MDIO devices, if they lack a compatible string?
>
> That is not how it currently works. If a device on an MDIO bus has a
> compatible, it is assumed to be an mdio device, and it is probed in a
> generic way as an sort of mdio device. It could be an Ethernet switch,
> or Broadcom has some generic PHYs which are mdio devices, etc.
>
> If there is no compatible, the ID registers are read and it is assumed
> to be a PHY. It will be probed as a PHY. The probe() function will be
> given a phydev etc.
>
> It will need some core changes to allow an mdio device to be probed
> via the ID registers.
Yes, it would require extending struct mdio_driver with something like
what struct phy_driver has (u32 phy_id, u32 phy_id_mask), or with a more
generic phy_id_match_table (similar to maybe of_match_table).
I don't see a conceptually simpler way though.
WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Sean Anderson <sean.anderson@seco.com>,
Vladimir Oltean <olteanv@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Madalin Bucur <madalin.bucur@nxp.com>,
"David S . Miller" <davem@davemloft.net>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Frank Rowand <frowand.list@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Leo Li <leoyang.li@nxp.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>,
Rob Herring <robh+dt@kernel.org>,
Saravana Kannan <saravanak@google.com>,
Shawn Guo <shawnguo@kernel.org>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH net-next v2 00/11] net: pcs: Add support for devices probed in the "usual" manner
Date: Thu, 10 Nov 2022 16:32:38 +0000 [thread overview]
Message-ID: <20221110163237.vigulusm2c5bepp3@skbuf> (raw)
In-Reply-To: <Y20gXppMemnHSTG9@lunn.ch>
On Thu, Nov 10, 2022 at 05:01:34PM +0100, Andrew Lunn wrote:
> On Thu, Nov 10, 2022 at 03:29:26PM +0000, Vladimir Oltean wrote:
> > On Thu, Nov 10, 2022 at 09:55:32AM -0500, Sean Anderson wrote:
> > > On 11/9/22 17:41, Vladimir Oltean wrote:
> > > > On Thu, Nov 03, 2022 at 05:06:39PM -0400, Sean Anderson wrote:
> > > >> Several (later) patches in this series cannot be applied until a stable
> > > >> release has occured containing the dts updates.
> > > >
> > > > New kernels must remain compatible with old device trees.
> > >
> > > Well, this binding is not present in older device trees, so it needs to
> > > be added before these patches can be applied. It also could be possible
> > > to manually bind the driver using e.g. a helper function (like what is
> > > done with lynx_pcs_create_on_bus). Of course this would be tricky,
> > > because we would need to unbind any generic phy driver attached, but
> > > avoid unbinding an existing Lynx PCS driver.
> >
> > If you know the value of the MII_PHYSID1 and MII_PHYSID2 registers for
> > these PCS devices, would it be possible to probe them in a generic way
> > as MDIO devices, if they lack a compatible string?
>
> That is not how it currently works. If a device on an MDIO bus has a
> compatible, it is assumed to be an mdio device, and it is probed in a
> generic way as an sort of mdio device. It could be an Ethernet switch,
> or Broadcom has some generic PHYs which are mdio devices, etc.
>
> If there is no compatible, the ID registers are read and it is assumed
> to be a PHY. It will be probed as a PHY. The probe() function will be
> given a phydev etc.
>
> It will need some core changes to allow an mdio device to be probed
> via the ID registers.
Yes, it would require extending struct mdio_driver with something like
what struct phy_driver has (u32 phy_id, u32 phy_id_mask), or with a more
generic phy_id_match_table (similar to maybe of_match_table).
I don't see a conceptually simpler way though.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Sean Anderson <sean.anderson@seco.com>,
Vladimir Oltean <olteanv@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Madalin Bucur <madalin.bucur@nxp.com>,
"David S . Miller" <davem@davemloft.net>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Frank Rowand <frowand.list@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Leo Li <leoyang.li@nxp.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>,
Rob Herring <robh+dt@kernel.org>,
Saravana Kannan <saravanak@google.com>,
Shawn Guo <shawnguo@kernel.org>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH net-next v2 00/11] net: pcs: Add support for devices probed in the "usual" manner
Date: Thu, 10 Nov 2022 16:32:38 +0000 [thread overview]
Message-ID: <20221110163237.vigulusm2c5bepp3@skbuf> (raw)
In-Reply-To: <Y20gXppMemnHSTG9@lunn.ch>
On Thu, Nov 10, 2022 at 05:01:34PM +0100, Andrew Lunn wrote:
> On Thu, Nov 10, 2022 at 03:29:26PM +0000, Vladimir Oltean wrote:
> > On Thu, Nov 10, 2022 at 09:55:32AM -0500, Sean Anderson wrote:
> > > On 11/9/22 17:41, Vladimir Oltean wrote:
> > > > On Thu, Nov 03, 2022 at 05:06:39PM -0400, Sean Anderson wrote:
> > > >> Several (later) patches in this series cannot be applied until a stable
> > > >> release has occured containing the dts updates.
> > > >
> > > > New kernels must remain compatible with old device trees.
> > >
> > > Well, this binding is not present in older device trees, so it needs to
> > > be added before these patches can be applied. It also could be possible
> > > to manually bind the driver using e.g. a helper function (like what is
> > > done with lynx_pcs_create_on_bus). Of course this would be tricky,
> > > because we would need to unbind any generic phy driver attached, but
> > > avoid unbinding an existing Lynx PCS driver.
> >
> > If you know the value of the MII_PHYSID1 and MII_PHYSID2 registers for
> > these PCS devices, would it be possible to probe them in a generic way
> > as MDIO devices, if they lack a compatible string?
>
> That is not how it currently works. If a device on an MDIO bus has a
> compatible, it is assumed to be an mdio device, and it is probed in a
> generic way as an sort of mdio device. It could be an Ethernet switch,
> or Broadcom has some generic PHYs which are mdio devices, etc.
>
> If there is no compatible, the ID registers are read and it is assumed
> to be a PHY. It will be probed as a PHY. The probe() function will be
> given a phydev etc.
>
> It will need some core changes to allow an mdio device to be probed
> via the ID registers.
Yes, it would require extending struct mdio_driver with something like
what struct phy_driver has (u32 phy_id, u32 phy_id_mask), or with a more
generic phy_id_match_table (similar to maybe of_match_table).
I don't see a conceptually simpler way though.
next prev parent reply other threads:[~2022-11-10 16:33 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 21:06 [PATCH net-next v2 00/11] net: pcs: Add support for devices probed in the "usual" manner Sean Anderson
2022-11-03 21:06 ` Sean Anderson
2022-11-03 21:06 ` Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 01/11] arm64: dts: Add compatible strings for Lynx PCSs Sean Anderson
2022-11-03 21:06 ` Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 02/11] powerpc: " Sean Anderson
2022-11-03 21:06 ` Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 03/11] net: dsa: ocelot: suppress PHY device scanning on the internal MDIO bus Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 04/11] net: pcs: Add subsystem Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 05/11] net: pcs: lynx: Convert to an MDIO driver Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 06/11] net: enetc: Convert to use PCS subsystem Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 07/11] net: dsa: felix: Convert to use PCS driver Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 08/11] of: property: Add device link support for PCS Sean Anderson
2022-11-07 20:10 ` Rob Herring
2022-11-07 20:22 ` Vladimir Oltean
2022-11-07 20:50 ` Sean Anderson
2022-11-07 21:36 ` Rob Herring
2022-11-08 20:56 ` Saravana Kannan
2022-11-09 21:56 ` Vladimir Oltean
2022-11-03 21:06 ` [PATCH net-next v2 09/11] [DO NOT MERGE] net: dpaa: Convert to use PCS subsystem Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 10/11] [DO NOT MERGE] net: dpaa2: " Sean Anderson
2022-11-03 21:06 ` [PATCH net-next v2 11/11] [DO NOT MERGE] net: pcs: lynx: Remove non-device functionality Sean Anderson
2022-11-09 22:41 ` [PATCH net-next v2 00/11] net: pcs: Add support for devices probed in the "usual" manner Vladimir Oltean
2022-11-09 22:41 ` Vladimir Oltean
2022-11-09 22:41 ` Vladimir Oltean
2022-11-10 14:55 ` Sean Anderson
2022-11-10 14:55 ` Sean Anderson
2022-11-10 14:55 ` Sean Anderson
2022-11-10 15:29 ` Vladimir Oltean
2022-11-10 15:29 ` Vladimir Oltean
2022-11-10 15:29 ` Vladimir Oltean
2022-11-10 15:39 ` Sean Anderson
2022-11-10 15:39 ` Sean Anderson
2022-11-10 15:39 ` Sean Anderson
2022-11-10 16:00 ` Vladimir Oltean
2022-11-10 16:00 ` Vladimir Oltean
2022-11-10 16:00 ` Vladimir Oltean
2022-11-10 16:56 ` Sean Anderson
2022-11-10 16:56 ` Sean Anderson
2022-11-10 16:56 ` Sean Anderson
2022-11-14 17:23 ` Vladimir Oltean
2022-11-14 17:23 ` Vladimir Oltean
2022-11-14 17:23 ` Vladimir Oltean
2022-11-14 18:08 ` Sean Anderson
2022-11-14 18:08 ` Sean Anderson
2022-11-14 18:08 ` Sean Anderson
2022-11-14 19:53 ` Vladimir Oltean
2022-11-14 19:53 ` Vladimir Oltean
2022-11-14 19:53 ` Vladimir Oltean
2022-11-17 13:38 ` Rob Herring
2022-11-17 13:38 ` Rob Herring
2022-11-17 13:38 ` Rob Herring
2022-11-10 16:01 ` Andrew Lunn
2022-11-10 16:01 ` Andrew Lunn
2022-11-10 16:01 ` Andrew Lunn
2022-11-10 16:32 ` Vladimir Oltean [this message]
2022-11-10 16:32 ` Vladimir Oltean
2022-11-10 16:32 ` Vladimir Oltean
2022-11-09 22:59 ` Vladimir Oltean
2022-11-09 22:59 ` Vladimir Oltean
2022-11-09 22:59 ` Vladimir Oltean
2022-11-10 15:15 ` Sean Anderson
2022-11-10 15:15 ` Sean Anderson
2022-11-10 15:15 ` Sean Anderson
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=20221110163237.vigulusm2c5bepp3@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=frowand.list@gmail.com \
--cc=ioana.ciornei@nxp.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madalin.bucur@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulus@samba.org \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
--cc=sean.anderson@seco.com \
--cc=vivien.didelot@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.