Message ID | 20250309003301.1152228-1-prabhakar.mahadev-lad.rj@bp.renesas.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [net-next] dt-bindings: net: Define interrupt constraints for DWMAC vendor bindings | expand |
On Sun, 09 Mar 2025 00:33:01 +0000, Prabhakar wrote: > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > 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> > --- > Hi All, > > Based on recent patch [0] which increases the interrupts to 11 > and adds `additionalItems: true` its good to have constraints > to validate the schema. Ive made the changes based on the DT > binding doc and the users. Ive ran dt binding checks to ensure > the constraints are valid. Please let me know if you'd like me > to split this patch or if any of the constraints are incorrect, > as I don't have documentation for all of these platforms. > > https://lore.kernel.org/all/20250308200921.1089980-2-prabhakar.mahadev-lad.rj@bp.renesas.com/ > > Cheers, Prabhakar > --- > .../devicetree/bindings/net/amlogic,meson-dwmac.yaml | 6 ++++++ > .../devicetree/bindings/net/intel,dwmac-plat.yaml | 6 ++++++ > .../devicetree/bindings/net/mediatek-dwmac.yaml | 6 ++++++ > .../devicetree/bindings/net/nxp,dwmac-imx.yaml | 8 ++++++++ > .../devicetree/bindings/net/rockchip-dwmac.yaml | 10 ++++++++++ > Documentation/devicetree/bindings/net/stm32-dwmac.yaml | 10 ++++++++++ > .../bindings/net/toshiba,visconti-dwmac.yaml | 6 ++++++ > 7 files changed, 52 insertions(+) > Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Hi, > -----Original Message----- > From: Prabhakar <prabhakar.csengg@gmail.com> > Sent: Sunday, March 9, 2025 9:33 AM > To: Andrew Lunn <andrew+netdev@lunn.ch>; David S. Miller > <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub > Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Rob Herring > <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley > <conor+dt@kernel.org>; Neil Armstrong <neil.armstrong@linaro.org>; Kevin > Hilman <khilman@baylibre.com>; Jerome Brunet <jbrunet@baylibre.com>; > Martin Blumenstingl <martin.blumenstingl@googlemail.com>; Shawn Guo > <shawnguo@kernel.org>; Sascha Hauer <s.hauer@pengutronix.de>; > Pengutronix Kernel Team <kernel@pengutronix.de>; Fabio Estevam > <festevam@gmail.com>; Heiko Stuebner <heiko@sntech.de>; Maxime > Coquelin <mcoquelin.stm32@gmail.com>; Alexandre Torgue > <alexandre.torgue@foss.st.com>; iwamatsu nobuhiro(岩松 信洋 ○DITC > □DIT○OST) <nobuhiro1.iwamatsu@toshiba.co.jp>; Matthias Brugger > <matthias.bgg@gmail.com>; AngeloGioacchino Del Regno > <angelogioacchino.delregno@collabora.com>; G. Jaya Kumaran > <vineetha.g.jaya.kumaran@intel.com>; Biao Huang > <biao.huang@mediatek.com>; Clark Wang <xiaoning.wang@nxp.com>; Linux > Team <linux-imx@nxp.com>; David Wu <david.wu@rock-chips.com>; > Christophe Roullier <christophe.roullier@foss.st.com>; Russell King (Oracle) > <rmk+kernel@armlinux.org.uk>; netdev@vger.kernel.org > Cc: devicetree@vger.kernel.org; linux-amlogic@lists.infradead.org; > linux-kernel@vger.kernel.org; imx@lists.linux.dev; > linux-rockchip@lists.infradead.org; > linux-stm32@st-md-mailman.stormreply.com; > linux-mediatek@lists.infradead.org; Prabhakar > <prabhakar.csengg@gmail.com>; Lad Prabhakar > <prabhakar.mahadev-lad.rj@bp.renesas.com> > Subject: [PATCH net-next] dt-bindings: net: Define interrupt constraints for > DWMAC vendor bindings > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > 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> > --- > Hi All, > > Based on recent patch [0] which increases the interrupts to 11 and adds > `additionalItems: true` its good to have constraints to validate the schema. Ive > made the changes based on the DT binding doc and the users. Ive ran dt > binding checks to ensure the constraints are valid. Please let me know if you'd > like me to split this patch or if any of the constraints are incorrect, as I don't > have documentation for all of these platforms. > > https://lore.kernel.org/all/20250308200921.1089980-2-prabhakar.mahadev-la > d.rj@bp.renesas.com/ > > Cheers, Prabhakar > --- > .../bindings/net/toshiba,visconti-dwmac.yaml | 6 ++++++ Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp> Best regards, Nobuhiro
diff --git a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml index 798a4c19f18c..0cd78d71768c 100644 --- a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml @@ -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 diff --git a/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml b/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml index 42a0bc94312c..62c1da36a2b5 100644 --- a/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml +++ b/Documentation/devicetree/bindings/net/intel,dwmac-plat.yaml @@ -41,6 +41,12 @@ properties: - const: ptp_ref - const: tx_clk + interrupts: + maxItems: 1 + + interrupt-names: + const: macirq + required: - compatible - clocks diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml index ed9d845f6008..3aab21b8e8de 100644 --- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml @@ -64,6 +64,12 @@ properties: - const: rmii_internal - const: mac_cg + interrupts: + maxItems: 1 + + interrupt-names: + const: macirq + power-domains: maxItems: 1 diff --git a/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml b/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml index 87bc4416eadf..e5db346beca9 100644 --- a/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml +++ b/Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml @@ -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: diff --git a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml index f8a576611d6c..891396140a7f 100644 --- a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml @@ -58,6 +58,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 diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml index 85cea9966a27..987254900d0d 100644 --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml @@ -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: diff --git a/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml b/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml index 052f636158b3..f0f32e18fc85 100644 --- a/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml @@ -42,6 +42,12 @@ properties: - const: stmmaceth - const: phy_ref_clk + interrupts: + maxItems: 1 + + interrupt-names: + const: macirq + required: - compatible - reg