diff mbox series

[v2] dt-bindings: net: renesas,etheravb: Document Gigabit Ethernet IP

Message ID 20210727123450.15918-1-biju.das.jz@bp.renesas.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series [v2] dt-bindings: net: renesas,etheravb: Document Gigabit Ethernet IP | expand

Commit Message

Biju Das July 27, 2021, 12:34 p.m. UTC
Document Gigabit Ethernet IP found on RZ/G2L SoC.

Gigabit Ethernet Interface includes Ethernet controller (E-MAC),
Internal TCP/IP Offload Engine (TOE) and Dedicated Direct memory
access controller (DMAC) for transferring transmitted Ethernet
frames to and received Ethernet frames from respective storage
areas in the URAM at high speed.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v1->v2:
 * No change. Seperated binding patch from driver patch series as per [1]
 [1]
  https://www.spinics.net/lists/linux-renesas-soc/msg59067.html
v1:-
 * New patch
---
 .../bindings/net/renesas,etheravb.yaml        | 57 +++++++++++++++----
 1 file changed, 45 insertions(+), 12 deletions(-)

Comments

Rob Herring Aug. 2, 2021, 8:15 p.m. UTC | #1
On Tue, 27 Jul 2021 13:34:50 +0100, Biju Das wrote:
> Document Gigabit Ethernet IP found on RZ/G2L SoC.
> 
> Gigabit Ethernet Interface includes Ethernet controller (E-MAC),
> Internal TCP/IP Offload Engine (TOE) and Dedicated Direct memory
> access controller (DMAC) for transferring transmitted Ethernet
> frames to and received Ethernet frames from respective storage
> areas in the URAM at high speed.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2:
>  * No change. Seperated binding patch from driver patch series as per [1]
>  [1]
>   https://www.spinics.net/lists/linux-renesas-soc/msg59067.html
> v1:-
>  * New patch
> ---
>  .../bindings/net/renesas,etheravb.yaml        | 57 +++++++++++++++----
>  1 file changed, 45 insertions(+), 12 deletions(-)
> 

Applied, thanks!
Geert Uytterhoeven Aug. 12, 2021, 8:27 a.m. UTC | #2
Hi Biju,

On Tue, Jul 27, 2021 at 2:35 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Document Gigabit Ethernet IP found on RZ/G2L SoC.
>
> Gigabit Ethernet Interface includes Ethernet controller (E-MAC),
> Internal TCP/IP Offload Engine (TOE) and Dedicated Direct memory
> access controller (DMAC) for transferring transmitted Ethernet
> frames to and received Ethernet frames from respective storage
> areas in the URAM at high speed.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml

> @@ -145,14 +142,20 @@ allOf:
>        properties:
>          compatible:
>            contains:
> -            const: renesas,etheravb-rcar-gen2
> +            enum:
> +              - renesas,etheravb-rcar-gen2
> +              - renesas,rzg2l-gbeth
>      then:
>        properties:
>          interrupts:
> -          maxItems: 1
> +          minItems: 1
> +          maxItems: 3
>          interrupt-names:
> +          minItems: 1
>            items:
>              - const: mux
> +            - const: int_fil_n
> +            - const: int_arp_ns_n

I'm aware Rob has already applied this, but should the "int_" prefix
be dropped?
The "_n" suffix is also a bit weird (albeit it matches the
documentation). Usually it is used to indicate an active-low signal,
but the interrupt is declared in the .dtsi with IRQ_TYPE_LEVEL_HIGH.

And the first interrupt is not a mux on RZ/G2L, but called "pif_int_n"
(whatever "pif" might mean).

>          rx-internal-delay-ps: false
>      else:
>        properties:

Gr{oetje,eeting}s,

                        Geert
Biju Das Aug. 12, 2021, 8:59 a.m. UTC | #3
Hi Geert,

Thanks for the feedback.

> Subject: Re: [PATCH v2] dt-bindings: net: renesas,etheravb: Document
> Gigabit Ethernet IP
> 
> Hi Biju,
> 
> On Tue, Jul 27, 2021 at 2:35 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > Document Gigabit Ethernet IP found on RZ/G2L SoC.
> >
> > Gigabit Ethernet Interface includes Ethernet controller (E-MAC),
> > Internal TCP/IP Offload Engine (TOE) and Dedicated Direct memory
> > access controller (DMAC) for transferring transmitted Ethernet frames
> > to and received Ethernet frames from respective storage areas in the
> > URAM at high speed.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Thanks for your patch!
> 
> > --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> > +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> 
> > @@ -145,14 +142,20 @@ allOf:
> >        properties:
> >          compatible:
> >            contains:
> > -            const: renesas,etheravb-rcar-gen2
> > +            enum:
> > +              - renesas,etheravb-rcar-gen2
> > +              - renesas,rzg2l-gbeth
> >      then:
> >        properties:
> >          interrupts:
> > -          maxItems: 1
> > +          minItems: 1
> > +          maxItems: 3
> >          interrupt-names:
> > +          minItems: 1
> >            items:
> >              - const: mux
> > +            - const: int_fil_n
> > +            - const: int_arp_ns_n
> 
> I'm aware Rob has already applied this, but should the "int_" prefix be
> dropped?

OK. I will use "fil" and "arp" instead.

> The "_n" suffix is also a bit weird (albeit it matches the documentation).
> Usually it is used to indicate an active-low signal, but the interrupt is
> declared in the .dtsi with IRQ_TYPE_LEVEL_HIGH.
> 

But here on the interrupt mapping table(RZG2L_InterruptMapping_rev01.xlsx). It is mentioned as high. So I guess, it is correct.

> And the first interrupt is not a mux on RZ/G2L, but called "pif_int_n"
> (whatever "pif" might mean).

As per section 32.5.12 Interrupts, this interrupt include, Descriptor interrupts,
Error interrupts, reception interrupts and transmission interrupts.

The source status can be checked from individual status register. 

For me. This description looks like a mux interrupt.
Multiple interrupt sources ored together to generate an interrupt and status can be 
Checked from each individual register. 
Please let me know if my understanding is wrong.

I agree, on HW manual it is mentioned as pif_int_n. I can replace mux with pif instead. Please let me know.

Regards,
Biju




> 
> >          rx-internal-delay-ps: false
> >      else:
> >        properties:
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
> 
> In personal conversations with technical people, I call myself a hacker.
> But when I'm talking to journalists I just say "programmer" or something
> like that.
>                                 -- Linus Torvalds
Geert Uytterhoeven Aug. 12, 2021, 9:07 a.m. UTC | #4
Hi Biju,

On Thu, Aug 12, 2021 at 11:00 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > Subject: Re: [PATCH v2] dt-bindings: net: renesas,etheravb: Document
> > Gigabit Ethernet IP
> > On Tue, Jul 27, 2021 at 2:35 PM Biju Das <biju.das.jz@bp.renesas.com>
> > wrote:
> > > Document Gigabit Ethernet IP found on RZ/G2L SoC.
> > >
> > > Gigabit Ethernet Interface includes Ethernet controller (E-MAC),
> > > Internal TCP/IP Offload Engine (TOE) and Dedicated Direct memory
> > > access controller (DMAC) for transferring transmitted Ethernet frames
> > > to and received Ethernet frames from respective storage areas in the
> > > URAM at high speed.
> > >
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Thanks for your patch!
> >
> > > --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> > > +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> >
> > > @@ -145,14 +142,20 @@ allOf:
> > >        properties:
> > >          compatible:
> > >            contains:
> > > -            const: renesas,etheravb-rcar-gen2
> > > +            enum:
> > > +              - renesas,etheravb-rcar-gen2
> > > +              - renesas,rzg2l-gbeth
> > >      then:
> > >        properties:
> > >          interrupts:
> > > -          maxItems: 1
> > > +          minItems: 1
> > > +          maxItems: 3
> > >          interrupt-names:
> > > +          minItems: 1
> > >            items:
> > >              - const: mux
> > > +            - const: int_fil_n
> > > +            - const: int_arp_ns_n
> >
> > I'm aware Rob has already applied this, but should the "int_" prefix be
> > dropped?
>
> OK. I will use "fil" and "arp" instead.
>
> > The "_n" suffix is also a bit weird (albeit it matches the documentation).
> > Usually it is used to indicate an active-low signal, but the interrupt is
> > declared in the .dtsi with IRQ_TYPE_LEVEL_HIGH.
> >
>
> But here on the interrupt mapping table(RZG2L_InterruptMapping_rev01.xlsx). It is mentioned as high. So I guess, it is correct.
>
> > And the first interrupt is not a mux on RZ/G2L, but called "pif_int_n"
> > (whatever "pif" might mean).
>
> As per section 32.5.12 Interrupts, this interrupt include, Descriptor interrupts,
> Error interrupts, reception interrupts and transmission interrupts.
>
> The source status can be checked from individual status register.
>
> For me. This description looks like a mux interrupt.
> Multiple interrupt sources ored together to generate an interrupt and status can be
> Checked from each individual register.
> Please let me know if my understanding is wrong.
>
> I agree, on HW manual it is mentioned as pif_int_n. I can replace mux with pif instead. Please let me know.

Let's keep the mux, like on R-Car Gen2.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
index 005868f703a6..5e12a759004f 100644
--- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
+++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
@@ -43,23 +43,20 @@  properties:
               - renesas,etheravb-r8a779a0     # R-Car V3U
           - const: renesas,etheravb-rcar-gen3 # R-Car Gen3 and RZ/G2
 
+      - items:
+          - enum:
+              - renesas,r9a07g044-gbeth # RZ/G2{L,LC}
+          - const: renesas,rzg2l-gbeth  # RZ/G2L
+
   reg: true
 
   interrupts: true
 
   interrupt-names: true
 
-  clocks:
-    minItems: 1
-    items:
-      - description: AVB functional clock
-      - description: Optional TXC reference clock
+  clocks: true
 
-  clock-names:
-    minItems: 1
-    items:
-      - const: fck
-      - const: refclk
+  clock-names: true
 
   iommus:
     maxItems: 1
@@ -145,14 +142,20 @@  allOf:
       properties:
         compatible:
           contains:
-            const: renesas,etheravb-rcar-gen2
+            enum:
+              - renesas,etheravb-rcar-gen2
+              - renesas,rzg2l-gbeth
     then:
       properties:
         interrupts:
-          maxItems: 1
+          minItems: 1
+          maxItems: 3
         interrupt-names:
+          minItems: 1
           items:
             - const: mux
+            - const: int_fil_n
+            - const: int_arp_ns_n
         rx-internal-delay-ps: false
     else:
       properties:
@@ -208,6 +211,36 @@  allOf:
         tx-internal-delay-ps:
           const: 2000
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: renesas,rzg2l-gbeth
+    then:
+      properties:
+        clocks:
+          items:
+            - description: Main clock
+            - description: Register access clock
+            - description: Reference clock for RGMII
+        clock-names:
+          items:
+            - const: axi
+            - const: chi
+            - const: refclk
+    else:
+      properties:
+        clocks:
+          minItems: 1
+          items:
+            - description: AVB functional clock
+            - description: Optional TXC reference clock
+        clock-names:
+          minItems: 1
+          items:
+            - const: fck
+            - const: refclk
+
 additionalProperties: false
 
 examples: