linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] net: ethernet: ave: Add capability of rgmii-id mode
@ 2020-02-12 10:55 Kunihiko Hayashi
  2020-02-12 17:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Kunihiko Hayashi @ 2020-02-12 10:55 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, linux-kernel, Masami Hiramatsu, Jassi Brar, Kunihiko Hayashi

This allows you to specify the type of rgmii-id that will enable phy
internal delay in ethernet phy-mode.

This adds all RGMII cases to all of get_pinmode() except LD11, because LD11
SoC doesn't support RGMII due to the constraint of the hardware. When RGMII
phy mode is specified in the devicetree for LD11, the driver will abort
with an error.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
Changes since v1:
- Add description about LD11 to the commit message

 drivers/net/ethernet/socionext/sni_ave.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
index b703242..67ddf78 100644
--- a/drivers/net/ethernet/socionext/sni_ave.c
+++ b/drivers/net/ethernet/socionext/sni_ave.c
@@ -1810,6 +1810,9 @@ static int ave_pro4_get_pinmode(struct ave_private *priv,
 		break;
 	case PHY_INTERFACE_MODE_MII:
 	case PHY_INTERFACE_MODE_RGMII:
+	case PHY_INTERFACE_MODE_RGMII_ID:
+	case PHY_INTERFACE_MODE_RGMII_RXID:
+	case PHY_INTERFACE_MODE_RGMII_TXID:
 		priv->pinmode_val = 0;
 		break;
 	default:
@@ -1854,6 +1857,9 @@ static int ave_ld20_get_pinmode(struct ave_private *priv,
 		priv->pinmode_val = SG_ETPINMODE_RMII(0);
 		break;
 	case PHY_INTERFACE_MODE_RGMII:
+	case PHY_INTERFACE_MODE_RGMII_ID:
+	case PHY_INTERFACE_MODE_RGMII_RXID:
+	case PHY_INTERFACE_MODE_RGMII_TXID:
 		priv->pinmode_val = 0;
 		break;
 	default:
@@ -1876,6 +1882,9 @@ static int ave_pxs3_get_pinmode(struct ave_private *priv,
 		priv->pinmode_val = SG_ETPINMODE_RMII(arg);
 		break;
 	case PHY_INTERFACE_MODE_RGMII:
+	case PHY_INTERFACE_MODE_RGMII_ID:
+	case PHY_INTERFACE_MODE_RGMII_RXID:
+	case PHY_INTERFACE_MODE_RGMII_TXID:
 		priv->pinmode_val = 0;
 		break;
 	default:
-- 
2.7.4


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

* Re: [PATCH net v2] net: ethernet: ave: Add capability of rgmii-id mode
  2020-02-12 10:55 [PATCH net v2] net: ethernet: ave: Add capability of rgmii-id mode Kunihiko Hayashi
@ 2020-02-12 17:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-02-12 17:55 UTC (permalink / raw)
  To: hayashi.kunihiko; +Cc: netdev, linux-kernel, masami.hiramatsu, jaswinder.singh

From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date: Wed, 12 Feb 2020 19:55:34 +0900

> This allows you to specify the type of rgmii-id that will enable phy
> internal delay in ethernet phy-mode.
> 
> This adds all RGMII cases to all of get_pinmode() except LD11, because LD11
> SoC doesn't support RGMII due to the constraint of the hardware. When RGMII
> phy mode is specified in the devicetree for LD11, the driver will abort
> with an error.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
> Changes since v1:
> - Add description about LD11 to the commit message

Applied, thank you.

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

end of thread, other threads:[~2020-02-12 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 10:55 [PATCH net v2] net: ethernet: ave: Add capability of rgmii-id mode Kunihiko Hayashi
2020-02-12 17:55 ` David Miller

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).