dt-bindings: net: Define interrupt constraints for DWMAC vendor bindings
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Sun, 9 Mar 2025 00:33:01 +0000 (00:33 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 13 Mar 2025 11:00:18 +0000 (12:00 +0100)
The `snps,dwmac.yaml` binding currently sets `maxItems: 3` for the
`interrupts` and `interrupt-names` properties, but vendor bindings
selecting `snps,dwmac.yaml` do not impose these limits.

Define constraints for `interrupts` and `interrupt-names` properties in
various DWMAC vendor bindings to ensure proper validation and consistency.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Link: https://patch.msgid.link/20250309003301.1152228-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml
Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
Documentation/devicetree/bindings/net/stm32-dwmac.yaml
Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml

index 798a4c19f18cf9c005293095ecfb0729e2b85d91..0cd78d71768c1e22e4ceb06cc147e600e010269c 100644 (file)
@@ -152,6 +152,12 @@ properties:
           The second range is is for the Amlogic specific configuration
           (for example the PRG_ETHERNET register range on Meson8b and newer)
 
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    const: macirq
+
 required:
   - compatible
   - reg
index 42a0bc94312c3cb25acf36fe397403d055b61483..62c1da36a2b5a29290e5e01be87c48158c4adf89 100644 (file)
@@ -41,6 +41,12 @@ properties:
       - const: ptp_ref
       - const: tx_clk
 
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    const: macirq
+
 required:
   - compatible
   - clocks
index ed9d845f600804964e0000dd4354898673fafe08..3aab21b8e8de5bb71e2e4ef307120deeb7b24a6f 100644 (file)
@@ -64,6 +64,12 @@ properties:
       - const: rmii_internal
       - const: mac_cg
 
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    const: macirq
+
   power-domains:
     maxItems: 1
 
index 87bc4416eadf212289c1724813383073b825a226..e5db346beca9649be4f97727b78fda8973095912 100644 (file)
@@ -56,6 +56,14 @@ properties:
         - tx
         - mem
 
+  interrupts:
+    maxItems: 2
+
+  interrupt-names:
+    items:
+      - const: macirq
+      - const: eth_wake_irq
+
   intf_mode:
     $ref: /schemas/types.yaml#/definitions/phandle-array
     items:
index 8dd870f0214dbf5ed9eb5aace044a8c6ecfcf3ba..63ee0cc7a8f890a932a07c49fa1b7307ebaf3ebc 100644 (file)
@@ -55,6 +55,16 @@ properties:
               - rockchip,rv1126-gmac
           - const: snps,dwmac-4.20a
 
+  interrupts:
+    minItems: 1
+    maxItems: 2
+
+  interrupt-names:
+    minItems: 1
+    items:
+      - const: macirq
+      - const: eth_wake_irq
+
   clocks:
     minItems: 5
     maxItems: 8
index 85cea9966a27e9a401a8724e32e577a3f48f1076..987254900d0da7aab81237f20b1540ad8a17bd21 100644 (file)
@@ -54,6 +54,16 @@ properties:
     items:
       - const: stmmaceth
 
+  interrupts:
+    minItems: 1
+    maxItems: 2
+
+  interrupt-names:
+    minItems: 1
+    items:
+      - const: macirq
+      - const: eth_wake_irq
+
   clocks:
     minItems: 3
     items:
index 052f636158b3f16087c83b90ad7132d6712c4c42..f0f32e18fc8550e6f63b87b60a095972453836c9 100644 (file)
@@ -42,6 +42,12 @@ properties:
       - const: stmmaceth
       - const: phy_ref_clk
 
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    const: macirq
+
 required:
   - compatible
   - reg