From cf28449748c3112037ebd3fbe71330a4bf037d0a Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Sat, 22 Feb 2014 11:16:56 +0000 Subject: [PATCH] b53: Add BCM53128 switch support Signed-off-by: Helmut Schaa Patchwork: http://patchwork.openwrt.org/patch/4867/ Signed-off-by: Jonas Gorski SVN-Revision: 39682 --- .../generic/files/drivers/net/phy/b53/b53_common.c | 14 ++++++++++++++ .../generic/files/drivers/net/phy/b53/b53_mdio.c | 2 +- .../generic/files/drivers/net/phy/b53/b53_priv.h | 4 +++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c index f6a5418c3f..72b08e1ecf 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c @@ -1129,6 +1129,19 @@ static const struct b53_chip_data b53_switch_chips[] = { .jumbo_size_reg = B53_JUMBO_MAX_SIZE, .sw_ops = &b53_switch_ops, }, + { + .chip_id = BCM53128_DEVICE_ID, + .dev_name = "BCM53128", + .alias = "bcm53128", + .vlans = 4096, + .enabled_ports = 0x1ff, + .cpu_port = B53_CPU_PORT, + .vta_regs = B53_VTA_REGS, + .duplex_reg = B53_DUPLEX_STAT_GE, + .jumbo_pm_reg = B53_JUMBO_PORT_MASK, + .jumbo_size_reg = B53_JUMBO_MAX_SIZE, + .sw_ops = &b53_switch_ops, + }, { .chip_id = BCM63XX_DEVICE_ID, .dev_name = "BCM63xx", @@ -1363,6 +1376,7 @@ int b53_switch_detect(struct b53_device *dev) switch (id32) { case BCM53115_DEVICE_ID: case BCM53125_DEVICE_ID: + case BCM53128_DEVICE_ID: case BCM53010_DEVICE_ID: case BCM53011_DEVICE_ID: case BCM53012_DEVICE_ID: diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c index cacf32b613..3c25f0ea2b 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c @@ -357,7 +357,7 @@ static struct phy_driver b53_phy_driver_id1 = { }, }; -/* BCM53125 */ +/* BCM53125, BCM53128 */ static struct phy_driver b53_phy_driver_id2 = { .phy_id = 0x03625c00, .name = "Broadcom B53 (2)", diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h b/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h index d9881a1ff7..ce5b530e98 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h @@ -46,6 +46,7 @@ enum { BCM5398_DEVICE_ID = 0x98, BCM53115_DEVICE_ID = 0x53115, BCM53125_DEVICE_ID = 0x53125, + BCM53128_DEVICE_ID = 0x53128, BCM63XX_DEVICE_ID = 0x6300, BCM53010_DEVICE_ID = 0x53010, BCM53011_DEVICE_ID = 0x53011, @@ -137,7 +138,8 @@ static inline int is539x(struct b53_device *dev) static inline int is531x5(struct b53_device *dev) { return dev->chip_id == BCM53115_DEVICE_ID || - dev->chip_id == BCM53125_DEVICE_ID; + dev->chip_id == BCM53125_DEVICE_ID || + dev->chip_id == BCM53128_DEVICE_ID; } static inline int is63xx(struct b53_device *dev) -- 2.30.2