All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	wsa+renesas@sang-engineering.com
Subject: Re: [PATCH net-next v4 06/14] dt-bindings: net: dsa: renesas,rzn1-a5psw: Add RZ/T2H and RZ/N2H ETHSW support
Date: Thu, 05 Nov 2026 18:21:30 +0000	[thread overview]
Message-ID: <sashiko-outbox-199731@kernel.org> (raw)
In-Reply-To: <20261104182105.1102555-7-prabhakar.mahadev-lad.rj@bp.renesas.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: net: dsa: rzn1-a5psw: split ETHSW into separate schema
--

commit 58ade097798a6648dae56580c5e1d16da26de07a
Author: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

dt-bindings: net: dsa: renesas,rzn1-a5psw: Add RZ/T2H and RZ/N2H ETHSW support

This commit extends the Renesas A5PSW DSA binding schema to cover the ETHSW
variant found on RZ/T2H and RZ/N2H SoCs, adding compatible strings and
per-variant constraints for interrupts, clocks, resets, and ports.

> diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
> index 250c59e58439b..338e499b42b1c 100644
> --- a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml
> @@ -4,43 +4,108 @@
>  $id: http://devicetree.org/schemas/net/dsa/renesas,rzn1-a5psw.yaml#
>  $schema: http://devicetree.org/meta-schemas/core.yaml#
>  
> -title: Renesas RZ/N1 Advanced 5 ports ethernet switch
> +title: Renesas RZ/N1 A5PSW and RZ/T2H, RZ/N2H ETHSW Ethernet Switch
>  
>  maintainers:
>    - Clément Léger <clement.leger@bootlin.com>
> +  - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>  
> -description: |
> -  The advanced 5 ports switch is present on the Renesas RZ/N1 SoC family and
> -  handles 4 ports + 1 CPU management port.
> +description: >
> +  This binding describes the Ethernet switch IPs used on Renesas SoCs:
>  
> -allOf:
> -  - $ref: dsa.yaml#/$defs/ethernet-ports
> +  - The A5PSW (Advanced 5-Port Switch) found on the RZ/N1 family, which
> +    provides 4 external ports and 1 CPU/management port.
> +  - The ETHSW (Ethernet Switch) found on the RZ/T2H and RZ/N2H families,
> +    which is derived from the A5PSW IP with some register layout
> +    differences, additional timestamping support, and a total of 4 ports
> +    including the CPU/management port.
>  
>  properties:
>    compatible:
> -    items:
> -      - enum:
> -          - renesas,r9a06g032-a5psw
> -      - const: renesas,rzn1-a5psw
> +    oneOf:
> +      - items:
> +          - enum:
> +              - renesas,r9a06g032-a5psw
> +          - const: renesas,rzn1-a5psw
> +
> +      - const: renesas,r9a09g077-ethsw
> +
> +      - items:
> +          - const: renesas,r9a09g087-ethsw
> +          - const: renesas,r9a09g077-ethsw

[ ... ]

> @@ -94,6 +166,48 @@ required:
>    - clock-names
>    - power-domains
>    - ethernet-ports
> +  - interrupts
> +  - interrupt-names
> +
> +allOf:
> +  - $ref: dsa.yaml#/$defs/ethernet-ports
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: renesas,r9a09g077-ethsw
> +    then:
> +      properties:
> +        interrupts:
> +          minItems: 24
> +        interrupt-names:
> +          minItems: 24
> +        clocks:
> +          minItems: 3
> +        clock-names:
> +          minItems: 3
> +        ethernet-ports:
> +          patternProperties:
> +            "^(ethernet-)?port@[0-3]$":
> +              properties:
> +                reg:
> +                  items:
> +                    - maximum: 3
> +            "^(ethernet-)?port@4$": false
> +      required:
> +        - resets
> +    else:
> +      properties:
> +        interrupts:
> +          maxItems: 5
> +        interrupt-names:
> +          maxItems: 5
> +        clocks:
> +          maxItems: 2
> +        clock-names:
> +          maxItems: 2
> +        resets: false

[Severity: Low]
This isn't a bug, but would it be cleaner to split the RZ/T2H and RZ/N2H
ETHSW binding into a separate schema document (such as
renesas,r9a09g077-ethsw.yaml) instead of combining it with
renesas,rzn1-a5psw.yaml?

In Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml, the
ETHSW compatibles (renesas,r9a09g077-ethsw and renesas,r9a09g087-ethsw) do
not share a fallback compatible with renesas,rzn1-a5psw, and nearly every
property in the schema differs between the two variants:

- interrupts and interrupt-names have different item counts (24 vs 5),
  names, and ordering (switch then dlr on ETHSW vs dlr then switch on
  A5PSW), requiring separate oneOf branches.
- clocks and clock-names have different item counts (3 including ts vs 2).
- resets is required on ETHSW and disallowed on A5PSW.
- ethernet-ports allows ports 0-3 (disallowing port@4 and restricting reg
  to maximum 3) on ETHSW versus ports 0-4 on A5PSW.

Because the allOf if-then-else conditional has to override almost every
property in the file, splitting ETHSW into its own schema file would avoid
the per-variant conditional complexity.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104182105.1102555-1-prabhakar.mahadev-lad.rj@bp.renesas.com?part=6

  reply	other threads:[~2026-11-05 18:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 18:20 [PATCH net-next v4 00/14] Add ETHSW support for Renesas RZ/T2H and RZ/N2H SoCs Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 01/14] net: dsa: tag_rzn1_a5psw: Drop redundant ETH_P_DSA_A5PSW definition Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 02/14] net: dsa: tag_rzn1_a5psw: Add RZ/T2H ETHSW tag protocol support Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 03/14] net: dsa: Kconfig: Expand config description to cover RZ/T2H and RZ/N2H ETHSW Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 04/14] dt-bindings: net: dsa: renesas,rzn1-a5psw: Reject the "ports" node Prabhakar
2026-11-06 15:39   ` Rob Herring (Arm)
2026-11-04 18:20 ` [PATCH net-next v4 05/14] dt-bindings: net: dsa: renesas,rzn1-a5psw: Disallow ports beyond port@4 Prabhakar
2026-11-06 15:44   ` Rob Herring
2026-11-12 12:34     ` Lad, Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 06/14] dt-bindings: net: dsa: renesas,rzn1-a5psw: Add RZ/T2H and RZ/N2H ETHSW support Prabhakar
2026-11-05 18:21   ` sashiko-bot [this message]
2026-11-04 18:20 ` [PATCH net-next v4 07/14] net: dsa: rzn1-a5psw: Add support for optional reset control Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 08/14] net: dsa: rzn1-a5psw: Add support for optional timestamp clock Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 09/14] net: dsa: rzn1-a5psw: Make use dev_err_probe() Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 10/14] net: dsa: rzn1-a5psw: Get switch info via OF data Prabhakar
2026-11-04 18:20 ` [PATCH net-next v4 11/14] net: dsa: rzn1-a5psw: Choose tagging protocol based on compatible string Prabhakar
2026-11-04 18:21 ` [PATCH net-next v4 12/14] net: dsa: rzn1-a5psw: Add fixed frame length workaround for management port Prabhakar
2026-11-04 18:21 ` [PATCH net-next v4 13/14] net: dsa: rzn1-a5psw: Add support for RZ/T2H Ethernet switch Prabhakar
2026-11-05 18:21   ` sashiko-bot
2026-11-04 18:21 ` [PATCH net-next v4 14/14] net: dsa: Kconfig: Enable support for RZ/T2H and RZ/N2H SoCs Prabhakar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-199731@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.