Skip to content
  • Guenter Roeck's avatar
    df3f5efe
    hw/net/imx_fec: Support two Ethernet interfaces connected to single MDIO bus · df3f5efe
    Guenter Roeck authored
    
    
    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 461c51ad ("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.
    
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Message-id: 20230315145248.1639364-2-linux@roeck-us.net
    Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    df3f5efe
    hw/net/imx_fec: Support two Ethernet interfaces connected to single MDIO bus
    Guenter Roeck authored
    
    
    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 461c51ad ("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.
    
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Message-id: 20230315145248.1639364-2-linux@roeck-us.net
    Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Loading