1 From 625aefac340f45a4fc60908da763f437599a0d6f Mon Sep 17 00:00:00 2001
2 From: Michael Krummsdorf <michael.krummsdorf@tq-group.com>
3 Date: Tue, 26 Mar 2024 13:36:54 +0100
4 Subject: net: dsa: mv88e6xxx: fix usable ports on 88e6020
6 From: Michael Krummsdorf <michael.krummsdorf@tq-group.com>
8 commit 625aefac340f45a4fc60908da763f437599a0d6f upstream.
10 The switch has 4 ports with 2 internal PHYs, but ports are numbered up
11 to 6, with ports 0, 1, 5 and 6 being usable.
13 Fixes: 71d94a432a15 ("net: dsa: mv88e6xxx: add support for MV88E6020 switch")
14 Signed-off-by: Michael Krummsdorf <michael.krummsdorf@tq-group.com>
15 Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
16 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
17 Reviewed-by: Simon Horman <horms@kernel.org>
18 Link: https://lore.kernel.org/r/20240326123655.40666-1-matthias.schiffer@ew.tq-group.com
19 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 drivers/net/dsa/mv88e6xxx/chip.c | 6 +++++-
23 1 file changed, 5 insertions(+), 1 deletion(-)
25 --- a/drivers/net/dsa/mv88e6xxx/chip.c
26 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
27 @@ -5386,8 +5386,12 @@ static const struct mv88e6xxx_info mv88e
28 .family = MV88E6XXX_FAMILY_6250,
29 .name = "Marvell 88E6020",
32 + /* Ports 2-4 are not routed to pins
33 + * => usable ports 0, 1, 5, 6
36 .num_internal_phys = 2,
37 + .invalid_port_mask = BIT(2) | BIT(3) | BIT(4),
39 .port_base_addr = 0x8,