[PATCH 1/4] net: dsa: b53: Indicate which BCM63268 port is GPHY

Kyle Hendry posted 4 patches 10 months, 1 week ago
[PATCH 1/4] net: dsa: b53: Indicate which BCM63268 port is GPHY
Posted by Kyle Hendry 10 months, 1 week ago
Add a gphy mask member and initialize for BCM63268.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 drivers/net/dsa/b53/b53_common.c | 3 +++
 drivers/net/dsa/b53/b53_priv.h   | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 79dc77835681..06739aea328d 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -2319,6 +2319,7 @@ struct b53_chip_data {
 	const char *dev_name;
 	u16 vlans;
 	u16 enabled_ports;
+	u16 internal_gphy_mask;
 	u8 imp_port;
 	u8 cpu_port;
 	u8 vta_regs[3];
@@ -2466,6 +2467,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.dev_name = "BCM63268",
 		.vlans = 4096,
 		.enabled_ports = 0, /* pdata must provide them */
+		.internal_gphy_mask = BIT(3),
 		.arl_bins = 4,
 		.arl_buckets = 1024,
 		.imp_port = 8,
@@ -2642,6 +2644,7 @@ static int b53_switch_init(struct b53_device *dev)
 			dev->num_vlans = chip->vlans;
 			dev->num_arl_bins = chip->arl_bins;
 			dev->num_arl_buckets = chip->arl_buckets;
+			dev->internal_gphy_mask = chip->internal_gphy_mask;
 			break;
 		}
 	}
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index 9e9b5bc0c5d6..cd565efbdec2 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -128,6 +128,7 @@ struct b53_device {
 
 	/* used ports mask */
 	u16 enabled_ports;
+	u16 internal_gphy_mask;
 	unsigned int imp_port;
 
 	/* connect specific data */
-- 
2.43.0