mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch
@ 2023-08-11 11:53 Oleksij Rempel
  2023-08-11 11:53 ` [PATCH v1 2/2] net: ksz9477: do not advertise EEE support Oleksij Rempel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Oleksij Rempel @ 2023-08-11 11:53 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

Add support for Microchip KSZ9893 switch. No additional changes seems to
be needed.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/ksz9477.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ksz9477.c b/drivers/net/ksz9477.c
index 61142aa97b..a6a8144479 100644
--- a/drivers/net/ksz9477.c
+++ b/drivers/net/ksz9477.c
@@ -476,6 +476,7 @@ static const struct of_device_id microchip_switch_dt_ids[] = {
 	{ .compatible = "microchip,ksz8563" },
 	{ .compatible = "microchip,ksz9477" },
 	{ .compatible = "microchip,ksz9563" },
+	{ .compatible = "microchip,ksz9893" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, microchip_switch_dt_ids);
-- 
2.39.2




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 2/2] net: ksz9477: do not advertise EEE support
  2023-08-11 11:53 [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch Oleksij Rempel
@ 2023-08-11 11:53 ` Oleksij Rempel
  2023-08-11 12:50 ` [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch Ahmad Fatoum
  2023-08-14  5:54 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Oleksij Rempel @ 2023-08-11 11:53 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

Do not advertise EEE support for all ksz9477 based chips. EEE needs
proper handling which we can't guarantee with limited resources.

At same time remove wrong comment and Gbit check. EEE is not coupled to
Gbit and KSZ8565 supports EEE as well. So, it seems like there is
nothing right on this comment.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/ksz9477.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ksz9477.c b/drivers/net/ksz9477.c
index a6a8144479..9665e0f723 100644
--- a/drivers/net/ksz9477.c
+++ b/drivers/net/ksz9477.c
@@ -175,12 +175,6 @@ static void ksz9477_phy_errata_setup(struct ksz_switch *priv, int port)
 	 */
 	ksz9477_port_mmd_write(priv, port, 0x1c, 0x04, 0x00d0);
 
-	/* Energy Efficient Ethernet (EEE) feature select must
-	 * be manually disabled (except on KSZ8565 which is 100Mbit)
-	 */
-	if (priv->features & GBIT_SUPPORT)
-		ksz9477_port_mmd_write(priv, port, 0x07, 0x3c, 0x0000);
-
 	/* Register settings are required to meet data sheet
 	 * supply current specifications
 	 */
@@ -269,6 +263,8 @@ static int ksz_port_setup(struct ksz_switch *priv, int port,
 		if (priv->features & KSZ9477_PHY_ERRATA)
 			ksz9477_phy_errata_setup(priv, port);
 
+		ksz9477_port_mmd_write(priv, port, 0x07, 0x3c, 0x0000);
+
 		ksz_pwrite16(priv, port, 0x100 + (MII_BMCR << 1),
 			     BMCR_ANENABLE | BMCR_ANRESTART | BMCR_RESET);
 	} else {
-- 
2.39.2




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch
  2023-08-11 11:53 [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch Oleksij Rempel
  2023-08-11 11:53 ` [PATCH v1 2/2] net: ksz9477: do not advertise EEE support Oleksij Rempel
@ 2023-08-11 12:50 ` Ahmad Fatoum
  2023-08-14  5:54 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2023-08-11 12:50 UTC (permalink / raw)
  To: Oleksij Rempel, barebox

On 11.08.23 13:53, Oleksij Rempel wrote:
> Add support for Microchip KSZ9893 switch. No additional changes seems to
> be needed.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  drivers/net/ksz9477.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ksz9477.c b/drivers/net/ksz9477.c
> index 61142aa97b..a6a8144479 100644
> --- a/drivers/net/ksz9477.c
> +++ b/drivers/net/ksz9477.c
> @@ -476,6 +476,7 @@ static const struct of_device_id microchip_switch_dt_ids[] = {
>  	{ .compatible = "microchip,ksz8563" },
>  	{ .compatible = "microchip,ksz9477" },
>  	{ .compatible = "microchip,ksz9563" },
> +	{ .compatible = "microchip,ksz9893" },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, microchip_switch_dt_ids);

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch
  2023-08-11 11:53 [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch Oleksij Rempel
  2023-08-11 11:53 ` [PATCH v1 2/2] net: ksz9477: do not advertise EEE support Oleksij Rempel
  2023-08-11 12:50 ` [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch Ahmad Fatoum
@ 2023-08-14  5:54 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2023-08-14  5:54 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: barebox

On Fri, Aug 11, 2023 at 01:53:24PM +0200, Oleksij Rempel wrote:
> Add support for Microchip KSZ9893 switch. No additional changes seems to
> be needed.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/ksz9477.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/net/ksz9477.c b/drivers/net/ksz9477.c
> index 61142aa97b..a6a8144479 100644
> --- a/drivers/net/ksz9477.c
> +++ b/drivers/net/ksz9477.c
> @@ -476,6 +476,7 @@ static const struct of_device_id microchip_switch_dt_ids[] = {
>  	{ .compatible = "microchip,ksz8563" },
>  	{ .compatible = "microchip,ksz9477" },
>  	{ .compatible = "microchip,ksz9563" },
> +	{ .compatible = "microchip,ksz9893" },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, microchip_switch_dt_ids);
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-14  5:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 11:53 [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch Oleksij Rempel
2023-08-11 11:53 ` [PATCH v1 2/2] net: ksz9477: do not advertise EEE support Oleksij Rempel
2023-08-11 12:50 ` [PATCH v1 1/2] net: ksz9477: add support for ksz9893 switch Ahmad Fatoum
2023-08-14  5:54 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox