]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: dsa: mt7530: move enabling disabling core clock to mt7530_pll_setup()
authorArınç ÜNAL <arinc.unal@arinc9.com>
Mon, 20 Mar 2023 19:05:18 +0000 (22:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:49:11 +0000 (12:49 +0200)
commit4424f88795d6d90948b5725c8874f49e72468df0
tree4be8aa4299d555ed458c4884ac64fe53e5fecc01
parentd4fe4edc6cf041aeda7e82d45e0e22ea2289895d
net: dsa: mt7530: move enabling disabling core clock to mt7530_pll_setup()

[ Upstream commit 8f058a6ef99f0b88a177b58cc46a44ff5112e40a ]

Split the code that enables and disables TRGMII clocks and core clock.
Move enabling and disabling core clock to mt7530_pll_setup() as it's
supposed to be run there.

Add 20 ms delay before enabling the core clock as seen on the U-Boot
MediaTek ethernet driver.

Change the comment for enabling and disabling TRGMII clocks as the code
seems to affect both TXC and RXC.

Tested rgmii and trgmii modes of port 6 and rgmii mode of port 5 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")
Link: https://source.denx.de/u-boot/u-boot/-/blob/29a48bf9ccba45a5e560bb564bbe76e42629325f/drivers/net/mtk_eth.c#L589
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/20230320190520.124513-1-arinc.unal@arinc9.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mt7530.c