diff mbox series

dt-bindings: net: ethernet-phy: clarify when compatible must specify PHY ID

Message ID b8613028fb2f7f69e2fa5e658bd2840c790935d4.1761898321.git.buday.csaba@prolan.hu
State New
Headers show
Series dt-bindings: net: ethernet-phy: clarify when compatible must specify PHY ID | expand

Commit Message

Buday Csaba Oct. 31, 2025, 8:15 a.m. UTC
Change PHY ID description in ethernet-phy.yaml to clarify that a
PHY ID is required (may -> must) when the PHY requires special
initialization sequence.

Link: https://lore.kernel.org/netdev/20251026212026.GA2959311-robh@kernel.org/
Link: https://lore.kernel.org/netdev/aQIZvDt5gooZSTcp@debianbuilder/

Signed-off-by: Buday Csaba <buday.csaba@prolan.hu>
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Andrew Lunn Oct. 31, 2025, 1:01 p.m. UTC | #1
On Fri, Oct 31, 2025 at 09:15:06AM +0100, Buday Csaba wrote:
> Change PHY ID description in ethernet-phy.yaml to clarify that a
> PHY ID is required (may -> must) when the PHY requires special
> initialization sequence.
> 
> Link: https://lore.kernel.org/netdev/20251026212026.GA2959311-robh@kernel.org/
> Link: https://lore.kernel.org/netdev/aQIZvDt5gooZSTcp@debianbuilder/
> 
> Signed-off-by: Buday Csaba <buday.csaba@prolan.hu>
> ---
>  Documentation/devicetree/bindings/net/ethernet-phy.yaml | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> index 2ec2d9fda..6f5599902 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> @@ -35,9 +35,10 @@ properties:
>          description: PHYs that implement IEEE802.3 clause 45
>        - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
>          description:
> -          If the PHY reports an incorrect ID (or none at all) then the
> -          compatible list may contain an entry with the correct PHY ID
> -          in the above form.
> +          If the PHY reports an incorrect ID (or none at all), or the PHY
> +          requires a specific initialization sequence (like a particular
> +          order of clocks, resets, power supplies), then the compatible list
> +          must contain an entry with the correct PHY ID in the above form.

That is good start, but how about:

          PHYs contain identification registers. These will be read to
          identify the PHY. If the PHY reports an incorrect ID, or the
          PHY requires a specific initialization sequence (like a
          particular order of clocks, resets, power supplies), in
          order to be able to read the ID registers, then the
          compatible list must contain an entry with the correct PHY
          ID in the above form.

The first two sentences make it clear we ideally use the ID registers.
Then we say what happens if cannot work.

The "(or none at all)" is exactly the case you are trying to clarify,
it does not respond due to missing reset, clocks etc. We don't need to
say it twice, so i removed it.

    Andrew
Conor Dooley Oct. 31, 2025, 3:08 p.m. UTC | #2
On Fri, Oct 31, 2025 at 02:01:26PM +0100, Andrew Lunn wrote:
> On Fri, Oct 31, 2025 at 09:15:06AM +0100, Buday Csaba wrote:
> > Change PHY ID description in ethernet-phy.yaml to clarify that a
> > PHY ID is required (may -> must) when the PHY requires special
> > initialization sequence.
> > 
> > Link: https://lore.kernel.org/netdev/20251026212026.GA2959311-robh@kernel.org/
> > Link: https://lore.kernel.org/netdev/aQIZvDt5gooZSTcp@debianbuilder/
> > 
> > Signed-off-by: Buday Csaba <buday.csaba@prolan.hu>
> > ---
> >  Documentation/devicetree/bindings/net/ethernet-phy.yaml | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > index 2ec2d9fda..6f5599902 100644
> > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > @@ -35,9 +35,10 @@ properties:
> >          description: PHYs that implement IEEE802.3 clause 45
> >        - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
> >          description:
> > -          If the PHY reports an incorrect ID (or none at all) then the
> > -          compatible list may contain an entry with the correct PHY ID
> > -          in the above form.
> > +          If the PHY reports an incorrect ID (or none at all), or the PHY
> > +          requires a specific initialization sequence (like a particular
> > +          order of clocks, resets, power supplies), then the compatible list
> > +          must contain an entry with the correct PHY ID in the above form.
> 
> That is good start, but how about:
> 
>           PHYs contain identification registers. These will be read to
>           identify the PHY. If the PHY reports an incorrect ID, or the
>           PHY requires a specific initialization sequence (like a
>           particular order of clocks, resets, power supplies), in
>           order to be able to read the ID registers, then the
>           compatible list must contain an entry with the correct PHY
>           ID in the above form.
> 
> The first two sentences make it clear we ideally use the ID registers.
> Then we say what happens if cannot work.
> 
> The "(or none at all)" is exactly the case you are trying to clarify,
> it does not respond due to missing reset, clocks etc. We don't need to
> say it twice, so i removed it.

I like this wording,
Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: changes-requested
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 2ec2d9fda..6f5599902 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -35,9 +35,10 @@  properties:
         description: PHYs that implement IEEE802.3 clause 45
       - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
         description:
-          If the PHY reports an incorrect ID (or none at all) then the
-          compatible list may contain an entry with the correct PHY ID
-          in the above form.
+          If the PHY reports an incorrect ID (or none at all), or the PHY
+          requires a specific initialization sequence (like a particular
+          order of clocks, resets, power supplies), then the compatible list
+          must contain an entry with the correct PHY ID in the above form.
           The first group of digits is the 16 bit Phy Identifier 1
           register, this is the chip vendor OUI bits 3:18. The
           second group of digits is the Phy Identifier 2 register,