[PATCH v2 2/2] net: fsl_enetc: Add support for i.MX952
Peng Fan
peng.fan at oss.nxp.com
Tue Apr 21 15:47:49 CEST 2026
On Mon, Apr 13, 2026 at 04:15:40PM +0800, alice.guo at oss.nxp.com wrote:
>From: Ye Li <ye.li at nxp.com>
>
>Extend ENETC driver to support i.MX952 platform where 2 ENETC
>controllers are located on different PCIe buses.
>
>Key changes:
>- Add enetc_dev_id_imx() to derive device ID from device tree "reg"
> property for i.MX952, mapping bus_devfn values 0x0 and 0x100 to device
> IDs 0 and 1 respectively
>- Implement imx952_netcmix_init() to configure MII protocol and PCS
> settings based on PHY mode parsed from device tree
>- Add i.MX952 to FSL_ENETC_NETC_BLK_CTRL Kconfig dependencies
>
>Signed-off-by: Ye Li <ye.li at nxp.com>
>Signed-off-by: Alice Guo <alice.guo at nxp.com>
>---
> drivers/net/Kconfig | 4 +-
> drivers/net/fsl_enetc.c | 28 +++++++++++++-
> drivers/net/fsl_enetc_netc_blk_ctrl.c | 72 +++++++++++++++++++++++++++++++++++
> 3 files changed, 101 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
>index ed07e286676..4da10ed1289 100644
>--- a/drivers/net/Kconfig
>+++ b/drivers/net/Kconfig
>@@ -1018,8 +1018,8 @@ config FSL_ENETC
> config FSL_ENETC_NETC_BLK_CTRL
> bool "NXP ENETC NETC blocks control driver"
> depends on FSL_ENETC
>- depends on IMX95 || IMX94
>- default y if IMX95 || IMX94
>+ depends on IMX95 || IMX94 || IMX952
>+ default y if IMX95 || IMX94 || IMX952
> help
> This driver configures Integrated Endpoint Register Block (IERB) and
> Privileged Register Block (PRB) of NETC. For i.MX platforms, it also
>diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
>index 766aea035d3..a1569b9d989 100644
>--- a/drivers/net/fsl_enetc.c
>+++ b/drivers/net/fsl_enetc.c
>@@ -67,10 +67,36 @@ static int enetc_is_ls1028a(struct udevice *dev)
> pplat->vendor == PCI_VENDOR_ID_FREESCALE;
> }
>
>+static int enetc_dev_id_imx(struct udevice *dev)
>+{
>+ if (IS_ENABLED(CONFIG_IMX952)) {
>+ int bus_devfn;
>+ u32 reg[5];
>+ int error;
>+
>+ error = ofnode_read_u32_array(dev_ofnode(dev), "reg", reg, ARRAY_SIZE(reg));
nit: use dev_read_u32_array. with this addressed, you could add:
Reviewed-by: Peng Fan <peng.fan at nxp.com>
>+ if (error)
>+ return error;
>+
More information about the U-Boot
mailing list