回复: [PATCH v2 2/2] net: fsl_enetc: Add support for i.MX952
Alice Guo (OSS)
alice.guo at oss.nxp.com
Wed Apr 22 05:38:47 CEST 2026
> -----邮件原件-----
> 发件人: Peng Fan (OSS) <peng.fan at oss.nxp.com>
> 发送时间: 2026年4月21日 21:48
> 收件人: Alice Guo (OSS) <alice.guo at oss.nxp.com>
> 抄送: Ye Li <ye.li at nxp.com>; tharvey at gateworks.com; Marek Vasut
> <marex at nabladev.com>; Fabio Estevam <festevam at gmail.com>;
> u-boot at lists.denx.de; Jerome Forissier <jerome.forissier at arm.com>; Tom Rini
> <trini at konsulko.com>; Michael Walle <mwalle at kernel.org>; Vladimir Oltean
> <vladimir.oltean at nxp.com>; Heiko Thiery <heiko.thiery at gmail.com>; Clark
> Wang <xiaoning.wang at nxp.com>; Thomas Schäfer
> <thomas.schaefer at kontron.com>; Christian Marangi
> <ansuelsmth at gmail.com>; Quentin Schulz <quentin.schulz at cherry.de>; Simon
> Glass <sjg at chromium.org>; Mikhail Kshevetskiy
> <mikhail.kshevetskiy at iopsys.eu>; Robert Marko <robert.marko at sartura.hr>;
> Yao Zi <me at ziyao.cc>; Peng Fan <peng.fan at nxp.com>; Andrew Goodbody
> <andrew.goodbody at linaro.org>; Jacky Bai <ping.bai at nxp.com>; Alice Guo
> <alice.guo at nxp.com>
> 主题: Re: [PATCH v2 2/2] net: fsl_enetc: Add support for i.MX952
>
> 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>
Thanks for the review. I will address the nit and add your Reviewed-by in v3.
More information about the U-Boot
mailing list