All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: phy: T1 support
@ 2019-05-22 18:47 Andrew Lunn
  2019-05-22 18:47 ` [PATCH net-next 1/2] net: phy: Add support for 100BaseT1 and 1000BaseT1 Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Lunn @ 2019-05-22 18:47 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Florian Fainelli, Heiner Kallweit, Marek Vasut, Andrew Lunn

T1 PHYs make use of a single twisted pair, rather than the traditional
2 pair for 100BaseT or 4 pair for 1000BaseT. This patchset adds link
modes for 100BaseT1 and 1000BaseT1, and them makes use of 100BaseT1 in
the list of PHY features used by current T1 drivers.

---

The NXP PHY TJA1100 and TJA1101 have ability bits in the extended
status register to indicate they support 100BaseT1. However i've not
been able to verify that these bits are actually part of the 802.3
standard. They are not in the 802.3 2018. So at the moment i assume
they are proprietary.

Andrew Lunn (2):
  net: phy: Add support for 100BaseT1 and 1000BaseT1
  net: phy: Make phy_basic_t1_features use base100t1.

 drivers/net/phy/phy-core.c   | 4 +++-
 drivers/net/phy/phy_device.c | 2 +-
 include/uapi/linux/ethtool.h | 2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.20.1


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

* [PATCH net-next 1/2] net: phy: Add support for 100BaseT1 and 1000BaseT1
  2019-05-22 18:47 [PATCH net-next 0/2] net: phy: T1 support Andrew Lunn
@ 2019-05-22 18:47 ` Andrew Lunn
  2019-05-22 18:47 ` [PATCH net-next 2/2] net: phy: Make phy_basic_t1_features use base100t1 Andrew Lunn
  2019-05-23  0:48 ` [PATCH net-next 0/2] net: phy: T1 support David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2019-05-22 18:47 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Florian Fainelli, Heiner Kallweit, Marek Vasut, Andrew Lunn

Add link modes for 100Mbps and 1Gbps over a single pair.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/phy/phy-core.c   | 4 +++-
 include/uapi/linux/ethtool.h | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c
index 3daf0214a242..16667fbac8bf 100644
--- a/drivers/net/phy/phy-core.c
+++ b/drivers/net/phy/phy-core.c
@@ -8,7 +8,7 @@
 
 const char *phy_speed_to_str(int speed)
 {
-	BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 67,
+	BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 69,
 		"Enum ethtool_link_mode_bit_indices and phylib are out of sync. "
 		"If a speed or mode has been added please update phy_speed_to_str "
 		"and the PHY settings array.\n");
@@ -131,9 +131,11 @@ static const struct phy_setting settings[] = {
 	PHY_SETTING(   1000, FULL,   1000baseKX_Full		),
 	PHY_SETTING(   1000, FULL,   1000baseT_Full		),
 	PHY_SETTING(   1000, HALF,   1000baseT_Half		),
+	PHY_SETTING(   1000, FULL,   1000baseT1_Full		),
 	PHY_SETTING(   1000, FULL,   1000baseX_Full		),
 	/* 100M */
 	PHY_SETTING(    100, FULL,    100baseT_Full		),
+	PHY_SETTING(    100, FULL,    100baseT1_Full		),
 	PHY_SETTING(    100, HALF,    100baseT_Half		),
 	/* 10M */
 	PHY_SETTING(     10, FULL,     10baseT_Full		),
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 3534ce157ae9..dd06302aa93e 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1483,6 +1483,8 @@ enum ethtool_link_mode_bit_indices {
 	ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 64,
 	ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT	 = 65,
 	ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT	 = 66,
+	ETHTOOL_LINK_MODE_100baseT1_Full_BIT		 = 67,
+	ETHTOOL_LINK_MODE_1000baseT1_Full_BIT		 = 68,
 
 	/* must be last entry */
 	__ETHTOOL_LINK_MODE_MASK_NBITS
-- 
2.20.1


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

* [PATCH net-next 2/2] net: phy: Make phy_basic_t1_features use base100t1.
  2019-05-22 18:47 [PATCH net-next 0/2] net: phy: T1 support Andrew Lunn
  2019-05-22 18:47 ` [PATCH net-next 1/2] net: phy: Add support for 100BaseT1 and 1000BaseT1 Andrew Lunn
@ 2019-05-22 18:47 ` Andrew Lunn
  2019-05-23  0:48 ` [PATCH net-next 0/2] net: phy: T1 support David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2019-05-22 18:47 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Florian Fainelli, Heiner Kallweit, Marek Vasut, Andrew Lunn

Now that there is a link mode for 100BaseT1, use it in
phy_basic_t1_features so T1 PHY drivers will indicate this mode via
the Ethtool API.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/phy/phy_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index dcc93a873174..5d288da9a3b0 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -89,7 +89,7 @@ EXPORT_SYMBOL_GPL(phy_10_100_features_array);
 
 const int phy_basic_t1_features_array[2] = {
 	ETHTOOL_LINK_MODE_TP_BIT,
-	ETHTOOL_LINK_MODE_100baseT_Full_BIT,
+	ETHTOOL_LINK_MODE_100baseT1_Full_BIT,
 };
 EXPORT_SYMBOL_GPL(phy_basic_t1_features_array);
 
-- 
2.20.1


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

* Re: [PATCH net-next 0/2] net: phy: T1 support
  2019-05-22 18:47 [PATCH net-next 0/2] net: phy: T1 support Andrew Lunn
  2019-05-22 18:47 ` [PATCH net-next 1/2] net: phy: Add support for 100BaseT1 and 1000BaseT1 Andrew Lunn
  2019-05-22 18:47 ` [PATCH net-next 2/2] net: phy: Make phy_basic_t1_features use base100t1 Andrew Lunn
@ 2019-05-23  0:48 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-05-23  0:48 UTC (permalink / raw)
  To: andrew; +Cc: netdev, f.fainelli, hkallweit1, marex

From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 22 May 2019 20:47:02 +0200

> T1 PHYs make use of a single twisted pair, rather than the traditional
> 2 pair for 100BaseT or 4 pair for 1000BaseT. This patchset adds link
> modes for 100BaseT1 and 1000BaseT1, and them makes use of 100BaseT1 in
> the list of PHY features used by current T1 drivers.

Series applied.

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

end of thread, other threads:[~2019-05-23  0:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 18:47 [PATCH net-next 0/2] net: phy: T1 support Andrew Lunn
2019-05-22 18:47 ` [PATCH net-next 1/2] net: phy: Add support for 100BaseT1 and 1000BaseT1 Andrew Lunn
2019-05-22 18:47 ` [PATCH net-next 2/2] net: phy: Make phy_basic_t1_features use base100t1 Andrew Lunn
2019-05-23  0:48 ` [PATCH net-next 0/2] net: phy: T1 support David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.