]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: dsa: mt7530: set PLL frequency and trgmii only when trgmii is used
authorArınç ÜNAL <arinc.unal@arinc9.com>
Fri, 10 Mar 2023 07:33:38 +0000 (10:33 +0300)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:15 +0000 (13:33 +0200)
commite1dba03e9a7bfc9ce9e07e2a6b65a7679a8fdc6d
tree7c4b0f7975d96c0f8cd7f2e99d94c7cfa4f94c08
parent743c9f80bbcfcd311d48a04d25aeca55144459de
net: dsa: mt7530: set PLL frequency and trgmii only when trgmii is used

BugLink: https://bugs.launchpad.net/bugs/2016876
[ Upstream commit 0b086d76e7b011772b0ac214c6e5fd5816eff2df ]

As my testing on the MCM MT7530 switch on MT7621 SoC shows, setting the PLL
frequency does not affect MII modes other than trgmii on port 5 and port 6.
So the assumption is that the operation here called "setting the PLL
frequency" actually sets the frequency of the TRGMII TX clock.

Make it so that it and the rest of the trgmii setup run only when the
trgmii mode is used.

Tested rgmii and trgmii modes of port 6 on MCM MT7530 on MT7621AT Unielec
U7621-06 and standalone MT7530 on MT7623NI Bananapi BPI-R2.

Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20230310073338.5836-2-arinc.unal@arinc9.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/dsa/mt7530.c