Skip to content

Commit

Permalink
net: dsa: add support for ksz9897 ethernet switch
Browse files Browse the repository at this point in the history
ksz9477 is superset of ksz9xx series, driver just works
out of the box for ksz9897 chip with this patch.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lad, Prabhakar authored and David S. Miller committed Aug 16, 2018
1 parent 7797b93 commit 4531681
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/net/dsa/ksz.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Microchip KSZ Series Ethernet switches
Required properties:

- compatible: For external switch chips, compatible string must be exactly one
of: "microchip,ksz9477"
of the following:
- "microchip,ksz9477"
- "microchip,ksz9897"

See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
required and optional properties.
Expand Down
9 changes: 9 additions & 0 deletions drivers/net/dsa/microchip/ksz_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,15 @@ static const struct ksz_chip_data ksz_switch_chips[] = {
.cpu_ports = 0x7F, /* can be configured as cpu port */
.port_cnt = 7, /* total physical port count */
},
{
.chip_id = 0x00989700,
.dev_name = "KSZ9897",
.num_vlans = 4096,
.num_alus = 4096,
.num_statics = 16,
.cpu_ports = 0x7F, /* can be configured as cpu port */
.port_cnt = 7, /* total physical port count */
},
};

static int ksz_switch_init(struct ksz_device *dev)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/dsa/microchip/ksz_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ static int ksz_spi_remove(struct spi_device *spi)

static const struct of_device_id ksz_dt_ids[] = {
{ .compatible = "microchip,ksz9477" },
{ .compatible = "microchip,ksz9897" },
{},
};
MODULE_DEVICE_TABLE(of, ksz_dt_ids);
Expand Down

0 comments on commit 4531681

Please sign in to comment.