diff mbox series

[2/2] dt-bindings: net: dwmac: document 'mac-mode' property

Message ID 20190906130256.10321-2-alexandru.ardelean@analog.com
State Changes Requested, archived
Headers show
Series None | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Alexandru Ardelean Sept. 6, 2019, 1:02 p.m. UTC
This change documents the 'mac-mode' property that was introduced in the
'stmmac' driver to support passive mode converters that can sit in-between
the MAC & PHY.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

David Miller Sept. 11, 2019, 2:28 p.m. UTC | #1
From: Alexandru Ardelean <alexandru.ardelean@analog.com>
Date: Fri, 6 Sep 2019 16:02:56 +0300

> This change documents the 'mac-mode' property that was introduced in the
> 'stmmac' driver to support passive mode converters that can sit in-between
> the MAC & PHY.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

Applied to net-next.
Rob Herring Sept. 13, 2019, 2:36 p.m. UTC | #2
On Fri, Sep 06, 2019 at 04:02:56PM +0300, Alexandru Ardelean wrote:
> This change documents the 'mac-mode' property that was introduced in the
> 'stmmac' driver to support passive mode converters that can sit in-between
> the MAC & PHY.
> 
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>  Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index c78be15704b9..ebe4537a7cce 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -112,6 +112,14 @@ properties:
>    reset-names:
>      const: stmmaceth
>  
> +  mac-mode:
> +    maxItems: 1

Is this an array because {min,max}Items is for arrays? It should be 
defined as a string with possible values.

As this property is the same as another, you can do this:

$ref: ethernet-controller.yaml#/properties/phy-connection-type

Unless only a small subset of those values are valid here, then you may 
want to list them here.

> +    description:
> +      The property is identical to 'phy-mode', and assumes that there is mode
> +      converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This converter
> +      can be passive (no SW requirement), and requires that the MAC operate
> +      in a different mode than the PHY in order to function.
> +
>    snps,axi-config:
>      $ref: /schemas/types.yaml#definitions/phandle
>      description:
> -- 
> 2.20.1
>
Alexandru Ardelean Sept. 16, 2019, 6:49 a.m. UTC | #3
On Fri, 2019-09-13 at 15:36 +0100, Rob Herring wrote:
> [External]
> 
> On Fri, Sep 06, 2019 at 04:02:56PM +0300, Alexandru Ardelean wrote:
> > This change documents the 'mac-mode' property that was introduced in the
> > 'stmmac' driver to support passive mode converters that can sit in-between
> > the MAC & PHY.
> > 
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> > ---
> >  Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > index c78be15704b9..ebe4537a7cce 100644
> > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > @@ -112,6 +112,14 @@ properties:
> >    reset-names:
> >      const: stmmaceth
> >  
> > +  mac-mode:
> > +    maxItems: 1
> 
> Is this an array because {min,max}Items is for arrays? It should be 
> defined as a string with possible values.
> 
> As this property is the same as another, you can do this:
> 
> $ref: ethernet-controller.yaml#/properties/phy-connection-type
> 
> Unless only a small subset of those values are valid here, then you may 
> want to list them here.
> 

Ack.
Thank you.

Will investigate and re-spin.


> > +    description:
> > +      The property is identical to 'phy-mode', and assumes that there is mode
> > +      converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This converter
> > +      can be passive (no SW requirement), and requires that the MAC operate
> > +      in a different mode than the PHY in order to function.
> > +
> >    snps,axi-config:
> >      $ref: /schemas/types.yaml#definitions/phandle
> >      description:
> > -- 
> > 2.20.1
> >
Alexandru Ardelean Sept. 17, 2019, 7:21 a.m. UTC | #4
On Mon, 2019-09-16 at 12:49 +0300, Alexandru Ardelean wrote:
> On Fri, 2019-09-13 at 15:36 +0100, Rob Herring wrote:
> > [External]
> > 
> > On Fri, Sep 06, 2019 at 04:02:56PM +0300, Alexandru Ardelean wrote:
> > > This change documents the 'mac-mode' property that was introduced in
> > > the
> > > 'stmmac' driver to support passive mode converters that can sit in-
> > > between
> > > the MAC & PHY.
> > > 
> > > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> > > ---
> > >  Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > > b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > > index c78be15704b9..ebe4537a7cce 100644
> > > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > > @@ -112,6 +112,14 @@ properties:
> > >    reset-names:
> > >      const: stmmaceth
> > >  
> > > +  mac-mode:
> > > +    maxItems: 1
> > 
> > Is this an array because {min,max}Items is for arrays? It should be 
> > defined as a string with possible values.
> > 
> > As this property is the same as another, you can do this:
> > 
> > $ref: ethernet-controller.yaml#/properties/phy-connection-type
> > 
> > Unless only a small subset of those values are valid here, then you
> > may 
> > want to list them here.
> > 
> 
> Ack.
> Thank you.
> 
> Will investigate and re-spin.

Looking at '$ref: ethernet-controller.yaml#/properties/phy-connection-type'
it looks like 'mac-mode' could cover almost all 'phy-connection-type'
except for a few (1 or 2). The 'dwmac' driver is pretty complex/big.

There was a note that Andrew made on a previous change, that we could have
a 'mac-mode' (similar to 'phy-mode') and that could become generic (either
in phylib or maybe somewhere else in netdev).

In any case, the conclusion [from my side] would be that
'$ref: ethernet-controller.yaml#/properties/phy-connection-type'
could work, and be sufficiently future-proof.

Thanks
Alex

> 
> 
> > > +    description:
> > > +      The property is identical to 'phy-mode', and assumes that
> > > there is mode
> > > +      converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This
> > > converter
> > > +      can be passive (no SW requirement), and requires that the MAC
> > > operate
> > > +      in a different mode than the PHY in order to function.
> > > +
> > >    snps,axi-config:
> > >      $ref: /schemas/types.yaml#definitions/phandle
> > >      description:
> > > -- 
> > > 2.20.1
> > >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index c78be15704b9..ebe4537a7cce 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -112,6 +112,14 @@  properties:
   reset-names:
     const: stmmaceth
 
+  mac-mode:
+    maxItems: 1
+    description:
+      The property is identical to 'phy-mode', and assumes that there is mode
+      converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This converter
+      can be passive (no SW requirement), and requires that the MAC operate
+      in a different mode than the PHY in order to function.
+
   snps,axi-config:
     $ref: /schemas/types.yaml#definitions/phandle
     description: