mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 07:04:28 +00:00
net: mvneta: Use DM MDIO API for connecting PHY
Use the modern DM MDIO API for connecting PHY in the mvneta driver. This requires enabling MVMDIO driver in several config files. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
47f0e8e21a
commit
da84e409df
15 changed files with 19 additions and 6 deletions
|
@ -62,6 +62,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
CONFIG_SCSI=y
|
||||
|
|
|
@ -77,6 +77,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_DM_PCI_COMPAT=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
|
|
|
@ -67,6 +67,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
|
|
|
@ -62,6 +62,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
CONFIG_SCSI=y
|
||||
|
|
|
@ -65,6 +65,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
|
|
|
@ -65,6 +65,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
|
|
|
@ -63,6 +63,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
CONFIG_SCSI=y
|
||||
|
|
|
@ -47,6 +47,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
CONFIG_SYS_NS16550=y
|
||||
CONFIG_KIRKWOOD_SPI=y
|
||||
|
|
|
@ -76,6 +76,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_E1000=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_NVME_PCI=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_AARDVARK=y
|
||||
|
|
|
@ -70,6 +70,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_DM_PCI_COMPAT=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
|
|
|
@ -82,6 +82,7 @@ CONFIG_SPI_FLASH_MTD=y
|
|||
CONFIG_PHY_MARVELL=y
|
||||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_NVME_PCI=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_AARDVARK=y
|
||||
|
|
|
@ -85,6 +85,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_NVME_PCI=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
|
|
|
@ -73,6 +73,7 @@ CONFIG_PHY_MARVELL=y
|
|||
CONFIG_PHY_GIGE=y
|
||||
CONFIG_E1000=y
|
||||
CONFIG_MVNETA=y
|
||||
CONFIG_MVMDIO=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_AARDVARK=y
|
||||
CONFIG_PHY=y
|
||||
|
|
|
@ -445,6 +445,7 @@ config MVNETA
|
|||
bool "Marvell Armada XP/385/3700 network interface support"
|
||||
depends on ARMADA_XP || ARMADA_38X || ARMADA_3700
|
||||
select PHYLIB
|
||||
select DM_MDIO
|
||||
help
|
||||
This driver supports the network interface units in the
|
||||
Marvell ARMADA XP, ARMADA 38X and ARMADA 3700 SoCs
|
||||
|
|
|
@ -1571,16 +1571,15 @@ static int mvneta_start(struct udevice *dev)
|
|||
|
||||
mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val);
|
||||
} else {
|
||||
/* Set phy address of the port */
|
||||
mvreg_write(pp, MVNETA_PHY_ADDR, pp->phyaddr);
|
||||
|
||||
phydev = phy_connect(pp->bus, pp->phyaddr, dev,
|
||||
pp->phy_interface);
|
||||
phydev = dm_eth_phy_connect(dev);
|
||||
if (!phydev) {
|
||||
printf("phy_connect failed\n");
|
||||
printf("dm_eth_phy_connect failed\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Set PHY address in case we will enable HW polling */
|
||||
mvreg_write(pp, MVNETA_PHY_ADDR, phydev->addr);
|
||||
|
||||
pp->phydev = phydev;
|
||||
phy_config(phydev);
|
||||
phy_startup(phydev);
|
||||
|
|
Loading…
Reference in a new issue