* [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed configuration for LAN7801 if NO EEPROM is detected
@ 2024-05-14 16:01 Rengarajan S
2024-05-14 16:02 ` [PATCH net-next v2 1/2] lan78xx: Enable 125 MHz CLK " Rengarajan S
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rengarajan S @ 2024-05-14 16:01 UTC (permalink / raw)
To: woojung.huh, UNGLinuxDriver, davem, edumazet, kuba, pabeni,
netdev, linux-usb, linux-kernel
Cc: rengarajan.s
This patch series adds the support for 125 MHz clock, Auto speed and
auto duplex configuration for LAN7801 in the absence of EEPROM.
Rengarajan S (2):
lan78xx: Enable 125 MHz CLK configuration for LAN7801 if NO EEPROM is
detected
lan78xx: Enable Auto Speed and Auto Duplex configuration for LAN7801
if NO EEPROM is detected
v2
Split the patches into 125 MHz clock support and Auto speed config
support for LAN7801.
v1
Initial Commit.
drivers/net/usb/lan78xx.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next v2 1/2] lan78xx: Enable 125 MHz CLK configuration for LAN7801 if NO EEPROM is detected
2024-05-14 16:01 [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed configuration for LAN7801 if NO EEPROM is detected Rengarajan S
@ 2024-05-14 16:02 ` Rengarajan S
2024-05-14 16:02 ` [PATCH net-next v2 2/2] lan78xx: Enable Auto Speed and Auto Duplex " Rengarajan S
2024-05-15 16:22 ` [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed " Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: Rengarajan S @ 2024-05-14 16:02 UTC (permalink / raw)
To: woojung.huh, UNGLinuxDriver, davem, edumazet, kuba, pabeni,
netdev, linux-usb, linux-kernel
Cc: rengarajan.s
The 125MHz and 25MHz clock configurations are enabled in the initialization
regardless of EEPROM (125MHz is needed for RGMII 1000Mbps operation). After
a lite reset (lan78xx_reset), these contents go back to defaults(all 0, so
no 125MHz or 25MHz clock).
Signed-off-by: Rengarajan S <rengarajan.s@microchip.com>
---
drivers/net/usb/lan78xx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index ba6c8ac2a736..7ac540cc3686 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2944,6 +2944,8 @@ static int lan78xx_reset(struct lan78xx_net *dev)
return ret;
buf |= HW_CFG_MEF_;
+ buf |= HW_CFG_CLK125_EN_;
+ buf |= HW_CFG_REFCLK25_EN_;
ret = lan78xx_write_reg(dev, HW_CFG, buf);
if (ret < 0)
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next v2 2/2] lan78xx: Enable Auto Speed and Auto Duplex configuration for LAN7801 if NO EEPROM is detected
2024-05-14 16:01 [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed configuration for LAN7801 if NO EEPROM is detected Rengarajan S
2024-05-14 16:02 ` [PATCH net-next v2 1/2] lan78xx: Enable 125 MHz CLK " Rengarajan S
@ 2024-05-14 16:02 ` Rengarajan S
2024-05-15 16:22 ` [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed " Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: Rengarajan S @ 2024-05-14 16:02 UTC (permalink / raw)
To: woojung.huh, UNGLinuxDriver, davem, edumazet, kuba, pabeni,
netdev, linux-usb, linux-kernel
Cc: rengarajan.s
Enabled ASD/ADD configuration for LAN7801 in the absence of EEPROM.
After the lite reset these contents go back to defaults where ASD/
ADD is disabled. The check is already available for LAN7800.
Signed-off-by: Rengarajan S <rengarajan.s@microchip.com>
---
drivers/net/usb/lan78xx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 7ac540cc3686..62dbfff8dad4 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -3034,8 +3034,11 @@ static int lan78xx_reset(struct lan78xx_net *dev)
return ret;
/* LAN7801 only has RGMII mode */
- if (dev->chipid == ID_REV_CHIP_ID_7801_)
+ if (dev->chipid == ID_REV_CHIP_ID_7801_) {
buf &= ~MAC_CR_GMII_EN_;
+ /* Enable Auto Duplex and Auto speed */
+ buf |= MAC_CR_AUTO_DUPLEX_ | MAC_CR_AUTO_SPEED_;
+ }
if (dev->chipid == ID_REV_CHIP_ID_7800_ ||
dev->chipid == ID_REV_CHIP_ID_7850_) {
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed configuration for LAN7801 if NO EEPROM is detected
2024-05-14 16:01 [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed configuration for LAN7801 if NO EEPROM is detected Rengarajan S
2024-05-14 16:02 ` [PATCH net-next v2 1/2] lan78xx: Enable 125 MHz CLK " Rengarajan S
2024-05-14 16:02 ` [PATCH net-next v2 2/2] lan78xx: Enable Auto Speed and Auto Duplex " Rengarajan S
@ 2024-05-15 16:22 ` Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-05-15 16:22 UTC (permalink / raw)
To: Rengarajan S
Cc: woojung.huh, UNGLinuxDriver, davem, edumazet, kuba, pabeni,
netdev, linux-usb, linux-kernel
On Tue, May 14, 2024 at 09:31:59PM +0530, Rengarajan S wrote:
> This patch series adds the support for 125 MHz clock, Auto speed and
> auto duplex configuration for LAN7801 in the absence of EEPROM.
>
> Rengarajan S (2):
> lan78xx: Enable 125 MHz CLK configuration for LAN7801 if NO EEPROM is
> detected
> lan78xx: Enable Auto Speed and Auto Duplex configuration for LAN7801
> if NO EEPROM is detected
>
> v2
> Split the patches into 125 MHz clock support and Auto speed config
> support for LAN7801.
> v1
> Initial Commit.
Hi Rengarajan,
Thanks for the revised patches, they look good to me.
Unfortunately, net-next is currently closed for the v6.10 merge window.
Please consider reposting once net-next re-opens, after 27th May.
Also, feel free to include:
Reviewed-by: Simon Horman <horms@kernel.org>
--
pw-bot: defer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-15 16:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-14 16:01 [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed configuration for LAN7801 if NO EEPROM is detected Rengarajan S
2024-05-14 16:02 ` [PATCH net-next v2 1/2] lan78xx: Enable 125 MHz CLK " Rengarajan S
2024-05-14 16:02 ` [PATCH net-next v2 2/2] lan78xx: Enable Auto Speed and Auto Duplex " Rengarajan S
2024-05-15 16:22 ` [PATCH net-next v2 0/2] lan78xx: Enable 125 MHz CLK and Auto Speed " Simon Horman
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).