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:
parent
58936e7639
commit
594e11a540
5 changed files with 8 additions and 1 deletions
|
@ -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 = ð##n##_phy_handle, \
|
||||
|
|
|
@ -504,6 +504,7 @@
|
|||
interrupt-names = "TX", "RX", "ERR";
|
||||
status = "disabled";
|
||||
label = "ETH_0";
|
||||
phy-addr = <0>;
|
||||
clocks = <&sim KINETIS_SIM_CORESYS_CLK 0 0>;
|
||||
ptp {
|
||||
compatible = "nxp,kinetis-ptp";
|
||||
|
|
|
@ -573,6 +573,7 @@
|
|||
interrupt-names = "COMMON";
|
||||
status = "disabled";
|
||||
label = "ETH_0";
|
||||
phy-addr = <0>;
|
||||
ptp {
|
||||
compatible = "nxp,kinetis-ptp";
|
||||
status = "disabled";
|
||||
|
|
|
@ -661,6 +661,7 @@
|
|||
interrupt-names = "COMMON";
|
||||
status = "disabled";
|
||||
label = "ETH_0";
|
||||
phy-addr = <2>;
|
||||
ptp {
|
||||
compatible = "nxp,kinetis-ptp";
|
||||
status = "disabled";
|
||||
|
|
|
@ -12,3 +12,7 @@ properties:
|
|||
required: true
|
||||
interrupts:
|
||||
required: true
|
||||
phy-addr:
|
||||
type: int
|
||||
description: Address of the phy controller
|
||||
required: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue