summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorArınç ÜNAL <arinc.unal@arinc9.com>2024-04-22 10:15:22 +0300
committerDavid S. Miller <davem@davemloft.net>2024-04-24 11:57:03 +0100
commitbf1774491eea7f0c146eac5b64cc93b38f5c5335 (patch)
treeeb939b52e723ede4637fb3dee9acaf9681bbed59 /drivers/net
parent9df9aec174f582c01f67ce1a9d2dc4f289e13b3f (diff)
net: dsa: mt7530: explain exposing MDIO bus of MT7531AE better
Unlike MT7531BE, the GPIO 6-12 pins are not used for RGMII on MT7531AE. Therefore, the GPIO 11-12 pins are set to function as MDC and MDIO to expose the MDIO bus of the switch. Replace the comment with a better explanation. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/dsa/mt7530.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 1f6cd24de4b7..2b9f904a98f0 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -2635,7 +2635,10 @@ mt7531_setup(struct dsa_switch *ds)
if (!priv->p5_sgmii) {
mt7531_pll_setup(priv);
} else {
- /* Let ds->user_mii_bus be able to access external phy. */
+ /* Unlike MT7531BE, the GPIO 6-12 pins are not used for RGMII on
+ * MT7531AE. Set the GPIO 11-12 pins to function as MDC and MDIO
+ * to expose the MDIO bus of the switch.
+ */
mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO11_RG_RXD2_MASK,
MT7531_EXT_P_MDC_11);
mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO12_RG_RXD3_MASK,