[PATCH 1/2] net: ave: Add capability of rgmii-id mode

Ramon Fried rfried.dev at gmail.com
Sat Aug 6 19:18:38 CEST 2022


On Wed, Jul 13, 2022 at 4:59 AM Kunihiko Hayashi
<hayashi.kunihiko at socionext.com> wrote:
>
> 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 at socionext.com>
> ---
>  drivers/net/sni_ave.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
> index 58276a40c774..014b070d9e52 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;
> --
> 2.7.4
>
Reviewed-by: Ramon Fried <rfried.dev at gmail.com>


More information about the U-Boot mailing list