From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: f.fainelli@gmail.com, jonas.gorski@gmail.com, andrew@lunn.ch,
olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Álvaro Fernández Rojas" <noltari@gmail.com>,
"Simon Horman" <simon.horman@corigine.com>
Subject: [PATCH v2 4/4] net: dsa: b53: add BCM63268 RGMII configuration
Date: Tue, 21 Mar 2023 18:33:59 +0100 [thread overview]
Message-ID: <20230321173359.251778-5-noltari@gmail.com> (raw)
In-Reply-To: <20230321173359.251778-1-noltari@gmail.com>
BCM63268 requires special RGMII configuration to work.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
---
v2: no changes.
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 97327d7a6760..1f9b251a5452 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
next prev parent reply other threads:[~2023-03-21 17:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 15:50 [PATCH 0/4] net: dsa: b53: configure BCM63268 RGMII ports Álvaro Fernández Rojas
2023-03-20 15:50 ` [PATCH 1/4] dt-bindings: net: dsa: b53: add more 63xx SoCs Álvaro Fernández Rojas
2023-03-20 19:49 ` Simon Horman
2023-03-20 19:51 ` Florian Fainelli
2023-03-21 7:14 ` Krzysztof Kozlowski
2023-03-20 15:50 ` [PATCH 2/4] net: dsa: b53: mmap: add more BCM63xx SoCs Álvaro Fernández Rojas
2023-03-20 19:52 ` Florian Fainelli
2023-03-20 19:54 ` Simon Horman
2023-03-20 19:56 ` Álvaro Fernández Rojas
2023-03-20 20:11 ` Simon Horman
2023-03-20 15:50 ` [PATCH 3/4] net: dsa: b53: mmap: allow passing a chip ID Álvaro Fernández Rojas
2023-03-20 19:57 ` Florian Fainelli
2023-03-20 20:01 ` Simon Horman
2023-03-20 15:50 ` [PATCH 4/4] net: dsa: b53: add BCM63268 RGMII configuration Álvaro Fernández Rojas
2023-03-20 20:00 ` Florian Fainelli
2023-03-21 9:10 ` Álvaro Fernández Rojas
2023-03-20 20:07 ` Simon Horman
2023-03-21 17:33 ` [PATCH v2 0/4] net: dsa: b53: configure 6318 and 63268 RGMII ports Álvaro Fernández Rojas
2023-03-21 17:33 ` [PATCH v2 1/4] dt-bindings: net: dsa: b53: add more 63xx SoCs Álvaro Fernández Rojas
2023-03-21 17:33 ` [PATCH v2 2/4] net: dsa: b53: mmap: " Álvaro Fernández Rojas
2023-03-22 11:11 ` Simon Horman
2023-03-21 17:33 ` [PATCH v2 3/4] net: dsa: b53: mmap: allow passing a chip ID Álvaro Fernández Rojas
2023-03-21 18:19 ` Florian Fainelli
2023-03-22 11:12 ` Simon Horman
2023-03-21 17:33 ` Álvaro Fernández Rojas [this message]
2023-03-23 4:50 ` [PATCH v2 0/4] net: dsa: b53: configure 6318 and 63268 RGMII ports patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230321173359.251778-5-noltari@gmail.com \
--to=noltari@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=jonas.gorski@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=simon.horman@corigine.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).