aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini2022-04-15 08:09:52 -0400
committerTom Rini2022-04-15 08:10:32 -0400
commit7f418ea59852945eeb9e5d2555d306f09643d555 (patch)
tree069dbaf3a1f62b68251189e9acdbd9affcbd98c5 /board
parent239fe55a6ce516f329687c0680428ca2acfc73ca (diff)
parent0154e6de37e8bbaac837939391f6d4a8f0b3fd18 (diff)
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-net
- DM9000 DM support - tftp server bug fix - mdio ofnode support functions - Various phy fixes and improvements. [trini: Fixup merge conflicts in drivers/net/phy/ethernet_id.c drivers/net/phy/phy.c include/phy.h]
Diffstat (limited to 'board')
-rw-r--r--board/CZ.NIC/turris_mox/turris_mox.c2
-rw-r--r--board/boundary/nitrogen6x/nitrogen6x.c2
-rw-r--r--board/freescale/corenet_ds/eth_hydra.c2
-rw-r--r--board/freescale/corenet_ds/eth_superhydra.c4
-rw-r--r--board/freescale/t104xrdb/eth.c4
-rw-r--r--board/gdsys/a38x/controlcenterdc.c7
-rw-r--r--board/gdsys/a38x/ihs_phys.c6
-rw-r--r--board/st/stm32f746-disco/stm32f746-disco.c13
8 files changed, 19 insertions, 21 deletions
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index 8888a2dcabc..9702d1fc782 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -396,7 +396,7 @@ static void mox_phy_leds_start_blinking(void)
return;
}
- phydev = phy_find_by_mask(bus, BIT(1), PHY_INTERFACE_MODE_RGMII);
+ phydev = phy_find_by_mask(bus, BIT(1));
if (!phydev) {
printf("Cannot get ethernet PHY!\n");
return;
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 8566c22a98f..83bb445d481 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -345,7 +345,7 @@ int board_eth_init(struct bd_info *bis)
if (!bus)
return -EINVAL;
/* scan phy 4,5,6,7 */
- phydev = phy_find_by_mask(bus, (0xf << 4), PHY_INTERFACE_MODE_RGMII);
+ phydev = phy_find_by_mask(bus, (0xf << 4));
if (!phydev) {
ret = -EINVAL;
goto free_bus;
diff --git a/board/freescale/corenet_ds/eth_hydra.c b/board/freescale/corenet_ds/eth_hydra.c
index 6500c2fcf67..a27e905ace9 100644
--- a/board/freescale/corenet_ds/eth_hydra.c
+++ b/board/freescale/corenet_ds/eth_hydra.c
@@ -471,7 +471,7 @@ int board_eth_init(struct bd_info *bis)
fm_info_set_mdio(i,
miiphy_get_dev_by_name("HYDRA_RGMII_MDIO"));
break;
- case PHY_INTERFACE_MODE_NONE:
+ case PHY_INTERFACE_MODE_NA:
fm_info_set_phy_address(i, 0);
break;
default:
diff --git a/board/freescale/corenet_ds/eth_superhydra.c b/board/freescale/corenet_ds/eth_superhydra.c
index de7b692f3fe..55bac0f7615 100644
--- a/board/freescale/corenet_ds/eth_superhydra.c
+++ b/board/freescale/corenet_ds/eth_superhydra.c
@@ -583,7 +583,7 @@ int board_eth_init(struct bd_info *bis)
fm_info_set_mdio(i,
miiphy_get_dev_by_name("SUPER_HYDRA_RGMII_MDIO"));
break;
- case PHY_INTERFACE_MODE_NONE:
+ case PHY_INTERFACE_MODE_NA:
fm_info_set_phy_address(i, 0);
break;
default:
@@ -733,7 +733,7 @@ int board_eth_init(struct bd_info *bis)
fm_info_set_mdio(i,
miiphy_get_dev_by_name("SUPER_HYDRA_RGMII_MDIO"));
break;
- case PHY_INTERFACE_MODE_NONE:
+ case PHY_INTERFACE_MODE_NA:
fm_info_set_phy_address(i, 0);
break;
default:
diff --git a/board/freescale/t104xrdb/eth.c b/board/freescale/t104xrdb/eth.c
index b034f11d68a..3ae5d722aab 100644
--- a/board/freescale/t104xrdb/eth.c
+++ b/board/freescale/t104xrdb/eth.c
@@ -89,7 +89,7 @@ int board_eth_init(struct bd_info *bis)
case PHY_INTERFACE_MODE_QSGMII:
fm_info_set_phy_address(i, 0);
break;
- case PHY_INTERFACE_MODE_NONE:
+ case PHY_INTERFACE_MODE_NA:
fm_info_set_phy_address(i, 0);
break;
default:
@@ -99,7 +99,7 @@ int board_eth_init(struct bd_info *bis)
break;
}
if (fm_info_get_enet_if(i) == PHY_INTERFACE_MODE_QSGMII ||
- fm_info_get_enet_if(i) == PHY_INTERFACE_MODE_NONE)
+ fm_info_get_enet_if(i) == PHY_INTERFACE_MODE_NA)
fm_info_set_mdio(i, NULL);
else
fm_info_set_mdio(i,
diff --git a/board/gdsys/a38x/controlcenterdc.c b/board/gdsys/a38x/controlcenterdc.c
index 7d65400ccb0..ccebba72721 100644
--- a/board/gdsys/a38x/controlcenterdc.c
+++ b/board/gdsys/a38x/controlcenterdc.c
@@ -194,11 +194,12 @@ void init_host_phys(struct mii_dev *bus)
for (k = 0; k < 2; ++k) {
struct phy_device *phydev;
- phydev = phy_find_by_mask(bus, 1 << k,
- PHY_INTERFACE_MODE_SGMII);
+ phydev = phy_find_by_mask(bus, 1 << k);
- if (phydev)
+ if (phydev) {
+ phydev->interface = PHY_INTERFACE_MODE_SGMII;
phy_config(phydev);
+ }
}
}
diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index e09c0006b76..60a5c37aeff 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -28,6 +28,7 @@ static void ihs_phy_config(struct phy_device *phydev, bool qinpn, bool qoutpn)
{
u16 reg;
+ phydev->interface = PHY_INTERFACE_MODE_MII;
phy_config(phydev);
/* enable QSGMII autonegotiation with flow control */
@@ -142,10 +143,9 @@ struct porttype *get_porttype(uint octo_phy_mask, uint k)
int init_single_phy(struct porttype *porttype, struct mii_dev *bus,
uint bus_idx, uint m, uint phy_idx)
{
- struct phy_device *phydev = phy_find_by_mask(
- bus, 1 << (m * 8 + phy_idx),
- PHY_INTERFACE_MODE_MII);
+ struct phy_device *phydev;
+ phydev = phy_find_by_mask(bus, BIT(m * 8 + phy_idx));
printf(" %u", bus_idx * 32 + m * 8 + phy_idx);
if (!phydev)
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index 95d83e73ee8..69f657c54b8 100644
--- a/board/st/stm32f746-disco/stm32f746-disco.c
+++ b/board/st/stm32f746-disco/stm32f746-disco.c
@@ -117,16 +117,13 @@ int board_late_init(void)
int board_init(void)
{
#ifdef CONFIG_ETH_DESIGNWARE
- const char *phy_mode;
- int node;
+ ofnode node;
- node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,stm32-dwmac");
- if (node < 0)
+ node = ofnode_by_compatible(ofnode_null(), "st,stm32-dwmac");
+ if (!ofnode_valid(node))
return -1;
- phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);
-
- switch (phy_get_interface_by_name(phy_mode)) {
+ switch (ofnode_read_phy_mode(node)) {
case PHY_INTERFACE_MODE_RMII:
STM32_SYSCFG->pmc |= SYSCFG_PMC_MII_RMII_SEL;
break;
@@ -134,7 +131,7 @@ int board_init(void)
STM32_SYSCFG->pmc &= ~SYSCFG_PMC_MII_RMII_SEL;
break;
default:
- printf("PHY interface %s not supported !\n", phy_mode);
+ printf("Unsupported PHY interface!\n");
}
#endif