diff mbox series

[net-next,v3,1/3] dt-bindings: net: dwmac: Increase 'maxItems' for 'interrupts' and 'interrupt-names'

Message ID 20250311221730.40720-2-prabhakar.mahadev-lad.rj@bp.renesas.com (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series Add GBETH glue layer driver for Renesas RZ/V2H(P) SoC | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 12 of 12 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 34 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Lad, Prabhakar March 11, 2025, 10:17 p.m. UTC
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Increase the `maxItems` value for the `interrupts` and `interrupt-names`
properties to 11 to support additional per-channel Tx/Rx completion
interrupts on the Renesas RZ/V2H(P) SoC, which features the
`snps,dwmac-5.20` IP.

Refactor the `interrupt-names` property by replacing repeated `enum`
entries with a `oneOf` list. Add support for per-channel receive and
transmit completion interrupts using regex patterns.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
Note, for adding constraints to vendor bindings patch [0] has been sent
out seprately.

[0] https://lore.kernel.org/all/20250309003301.1152228-1-prabhakar.mahadev-lad.rj@bp.renesas.com/

v2->v3
- Dropped adding `additionalItems`
- Moved interrupts description into interrupt-names
- Replaced enum with a oneOf and added Rx/Tx regex patterns

v1->v2
- No change
---
 .../devicetree/bindings/net/snps,dwmac.yaml   | 24 ++++++++++++-------
 1 file changed, 15 insertions(+), 9 deletions(-)

Comments

Rob Herring (Arm) March 12, 2025, 1:16 p.m. UTC | #1
On Tue, Mar 11, 2025 at 10:17:28PM +0000, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Increase the `maxItems` value for the `interrupts` and `interrupt-names`
> properties to 11 to support additional per-channel Tx/Rx completion
> interrupts on the Renesas RZ/V2H(P) SoC, which features the
> `snps,dwmac-5.20` IP.
> 
> Refactor the `interrupt-names` property by replacing repeated `enum`
> entries with a `oneOf` list. Add support for per-channel receive and
> transmit completion interrupts using regex patterns.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> Note, for adding constraints to vendor bindings patch [0] has been sent
> out seprately.
> 
> [0] https://lore.kernel.org/all/20250309003301.1152228-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
> 
> v2->v3
> - Dropped adding `additionalItems`
> - Moved interrupts description into interrupt-names
> - Replaced enum with a oneOf and added Rx/Tx regex patterns
> 
> v1->v2
> - No change
> ---
>  .../devicetree/bindings/net/snps,dwmac.yaml   | 24 ++++++++++++-------
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> index 78b3030dc56d..bacec6e6514b 100644
> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> @@ -114,19 +114,25 @@ properties:
>  
>    interrupts:
>      minItems: 1
> -    items:
> -      - description: Combined signal for various interrupt events
> -      - description: The interrupt to manage the remote wake-up packet detection
> -      - description: The interrupt that occurs when Rx exits the LPI state
> -      - description: The interrupt that occurs when HW safety error triggered
> +    maxItems: 11
>  
>    interrupt-names:
>      minItems: 1
> +    maxItems: 26

Oops! I assume you meant 11. With that fixed:

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>

>      items:
> -      - const: macirq
> -      - enum: [eth_wake_irq, eth_lpi, sfty]
> -      - enum: [eth_wake_irq, eth_lpi, sfty]
> -      - enum: [eth_wake_irq, eth_lpi, sfty]
> +      oneOf:
> +        - description: Combined signal for various interrupt events
> +          const: macirq
> +        - description: The interrupt to manage the remote wake-up packet detection
> +          const: eth_wake_irq
> +        - description: The interrupt that occurs when Rx exits the LPI state
> +          const: eth_lpi
> +        - description: The interrupt that occurs when HW safety error triggered
> +          const: sfty
> +        - description: Per channel receive completion interrupt
> +          pattern: '^rx-queue-[0-3]$'
> +        - description: Per channel transmit completion interrupt
> +          pattern: '^tx-queue-[0-3]$'
>  
>    clocks:
>      minItems: 1
> -- 
> 2.43.0
>
Lad, Prabhakar March 14, 2025, 2:22 a.m. UTC | #2
Hi Rob,

Thank you for the review.

On Wed, Mar 12, 2025 at 1:16 PM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Mar 11, 2025 at 10:17:28PM +0000, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Increase the `maxItems` value for the `interrupts` and `interrupt-names`
> > properties to 11 to support additional per-channel Tx/Rx completion
> > interrupts on the Renesas RZ/V2H(P) SoC, which features the
> > `snps,dwmac-5.20` IP.
> >
> > Refactor the `interrupt-names` property by replacing repeated `enum`
> > entries with a `oneOf` list. Add support for per-channel receive and
> > transmit completion interrupts using regex patterns.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > Note, for adding constraints to vendor bindings patch [0] has been sent
> > out seprately.
> >
> > [0] https://lore.kernel.org/all/20250309003301.1152228-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
> >
> > v2->v3
> > - Dropped adding `additionalItems`
> > - Moved interrupts description into interrupt-names
> > - Replaced enum with a oneOf and added Rx/Tx regex patterns
> >
> > v1->v2
> > - No change
> > ---
> >  .../devicetree/bindings/net/snps,dwmac.yaml   | 24 ++++++++++++-------
> >  1 file changed, 15 insertions(+), 9 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > index 78b3030dc56d..bacec6e6514b 100644
> > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
> > @@ -114,19 +114,25 @@ properties:
> >
> >    interrupts:
> >      minItems: 1
> > -    items:
> > -      - description: Combined signal for various interrupt events
> > -      - description: The interrupt to manage the remote wake-up packet detection
> > -      - description: The interrupt that occurs when Rx exits the LPI state
> > -      - description: The interrupt that occurs when HW safety error triggered
> > +    maxItems: 11
> >
> >    interrupt-names:
> >      minItems: 1
> > +    maxItems: 26
>
> Oops! I assume you meant 11. With that fixed:
Ouch, I will fix this in v4.

>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
>
> >      items:
> > -      - const: macirq
> > -      - enum: [eth_wake_irq, eth_lpi, sfty]
> > -      - enum: [eth_wake_irq, eth_lpi, sfty]
> > -      - enum: [eth_wake_irq, eth_lpi, sfty]
> > +      oneOf:
> > +        - description: Combined signal for various interrupt events
> > +          const: macirq
> > +        - description: The interrupt to manage the remote wake-up packet detection
> > +          const: eth_wake_irq
> > +        - description: The interrupt that occurs when Rx exits the LPI state
> > +          const: eth_lpi
> > +        - description: The interrupt that occurs when HW safety error triggered
> > +          const: sfty
> > +        - description: Per channel receive completion interrupt
> > +          pattern: '^rx-queue-[0-3]$'
> > +        - description: Per channel transmit completion interrupt
> > +          pattern: '^tx-queue-[0-3]$'
> >
> >    clocks:
> >      minItems: 1
> > --
> > 2.43.0
> >

Cheers,
Prabhakar
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 78b3030dc56d..bacec6e6514b 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -114,19 +114,25 @@  properties:
 
   interrupts:
     minItems: 1
-    items:
-      - description: Combined signal for various interrupt events
-      - description: The interrupt to manage the remote wake-up packet detection
-      - description: The interrupt that occurs when Rx exits the LPI state
-      - description: The interrupt that occurs when HW safety error triggered
+    maxItems: 11
 
   interrupt-names:
     minItems: 1
+    maxItems: 26
     items:
-      - const: macirq
-      - enum: [eth_wake_irq, eth_lpi, sfty]
-      - enum: [eth_wake_irq, eth_lpi, sfty]
-      - enum: [eth_wake_irq, eth_lpi, sfty]
+      oneOf:
+        - description: Combined signal for various interrupt events
+          const: macirq
+        - description: The interrupt to manage the remote wake-up packet detection
+          const: eth_wake_irq
+        - description: The interrupt that occurs when Rx exits the LPI state
+          const: eth_lpi
+        - description: The interrupt that occurs when HW safety error triggered
+          const: sfty
+        - description: Per channel receive completion interrupt
+          pattern: '^rx-queue-[0-3]$'
+        - description: Per channel transmit completion interrupt
+          pattern: '^tx-queue-[0-3]$'
 
   clocks:
     minItems: 1