Skip to content

Commit 4531681

Browse files
prabhakarladdavem330
authored andcommitted
net: dsa: add support for ksz9897 ethernet switch
ksz9477 is superset of ksz9xx series, driver just works out of the box for ksz9897 chip with this patch. Signed-off-by: Lad, Prabhakar <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7797b93 commit 4531681

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Documentation/devicetree/bindings/net/dsa/ksz.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Microchip KSZ Series Ethernet switches
44
Required properties:
55

66
- compatible: For external switch chips, compatible string must be exactly one
7-
of: "microchip,ksz9477"
7+
of the following:
8+
- "microchip,ksz9477"
9+
- "microchip,ksz9897"
810

911
See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
1012
required and optional properties.

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,15 @@ static const struct ksz_chip_data ksz_switch_chips[] = {
11021102
.cpu_ports = 0x7F, /* can be configured as cpu port */
11031103
.port_cnt = 7, /* total physical port count */
11041104
},
1105+
{
1106+
.chip_id = 0x00989700,
1107+
.dev_name = "KSZ9897",
1108+
.num_vlans = 4096,
1109+
.num_alus = 4096,
1110+
.num_statics = 16,
1111+
.cpu_ports = 0x7F, /* can be configured as cpu port */
1112+
.port_cnt = 7, /* total physical port count */
1113+
},
11051114
};
11061115

11071116
static int ksz_switch_init(struct ksz_device *dev)

drivers/net/dsa/microchip/ksz_spi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ static int ksz_spi_remove(struct spi_device *spi)
195195

196196
static const struct of_device_id ksz_dt_ids[] = {
197197
{ .compatible = "microchip,ksz9477" },
198+
{ .compatible = "microchip,ksz9897" },
198199
{},
199200
};
200201
MODULE_DEVICE_TABLE(of, ksz_dt_ids);

0 commit comments

Comments
 (0)