]> git.itanic.dy.fi Git - linux-stable/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)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Mar 2023 05:14:45 +0000 (22:14 -0700)
commit8f058a6ef99f0b88a177b58cc46a44ff5112e40a
tree6fdbb099484d7d268076e33498f8cf4db89a9815
parent8eac0095de355ee31e1b014f79f83d2cd62a2d04
net: dsa: mt7530: move enabling disabling core clock to mt7530_pll_setup()

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>
drivers/net/dsa/mt7530.c