* [PATCH] net: dsa: add support for ksz9897 ethernet switch
@ 2018-08-15 15:51 Lad Prabhakar
2018-08-16 0:24 ` Florian Fainelli
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lad Prabhakar @ 2018-08-15 15:51 UTC (permalink / raw)
To: Woojung Huh, Microchip Linux Driver Support, Andrew Lunn,
Vivien Didelot, Florian Fainelli
Cc: netdev, devicetree, Lad, Prabhakar
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
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>
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 4 +++-
drivers/net/dsa/microchip/ksz_common.c | 9 +++++++++
drivers/net/dsa/microchip/ksz_spi.c | 1 +
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt b/Documentation/devicetree/bindings/net/dsa/ksz.txt
index a700943..ac145b8 100644
--- a/Documentation/devicetree/bindings/net/dsa/ksz.txt
+++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt
@@ -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.
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 7210c49..54e0ca6 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -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)
diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c
index c519469..8c1778b 100644
--- a/drivers/net/dsa/microchip/ksz_spi.c
+++ b/drivers/net/dsa/microchip/ksz_spi.c
@@ -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);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: dsa: add support for ksz9897 ethernet switch
2018-08-15 15:51 [PATCH] net: dsa: add support for ksz9897 ethernet switch Lad Prabhakar
@ 2018-08-16 0:24 ` Florian Fainelli
2018-08-16 19:25 ` David Miller
2018-08-17 15:09 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2018-08-16 0:24 UTC (permalink / raw)
To: Lad Prabhakar, Woojung Huh, Microchip Linux Driver Support,
Andrew Lunn, Vivien Didelot
Cc: netdev, devicetree
On 08/15/2018 08:51 AM, Lad Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> ksz9477 is superset of ksz9xx series, driver just works
> out of the box for ksz9897 chip with this patch.
net-next is currently closed, but other than that:
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> ---
> Documentation/devicetree/bindings/net/dsa/ksz.txt | 4 +++-
> drivers/net/dsa/microchip/ksz_common.c | 9 +++++++++
> drivers/net/dsa/microchip/ksz_spi.c | 1 +
> 3 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt b/Documentation/devicetree/bindings/net/dsa/ksz.txt
> index a700943..ac145b8 100644
> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt
> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt
> @@ -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.
> diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
> index 7210c49..54e0ca6 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -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)
> diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c
> index c519469..8c1778b 100644
> --- a/drivers/net/dsa/microchip/ksz_spi.c
> +++ b/drivers/net/dsa/microchip/ksz_spi.c
> @@ -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);
>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: dsa: add support for ksz9897 ethernet switch
2018-08-15 15:51 [PATCH] net: dsa: add support for ksz9897 ethernet switch Lad Prabhakar
2018-08-16 0:24 ` Florian Fainelli
@ 2018-08-16 19:25 ` David Miller
2018-08-17 15:09 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-08-16 19:25 UTC (permalink / raw)
To: prabhakar.csengg
Cc: Woojung.Huh, UNGLinuxDriver, andrew, vivien.didelot, f.fainelli,
netdev, devicetree
From: Lad Prabhakar <prabhakar.csengg@gmail.com>
Date: Wed, 15 Aug 2018 16:51:23 +0100
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> 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>
Since this is just adding chip IDs and such, this can go in now.
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: dsa: add support for ksz9897 ethernet switch
2018-08-15 15:51 [PATCH] net: dsa: add support for ksz9897 ethernet switch Lad Prabhakar
2018-08-16 0:24 ` Florian Fainelli
2018-08-16 19:25 ` David Miller
@ 2018-08-17 15:09 ` Rob Herring
2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2018-08-17 15:09 UTC (permalink / raw)
Cc: Woojung Huh, Microchip Linux Driver Support, Andrew Lunn,
Vivien Didelot, Florian Fainelli, netdev, devicetree,
Lad, Prabhakar
Hi, this email is from Rob's (experimental) review bot. I found a couple
of common problems with your patch. Please see below.
On Wed, 15 Aug 2018 16:51:23 +0100, Lad Prabhakar wrote:
> From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
>
> 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>
The preferred subject prefix is "dt-bindings: <binding dir>: ...".
> ---
> Documentation/devicetree/bindings/net/dsa/ksz.txt | 4 +++-
> drivers/net/dsa/microchip/ksz_common.c | 9 +++++++++
> drivers/net/dsa/microchip/ksz_spi.c | 1 +
> 3 files changed, 13 insertions(+), 1 deletion(-)
>
DT bindings (including binding headers) should be a separate patch. See
Documentation/devicetree/bindings/submitting-patches.txt.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-17 15:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-15 15:51 [PATCH] net: dsa: add support for ksz9897 ethernet switch Lad Prabhakar
2018-08-16 0:24 ` Florian Fainelli
2018-08-16 19:25 ` David Miller
2018-08-17 15:09 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).