From: Lad Prabhakar Extend the A5PSW DSA binding to cover the ETHSW variant used on newer Renesas RZ/T2H and RZ/N2H SoCs. ETHSW is derived from the A5PSW switch found on RZ/N1 but differs in register layout, clocking and interrupt topology, and exposes four ports in total (including the CPU/management port) instead of five. Update the schema to describe these differences by adding dedicated compatible strings for RZ/T2H and RZ/N2H. Use the RZ/T2H compatible string as the fallback for RZ/N2H, reflecting that both SoCs integrate the same ETHSW IP. Add myself as a co-maintainer of the binding to support ongoing work on the ETHSW family across RZ/T2H and RZ/N2H devices. Signed-off-by: Lad Prabhakar Reviewed-by: Rob Herring (Arm) --- v6: - No change v5: https://lore.kernel.org/all/20261120002549.1908299-8-prabhakar.mahadev-lad.rj@bp.renesas.com/ - Rebased the patch due to previous changes in the binding - Replaced the patternProperties expression for ethernet-ports - Set the maximum constraint for reg values on ethernet-ports - Restored the RB tag from Rob v4: https://lore.kernel.org/all/20261104182105.1102555-7-prabhakar.mahadev-lad.rj@bp.renesas.com/ - Restricted the reg property for ethernet-ports to maximum 3 for RZ/T2H - Added RB tag from Rob v3: https://lore.kernel.org/all/20261014131906.990077-6-prabhakar.mahadev-lad.rj@bp.renesas.com/ - Added a restriction to disallow port@4 - Updated commit message v2: https://lore.kernel.org/all/20261001154326.754314-5-prabhakar.mahadev-lad.rj@bp.renesas.com/ - Added full names for SoCs v1: https://lore.kernel.org/all/20251121113553.2955854-5-prabhakar.mahadev-lad.rj@bp.renesas.com/ --- .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 156 +++++++++++++++--- 1 file changed, 134 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml b/Documentation/devicetree/bindings/net/dsa/renesas,rzn1-a5psw.yaml index 30f25b06d62c..c08729136176 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 + - Lad Prabhakar -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 reg: maxItems: 1 interrupts: - items: - - description: Device Level Ring (DLR) interrupt - - description: Switch interrupt - - description: Parallel Redundancy Protocol (PRP) interrupt - - description: Integrated HUB module interrupt - - description: Receive Pattern Match interrupt + oneOf: + - items: + - description: Device Level Ring (DLR) interrupt + - description: Switch interrupt + - description: Parallel Redundancy Protocol (PRP) interrupt + - description: Integrated HUB module interrupt + - description: Receive Pattern Match interrupt + + - items: + - description: Switch interrupt + - description: Device Level Ring (DLR) interrupt + - description: Parallel Redundancy Protocol (PRP) interrupt + - description: Integrated HUB module interrupt + - description: Receive Pattern Match interrupt 0 + - description: Receive Pattern Match interrupt 1 + - description: Receive Pattern Match interrupt 2 + - description: Receive Pattern Match interrupt 3 + - description: Receive Pattern Match interrupt 4 + - description: Receive Pattern Match interrupt 5 + - description: Receive Pattern Match interrupt 6 + - description: Receive Pattern Match interrupt 7 + - description: Receive Pattern Match interrupt 8 + - description: Receive Pattern Match interrupt 9 + - description: Receive Pattern Match interrupt 10 + - description: Receive Pattern Match interrupt 11 + - description: Switch timer pulse output interrupt 0 + - description: Switch timer pulse output interrupt 1 + - description: Switch timer pulse output interrupt 2 + - description: Switch timer pulse output interrupt 3 + - description: Switch TDMA timer output interrupt 0 + - description: Switch TDMA timer output interrupt 1 + - description: Switch TDMA timer output interrupt 2 + - description: Switch TDMA timer output interrupt 3 interrupt-names: - items: - - const: dlr - - const: switch - - const: prp - - const: hub - - const: ptrn + oneOf: + - items: + - const: dlr + - const: switch + - const: prp + - const: hub + - const: ptrn + + - items: + - const: switch + - const: dlr + - const: prp + - const: hub + - const: ptrn0 + - const: ptrn1 + - const: ptrn2 + - const: ptrn3 + - const: ptrn4 + - const: ptrn5 + - const: ptrn6 + - const: ptrn7 + - const: ptrn8 + - const: ptrn9 + - const: ptrn10 + - const: ptrn11 + - const: tp0 + - const: tp1 + - const: tp2 + - const: tp3 + - const: tdma0 + - const: tdma1 + - const: tdma2 + - const: tdma3 power-domains: maxItems: 1 @@ -52,14 +117,21 @@ properties: unevaluatedProperties: false clocks: + minItems: 2 items: - description: AHB clock used for the switch register interface - description: Switch system clock + - description: Timestamp clock clock-names: + minItems: 2 items: - const: hclk - const: clk + - const: ts + + resets: + maxItems: 1 ethernet-ports: type: object @@ -86,6 +158,46 @@ 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@": + properties: + reg: + maximum: 3 + required: + - resets + else: + properties: + interrupts: + maxItems: 5 + interrupt-names: + maxItems: 5 + clocks: + maxItems: 2 + clock-names: + maxItems: 2 + resets: false examples: - | -- 2.56.1