]> git.itanic.dy.fi Git - linux-stable/commit
net: stmmac: implement support for passive mode converters via dt
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 6 Sep 2019 13:02:55 +0000 (16:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Sep 2019 14:27:09 +0000 (15:27 +0100)
commit0060c8783330ab60deb96f9d6bb7abfe4664765d
treeac2defbf44fe2c1ca5ffb3f82ba305897bd7a153
parentc1609946b8b6485e1d405663004867ea9e92178a
net: stmmac: implement support for passive mode converters via dt

In-between the MAC & PHY there can be a mode converter, which converts one
mode to another (e.g. GMII-to-RGMII).

The converter, can be passive (i.e. no driver or OS/SW information
required), so the MAC & PHY need to be configured differently.

For the `stmmac` driver, this is implemented via a `mac-mode` property in
the device-tree, which configures the MAC into a certain mode, and for the
PHY a `phy_interface` field will hold the mode of the PHY. The mode of the
PHY will be passed to the PHY and from there-on it work in a different
mode. If unspecified, the default `phy-mode` will be used for both.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
include/linux/stmmac.h