[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f7e9b8c-6256-e7dd-b130-8e1429610faa@gmail.com>
Date: Mon, 20 Mar 2023 13:00:15 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Álvaro Fernández Rojas <noltari@...il.com>,
andrew@...n.ch, olteanv@...il.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] net: dsa: b53: add BCM63268 RGMII configuration
On 3/20/23 08:50, Álvaro Fernández Rojas wrote:
> BCM63268 requires special RGMII configuration to work.
>
> Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
> ---
> drivers/net/dsa/b53/b53_common.c | 6 +++++-
> drivers/net/dsa/b53/b53_regs.h | 1 +
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 6e212f6f1cb9..d0a22c8a55c9 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
> @@ -1240,8 +1240,12 @@ static void b53_adjust_63xx_rgmii(struct dsa_switch *ds, int port,
> break;
> }
>
> - if (port != dev->imp_port)
> + if (port != dev->imp_port) {
> + if (is63268(dev))
> + rgmii_ctrl |= RGMII_CTRL_MII_OVERRIDE;
AFAICT the override bit is defined and valid for both 63268 and 6318,
essentially whenever more than one RGMII control register for port 4,
but also for other ports, it seems like the bit becomes valid. The
comment I have says that the override bit ensures that what is populated
in bits 5:4 which is the actual RGMII interface mode is applied. That
mode can be one of:
0b00: RGMII mode
0b01: MII mode
0b10: RVMII mode
0b11: GMII mode
even though this is not documented as such, I suspect that the override
bit does not only set the mode, but also ensures that the delays are
also applied.
Once you update patch 3, this LGTM and you may add:
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
For your v2. Thanks!
--
Florian
Powered by blists - more mailing lists