diff mbox series

[net-next,v2,5/5] dt-bindings: net: altera: tse: add an optional pcs register range

Message ID 20220830095549.120625-6-maxime.chevallier@bootlin.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: altera: tse: phylink conversion | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 4 this patch: 4
netdev/cc_maintainers warning 1 maintainers not CCed: krzysztof.kozlowski+dt@linaro.org
netdev/build_clang fail Errors and warnings before: 4 this patch: 4
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 59 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Maxime Chevallier Aug. 30, 2022, 9:55 a.m. UTC
Some implementations of the TSE have their PCS as an external bloc,
exposed at its own register range. Document this, and add a new example
showing a case using the pcs and the new phylink conversion to connect
an sfp port to a TSE mac.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V1->V2 :
 - Fixed example

 .../devicetree/bindings/net/altr,tse.yaml     | 29 ++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Aug. 30, 2022, 5:14 p.m. UTC | #1
On 30/08/2022 12:55, Maxime Chevallier wrote:
> Some implementations of the TSE have their PCS as an external bloc,
> exposed at its own register range. Document this, and add a new example
> showing a case using the pcs and the new phylink conversion to connect
> an sfp port to a TSE mac.
> 
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
> V1->V2 :
>  - Fixed example
> 
>  .../devicetree/bindings/net/altr,tse.yaml     | 29 ++++++++++++++++++-
>  1 file changed, 28 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/altr,tse.yaml b/Documentation/devicetree/bindings/net/altr,tse.yaml
> index 1676e13b8c64..4b314861a831 100644
> --- a/Documentation/devicetree/bindings/net/altr,tse.yaml
> +++ b/Documentation/devicetree/bindings/net/altr,tse.yaml
> @@ -39,6 +39,7 @@ allOf:
>        properties:
>          reg:
>            minItems: 6
> +          maxItems: 7
>          reg-names:
>            minItems: 6
>            items:
> @@ -48,6 +49,7 @@ allOf:
>              - const: rx_resp
>              - const: tx_csr
>              - const: tx_desc
> +            - const: pcs
>  
>  properties:
>    compatible:
> @@ -58,7 +60,7 @@ properties:
>  
>    reg:
>      minItems: 4
> -    maxItems: 6
> +    maxItems: 7
>  
>    reg-names:
>      minItems: 4
> @@ -69,6 +71,7 @@ properties:
>        - const: rx_resp
>        - const: tx_csr
>        - const: tx_desc
> +      - const: pcs
>        - const: s1
>  

So now 8 items?

>    interrupts:
> @@ -122,6 +125,30 @@ required:
>  unevaluatedProperties: false
>  
>  examples:
> +  - |
> +    tse_sub_0: ethernet@c0100000 {
> +        compatible = "altr,tse-msgdma-1.0";
> +        reg = <0xc0100000 0x00000400>,
> +              <0xc0101000 0x00000020>,
> +              <0xc0102000 0x00000020>,
> +              <0xc0103000 0x00000008>,
> +              <0xc0104000 0x00000020>,
> +              <0xc0105000 0x00000020>,
> +              <0xc0106000 0x00000100>;
> +        reg-names = "control_port", "rx_csr", "rx_desc", "rx_resp", "tx_csr", "tx_desc", "pcs";
> +        interrupt-parent = <&intc>;
> +        interrupts = <0 44 4>,<0 45 4>;
> +        interrupt-names = "rx_irq","tx_irq";
> +        rx-fifo-depth = <2048>;
> +        tx-fifo-depth = <2048>;
> +        max-frame-size = <1500>;
> +        local-mac-address = [ 00 0C ED 00 00 02 ];

00 00 00 00 00 00
(easier to spot that it is invalid)

Best regards,
Krzysztof
Maxime Chevallier Aug. 30, 2022, 7:18 p.m. UTC | #2
On Tue, 30 Aug 2022 20:14:52 +0300
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 30/08/2022 12:55, Maxime Chevallier wrote:
> > Some implementations of the TSE have their PCS as an external bloc,
> > exposed at its own register range. Document this, and add a new
> > example showing a case using the pcs and the new phylink conversion
> > to connect an sfp port to a TSE mac.
> > 
> > Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> > ---
> > V1->V2 :
> >  - Fixed example
> > 
> >  .../devicetree/bindings/net/altr,tse.yaml     | 29
> > ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/altr,tse.yaml
> > b/Documentation/devicetree/bindings/net/altr,tse.yaml index
> > 1676e13b8c64..4b314861a831 100644 ---
> > a/Documentation/devicetree/bindings/net/altr,tse.yaml +++
> > b/Documentation/devicetree/bindings/net/altr,tse.yaml @@ -39,6
> > +39,7 @@ allOf: properties:
> >          reg:
> >            minItems: 6
> > +          maxItems: 7
> >          reg-names:
> >            minItems: 6
> >            items:
> > @@ -48,6 +49,7 @@ allOf:
> >              - const: rx_resp
> >              - const: tx_csr
> >              - const: tx_desc
> > +            - const: pcs
> >  
> >  properties:
> >    compatible:
> > @@ -58,7 +60,7 @@ properties:
> >  
> >    reg:
> >      minItems: 4
> > -    maxItems: 6
> > +    maxItems: 7
> >  
> >    reg-names:
> >      minItems: 4
> > @@ -69,6 +71,7 @@ properties:
> >        - const: rx_resp
> >        - const: tx_csr
> >        - const: tx_desc
> > +      - const: pcs
> >        - const: s1
> >    
> 
> So now 8 items?

I'll also remove that. My understanding was that on top of the
allOf:if/then, I was supposed to re-list all possible values. I got
that wrong, so that's not needed at all.

> 
> >    interrupts:
> > @@ -122,6 +125,30 @@ required:
> >  unevaluatedProperties: false
> >  
> >  examples:
> > +  - |
> > +    tse_sub_0: ethernet@c0100000 {
> > +        compatible = "altr,tse-msgdma-1.0";
> > +        reg = <0xc0100000 0x00000400>,
> > +              <0xc0101000 0x00000020>,
> > +              <0xc0102000 0x00000020>,
> > +              <0xc0103000 0x00000008>,
> > +              <0xc0104000 0x00000020>,
> > +              <0xc0105000 0x00000020>,
> > +              <0xc0106000 0x00000100>;
> > +        reg-names = "control_port", "rx_csr", "rx_desc",
> > "rx_resp", "tx_csr", "tx_desc", "pcs";
> > +        interrupt-parent = <&intc>;
> > +        interrupts = <0 44 4>,<0 45 4>;
> > +        interrupt-names = "rx_irq","tx_irq";
> > +        rx-fifo-depth = <2048>;
> > +        tx-fifo-depth = <2048>;
> > +        max-frame-size = <1500>;
> > +        local-mac-address = [ 00 0C ED 00 00 02 ];  
> 
> 00 00 00 00 00 00
> (easier to spot that it is invalid)

Ack, thanks !

Best regards,

Maxime

> 
> Best regards,
> Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/altr,tse.yaml b/Documentation/devicetree/bindings/net/altr,tse.yaml
index 1676e13b8c64..4b314861a831 100644
--- a/Documentation/devicetree/bindings/net/altr,tse.yaml
+++ b/Documentation/devicetree/bindings/net/altr,tse.yaml
@@ -39,6 +39,7 @@  allOf:
       properties:
         reg:
           minItems: 6
+          maxItems: 7
         reg-names:
           minItems: 6
           items:
@@ -48,6 +49,7 @@  allOf:
             - const: rx_resp
             - const: tx_csr
             - const: tx_desc
+            - const: pcs
 
 properties:
   compatible:
@@ -58,7 +60,7 @@  properties:
 
   reg:
     minItems: 4
-    maxItems: 6
+    maxItems: 7
 
   reg-names:
     minItems: 4
@@ -69,6 +71,7 @@  properties:
       - const: rx_resp
       - const: tx_csr
       - const: tx_desc
+      - const: pcs
       - const: s1
 
   interrupts:
@@ -122,6 +125,30 @@  required:
 unevaluatedProperties: false
 
 examples:
+  - |
+    tse_sub_0: ethernet@c0100000 {
+        compatible = "altr,tse-msgdma-1.0";
+        reg = <0xc0100000 0x00000400>,
+              <0xc0101000 0x00000020>,
+              <0xc0102000 0x00000020>,
+              <0xc0103000 0x00000008>,
+              <0xc0104000 0x00000020>,
+              <0xc0105000 0x00000020>,
+              <0xc0106000 0x00000100>;
+        reg-names = "control_port", "rx_csr", "rx_desc", "rx_resp", "tx_csr", "tx_desc", "pcs";
+        interrupt-parent = <&intc>;
+        interrupts = <0 44 4>,<0 45 4>;
+        interrupt-names = "rx_irq","tx_irq";
+        rx-fifo-depth = <2048>;
+        tx-fifo-depth = <2048>;
+        max-frame-size = <1500>;
+        local-mac-address = [ 00 0C ED 00 00 02 ];
+        altr,has-supplementary-unicast;
+        altr,has-hash-multicast-filter;
+        sfp = <&sfp0>;
+        phy-mode = "sgmii";
+        managed = "in-band-status";
+    };
   - |
     tse_sub_1_eth_tse_0: ethernet@1,00001000 {
         compatible = "altr,tse-msgdma-1.0";