From: Florian Fainelli <f.fainelli@gmail•com>
To: Vladimir Oltean <olteanv@gmail•com>,
Jakub Kicinski <kuba@kernel•org>,
"David S. Miller" <davem@davemloft•net>,
netdev@vger•kernel.org
Cc: Andrew Lunn <andrew@lunn•ch>,
Vivien Didelot <vivien.didelot@gmail•com>,
Vladimir Oltean <vladimir.oltean@nxp•com>
Subject: Re: [PATCH net-next 07/13] net: dsa: sja1105: always keep RGMII ports in the MAC role
Date: Mon, 24 May 2021 19:24:10 -0700 [thread overview]
Message-ID: <eb3e9ba6-718b-8dda-dc97-da86ca52d9e3@gmail.com> (raw)
In-Reply-To: <20210524232214.1378937-8-olteanv@gmail.com>
On 5/24/2021 4:22 PM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp•com>
>
> In SJA1105, the xMII Mode Parameters Table field called PHY_MAC denotes
> the 'role' of the port, be it a PHY or a MAC. This makes a difference in
> the MII and RMII protocols, but RGMII is symmetric, so either PHY or MAC
> settings result in the same hardware behavior.
>
> The SJA1110 is different, and the RGMII ports only work when configured
> in MAC mode, so keep the port roles in MAC mode unconditionally.
>
> Why we had an RGMII port in the PHY role in the first place was because
> we wanted to have a way in the driver to denote whether RGMII delays
> should be applied based on the phy-mode property or not. This is already
> done in sja1105_parse_rgmii_delays() based on an intermediary
> struct sja1105_dt_port (which contains the port role). So it is a
> logical fallacy to use the hardware configuration as a scratchpad for
> driver data, it isn't necessary.
>
> We can also remove the gating condition for applying RGMII delays only
> for ports in the PHY role. The .setup_rgmii_delay() method looks at
> the priv->rgmii_rx_delay[port] and priv->rgmii_tx_delay[port] properties
> which are already populated properly (in the case of a port in the MAC
> role they are false). Removing this condition generates a few more SPI
> writes for these ports (clearing the RGMII delays) which are perhaps
> useless for SJA1105P/Q/R/S, where we know that the delays are disabled
> by default. But for SJA1110, the firmware on the embedded microcontroller
> might have done something funny, so it's always a good idea to clear the
> RGMII delays if that's what Linux expects.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp•com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail•com>
--
Florian
next prev parent reply other threads:[~2021-05-25 2:24 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 23:22 [PATCH net-next 00/13] Add NXP SJA1110 support to the sja1105 DSA driver Vladimir Oltean
2021-05-24 23:22 ` [PATCH net-next 01/13] net: dsa: sja1105: be compatible with "ethernet-ports" OF node name Vladimir Oltean
2021-05-25 2:13 ` Florian Fainelli
2021-05-24 23:22 ` [PATCH net-next 02/13] net: dsa: sja1105: allow SGMII PCS configuration to be per port Vladimir Oltean
2021-05-25 2:16 ` Florian Fainelli
2021-05-26 12:39 ` Vladimir Oltean
2021-05-24 23:22 ` [PATCH net-next 03/13] net: dsa: sja1105: the 0x1F0000 SGMII "base address" is actually MDIO_MMD_VEND2 Vladimir Oltean
2021-05-25 2:19 ` Florian Fainelli
2021-05-25 9:12 ` Vladimir Oltean
2021-05-25 2:40 ` Andrew Lunn
2021-05-24 23:22 ` [PATCH net-next 04/13] net: dsa: sja1105: cache the phy-mode port property Vladimir Oltean
2021-05-25 2:19 ` Florian Fainelli
2021-05-24 23:22 ` [PATCH net-next 05/13] net: dsa: sja1105: add a PHY interface type compatibility matrix Vladimir Oltean
2021-05-25 2:23 ` Florian Fainelli
2021-05-26 12:37 ` Vladimir Oltean
2021-05-24 23:22 ` [PATCH net-next 06/13] net: dsa: sja1105: add a translation table for port speeds Vladimir Oltean
2021-05-24 23:22 ` [PATCH net-next 07/13] net: dsa: sja1105: always keep RGMII ports in the MAC role Vladimir Oltean
2021-05-25 2:24 ` Florian Fainelli [this message]
2021-05-24 23:22 ` [PATCH net-next 08/13] net: dsa: sja1105: some table entries are always present when read dynamically Vladimir Oltean
2021-05-24 23:22 ` [PATCH net-next 09/13] dt-bindings: net: dsa: sja1105: add compatible strings for SJA1110 Vladimir Oltean
2021-05-25 2:24 ` Florian Fainelli
2021-05-25 11:57 ` Vladimir Oltean
2021-05-24 23:22 ` [PATCH net-next 10/13] net: dsa: sja1105: add support for the SJA1110 switch family Vladimir Oltean
2021-05-24 23:22 ` [PATCH net-next 11/13] net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX Vladimir Oltean
2021-05-25 2:18 ` Andrew Lunn
2021-05-25 11:54 ` Vladimir Oltean
2021-05-25 13:16 ` Andrew Lunn
2021-05-25 13:21 ` Vladimir Oltean
2021-05-25 13:43 ` Andrew Lunn
2021-05-26 11:52 ` Vladimir Oltean
2021-05-25 2:27 ` Florian Fainelli
2021-05-24 23:22 ` [PATCH net-next 12/13] net: dsa: sja1105: expose the SGMII PCS as an mdio_device Vladimir Oltean
2021-05-25 2:33 ` Andrew Lunn
2021-05-25 2:35 ` Florian Fainelli
2021-05-25 11:50 ` Vladimir Oltean
2021-05-24 23:22 ` [PATCH net-next 13/13] net: dsa: sja1105: add support for the SJA1110 SGMII/2500base-x PCS Vladimir Oltean
2021-05-25 2:39 ` Florian Fainelli
2021-05-25 11:47 ` Vladimir Oltean
2021-05-25 2:03 ` [PATCH net-next 00/13] Add NXP SJA1110 support to the sja1105 DSA driver Andrew Lunn
2021-05-26 12:51 ` Vladimir Oltean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb3e9ba6-718b-8dda-dc97-da86ca52d9e3@gmail.com \
--to=f.fainelli@gmail$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=olteanv@gmail$(echo .)com \
--cc=vivien.didelot@gmail$(echo .)com \
--cc=vladimir.oltean@nxp$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox