Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Claudiu Manoil
Fri, 13 Nov 2026 15:02
[PATCH net-next v4 5/6] arm64: dts: s32n79-rdb: enable NETC IEP18
Author: Claudiu Manoil
Date: Fri, 13 Nov 2026 15:02
Date: Fri, 13 Nov 2026 15:02
27 lines
9781 bytes
9781 bytes
Enable the NETC v4 ECAM bus #18 on the S32N79-RDB board so that the
ENETC v4 Pseudo-MAC port (PPM) PF and VF instances are probed.
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
---
v4: none
v3: none
v2: none
arch/arm64/boot/dts/freescale/s32n79-rdb.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32n79-rdb.dts b/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
index 1feccd61258e..897ba24ac03a 100644
--- a/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
@@ -68,3 +68,7 @@ &usdhc0 {
no-sdio;
status = "okay";
};
+
+&netc_iep18 {
+ status = "okay";
+};
--
2.34.1
Re: [PATCH net-next v4 5/6] arm64: dts: s32n79-rdb: enable NETC IEP18
Author: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 15:55
Date: Tue, 17 Nov 2026 15:55
133 lines
12853 bytes
12853 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] This patch turns on `&netc_iep18` in
arch/arm64/boot/dts/freescale/s32n79-rdb.dts so that, per the commit…
- [Medium] Setting `&netc_iep18` to okay makes the ENETC v4 PPM PF and
VFs live DMA masters.
- [Low] The new `&netc_iep18` override in
arch/arm64/boot/dts/freescale/s32n79-rdb.dts is added after `&usdhc0`.
--
arm64: dts: s32n79-rdb: enable NETC IEP18
This commit enables the NETC v4 ECAM bus #18 on the S32N79-RDB board. The
goal is for the ENETC v4 Pseudo-MAC port (PPM) PF and VF instances to be
probed.
> diff --git a/arch/arm64/boot/dts/freescale/s32n79-rdb.dts b/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> index 1feccd61258ef..897ba24ac03ae 100644
> --- a/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> +++ b/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> @@ -68,3 +68,7 @@ &usdhc0 {
> no-sdio;
> status = "okay";
> };
> +
> +&netc_iep18 {
[Severity: Low]
This isn't a bug, but Documentation/devicetree/bindings/dts-coding-style.rst
says:
When extending nodes in the board DTS via &label, the entries shall be
ordered either alpha-numerically or by keeping the order from DTSI,
The existing overrides in this file are in alphabetical order (irqsteer_coss,
uart0, uart5, uart6, uart7, usdhc0). Should &netc_iep18 go between
&irqsteer_coss and &uart0? Keeping the DTSI order would also put it before
&usdhc0.
> + status = "okay";
> +};
[Severity: Medium]
The commit message says the bus is enabled "so that the ENETC v4 Pseudo-MAC
port (PPM) PF and VF instances are probed". Does the PF actually probe when
the kernel is built from the in-tree arm64 defconfig?
The netc_iep18 host bridge node in s32n79.dtsi has no child nodes, so the
ENETC PF function does not get a static of_node. For a pseudo-MAC port,
enetc4_link_init() in drivers/net/ethernet/freescale/enetc/enetc4_pf.c then
fails here:
if (!node) {
dev_err(dev, "Missing of_node for Pseudo-MAC port\n");
return -ENODEV;
}
The only other way to get an of_node is of_pci_make_dev_node(). The last
patch in the series, "PCI: Create OF node for NXP ENETC pseudo-MAC
functions", adds it as a final fixup for 0xe101/0xe110:
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PHILIPS, 0xe101, of_pci_make_dev_node);
However, of_pci_make_dev_node() is only built with
CONFIG_PCI_DYNAMIC_OF_NODES. Without it, drivers/pci/pci.h provides an empty
inline stub.
PCI_DYNAMIC_OF_NODES is a plain bool with no default, and NXP_ENETC4 only
selects OF_DYNAMIC. arch/arm64/configs/defconfig sets
CONFIG_PCI_HOST_GENERIC=y, CONFIG_NXP_ENETC4=m and CONFIG_FSL_ENETC_VF=m, but
it does not set CONFIG_PCI_DYNAMIC_OF_NODES.
So on a default arm64 build, won't the only device behind the newly enabled
bus fail with -ENODEV? The PF creates the VFs through SR-IOV, so the VFs
would not appear either. This is still the case at the end of the series.
Would one of these work: giving the PF a static child node in DT, adding
CONFIG_PCI_DYNAMIC_OF_NODES=y to the arm64 defconfig, or having NXP_ENETC4
imply or select it?
[Severity: Medium]
With this bus enabled, the PPM PF and VFs become live DMA masters. The
netc_iep18 node in s32n79.dtsi has:
iommu-map = <0x0 &smmu 0xc0000 0x100>;
msi-map = <0x0 &its 0xc0000 0x100>;
dma-coherent;
The smmu node it points to is disabled at the SoC level:
smmu: iommu@4fc00000 {
compatible = "arm,smmu-v3";
...
status = "disabled";
No board DTS under arch/arm64/boot/dts/freescale/ enables it.
of_iommu_xlate() in drivers/iommu/of_iommu.c then ignores the mapping without
any message:
if (!of_device_is_available(iommu_spec->np))
return -ENODEV;
As a result, the PF and VFs fall back to dma-direct and use raw physical
addresses for the BD rings and buffers.
The SoC dtsi commit in this series says "DMA is translated by the SMMUv3
(iommu-map)". That does not seem to hold on this board.
Doesn't DMA now depend entirely on the SMMU state left by boot firmware?
Suppose firmware left the SMMU enabled with its own stream table, or set it
to abort unmatched streams. NETC DMA would then fault or be blocked, even
though the netdev probes.
The dma-coherent property makes Linux skip cache maintenance. That too relies
on stream attributes configured outside of Linux.
Should &smmu be enabled along with this bus? Alternatively, could the
firmware requirement be documented (SMMU in bypass with coherent attributes
for StreamIDs 0xc0000 and up) and the dtsi commit message corrected?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1794581338.git.claudiu.manoil%40nxp.com
RE: [PATCH net-next v4 5/6] arm64: dts: s32n79-rdb: enable NETC IEP18
Author: Claudiu Manoil
Date: Wed, 18 Nov 2026 16:40
Date: Wed, 18 Nov 2026 16:40
167 lines
23505 bytes
23505 bytes
From: netdev-bot+sashiko@kernel.org <netdev-bot+sashiko@kernel.org>
Sent: Tuesday, November 17, 2026 5:55 PM
> To: Claudiu Manoil <claudiu.manoil@nxp.com>
> Cc: netdev@vger.kernel.org; dl-S32 <S32@nxp.com>; bhelgaas@google.com;
> linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org; kuba@kernel.org
> Subject: Re: [PATCH net-next v4 5/6] arm64: dts: s32n79-rdb: enable NETC
> IEP18
>
> Thank you for your contribution! Sashiko AI review found 3 potential
> issue(s) to consider.
>
> Critical: 0 * High: 0 * Medium: 2 * Low: 1
>
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
>
> - [Medium] This patch turns on `&netc_iep18` in
> arch/arm64/boot/dts/freescale/s32n79-rdb.dts so that, per the commit...
> - [Medium] Setting `&netc_iep18` to okay makes the ENETC v4 PPM PF and
> VFs live DMA masters.
> - [Low] The new `&netc_iep18` override in
> arch/arm64/boot/dts/freescale/s32n79-rdb.dts is added after `&usdhc0`.
>
> --
>
> arm64: dts: s32n79-rdb: enable NETC IEP18
>
> This commit enables the NETC v4 ECAM bus #18 on the S32N79-RDB board.
> The
> goal is for the ENETC v4 Pseudo-MAC port (PPM) PF and VF instances to be
> probed.
>
> > diff --git a/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> b/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> > index 1feccd61258ef..897ba24ac03ae 100644
> > --- a/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> > +++ b/arch/arm64/boot/dts/freescale/s32n79-rdb.dts
> > @@ -68,3 +68,7 @@ &usdhc0 {
> > no-sdio;
> > status = "okay";
> > };
> > +
> > +&netc_iep18 {
>
[...]
> [Severity: Medium]
> The commit message says the bus is enabled "so that the ENETC v4 Pseudo-
> MAC port (PPM) PF and VF instances are probed". Does the PF actually probe when
> the kernel is built from the in-tree arm64 defconfig?
>
> The netc_iep18 host bridge node in s32n79.dtsi has no child nodes, so the
> ENETC PF function does not get a static of_node. For a pseudo-MAC port,
> enetc4_link_init() in drivers/net/ethernet/freescale/enetc/enetc4_pf.c then
> fails here:
>
> if (!node) {
> dev_err(dev, "Missing of_node for Pseudo-MAC port\n");
> return -ENODEV;
> }
>
> The only other way to get an of_node is of_pci_make_dev_node(). The last
> patch in the series, "PCI: Create OF node for NXP ENETC pseudo-MAC
> functions", adds it as a final fixup for 0xe101/0xe110:
>
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PHILIPS, 0xe101,
> of_pci_make_dev_node);
>
Chicken and egg problem, both the PCI patch and the pci-host-ecam DT node
for IEP 18 (netc_iep18) are needed for probing. The decision was to keep the
PCI patch as the last in the series.
> However, of_pci_make_dev_node() is only built with
> CONFIG_PCI_DYNAMIC_OF_NODES. Without it, drivers/pci/pci.h provides an
> empty inline stub.
>
> PCI_DYNAMIC_OF_NODES is a plain bool with no default, and NXP_ENETC4
> only
> selects OF_DYNAMIC. arch/arm64/configs/defconfig sets
> CONFIG_PCI_HOST_GENERIC=y, CONFIG_NXP_ENETC4=m and
> CONFIG_FSL_ENETC_VF=m, but
> it does not set CONFIG_PCI_DYNAMIC_OF_NODES.
>
> So on a default arm64 build, won't the only device behind the newly enabled
> bus fail with -ENODEV? The PF creates the VFs through SR-IOV, so the VFs
> would not appear either. This is still the case at the end of the series.
>
> Would one of these work: giving the PF a static child node in DT, adding
> CONFIG_PCI_DYNAMIC_OF_NODES=y to the arm64 defconfig, or having
> NXP_ENETC4 imply or select it?
CONFIG_PCI_DYNAMIC_OF_NODES is not a hard Kconfig dependency
because only the newly introduced S32N79 chip makes use of this feature
currently. This is intentional. So, this config will be enabled for S32N79
platforms only, for now.
Provided same reply for v2:
https://lore.kernel.org/all/GV2PR04MB117408067A4647C476FAD617596692@GV2PR04MB11740.eurprd04.prod.outlook.com/
>
> [Severity: Medium]
> With this bus enabled, the PPM PF and VFs become live DMA masters. The
> netc_iep18 node in s32n79.dtsi has:
>
> iommu-map = <0x0 &smmu 0xc0000 0x100>;
> msi-map = <0x0 &its 0xc0000 0x100>;
> dma-coherent;
>
> The smmu node it points to is disabled at the SoC level:
>
> smmu: iommu@4fc00000 {
> compatible = "arm,smmu-v3";
> ...
> status = "disabled";
>
> No board DTS under arch/arm64/boot/dts/freescale/ enables it.
> of_iommu_xlate() in drivers/iommu/of_iommu.c then ignores the mapping
> without
> any message:
>
> if (!of_device_is_available(iommu_spec->np))
> return -ENODEV;
>
> As a result, the PF and VFs fall back to dma-direct and use raw physical
> addresses for the BD rings and buffers.
>
> The SoC dtsi commit in this series says "DMA is translated by the SMMUv3
> (iommu-map)". That does not seem to hold on this board.
>
> Doesn't DMA now depend entirely on the SMMU state left by boot firmware?
> Suppose firmware left the SMMU enabled with its own stream table, or set it
> to abort unmatched streams. NETC DMA would then fault or be blocked, even
> though the netdev probes.
>
> The dma-coherent property makes Linux skip cache maintenance. That too
> relies on stream attributes configured outside of Linux.
>
> Should &smmu be enabled along with this bus? Alternatively, could the
> firmware requirement be documented (SMMU in bypass with coherent
> attributes for StreamIDs 0xc0000 and up) and the dtsi commit message
> corrected?
As already explained for v2, enabling SMMU is outside the scope of this patch set:
https://lore.kernel.org/all/GV2PR04MB11740BC1C66529A8E2B672CF096692@GV2PR04MB11740.eurprd04.prod.outlook.com/
ENETC sits behind SMMU, however the SMMU node is not ready to be enabled yet,
and this is not in the scope of current patch set.
SMMU on S32N79 needs some support patches (SoC level workarounds) before
enabling it, since SMMU is a system wide config that affects other devices too.
ENETC4 is functional with the SMMU node disabled, and I checked it with traffic tests.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads