[<prev] [next>] [day] [month] [year] [list]
Message-ID: <85bc49e5-a086-4484-86d2-bc2c3829de87@gmail.com>
Date: Mon, 18 Mar 2024 06:11:51 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: arinc.unal@...nc9.com, Daniel Golle <daniel@...rotopia.org>,
DENG Qingfang <dqfext@...il.com>, Sean Wang <sean.wang@...iatek.com>,
Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
René van Dorst <opensource@...rst.com>,
Russell King <linux@...linux.org.uk>,
SkyLake Huang <SkyLake.Huang@...iatek.com>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: Bartel Eerdekens <bartel.eerdekens@...stell8.be>,
mithat.guner@...ont.com, erkin.bozoglu@...ont.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH 1/3] net: dsa: mt7530: fix enabling EEE on MT7531 switch
on all boards
On 3/18/2024 12:46 AM, Arınç ÜNAL via B4 Relay wrote:
> From: Arınç ÜNAL <arinc.unal@...nc9.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@...nc9.com>
Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
--
Florian
Powered by blists - more mailing lists