net: fsl_enetc: add i.MX95 EMDIO support
The verdor ID and device ID of i.MX95 EMDIO are different from LS1028A EMDIO, so add new vendor ID and device ID to pci_device_id table to support i.MX95 EMDIO. Signed-off-by: Alice Guo <alice.guo@nxp.com> Signed-off-by: Marek Vasut <marex@denx.de> # Clean up Signed-off-by: Ye Li <ye.li@nxp.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
/* PCI function IDs */
|
||||
#define PCI_DEVICE_ID_ENETC_ETH 0xE100
|
||||
#define PCI_DEVICE_ID_ENETC_MDIO 0xEE01
|
||||
#define PCI_DEVICE_ID_ENETC4_EMDIO 0xEE00
|
||||
|
||||
/* ENETC Ethernet controller registers */
|
||||
/* Station interface register offsets */
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* ENETC ethernet controller driver
|
||||
* Copyright 2019 NXP
|
||||
* Copyright 2019-2025 NXP
|
||||
*/
|
||||
|
||||
#include <dm.h>
|
||||
@@ -132,7 +132,9 @@ static int enetc_mdio_bind(struct udevice *dev)
|
||||
|
||||
static int enetc_mdio_probe(struct udevice *dev)
|
||||
{
|
||||
struct pci_child_plat *pplat = dev_get_parent_plat(dev);
|
||||
struct enetc_mdio_priv *priv = dev_get_priv(dev);
|
||||
u16 cmd = PCI_COMMAND_MEMORY;
|
||||
|
||||
priv->regs_base = dm_pci_map_bar(dev, PCI_BASE_ADDRESS_0, 0, 0, PCI_REGION_TYPE, 0);
|
||||
if (!priv->regs_base) {
|
||||
@@ -142,7 +144,10 @@ static int enetc_mdio_probe(struct udevice *dev)
|
||||
|
||||
priv->regs_base += ENETC_MDIO_BASE;
|
||||
|
||||
dm_pci_clrset_config16(dev, PCI_COMMAND, 0, PCI_COMMAND_MEMORY);
|
||||
if (pplat->vendor == PCI_VENDOR_ID_PHILIPS) /* i.MX95 */
|
||||
cmd |= PCI_COMMAND_MASTER;
|
||||
|
||||
dm_pci_clrset_config16(dev, PCI_COMMAND, 0, cmd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -158,6 +163,7 @@ U_BOOT_DRIVER(enetc_mdio) = {
|
||||
|
||||
static struct pci_device_id enetc_mdio_ids[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, PCI_DEVICE_ID_ENETC_MDIO) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_PHILIPS, PCI_DEVICE_ID_ENETC4_EMDIO) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user