lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230321173359.251778-5-noltari@gmail.com>
Date:   Tue, 21 Mar 2023 18:33:59 +0100
From:   Álvaro Fernández Rojas 
        <noltari@...il.com>
To:     f.fainelli@...il.com, jonas.gorski@...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>, Simon Horman <simon.horman@...igine.com>
Subject: [PATCH v2 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>
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
Reviewed-by: Simon Horman <simon.horman@...igine.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ