Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: renesas,rzv2h-gbeth: Document Renesas RZ/T2H and RZ/N2H SoCs

Add device tree binding support for the Gigabit Ethernet MAC (GMAC) IP
on Renesas RZ/T2H and RZ/N2H SoCs. While these SoCs use the same
Synopsys DesignWare MAC version 5.20 as RZ/V2H, they are synthesized
with different hardware configurations.

Add new compatible strings "renesas,r9a09g077-gbeth" for RZ/T2H and
"renesas,r9a09g087-gbeth" for RZ/N2H, with the latter using RZ/T2H as
fallback since they share identical GMAC IP.

Update the schema to handle hardware differences between SoC variants.
RZ/T2H requires only 3 clocks compared to 7 on RZ/V2H, supports 8 RX/TX
queue pairs instead of 4, and needs 2 reset controls with reset-names
property versus a single unnamed reset. RZ/T2H also has the split header
feature enabled which is disabled on RZ/V2H.

Add support for an optional pcs-handle property to connect the GMAC to
the MIIC PCS converter on RZ/T2H. Use conditional schema validation to
enforce the correct clock, reset, and interrupt configurations per SoC
variant.

Extend the base snps,dwmac.yaml schema to accommodate the increased
interrupt count, supporting up to 19 interrupts and extending the
rx-queue and tx-queue interrupt name patterns to cover queues 0-7.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250908105901.3198975-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Lad Prabhakar and committed by
Jakub Kicinski
d43ce982 fc006f54

+143 -44
+138 -40
Documentation/devicetree/bindings/net/renesas,rzv2h-gbeth.yaml
··· 17 17 - renesas,r9a09g047-gbeth 18 18 - renesas,r9a09g056-gbeth 19 19 - renesas,r9a09g057-gbeth 20 + - renesas,r9a09g077-gbeth 21 + - renesas,r9a09g087-gbeth 20 22 - renesas,rzv2h-gbeth 21 23 required: 22 24 - compatible 23 25 24 26 properties: 25 27 compatible: 26 - items: 27 - - enum: 28 - - renesas,r9a09g047-gbeth # RZ/G3E 29 - - renesas,r9a09g056-gbeth # RZ/V2N 30 - - renesas,r9a09g057-gbeth # RZ/V2H(P) 31 - - const: renesas,rzv2h-gbeth 32 - - const: snps,dwmac-5.20 28 + oneOf: 29 + - items: 30 + - enum: 31 + - renesas,r9a09g047-gbeth # RZ/G3E 32 + - renesas,r9a09g056-gbeth # RZ/V2N 33 + - renesas,r9a09g057-gbeth # RZ/V2H(P) 34 + - const: renesas,rzv2h-gbeth 35 + - const: snps,dwmac-5.20 36 + - items: 37 + - const: renesas,r9a09g077-gbeth # RZ/T2H 38 + - const: snps,dwmac-5.20 39 + - items: 40 + - const: renesas,r9a09g087-gbeth # RZ/N2H 41 + - const: renesas,r9a09g077-gbeth 42 + - const: snps,dwmac-5.20 33 43 34 44 reg: 35 45 maxItems: 1 36 46 37 47 clocks: 38 - items: 39 - - description: CSR clock 40 - - description: AXI system clock 41 - - description: PTP clock 42 - - description: TX clock 43 - - description: RX clock 44 - - description: TX clock phase-shifted by 180 degrees 45 - - description: RX clock phase-shifted by 180 degrees 48 + oneOf: 49 + - items: 50 + - description: CSR clock 51 + - description: AXI system clock 52 + - description: PTP clock 53 + - description: TX clock 54 + - description: RX clock 55 + - description: TX clock phase-shifted by 180 degrees 56 + - description: RX clock phase-shifted by 180 degrees 57 + - items: 58 + - description: CSR clock 59 + - description: AXI system clock 60 + - description: TX clock 46 61 47 62 clock-names: 48 - items: 49 - - const: stmmaceth 50 - - const: pclk 51 - - const: ptp_ref 52 - - const: tx 53 - - const: rx 54 - - const: tx-180 55 - - const: rx-180 56 - 57 - interrupts: 58 - minItems: 11 63 + oneOf: 64 + - items: 65 + - const: stmmaceth 66 + - const: pclk 67 + - const: ptp_ref 68 + - const: tx 69 + - const: rx 70 + - const: tx-180 71 + - const: rx-180 72 + - items: 73 + - const: stmmaceth 74 + - const: pclk 75 + - const: tx 59 76 60 77 interrupt-names: 61 - items: 62 - - const: macirq 63 - - const: eth_wake_irq 64 - - const: eth_lpi 65 - - const: rx-queue-0 66 - - const: rx-queue-1 67 - - const: rx-queue-2 68 - - const: rx-queue-3 69 - - const: tx-queue-0 70 - - const: tx-queue-1 71 - - const: tx-queue-2 72 - - const: tx-queue-3 78 + oneOf: 79 + - items: 80 + - const: macirq 81 + - const: eth_wake_irq 82 + - const: eth_lpi 83 + - const: rx-queue-0 84 + - const: rx-queue-1 85 + - const: rx-queue-2 86 + - const: rx-queue-3 87 + - const: tx-queue-0 88 + - const: tx-queue-1 89 + - const: tx-queue-2 90 + - const: tx-queue-3 91 + - items: 92 + - const: macirq 93 + - const: eth_wake_irq 94 + - const: eth_lpi 95 + - const: rx-queue-0 96 + - const: rx-queue-1 97 + - const: rx-queue-2 98 + - const: rx-queue-3 99 + - const: rx-queue-4 100 + - const: rx-queue-5 101 + - const: rx-queue-6 102 + - const: rx-queue-7 103 + - const: tx-queue-0 104 + - const: tx-queue-1 105 + - const: tx-queue-2 106 + - const: tx-queue-3 107 + - const: tx-queue-4 108 + - const: tx-queue-5 109 + - const: tx-queue-6 110 + - const: tx-queue-7 73 111 74 112 resets: 75 - items: 76 - - description: AXI power-on system reset 113 + oneOf: 114 + - items: 115 + - description: AXI power-on system reset 116 + - items: 117 + - description: AXI power-on system reset 118 + - description: AHB reset 119 + 120 + pcs-handle: 121 + description: 122 + phandle pointing to a PCS sub-node compatible with 123 + Documentation/devicetree/bindings/net/pcs/renesas,rzn1-miic.yaml# 124 + (Refer RZ/T2H portion in the DT-binding file) 77 125 78 126 required: 79 127 - compatible ··· 134 86 135 87 allOf: 136 88 - $ref: snps,dwmac.yaml# 89 + 90 + - if: 91 + properties: 92 + compatible: 93 + contains: 94 + const: renesas,r9a09g077-gbeth 95 + then: 96 + properties: 97 + clocks: 98 + maxItems: 3 99 + 100 + clock-names: 101 + maxItems: 3 102 + 103 + interrupts: 104 + minItems: 19 105 + 106 + interrupt-names: 107 + minItems: 19 108 + 109 + resets: 110 + minItems: 2 111 + 112 + reset-names: 113 + minItems: 2 114 + 115 + required: 116 + - reset-names 117 + else: 118 + properties: 119 + clocks: 120 + minItems: 7 121 + 122 + clock-names: 123 + minItems: 7 124 + 125 + interrupts: 126 + minItems: 11 127 + maxItems: 11 128 + 129 + interrupt-names: 130 + minItems: 11 131 + maxItems: 11 132 + 133 + resets: 134 + maxItems: 1 135 + 136 + pcs-handle: false 137 + 138 + reset-names: false 137 139 138 140 unevaluatedProperties: false 139 141
+5 -4
Documentation/devicetree/bindings/net/snps,dwmac.yaml
··· 75 75 - qcom,sc8280xp-ethqos 76 76 - qcom,sm8150-ethqos 77 77 - renesas,r9a06g032-gmac 78 + - renesas,r9a09g077-gbeth 78 79 - renesas,rzn1-gmac 79 80 - renesas,rzv2h-gbeth 80 81 - rockchip,px30-gmac ··· 119 118 120 119 interrupts: 121 120 minItems: 1 122 - maxItems: 11 121 + maxItems: 19 123 122 124 123 interrupt-names: 125 124 minItems: 1 126 - maxItems: 11 125 + maxItems: 19 127 126 items: 128 127 oneOf: 129 128 - description: Combined signal for various interrupt events ··· 135 134 - description: The interrupt that occurs when HW safety error triggered 136 135 const: sfty 137 136 - description: Per channel receive completion interrupt 138 - pattern: '^rx-queue-[0-3]$' 137 + pattern: '^rx-queue-[0-7]$' 139 138 - description: Per channel transmit completion interrupt 140 - pattern: '^tx-queue-[0-3]$' 139 + pattern: '^tx-queue-[0-7]$' 141 140 142 141 clocks: 143 142 minItems: 1