Skip to content

Support both Ethernet interfaces on i.MX6UL and i.MX7

Guenter Roeck qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5hw/net/imx_fec: Support two Ethernet interfaces connected to single MDIO bushw/net/imx_fec.c include/hw/net/imx_fec.h+25 -42 replies
2/5fsl-imx6ul: Add fec[12]-phy-connected propertieshw/arm/fsl-imx6ul.c include/hw/arm/fsl-imx6ul.h+21 -00 replies
3/5arm/mcimx6ul-evk: Set fec1-phy-connected property to falsehw/arm/mcimx6ul-evk.c+2 -00 replies
4/5fsl-imx7: Add fec[12]-phy-connected propertieshw/arm/fsl-imx7.c include/hw/arm/fsl-imx7.h+21 -00 replies
5/5arm/mcimx7d-sabre: Set fec2-phy-connected property to falsehw/arm/mcimx7d-sabre.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Support both Ethernet interfaces on i.MX6UL and i.MX7

The SOC on i.MX6UL and i.MX7 has 2 Ethernet interfaces. The PHY on each may be connected to separate MDIO busses, or both may be connected on the same MDIO bus using different PHY addresses. Commit 461c51ad4275 ("Add a phy-num property to the i.MX FEC emulator") added support for specifying PHY addresses, but it did not provide support for linking the second PHY on a given MDIO bus to the other Ethernet interface.

To be able to support two PHY instances on a single MDIO bus, two properties are needed: First, there needs to be a flag indicating if the MDIO bus on a given Ethernet interface is connected. If not, attempts to read from this bus must always return 0xffff. Implement this property as phy-connected. Second, if the MDIO bus on an interface is active, it needs a link to the consumer interface to be able to provide PHY access for it. Implement this property as phy-consumer.

The first patch of the series implements support in hw/net/imx_fec.c. Patches 2..5 set the necessary properties in i.MX6UL and i.MX7 emulations. With this series in place, both Ethernet interfaces on affected emulations are functional.

----------------------------------------------------------------
Guenter Roeck (5):
hw/net/imx_fec: Support two Ethernet interfaces connected to single MDIO bus
fsl-imx6ul: Add fec[12]-phy-connected properties arm/mcimx6ul-evk: Set fec1-phy-connected property to false
fsl-imx7: Add fec[12]-phy-connected properties arm/mcimx7d-sabre: Set fec2-phy-connected property to false

 hw/arm/fsl-imx6ul.c         | 20 ++++++++++++++++++++
 hw/arm/fsl-imx7.c           | 20 ++++++++++++++++++++
 hw/arm/mcimx6ul-evk.c       |  2 ++
 hw/arm/mcimx7d-sabre.c      |  2 ++
 hw/net/imx_fec.c            | 27 +++++++++++++++++++++++----
 include/hw/arm/fsl-imx6ul.h |  1 +
 include/hw/arm/fsl-imx7.h   |  1 +
 include/hw/net/imx_fec.h    |  2 ++
 8 files changed, 71 insertions(+), 4 deletions(-)