[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230320155024.164523-5-noltari@gmail.com>
Date: Mon, 20 Mar 2023 16:50:24 +0100
From: Álvaro Fernández Rojas
<noltari@...il.com>
To: f.fainelli@...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
Cc: Álvaro Fernández Rojas
<noltari@...il.com>
Subject: [PATCH 4/4] net: dsa: b53: add BCM63268 RGMII configuration
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;
+
rgmii_ctrl |= RGMII_CTRL_ENABLE_GMII;
+ }
b53_write8(dev, B53_CTRL_PAGE, off, rgmii_ctrl);
diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
index b2c539a42154..bfbcb66bef66 100644
--- a/drivers/net/dsa/b53/b53_regs.h
+++ b/drivers/net/dsa/b53/b53_regs.h
@@ -138,6 +138,7 @@
#define B53_RGMII_CTRL_IMP 0x60
#define RGMII_CTRL_ENABLE_GMII BIT(7)
+#define RGMII_CTRL_MII_OVERRIDE BIT(6)
#define RGMII_CTRL_TIMING_SEL BIT(2)
#define RGMII_CTRL_DLL_RXC BIT(1)
#define RGMII_CTRL_DLL_TXC BIT(0)
--
2.30.2
Powered by blists - more mailing lists