drivers: eth_mcux: Enable specifying PHY addr for enet module

PHY addr is not always 0 on boards with multiple PHYs. Allow specifying
via devicetree.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-01-10 15:25:15 -06:00 committed by Anas Nashif
commit 594e11a540
5 changed files with 8 additions and 1 deletions

View file

@ -1392,7 +1392,7 @@ static void eth_mcux_err_isr(const struct device *dev)
static struct eth_context eth##n##_context = { \
.base = (ENET_Type *)DT_INST_REG_ADDR(n), \
.config_func = eth##n##_config_func, \
.phy_addr = 0U, \
.phy_addr = DT_INST_PROP(n, phy_addr), \
.phy_duplex = kPHY_FullDuplex, \
.phy_speed = kPHY_Speed100M, \
.phy_handle = &eth##n##_phy_handle, \