* [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers
@ 2025-12-14 22:15 Jan Petrous via B4 Relay
2025-12-14 22:15 ` [PATCH RFC 1/4] net: stmmac: platform: read channels irq Jan Petrous via B4 Relay
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Jan Petrous via B4 Relay @ 2025-12-14 22:15 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin,
Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team,
Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx,
devicetree, Jan Petrous (OSS)
The stmmac core supports two interrupt modes, controlled by the
flag STMMAC_FLAG_MULTI_MSI_EN.
- When the flag is set, the driver uses multi-channel IRQ mode (multi-IRQ).
- Otherwise, a single IRQ line is requested:
static int stmmac_request_irq(struct net_device *dev)
{
/* Request the IRQ lines */
if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN)
ret = stmmac_request_irq_multi_msi(dev);
else
ret = stmmac_request_irq_single(dev);
}
At present, only PCI drivers (Intel and Loongson) make use of the multi-IRQ
mode. This concept can be extended to DT-based embedded glue drivers
(dwmac-xxx.c).
This series adds support for reading per-channel IRQs from the DT node and
reuses the existing STMMAC_FLAG_MULTI_MSI_EN flag to enable multi-IRQ
operation in platform drivers.
NXP S32G2/S32G3/S32R SoCs integrate the DWMAC IP with multi-channel
interrupt support. The dwmac-s32.c driver change is provided as an example of
enabling multi-IRQ mode for non-PCI drivers.
An open question remains: should platform drivers support both single-IRQ
and multi-IRQ modes, or should multi-IRQ be required with the DT node
specifying all channel interrupts? The current RFC implementation follows
the latter approach — dwmac-s32 requires IRQs to be defined for all
channels.
So, when the glue driver has set the flag, but the corresponding DT node
has not expanded 'interrupts' property accordingly, the driver init
fails with the following error:
[4.925420] s32-dwmac 4033c000.ethernet eth0: stmmac_request_irq_multi_msi: alloc rx-0 MSI -6 (error: -22)
When correctly set, the assigned IRQs can be visible
in /proc/interrupts:
root@s32g399aevb3:~# grep eth /proc/interrupts
29: 0 0 0 0 0 0 0 0 GICv3 89 Level eth0:mac
30: 0 0 0 0 0 0 0 0 GICv3 91 Level eth0:rx-0
31: 0 0 0 0 0 0 0 0 GICv3 93 Level eth0:rx-1
32: 0 0 0 0 0 0 0 0 GICv3 95 Level eth0:rx-2
33: 0 0 0 0 0 0 0 0 GICv3 97 Level eth0:rx-3
34: 0 0 0 0 0 0 0 0 GICv3 99 Level eth0:rx-4
35: 0 0 0 0 0 0 0 0 GICv3 90 Level eth0:tx-0
36: 0 0 0 0 0 0 0 0 GICv3 92 Level eth0:tx-1
37: 0 0 0 0 0 0 0 0 GICv3 94 Level eth0:tx-2
38: 0 0 0 0 0 0 0 0 GICv3 96 Level eth0:tx-3
39: 0 0 0 0 0 0 0 0 GICv3 98 Level eth0:tx-4
Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com>
---
Jan Petrous (OSS) (4):
net: stmmac: platform: read channels irq
dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts
arm64: dts: s32: set Ethernet channel irqs
stmmac: s32: enable multi irqs mode
.../devicetree/bindings/net/nxp,s32-dwmac.yaml | 40 +++++++++++++++++++---
arch/arm64/boot/dts/freescale/s32g2.dtsi | 24 +++++++++++--
arch/arm64/boot/dts/freescale/s32g3.dtsi | 24 +++++++++++--
drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c | 3 +-
.../net/ethernet/stmicro/stmmac/stmmac_platform.c | 38 +++++++++++++++++++-
5 files changed, 119 insertions(+), 10 deletions(-)
---
base-commit: cb015814f8b6eebcbb8e46e111d108892c5e6821
change-id: 20251209-dwmac_multi_irq-9d8f60462cc1
Best regards,
--
Jan Petrous (OSS) <jan.petrous@oss.nxp.com>
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH RFC 1/4] net: stmmac: platform: read channels irq 2025-12-14 22:15 [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay @ 2025-12-14 22:15 ` Jan Petrous via B4 Relay 2025-12-14 22:30 ` Andrew Lunn 2025-12-14 22:15 ` [PATCH RFC 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts Jan Petrous via B4 Relay ` (3 subsequent siblings) 4 siblings, 1 reply; 12+ messages in thread From: Jan Petrous via B4 Relay @ 2025-12-14 22:15 UTC (permalink / raw) To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree, Jan Petrous (OSS) From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com> Read IRQ resources for all channels, to allow multi IRQ mode for platform glue drivers. Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> --- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 38 +++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 8979a50b5507..29e40253bdfe 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -700,6 +700,9 @@ EXPORT_SYMBOL_GPL(stmmac_pltfr_find_clk); int stmmac_get_platform_resources(struct platform_device *pdev, struct stmmac_resources *stmmac_res) { + int i; + char name[8]; + memset(stmmac_res, 0, sizeof(*stmmac_res)); /* Get IRQ information early to have an ability to ask for deferred @@ -743,7 +746,40 @@ int stmmac_get_platform_resources(struct platform_device *pdev, stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0); - return PTR_ERR_OR_ZERO(stmmac_res->addr); + if (IS_ERR(stmmac_res->addr)) + return PTR_ERR(stmmac_res->addr); + + /* RX channels irq */ + for (i = 0; i < MTL_MAX_RX_QUEUES; i++) { + scnprintf(name, 8, "rx-queue-%d", i); + stmmac_res->rx_irq[i] = platform_get_irq_byname_optional(pdev, + name); + if (stmmac_res->rx_irq[i] < 0) { + if (stmmac_res->rx_irq[i] == -EPROBE_DEFER) + return -EPROBE_DEFER; + dev_dbg(&pdev->dev, "IRQ rx-queue-%d not found\n", i); + + /* Stop on first unset rx-queue-%i property member */ + break; + } + } + + /* TX channels irq */ + for (i = 0; i < MTL_MAX_TX_QUEUES; i++) { + scnprintf(name, 8, "tx-queue-%d", i); + stmmac_res->tx_irq[i] = platform_get_irq_byname_optional(pdev, + name); + if (stmmac_res->tx_irq[i] < 0) { + if (stmmac_res->tx_irq[i] == -EPROBE_DEFER) + return -EPROBE_DEFER; + dev_dbg(&pdev->dev, "IRQ tx-queue-%d not found\n", i); + + /* Stop on first unset tx-queue-%i property member */ + break; + } + } + + return 0; } EXPORT_SYMBOL_GPL(stmmac_get_platform_resources); -- 2.47.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 1/4] net: stmmac: platform: read channels irq 2025-12-14 22:15 ` [PATCH RFC 1/4] net: stmmac: platform: read channels irq Jan Petrous via B4 Relay @ 2025-12-14 22:30 ` Andrew Lunn 2026-01-21 7:44 ` Jan Petrous 0 siblings, 1 reply; 12+ messages in thread From: Andrew Lunn @ 2025-12-14 22:30 UTC (permalink / raw) To: jan.petrous Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree On Sun, Dec 14, 2025 at 11:15:37PM +0100, Jan Petrous via B4 Relay wrote: > From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com> > > Read IRQ resources for all channels, to allow multi IRQ mode > for platform glue drivers. > > Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> > --- > .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 38 +++++++++++++++++++++- > 1 file changed, 37 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > index 8979a50b5507..29e40253bdfe 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > @@ -700,6 +700,9 @@ EXPORT_SYMBOL_GPL(stmmac_pltfr_find_clk); > int stmmac_get_platform_resources(struct platform_device *pdev, > struct stmmac_resources *stmmac_res) > { > + int i; > + char name[8]; Reverse Christmas tree please. > memset(stmmac_res, 0, sizeof(*stmmac_res)); > > /* Get IRQ information early to have an ability to ask for deferred > @@ -743,7 +746,40 @@ int stmmac_get_platform_resources(struct platform_device *pdev, > > stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0); > > - return PTR_ERR_OR_ZERO(stmmac_res->addr); > + if (IS_ERR(stmmac_res->addr)) > + return PTR_ERR(stmmac_res->addr); > + > + /* RX channels irq */ > + for (i = 0; i < MTL_MAX_RX_QUEUES; i++) { > + scnprintf(name, 8, "rx-queue-%d", i); It would be better to use sizeof(name), not 8. Also, 'rx-queue-' is 9 characters. So i don't see how this can actually work? Andrew ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 1/4] net: stmmac: platform: read channels irq 2025-12-14 22:30 ` Andrew Lunn @ 2026-01-21 7:44 ` Jan Petrous 0 siblings, 0 replies; 12+ messages in thread From: Jan Petrous @ 2026-01-21 7:44 UTC (permalink / raw) To: Andrew Lunn Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree On Sun, Dec 14, 2025 at 11:30:43PM +0100, Andrew Lunn wrote: > On Sun, Dec 14, 2025 at 11:15:37PM +0100, Jan Petrous via B4 Relay wrote: > > From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com> > > > > Read IRQ resources for all channels, to allow multi IRQ mode > > for platform glue drivers. > > > > Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> > > --- > > .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 38 +++++++++++++++++++++- > > 1 file changed, 37 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > > index 8979a50b5507..29e40253bdfe 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > > @@ -700,6 +700,9 @@ EXPORT_SYMBOL_GPL(stmmac_pltfr_find_clk); > > int stmmac_get_platform_resources(struct platform_device *pdev, > > struct stmmac_resources *stmmac_res) > > { > > + int i; > > + char name[8]; > > Reverse Christmas tree please. > Fixed in v2. > > memset(stmmac_res, 0, sizeof(*stmmac_res)); > > > > /* Get IRQ information early to have an ability to ask for deferred > > @@ -743,7 +746,40 @@ int stmmac_get_platform_resources(struct platform_device *pdev, > > > > stmmac_res->addr = devm_platform_ioremap_resource(pdev, 0); > > > > - return PTR_ERR_OR_ZERO(stmmac_res->addr); > > + if (IS_ERR(stmmac_res->addr)) > > + return PTR_ERR(stmmac_res->addr); > > + > > + /* RX channels irq */ > > + for (i = 0; i < MTL_MAX_RX_QUEUES; i++) { > > + scnprintf(name, 8, "rx-queue-%d", i); > > It would be better to use sizeof(name), not 8. > > Also, 'rx-queue-' is 9 characters. So i don't see how this can > actually work? > That is true. My fault, I accidentally pushed incorrect version. Fixed in v2. Thanks. /Jan ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH RFC 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts 2025-12-14 22:15 [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay 2025-12-14 22:15 ` [PATCH RFC 1/4] net: stmmac: platform: read channels irq Jan Petrous via B4 Relay @ 2025-12-14 22:15 ` Jan Petrous via B4 Relay 2025-12-15 18:09 ` Rob Herring (Arm) 2025-12-14 22:15 ` [PATCH RFC 3/4] arm64: dts: s32: set Ethernet channel irqs Jan Petrous via B4 Relay ` (2 subsequent siblings) 4 siblings, 1 reply; 12+ messages in thread From: Jan Petrous via B4 Relay @ 2025-12-14 22:15 UTC (permalink / raw) To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree, Jan Petrous (OSS) From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com> The DWMAC IP on supported SoCs has connected queue-based IRQ lines. Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> --- .../devicetree/bindings/net/nxp,s32-dwmac.yaml | 40 +++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml index 2b8b74c5feec..b5e42fa49110 100644 --- a/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml @@ -33,10 +33,22 @@ properties: - description: GMAC PHY mode control register interrupts: - maxItems: 1 + minItems: 11 + maxItems: 11 interrupt-names: - const: macirq + - items: + - const: macirq + - const: rx-queue-0 + - const: tx-queue-0 + - const: rx-queue-1 + - const: tx-queue-1 + - const: rx-queue-2 + - const: tx-queue-2 + - const: rx-queue-3 + - const: tx-queue-3 + - const: rx-queue-4 + - const: tx-queue-4 clocks: items: @@ -75,8 +87,28 @@ examples: reg = <0x0 0x4033c000 0x0 0x2000>, /* gmac IP */ <0x0 0x4007c004 0x0 0x4>; /* GMAC_0_CTRL_STS */ interrupt-parent = <&gic>; - interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "macirq"; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 0: tx, rx */ + <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 1: tx, rx */ + <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 2: tx, rx */ + <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 3: tx, rx */ + <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 4: tx, rx */ + <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq", + "tx-queue-0", "rx-queue-0", + "tx-queue-1", "rx-queue-1", + "tx-queue-2", "rx-queue-2", + "tx-queue-3", "rx-queue-3", + "tx-queue-4", "rx-queue-4", snps,mtl-rx-config = <&mtl_rx_setup>; snps,mtl-tx-config = <&mtl_tx_setup>; clocks = <&clks 24>, <&clks 17>, <&clks 16>, <&clks 15>; -- 2.47.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts 2025-12-14 22:15 ` [PATCH RFC 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts Jan Petrous via B4 Relay @ 2025-12-15 18:09 ` Rob Herring (Arm) 2026-01-21 8:15 ` Jan Petrous 0 siblings, 1 reply; 12+ messages in thread From: Rob Herring (Arm) @ 2025-12-15 18:09 UTC (permalink / raw) To: Jan Petrous (OSS) Cc: Chester Lin, Matthias Brugger, Alexandre Torgue, linux-arm-kernel, Shawn Guo, Paolo Abeni, David S. Miller, linux-kernel, NXP S32 Linux Team, Pengutronix Kernel Team, linux-stm32, Maxime Coquelin, netdev, Eric Dumazet, devicetree, Sascha Hauer, Fabio Estevam, Andrew Lunn, Jakub Kicinski, Krzysztof Kozlowski, imx, Ghennadi Procopciuc, Conor Dooley On Sun, 14 Dec 2025 23:15:38 +0100, Jan Petrous (OSS) wrote: > The DWMAC IP on supported SoCs has connected queue-based IRQ lines. > > Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> > --- > .../devicetree/bindings/net/nxp,s32-dwmac.yaml | 40 +++++++++++++++++++--- > 1 file changed, 36 insertions(+), 4 deletions(-) > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: ignoring, error in schema: properties: interrupt-names /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' from schema $id: http://devicetree.org/meta-schemas/keywords.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' Traceback (most recent call last): File "/usr/local/bin/dt-doc-validate", line 8, in <module> sys.exit(main()) ~~~~^^ File "/usr/local/lib/python3.13/dist-packages/dtschema/doc_validate.py", line 66, in main ret |= check_doc(f) ~~~~~~~~~^^^ File "/usr/local/lib/python3.13/dist-packages/dtschema/doc_validate.py", line 37, in check_doc dtsch.check_schema_refs() ~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 241, in check_schema_refs self._check_schema_refs(resolver, self) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 212, in _check_schema_refs self._check_schema_refs(resolver, v, parent=k, is_common=is_common, ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ has_constraint=has_constraint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 216, in _check_schema_refs self._check_schema_refs(resolver, schema[i], parent=parent, is_common=is_common, ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ has_constraint=has_constraint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 203, in _check_schema_refs ref_sch = resolver.lookup(schema['$ref']).contents ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 682, in lookup retrieved = self._registry.get_or_retrieve(uri) File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 422, in get_or_retrieve registry = self.crawl() File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 500, in crawl id = resource.id() File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 231, in id id = self._specification.id_of(self.contents) File "/usr/local/lib/python3.13/dist-packages/referencing/jsonschema.py", line 50, in _dollar_id return contents.get("$id") ^^^^^^^^^^^^ AttributeError: 'list' object has no attribute 'get' Lexical error: Documentation/devicetree/bindings/net/nxp,s32-dwmac.example.dts:58.13-17 Unexpected 'snps' Error: Documentation/devicetree/bindings/net/nxp,s32-dwmac.example.dts:58.13-17 syntax error FATAL ERROR: Unable to parse input tree make[2]: *** [scripts/Makefile.dtbs:141: Documentation/devicetree/bindings/net/nxp,s32-dwmac.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1559: dt_binding_check] Error 2 make: *** [Makefile:248: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.kernel.org/project/devicetree/patch/20251214-dwmac_multi_irq-v1-2-36562ab0e9f7@oss.nxp.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts 2025-12-15 18:09 ` Rob Herring (Arm) @ 2026-01-21 8:15 ` Jan Petrous 0 siblings, 0 replies; 12+ messages in thread From: Jan Petrous @ 2026-01-21 8:15 UTC (permalink / raw) To: Rob Herring (Arm) Cc: Chester Lin, Matthias Brugger, Alexandre Torgue, linux-arm-kernel, Shawn Guo, Paolo Abeni, David S. Miller, linux-kernel, NXP S32 Linux Team, Pengutronix Kernel Team, linux-stm32, Maxime Coquelin, netdev, Eric Dumazet, devicetree, Sascha Hauer, Fabio Estevam, Andrew Lunn, Jakub Kicinski, Krzysztof Kozlowski, imx, Ghennadi Procopciuc, Conor Dooley On Mon, Dec 15, 2025 at 12:09:39PM -0600, Rob Herring (Arm) wrote: > > On Sun, 14 Dec 2025 23:15:38 +0100, Jan Petrous (OSS) wrote: > > The DWMAC IP on supported SoCs has connected queue-based IRQ lines. > > > > Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> > > --- > > .../devicetree/bindings/net/nxp,s32-dwmac.yaml | 40 +++++++++++++++++++--- > > 1 file changed, 36 insertions(+), 4 deletions(-) > > > > My bot found errors running 'make dt_binding_check' on your patch: > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: ignoring, error in schema: properties: interrupt-names > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' > from schema $id: http://devicetree.org/meta-schemas/keywords.yaml > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml: properties:interrupt-names: [{'items': [{'const': 'macirq'}, {'const': 'rx-queue-0'}, {'const': 'tx-queue-0'}, {'const': 'rx-queue-1'}, {'const': 'tx-queue-1'}, {'const': 'rx-queue-2'}, {'const': 'tx-queue-2'}, {'const': 'rx-queue-3'}, {'const': 'tx-queue-3'}, {'const': 'rx-queue-4'}, {'const': 'tx-queue-4'}]}] is not of type 'object', 'boolean' > Traceback (most recent call last): > File "/usr/local/bin/dt-doc-validate", line 8, in <module> > sys.exit(main()) > ~~~~^^ > File "/usr/local/lib/python3.13/dist-packages/dtschema/doc_validate.py", line 66, in main > ret |= check_doc(f) > ~~~~~~~~~^^^ > File "/usr/local/lib/python3.13/dist-packages/dtschema/doc_validate.py", line 37, in check_doc > dtsch.check_schema_refs() > ~~~~~~~~~~~~~~~~~~~~~~~^^ > File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 241, in check_schema_refs > self._check_schema_refs(resolver, self) > ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ > File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 212, in _check_schema_refs > self._check_schema_refs(resolver, v, parent=k, is_common=is_common, > ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > has_constraint=has_constraint) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 216, in _check_schema_refs > self._check_schema_refs(resolver, schema[i], parent=parent, is_common=is_common, > ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > has_constraint=has_constraint) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "/usr/local/lib/python3.13/dist-packages/dtschema/schema.py", line 203, in _check_schema_refs > ref_sch = resolver.lookup(schema['$ref']).contents > ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^ > File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 682, in lookup > retrieved = self._registry.get_or_retrieve(uri) > File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 422, in get_or_retrieve > registry = self.crawl() > File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 500, in crawl > id = resource.id() > File "/usr/local/lib/python3.13/dist-packages/referencing/_core.py", line 231, in id > id = self._specification.id_of(self.contents) > File "/usr/local/lib/python3.13/dist-packages/referencing/jsonschema.py", line 50, in _dollar_id > return contents.get("$id") > ^^^^^^^^^^^^ > AttributeError: 'list' object has no attribute 'get' > Lexical error: Documentation/devicetree/bindings/net/nxp,s32-dwmac.example.dts:58.13-17 Unexpected 'snps' > Error: Documentation/devicetree/bindings/net/nxp,s32-dwmac.example.dts:58.13-17 syntax error > FATAL ERROR: Unable to parse input tree > make[2]: *** [scripts/Makefile.dtbs:141: Documentation/devicetree/bindings/net/nxp,s32-dwmac.example.dtb] Error 1 > make[2]: *** Waiting for unfinished jobs.... > make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1559: dt_binding_check] Error 2 > make: *** [Makefile:248: __sub-make] Error 2 > > doc reference errors (make refcheckdocs): > > See https://patchwork.kernel.org/project/devicetree/patch/20251214-dwmac_multi_irq-v1-2-36562ab0e9f7@oss.nxp.com > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema. > It was missing closing semicolon in the example. Thanks for catch. Fixed in v2. /Jan ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH RFC 3/4] arm64: dts: s32: set Ethernet channel irqs 2025-12-14 22:15 [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay 2025-12-14 22:15 ` [PATCH RFC 1/4] net: stmmac: platform: read channels irq Jan Petrous via B4 Relay 2025-12-14 22:15 ` [PATCH RFC 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts Jan Petrous via B4 Relay @ 2025-12-14 22:15 ` Jan Petrous via B4 Relay 2025-12-14 22:15 ` [PATCH RFC 4/4] stmmac: s32: enable multi irqs mode Jan Petrous via B4 Relay 2025-12-14 22:33 ` [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Andrew Lunn 4 siblings, 0 replies; 12+ messages in thread From: Jan Petrous via B4 Relay @ 2025-12-14 22:15 UTC (permalink / raw) To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree, Jan Petrous (OSS) From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com> The GMAC Ethernet controller found on S32G2/S32G3 and S32R45 contains up to 5 RX and 5 TX channels. It can operate in two interrupt modes: 1) Sharing irq mode: only one irq line is used for all channels. 2) Multiple irq mode: every channel uses two irq lines, one for RX and second for TX. Specify all irq twins for all channels. Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> --- arch/arm64/boot/dts/freescale/s32g2.dtsi | 24 ++++++++++++++++++++++-- arch/arm64/boot/dts/freescale/s32g3.dtsi | 24 ++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts/freescale/s32g2.dtsi index 51d00dac12de..ea615fc5ccd9 100644 --- a/arch/arm64/boot/dts/freescale/s32g2.dtsi +++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi @@ -732,8 +732,28 @@ gmac0: ethernet@4033c000 { reg = <0x4033c000 0x2000>, /* gmac IP */ <0x4007c004 0x4>; /* GMAC_0_CTRL_STS */ interrupt-parent = <&gic>; - interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "macirq"; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 0: tx, rx */ + <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 1: tx, rx */ + <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 2: tx, rx */ + <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 3: tx, rx */ + <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 4: tx, rx */ + <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq", + "tx-queue-0", "rx-queue-0", + "tx-queue-1", "rx-queue-1", + "tx-queue-2", "rx-queue-2", + "tx-queue-3", "rx-queue-3", + "tx-queue-4", "rx-queue-4"; snps,mtl-rx-config = <&mtl_rx_setup>; snps,mtl-tx-config = <&mtl_tx_setup>; status = "disabled"; diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi index eff7673e7f34..ecbec49c7344 100644 --- a/arch/arm64/boot/dts/freescale/s32g3.dtsi +++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi @@ -809,8 +809,28 @@ gmac0: ethernet@4033c000 { reg = <0x4033c000 0x2000>, /* gmac IP */ <0x4007c004 0x4>; /* GMAC_0_CTRL_STS */ interrupt-parent = <&gic>; - interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "macirq"; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 0: tx, rx */ + <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 1: tx, rx */ + <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 2: tx, rx */ + <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 3: tx, rx */ + <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, + /* CHN 4: tx, rx */ + <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq", + "tx-queue-0", "rx-queue-0", + "tx-queue-1", "rx-queue-1", + "tx-queue-2", "rx-queue-2", + "tx-queue-3", "rx-queue-3", + "tx-queue-4", "rx-queue-4"; snps,mtl-rx-config = <&mtl_rx_setup>; snps,mtl-tx-config = <&mtl_tx_setup>; status = "disabled"; -- 2.47.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH RFC 4/4] stmmac: s32: enable multi irqs mode 2025-12-14 22:15 [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay ` (2 preceding siblings ...) 2025-12-14 22:15 ` [PATCH RFC 3/4] arm64: dts: s32: set Ethernet channel irqs Jan Petrous via B4 Relay @ 2025-12-14 22:15 ` Jan Petrous via B4 Relay 2025-12-14 22:37 ` Andrew Lunn 2025-12-14 22:33 ` [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Andrew Lunn 4 siblings, 1 reply; 12+ messages in thread From: Jan Petrous via B4 Relay @ 2025-12-14 22:15 UTC (permalink / raw) To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree, Jan Petrous (OSS) From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com> Signalize support for multi irq mode. From now, if yoused old DT node, without channel IRQs set, the driver fails to init with the following error: [4.925420] s32-dwmac 4033c000.ethernet eth0: stmmac_request_irq_multi_msi: alloc rx-0 MSI -6 (error: -22) Signed-off-by: Jan Petrous (OSS) <jan.petrous@oss.nxp.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c index 5a485ee98fa7..284e2067a00b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c @@ -2,7 +2,7 @@ /* * NXP S32G/R GMAC glue layer * - * Copyright 2019-2024 NXP + * Copyright 2019-2025 NXP * */ @@ -149,6 +149,7 @@ static int s32_dwmac_probe(struct platform_device *pdev) plat->core_type = DWMAC_CORE_GMAC4; plat->pmt = 1; plat->flags |= STMMAC_FLAG_SPH_DISABLE; + plat->flags |= STMMAC_FLAG_MULTI_MSI_EN; plat->rx_fifo_size = 20480; plat->tx_fifo_size = 20480; -- 2.47.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 4/4] stmmac: s32: enable multi irqs mode 2025-12-14 22:15 ` [PATCH RFC 4/4] stmmac: s32: enable multi irqs mode Jan Petrous via B4 Relay @ 2025-12-14 22:37 ` Andrew Lunn 2025-12-15 14:21 ` Jan Petrous 0 siblings, 1 reply; 12+ messages in thread From: Andrew Lunn @ 2025-12-14 22:37 UTC (permalink / raw) To: jan.petrous Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree On Sun, Dec 14, 2025 at 11:15:40PM +0100, Jan Petrous via B4 Relay wrote: > From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com> > > Signalize support for multi irq mode. > > >From now, if yoused old DT node, without channel IRQs set, > the driver fails to init with the following error: > > [4.925420] s32-dwmac 4033c000.ethernet eth0: stmmac_request_irq_multi_msi: alloc rx-0 MSI -6 (error: -22) Sorry, but that is not acceptable. You cannot break old DT blobs. Please reverse the logic. If you find all the needed properties in DT enable STMMAC_FLAG_MULTI_MSI_EN. If none of the properties are there, continue using one interrupt, and if only some of the needed properties are there but some are missing, then you can error out with EINVAL, because the DT blob is invalid. Andrew ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 4/4] stmmac: s32: enable multi irqs mode 2025-12-14 22:37 ` Andrew Lunn @ 2025-12-15 14:21 ` Jan Petrous 0 siblings, 0 replies; 12+ messages in thread From: Jan Petrous @ 2025-12-15 14:21 UTC (permalink / raw) To: Andrew Lunn Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree On Sun, Dec 14, 2025 at 11:37:51PM +0100, Andrew Lunn wrote: > On Sun, Dec 14, 2025 at 11:15:40PM +0100, Jan Petrous via B4 Relay wrote: > > From: "Jan Petrous (OSS)" <jan.petrous@oss.nxp.com> > > > > Signalize support for multi irq mode. > > > > >From now, if yoused old DT node, without channel IRQs set, > > the driver fails to init with the following error: > > > > [4.925420] s32-dwmac 4033c000.ethernet eth0: stmmac_request_irq_multi_msi: alloc rx-0 MSI -6 (error: -22) > > Sorry, but that is not acceptable. You cannot break old DT blobs. > > Please reverse the logic. If you find all the needed properties in DT > enable STMMAC_FLAG_MULTI_MSI_EN. If none of the properties are there, > continue using one interrupt, and if only some of the needed > properties are there but some are missing, then you can error out with > EINVAL, because the DT blob is invalid. > Yeh, that was the main reason of marking it as RFC, I was not sure if I can break old DT blobs or not. Thanks for answer. I will change the procedure to stay backward compatible. /Jan ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers 2025-12-14 22:15 [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay ` (3 preceding siblings ...) 2025-12-14 22:15 ` [PATCH RFC 4/4] stmmac: s32: enable multi irqs mode Jan Petrous via B4 Relay @ 2025-12-14 22:33 ` Andrew Lunn 4 siblings, 0 replies; 12+ messages in thread From: Andrew Lunn @ 2025-12-14 22:33 UTC (permalink / raw) To: jan.petrous Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Chester Lin, Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, netdev, linux-stm32, linux-arm-kernel, linux-kernel, imx, devicetree On Sun, Dec 14, 2025 at 11:15:36PM +0100, Jan Petrous via B4 Relay wrote: > The stmmac core supports two interrupt modes, controlled by the > flag STMMAC_FLAG_MULTI_MSI_EN. > - When the flag is set, the driver uses multi-channel IRQ mode (multi-IRQ). > - Otherwise, a single IRQ line is requested: > > static int stmmac_request_irq(struct net_device *dev) > { > /* Request the IRQ lines */ > if (priv->plat->flags & STMMAC_FLAG_MULTI_MSI_EN) > ret = stmmac_request_irq_multi_msi(dev); > else > ret = stmmac_request_irq_single(dev); > } > > At present, only PCI drivers (Intel and Loongson) make use of the multi-IRQ > mode. This concept can be extended to DT-based embedded glue drivers > (dwmac-xxx.c). > > This series adds support for reading per-channel IRQs from the DT node and > reuses the existing STMMAC_FLAG_MULTI_MSI_EN flag to enable multi-IRQ > operation in platform drivers. > > NXP S32G2/S32G3/S32R SoCs integrate the DWMAC IP with multi-channel > interrupt support. The dwmac-s32.c driver change is provided as an example of > enabling multi-IRQ mode for non-PCI drivers. > > An open question remains: should platform drivers support both single-IRQ > and multi-IRQ modes, or should multi-IRQ be required with the DT node > specifying all channel interrupts? The current RFC implementation follows > the latter approach — dwmac-s32 requires IRQs to be defined for all > channels. You need to consider backwards compatibility. Will an old DT blob continue to work after this change? Andrew ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-01-21 8:15 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-14 22:15 [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Jan Petrous via B4 Relay 2025-12-14 22:15 ` [PATCH RFC 1/4] net: stmmac: platform: read channels irq Jan Petrous via B4 Relay 2025-12-14 22:30 ` Andrew Lunn 2026-01-21 7:44 ` Jan Petrous 2025-12-14 22:15 ` [PATCH RFC 2/4] dt-bindings: net: nxp,s32-dwmac: Declare per-queue interrupts Jan Petrous via B4 Relay 2025-12-15 18:09 ` Rob Herring (Arm) 2026-01-21 8:15 ` Jan Petrous 2025-12-14 22:15 ` [PATCH RFC 3/4] arm64: dts: s32: set Ethernet channel irqs Jan Petrous via B4 Relay 2025-12-14 22:15 ` [PATCH RFC 4/4] stmmac: s32: enable multi irqs mode Jan Petrous via B4 Relay 2025-12-14 22:37 ` Andrew Lunn 2025-12-15 14:21 ` Jan Petrous 2025-12-14 22:33 ` [PATCH RFC 0/4] Support multi-channel IRQs in stmmac platform drivers Andrew Lunn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox