From: Revanth Kumar Uppala <ruppala@nvidia.com>
To: <andrew@lunn.ch>, <hkallweit1@gmail.com>, <netdev@vger.kernel.org>
Cc: <linux-tegra@vger.kernel.org>,
Revanth Kumar Uppala <ruppala@nvidia.com>,
Narayan Reddy <narayanr@nvidia.com>
Subject: [PATCH] net: phy: Enhance fixed PHY to support 10G and 5G
Date: Wed, 21 Jun 2023 22:28:53 +0530 [thread overview]
Message-ID: <20230621165853.52273-1-ruppala@nvidia.com> (raw)
Add 10G and 5G speed entries for fixed PHY
framework.These are needed for the platforms which
doesn't have a PHY driver.
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
---
drivers/net/phy/swphy.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/phy/swphy.c b/drivers/net/phy/swphy.c
index 59f1ba4d49bc..5380f952e846 100644
--- a/drivers/net/phy/swphy.c
+++ b/drivers/net/phy/swphy.c
@@ -8,6 +8,7 @@
* Anton Vorontsov <avorontsov@ru.mvista.com>
*
* Copyright (c) 2006-2007 MontaVista Software, Inc.
+ * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
*/
#include <linux/export.h>
#include <linux/mii.h>
@@ -29,6 +30,8 @@ enum {
SWMII_SPEED_10 = 0,
SWMII_SPEED_100,
SWMII_SPEED_1000,
+ SWMII_SPEED_5000,
+ SWMII_SPEED_10000,
SWMII_DUPLEX_HALF = 0,
SWMII_DUPLEX_FULL,
};
@@ -51,6 +54,10 @@ static const struct swmii_regs speed[] = {
.lpagb = LPA_1000FULL | LPA_1000HALF,
.estat = ESTATUS_1000_TFULL | ESTATUS_1000_THALF,
},
+ [SWMII_SPEED_5000] = {
+ },
+ [SWMII_SPEED_10000] = {
+ },
};
static const struct swmii_regs duplex[] = {
@@ -71,6 +78,10 @@ static const struct swmii_regs duplex[] = {
static int swphy_decode_speed(int speed)
{
switch (speed) {
+ case 10000:
+ return SWMII_SPEED_10000;
+ case 5000:
+ return SWMII_SPEED_5000;
case 1000:
return SWMII_SPEED_1000;
case 100:
--
2.17.1
next reply other threads:[~2023-06-21 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 16:58 Revanth Kumar Uppala [this message]
2023-06-21 17:30 ` [PATCH] net: phy: Enhance fixed PHY to support 10G and 5G Andrew Lunn
2023-06-23 12:28 ` Revanth Kumar Uppala
2023-06-23 13:29 ` Andrew Lunn
2023-06-23 13:55 ` Russell King (Oracle)
2023-06-27 9:30 ` Revanth Kumar Uppala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230621165853.52273-1-ruppala@nvidia.com \
--to=ruppala@nvidia.com \
--cc=andrew@lunn.ch \
--cc=hkallweit1@gmail.com \
--cc=linux-tegra@vger.kernel.org \
--cc=narayanr@nvidia.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).