summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Foster <colin.foster@in-advantage.com>2023-03-17 11:54:15 -0700
committerDavid S. Miller <davem@davemloft.net>2023-03-20 09:08:48 +0000
commit4c05e5ceecbbcc0bd570eae218066e1b8bab6438 (patch)
treef922b2a5f1097fae1ae3c137a102d22637ebe80a
parent6865ecee385bc91d47e6a1801fdf70732e33a6fd (diff)
downloadlinux-stable-4c05e5ceecbbcc0bd570eae218066e1b8bab6438.tar.gz
linux-stable-4c05e5ceecbbcc0bd570eae218066e1b8bab6438.tar.bz2
linux-stable-4c05e5ceecbbcc0bd570eae218066e1b8bab6438.zip
net: dsa: ocelot: add support for external phys
The VSC7512 has four ports with internal phys that are already supported. There are additional ports that can be configured to work with external phys. Add support for these additional ethernet ports. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/ocelot/ocelot_ext.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/dsa/ocelot/ocelot_ext.c b/drivers/net/dsa/ocelot/ocelot_ext.c
index 228737a32080..c29bee5a5c48 100644
--- a/drivers/net/dsa/ocelot/ocelot_ext.c
+++ b/drivers/net/dsa/ocelot/ocelot_ext.c
@@ -20,13 +20,13 @@ static const u32 vsc7512_port_modes[VSC7514_NUM_PORTS] = {
OCELOT_PORT_MODE_INTERNAL,
OCELOT_PORT_MODE_INTERNAL,
OCELOT_PORT_MODE_INTERNAL,
- OCELOT_PORT_MODE_NONE,
- OCELOT_PORT_MODE_NONE,
- OCELOT_PORT_MODE_NONE,
- OCELOT_PORT_MODE_NONE,
- OCELOT_PORT_MODE_NONE,
- OCELOT_PORT_MODE_NONE,
- OCELOT_PORT_MODE_NONE,
+ OCELOT_PORT_MODE_SERDES,
+ OCELOT_PORT_MODE_SERDES,
+ OCELOT_PORT_MODE_SERDES,
+ OCELOT_PORT_MODE_SERDES,
+ OCELOT_PORT_MODE_SERDES,
+ OCELOT_PORT_MODE_SGMII,
+ OCELOT_PORT_MODE_SERDES,
};
static const struct ocelot_ops ocelot_ext_ops = {
@@ -59,6 +59,8 @@ static const struct felix_info vsc7512_info = {
.num_ports = VSC7514_NUM_PORTS,
.num_tx_queues = OCELOT_NUM_TC,
.port_modes = vsc7512_port_modes,
+ .phylink_mac_config = ocelot_phylink_mac_config,
+ .configure_serdes = ocelot_port_configure_serdes,
};
static int ocelot_ext_probe(struct platform_device *pdev)