Browse Source

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>
pull/41171/head
Daniel DeGrasse 4 years ago committed by Anas Nashif
parent
commit
594e11a540
  1. 2
      drivers/ethernet/eth_mcux.c
  2. 1
      dts/arm/nxp/nxp_k6x.dtsi
  3. 1
      dts/arm/nxp/nxp_rt.dtsi
  4. 1
      dts/arm/nxp/nxp_rt11xx.dtsi
  5. 4
      dts/bindings/ethernet/nxp,kinetis-ethernet.yaml

2
drivers/ethernet/eth_mcux.c

@ -1392,7 +1392,7 @@ static void eth_mcux_err_isr(const struct device *dev) @@ -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, \

1
dts/arm/nxp/nxp_k6x.dtsi

@ -504,6 +504,7 @@ @@ -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";

1
dts/arm/nxp/nxp_rt.dtsi

@ -573,6 +573,7 @@ @@ -573,6 +573,7 @@
interrupt-names = "COMMON";
status = "disabled";
label = "ETH_0";
phy-addr = <0>;
ptp {
compatible = "nxp,kinetis-ptp";
status = "disabled";

1
dts/arm/nxp/nxp_rt11xx.dtsi

@ -661,6 +661,7 @@ @@ -661,6 +661,7 @@
interrupt-names = "COMMON";
status = "disabled";
label = "ETH_0";
phy-addr = <2>;
ptp {
compatible = "nxp,kinetis-ptp";
status = "disabled";

4
dts/bindings/ethernet/nxp,kinetis-ethernet.yaml

@ -12,3 +12,7 @@ properties: @@ -12,3 +12,7 @@ properties:
required: true
interrupts:
required: true
phy-addr:
type: int
description: Address of the phy controller
required: true

Loading…
Cancel
Save