Skip to content

Commit c4f873c

Browse files
prevas-tonnkuba-moo
authored andcommitted
net: dsa: b53: mdio: add support for BCM53101
BCM53101 is a ethernet switch, very similar to the BCM53115. Enable support for it, in the existing b53 dsa driver. Signed-off-by: Torben Nielsen <[email protected]> Signed-off-by: Claus Stovgaard <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent de7a88b commit c4f873c

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,6 +2409,19 @@ static const struct b53_chip_data b53_switch_chips[] = {
24092409
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
24102410
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
24112411
},
2412+
{
2413+
.chip_id = BCM53101_DEVICE_ID,
2414+
.dev_name = "BCM53101",
2415+
.vlans = 4096,
2416+
.enabled_ports = 0x11f,
2417+
.arl_bins = 4,
2418+
.arl_buckets = 512,
2419+
.vta_regs = B53_VTA_REGS,
2420+
.imp_port = 8,
2421+
.duplex_reg = B53_DUPLEX_STAT_GE,
2422+
.jumbo_pm_reg = B53_JUMBO_PORT_MASK,
2423+
.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
2424+
},
24122425
{
24132426
.chip_id = BCM53115_DEVICE_ID,
24142427
.dev_name = "BCM53115",
@@ -2789,6 +2802,7 @@ int b53_switch_detect(struct b53_device *dev)
27892802
return ret;
27902803

27912804
switch (id32) {
2805+
case BCM53101_DEVICE_ID:
27922806
case BCM53115_DEVICE_ID:
27932807
case BCM53125_DEVICE_ID:
27942808
case BCM53128_DEVICE_ID:

drivers/net/dsa/b53/b53_mdio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ static void b53_mdio_shutdown(struct mdio_device *mdiodev)
374374

375375
static const struct of_device_id b53_of_match[] = {
376376
{ .compatible = "brcm,bcm5325" },
377+
{ .compatible = "brcm,bcm53101" },
377378
{ .compatible = "brcm,bcm53115" },
378379
{ .compatible = "brcm,bcm53125" },
379380
{ .compatible = "brcm,bcm53128" },

drivers/net/dsa/b53/b53_priv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ enum {
6666
BCM5395_DEVICE_ID = 0x95,
6767
BCM5397_DEVICE_ID = 0x97,
6868
BCM5398_DEVICE_ID = 0x98,
69+
BCM53101_DEVICE_ID = 0x53101,
6970
BCM53115_DEVICE_ID = 0x53115,
7071
BCM53125_DEVICE_ID = 0x53125,
7172
BCM53128_DEVICE_ID = 0x53128,
@@ -188,6 +189,7 @@ static inline int is531x5(struct b53_device *dev)
188189
{
189190
return dev->chip_id == BCM53115_DEVICE_ID ||
190191
dev->chip_id == BCM53125_DEVICE_ID ||
192+
dev->chip_id == BCM53101_DEVICE_ID ||
191193
dev->chip_id == BCM53128_DEVICE_ID ||
192194
dev->chip_id == BCM53134_DEVICE_ID;
193195
}

0 commit comments

Comments
 (0)