net: fsl_enetc: Add support for i.MX952
PATCH v3 1/1 net: fsl_enetc: Add support for i.MX952
From: Ye Li <[email protected]>
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
---
This is a resend of the v3 patch series with the first one patch removed.
There are no other changes compared to the previous v3 submission.
--- 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(-)
drivers/net/Kconfig +2 -2
@@ -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
drivers/net/fsl_enetc.c +27 -1
@@ -74,10 +74,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 =dev_read_u32_array (dev,"reg" , reg,ARRAY_SIZE (reg)); +if (error) +return error; + + bus_devfn = (reg[0 ] >>8 ) &0xffff ; + +switch (bus_devfn) { +case 0 : +return 0 ; +case 0x100 : +return 1 ; +default : +return -EINVAL ; + } + } + +return PCI_DEV (pci_get_devfn (dev)) >>3 ; +} +static int enetc_dev_id (struct udevice *dev) {if (enetc_is_imx95 (dev)) -return PCI_DEV (pci_get_devfn (dev)) >>3 ; +return enetc_dev_id_imx (dev);if (enetc_is_ls1028a (dev))return PCI_FUNC (pci_get_devfn (dev));
drivers/net/fsl_enetc_netc_blk_ctrl.c +72 -0
99 lines not on this page · raw message
---
base-commit: 4433253ecf2041f9362a763bb6cb79960921ac7e
change-id: 20260430-952netc-168485943bab
Best regards,
Signature · 1 line
Alice Guo <[email protected]>