[PATCH 1/3] net: dsa: mt7530: fix enabling EEE on MT7531 switch on all boards

Florian Fainelli f.fainelli at gmail.com
Mon Mar 18 06:11:51 PDT 2024



On 3/18/2024 12:46 AM, Arınç ÜNAL via B4 Relay wrote:
> From: Arınç ÜNAL <arinc.unal at arinc9.com>
> 
> The commit 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
> brought EEE support but did not enable EEE on MT7531 switch MACs. EEE is
> enabled on MT7531 switch MACs either by pulling the LAN2LED0 pin low on the
> board (bootstrapping), or unsetting the EEE_DIS bit on the trap register.
> 
> There are existing boards that were not designed to pull the pin low.
> Therefore, unset the EEE_DIS bit on the trap register.
> 
> Unlike MT7530, the modifiable trap register won't be populated identical to
> the trap status register after reset. Therefore, read from the trap status
> register, modify the bits, then write to the modifiable trap register.
> 
> The disable EEE bit on the trap pertains to the LAN2LED0 pin which is
> usually used to control an LED. Once the bit is unset, the pin will be low.
> That will make the active low LED turn on.
> 
> The pin is controlled by the switch PHY. It seems that the PHY controls the
> pin in the way that it inverts the pin state. That means depending on the
> wiring of the LED connected to LAN2LED0 on the board, the LED may be on
> without an active link.
> 
> Fixes: 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
> Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>

Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-- 
Florian



More information about the Linux-mediatek mailing list