Re: [PATCH net-next 13/13] net: dsa: sja1105: add support for the SJA1110 SGMII/2500base-x PCS

Florian Fainelli
2021-05-25T02:39:47Z

On 5/24/2021 4:22 PM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> Configure the Synopsys PCS for 10/100/1000 SGMII in autoneg on/off
> modes, or for fixed 2500base-x.
>
> The portion of PCS configuration that forces the speed is common, but
> the portion that initializes the PCS and enables/disables autoneg is
> different, so a new .pcs_config() method was introduced in struct
> sja1105_info to hide away the differences.
>
> For the xMII Mode Parameters Table to be properly configured for SGMII
> mode on SJA1110, we need to set the "special" bit, since SGMII is
> officially bitwise coded as 0b0011 in SJA1105 (decimal 3, equal to
> XMII_MODE_SGMII), and as 0b1011 in SJA1110 (decimal 11).

That special bit appears to be write only in the patch you submitted, do
we need it?

How much of the programming you are doing is really specific to the
SJA1110 switch family and how much would be universally (or
configurable) applicable to a Synopsys PCS driver that would live
outside of this switch driver?
--
Florian