aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKunihiko Hayashi2022-07-13 10:59:44 +0900
committerTom Rini2022-08-08 11:37:57 -0400
commit5a28aa6a7b2c9fff1d852ba0093f47987c5b0235 (patch)
treee3c519113d1036e0e8ba3e87bb174708a9e10429 /drivers/net
parentebb8ff61ad97bd1c9721b049497ddb80030eeb0f (diff)
net: ave: Add capability of rgmii-id mode
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> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sni_ave.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 58276a40c77..014b070d9e5 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -483,7 +483,10 @@ static int ave_start(struct udevice *dev)
priv->rx_siz = (PKTSIZE_ALIGN - priv->rx_off);
val = 0;
- if (priv->phy_mode != PHY_INTERFACE_MODE_RGMII)
+ if (priv->phy_mode != PHY_INTERFACE_MODE_RGMII &&
+ priv->phy_mode != PHY_INTERFACE_MODE_RGMII_ID &&
+ priv->phy_mode != PHY_INTERFACE_MODE_RGMII_RXID &&
+ priv->phy_mode != PHY_INTERFACE_MODE_RGMII_TXID)
val |= AVE_CFGR_MII;
writel(val, priv->iobase + AVE_CFGR);
@@ -639,6 +642,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:
break;
default:
return -EINVAL;
@@ -693,6 +699,9 @@ static int ave_ld20_get_pinmode(struct ave_private *priv)
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:
break;
default:
return -EINVAL;
@@ -720,6 +729,9 @@ static int ave_pxs3_get_pinmode(struct ave_private *priv)
val = SG_ETPINMODE_RMII(priv->regmap_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:
break;
default:
return -EINVAL;