]> git.itanic.dy.fi Git - linux-stable/commit
net: dsa: mt7530: move lowering TRGMII driving to mt7530_setup()
authorArınç ÜNAL <arinc.unal@arinc9.com>
Mon, 20 Mar 2023 19:05:19 +0000 (22:05 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Mar 2023 05:14:45 +0000 (22:14 -0700)
commitfdcc8ccd823740c18e803b886cec461bc0e64201
tree1cb7671556ec0c1bda910e5a1367f1dbe8c7e571
parent8f058a6ef99f0b88a177b58cc46a44ff5112e40a
net: dsa: mt7530: move lowering TRGMII driving to mt7530_setup()

Move lowering the TRGMII Tx clock driving to mt7530_setup(), after setting
the core clock, as seen on the U-Boot MediaTek ethernet driver.

Move the code which looks like it lowers the TRGMII Rx clock driving to
after the TRGMII Tx clock driving is lowered. This is run after lowering
the Tx clock driving on the U-Boot MediaTek ethernet driver as well.

This way, the switch should consume less power regardless of port 6 being
used.

Update the comment explaining mt7530_pad_clk_setup().

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#L682
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-2-arinc.unal@arinc9.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mt7530.c