net: mscc: ocelot: make use of SerDes PHYs for handling their configuration
Previously, the SerDes muxing was hardcoded to a given mode in the MAC controller driver. Now, the SerDes muxing is configured within the Device Tree and is enforced in the MAC controller driver so we can have a lot of different SerDes configurations. Make use of the SerDes PHYs in the MAC controller to set up the SerDes according to the SerDes<->switch port mapping and the communication mode with the Ethernet PHY. Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
51f6b410fc
commit
71e32a20cf
@@ -11,9 +11,10 @@
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <soc/mscc/ocelot_hsio.h>
|
||||
|
||||
#include "ocelot_ana.h"
|
||||
#include "ocelot_dev.h"
|
||||
@@ -454,6 +455,9 @@ struct ocelot_port {
|
||||
u8 vlan_aware;
|
||||
|
||||
u64 *stats;
|
||||
|
||||
phy_interface_t phy_mode;
|
||||
struct phy *serdes;
|
||||
};
|
||||
|
||||
u32 __ocelot_read_ix(struct ocelot *ocelot, u32 reg, u32 offset);
|
||||
|
Reference in New Issue
Block a user