aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip/ksz_spi.c
diff options
context:
space:
mode:
authorTristram Ha <tristram.ha@microchip.com>2024-08-26 21:43:08 +0000
committerJakub Kicinski <kuba@kernel.org>2024-08-27 16:14:18 -0700
commita96c5515d0d15df103598b2bc57245d66143b5dd (patch)
treed43cf5e153d6321e234fe7c230edc85c4000b971 /drivers/net/dsa/microchip/ksz_spi.c
parente3717f2ad1a2620730a7086e032ffa7242f8aa23 (diff)
net: dsa: microchip: Add KSZ8895/KSZ8864 switch support
KSZ8895/KSZ8864 is a switch family between KSZ8863/73 and KSZ8795, so it shares some registers and functions in those switches already implemented in the KSZ DSA driver. Signed-off-by: Tristram Ha <tristram.ha@microchip.com> Tested-by: Pieter Van Trappen <pieter.van.trappen@cern.ch> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_spi.c')
-rw-r--r--drivers/net/dsa/microchip/ksz_spi.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c
index 8e8d83213b04..f4287310e89f 100644
--- a/drivers/net/dsa/microchip/ksz_spi.c
+++ b/drivers/net/dsa/microchip/ksz_spi.c
@@ -2,7 +2,7 @@
/*
* Microchip ksz series register access through SPI
*
- * Copyright (C) 2017 Microchip Technology Inc.
+ * Copyright (C) 2017-2024 Microchip Technology Inc.
* Tristram Ha <Tristram.Ha@microchip.com>
*/
@@ -60,6 +60,9 @@ static int ksz_spi_probe(struct spi_device *spi)
chip->chip_id == KSZ8794_CHIP_ID ||
chip->chip_id == KSZ8765_CHIP_ID)
regmap_config = ksz8795_regmap_config;
+ else if (chip->chip_id == KSZ8895_CHIP_ID ||
+ chip->chip_id == KSZ8864_CHIP_ID)
+ regmap_config = ksz8863_regmap_config;
else
regmap_config = ksz9477_regmap_config;
@@ -137,10 +140,18 @@ static const struct of_device_id ksz_dt_ids[] = {
.data = &ksz_switch_chips[KSZ8830]
},
{
+ .compatible = "microchip,ksz8864",
+ .data = &ksz_switch_chips[KSZ8864]
+ },
+ {
.compatible = "microchip,ksz8873",
.data = &ksz_switch_chips[KSZ8830]
},
{
+ .compatible = "microchip,ksz8895",
+ .data = &ksz_switch_chips[KSZ8895]
+ },
+ {
.compatible = "microchip,ksz9477",
.data = &ksz_switch_chips[KSZ9477]
},
@@ -201,7 +212,9 @@ static const struct spi_device_id ksz_spi_ids[] = {
{ "ksz8794" },
{ "ksz8795" },
{ "ksz8863" },
+ { "ksz8864" },
{ "ksz8873" },
+ { "ksz8895" },
{ "ksz9477" },
{ "ksz9896" },
{ "ksz9897" },