* [PATCH] net: phy: micrel: add KSZ8795 ethernet switch
@ 2017-01-20 12:50 Sean Nyekjaer
2017-01-20 14:17 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Sean Nyekjaer @ 2017-01-20 12:50 UTC (permalink / raw)
To: netdev; +Cc: Sean Nyekjaer
This ethernet switch have unfortunately the same phy id as KSZ8051.
Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
---
drivers/net/phy/micrel.c | 14 ++++++++++++++
include/linux/micrel_phy.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index ea92d524d5a8..d47026c18974 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -1014,6 +1014,20 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats,
.suspend = genphy_suspend,
.resume = genphy_resume,
+}, {
+ .phy_id = PHY_ID_KSZ8795,
+ .phy_id_mask = MICREL_PHY_ID_MASK,
+ .name = "Micrel KSZ8795 Switch",
+ .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
+ .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+ .config_init = kszphy_config_init,
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .get_sset_count = kszphy_get_sset_count,
+ .get_strings = kszphy_get_strings,
+ .get_stats = kszphy_get_stats,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
} };
module_phy_driver(ksphy_driver);
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index 257173e0095e..f541da68d1e7 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -35,6 +35,8 @@
#define PHY_ID_KSZ886X 0x00221430
#define PHY_ID_KSZ8863 0x00221435
+#define PHY_ID_KSZ8795 0x00221550
+
/* struct phy_device dev_flags definitions */
#define MICREL_PHY_50MHZ_CLK 0x00000001
#define MICREL_PHY_FXEN 0x00000002
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: phy: micrel: add KSZ8795 ethernet switch
2017-01-20 12:50 [PATCH] net: phy: micrel: add KSZ8795 ethernet switch Sean Nyekjaer
@ 2017-01-20 14:17 ` Andrew Lunn
2017-01-23 7:22 ` Sean Nyekjær
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2017-01-20 14:17 UTC (permalink / raw)
To: Sean Nyekjaer; +Cc: netdev
On Fri, Jan 20, 2017 at 01:50:49PM +0100, Sean Nyekjaer wrote:
> This ethernet switch have unfortunately the same phy id as KSZ8051.
Hi Sean
Please could you explain some more. You are adding PHY support here,
not switch support. So is this to enable the PHY driver for the PHYs
embedded in the switch?
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: phy: micrel: add KSZ8795 ethernet switch
2017-01-20 14:17 ` Andrew Lunn
@ 2017-01-23 7:22 ` Sean Nyekjær
0 siblings, 0 replies; 3+ messages in thread
From: Sean Nyekjær @ 2017-01-23 7:22 UTC (permalink / raw)
To: Andrew Lunn; +Cc: netdev
On 2017-01-20 15:17, Andrew Lunn wrote:
> On Fri, Jan 20, 2017 at 01:50:49PM +0100, Sean Nyekjaer wrote:
>> This ethernet switch have unfortunately the same phy id as KSZ8051.
> Hi Sean
>
> Please could you explain some more. You are adding PHY support here,
> not switch support. So is this to enable the PHY driver for the PHYs
> embedded in the switch?
>
> Andrew
Yes of couse :-)
The KSZ8051 is a 5 port managed ethernet switch with integrated PHY with
MII/RMII interface on one port.
Through the MDIO interface is possible to control the PHY on port 1-5.
I have just seen an issue with the reported speed and duplex, so i'm
gonna submit a new version with a better description
/Sean
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-23 7:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-20 12:50 [PATCH] net: phy: micrel: add KSZ8795 ethernet switch Sean Nyekjaer
2017-01-20 14:17 ` Andrew Lunn
2017-01-23 7:22 ` Sean Nyekjær
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).