[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YZZiZ1urmmvp3MRi@shell.armlinux.org.uk>
Date: Thu, 18 Nov 2021 14:25:43 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Marek Behún <kabel@...nel.org>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 8/8] net: phy: marvell10g: select host interface
configuration
On Thu, Nov 18, 2021 at 02:46:28PM +0100, Marek Behún wrote:
> On Thu, 18 Nov 2021 09:41:27 +0000
> "Russell King (Oracle)" <linux@...linux.org.uk> wrote:
>
> > On Wed, Nov 17, 2021 at 11:50:50PM +0100, Marek Behún wrote:
> > > +static int mv3310_select_mactype(unsigned long *interfaces)
> > > +{
> > > + if (test_bit(PHY_INTERFACE_MODE_USXGMII, interfaces))
> > > + return MV_V2_33X0_PORT_CTRL_MACTYPE_USXGMII;
> > > + else if (test_bit(PHY_INTERFACE_MODE_SGMII, interfaces) &&
> > > + test_bit(PHY_INTERFACE_MODE_10GBASER, interfaces))
> > > + return MV_V2_33X0_PORT_CTRL_MACTYPE_10GBASER;
> > > + else if (test_bit(PHY_INTERFACE_MODE_SGMII, interfaces) &&
> > > + test_bit(PHY_INTERFACE_MODE_RXAUI, interfaces))
> > > + return MV_V2_33X0_PORT_CTRL_MACTYPE_RXAUI;
> > > + else if (test_bit(PHY_INTERFACE_MODE_SGMII, interfaces) &&
> > > + test_bit(PHY_INTERFACE_MODE_XAUI, interfaces))
> > > + return MV_V2_3310_PORT_CTRL_MACTYPE_XAUI;
> > > + else if (test_bit(PHY_INTERFACE_MODE_10GBASER, interfaces))
> > > + return MV_V2_33X0_PORT_CTRL_MACTYPE_10GBASER_RATE_MATCH;
> > > + else if (test_bit(PHY_INTERFACE_MODE_RXAUI, interfaces))
> > > + return MV_V2_33X0_PORT_CTRL_MACTYPE_RXAUI_RATE_MATCH;
> > > + else if (test_bit(PHY_INTERFACE_MODE_XAUI, interfaces))
> > > + return MV_V2_3310_PORT_CTRL_MACTYPE_XAUI_RATE_MATCH;
> > > + else if (test_bit(PHY_INTERFACE_MODE_SGMII, interfaces))
> > > + return MV_V2_33X0_PORT_CTRL_MACTYPE_10GBASER;
> >
> > Hi,
> >
> > There are differences in the MACTYPE register between the 88X3310
> > and 88X3340. For example, the 88X3340 has no support for XAUI.
> > This is documented in the data sheet, and in the definitions of
> > these values - note that MV_V2_3310_PORT_CTRL_MACTYPE_XAUI and
> > MV_V2_3310_PORT_CTRL_MACTYPE_XAUI_RATE_MATCH are only applicable
> > to the 88X3310 (they don't use MV_V2_33X0_*).
>
> Yes, but 88X3340 does not support XAUI, only RXAUI, it is defined in
> supported_interfaces. So PHY_INTERFACE_MODE_XAUI will never be set in
> interfaces, and thus this function can be used for both 88X3310 and
> 88X3340.
Okay, that's fine then. The only setting we will omit from this for
the 88X3340 then is MV_V2_3340_PORT_CTRL_MACTYPE_RXAUI_NO_SGMII_AN.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists