Skip to content

Commit

Permalink
dt-bindings: net: Define interrupt constraints for DWMAC vendor bindings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lad Prabhakar authored and Paolo Abeni committed Mar 13, 2025
1 parent d28fcb7 commit 5a1dddd
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ properties:
- const: ptp_ref
- const: tx_clk

interrupts:
maxItems: 1

interrupt-names:
const: macirq

required:
- compatible
- clocks
Expand Down
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ properties:
- const: rmii_internal
- const: mac_cg

interrupts:
maxItems: 1

interrupt-names:
const: macirq

power-domains:
maxItems: 1

Expand Down
8 changes: 8 additions & 0 deletions Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions Documentation/devicetree/bindings/net/stm32-dwmac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ properties:
- const: stmmaceth
- const: phy_ref_clk

interrupts:
maxItems: 1

interrupt-names:
const: macirq

required:
- compatible
- reg
Expand Down

0 comments on commit 5a1dddd

Please sign in to comment.