From: Martin Kaistra <martin.kaistra@linutronix.de>
To: Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>
Cc: martin.kaistra@linutronix.de,
Richard Cochran <richardcochran@gmail.com>,
Kurt Kanzenbach <kurt@linutronix.de>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Boyd <sboyd@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Marc Kleine-Budde <mkl@pengutronix.de>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH v2 1/7] net: dsa: b53: Add BroadSync HD register definitions
Date: Tue, 9 Nov 2021 10:50:03 +0100 [thread overview]
Message-ID: <20211109095013.27829-2-martin.kaistra@linutronix.de> (raw)
In-Reply-To: <20211109095013.27829-1-martin.kaistra@linutronix.de>
From: Kurt Kanzenbach <kurt@linutronix.de>
Add register definitions for the BroadSync HD features of
BCM53128. These will be used to enable PTP support.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
---
drivers/net/dsa/b53/b53_regs.h | 71 ++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
index b2c539a42154..0deb11a7c9cd 100644
--- a/drivers/net/dsa/b53/b53_regs.h
+++ b/drivers/net/dsa/b53/b53_regs.h
@@ -50,6 +50,12 @@
/* Jumbo Frame Registers */
#define B53_JUMBO_PAGE 0x40
+/* BroadSync HD Register Page */
+#define B53_BROADSYNC_PAGE 0x90
+
+/* Traffic Remarking Register Page */
+#define B53_TRAFFICREMARKING_PAGE 0x91
+
/* EEE Control Registers Page */
#define B53_EEE_PAGE 0x92
@@ -260,6 +266,27 @@
/* Broadcom header TX control (16 bit) */
#define B53_BRCM_HDR_TX_DIS 0x62
+/*************************************************************************
+ * ARL Control Registers
+ *************************************************************************/
+
+/* Multiport Control Register (16 bit) */
+#define B53_MPORT_CTRL 0x0e
+#define MPORT_CTRL_DIS_FORWARD 0
+#define MPORT_CTRL_CMP_ETYPE 1
+#define MPORT_CTRL_CMP_ADDR 2
+#define MPORT_CTRL_CMP_ADDR_ETYPE 3
+#define MPORT_CTRL_SHIFT(x) ((x) << 1)
+#define MPORT_CTRL_MASK 0x2
+#define MPORT0_TS_EN BIT(15)
+
+/* Multiport Address N (N = 0–5) Register (64 bit) */
+#define B53_MPORT_ADDR(n) (0x10 + ((n) << 4))
+#define MPORT_ETYPE(x) ((u64)(x) << 48)
+
+/* Multiport Vector N (N = 0–5) Register (32 bit) */
+#define B53_MPORT_VCTR(n) (0x18 + ((n) << 4))
+
/*************************************************************************
* ARL Access Page Registers
*************************************************************************/
@@ -479,6 +506,50 @@
#define JMS_MIN_SIZE 1518
#define JMS_MAX_SIZE 9724
+/*************************************************************************
+ * BroadSync HD Page Registers
+ *************************************************************************/
+
+/* BroadSync HD Enable Control Register (16 bit) */
+#define B53_BROADSYNC_EN_CTRL 0x00
+
+/* BroadSync HD Time Stamp Report Control Register */
+#define B53_BROADSYNC_TS_REPORT_CTRL 0x02
+#define TSRPT_PKT_EN BIT(0)
+
+/* BroadSync HD PCP Value Control Register */
+#define B53_BROADSYNC_PCP_CTRL 0x03
+
+/* BroadSync HD Max Packet Size Register */
+#define B53_BROADSYNC_MAX_SDU 0x04
+
+/* BroadSync HD Time Base Register (32 bit) */
+#define B53_BROADSYNC_TIMEBASE 0x10
+
+/* BroadSync HD Time Base Adjustment Register (32 bit) */
+#define B53_BROADSYNC_TIMEBASE_ADJ 0x14
+
+/* BroadSync HD Slot Number and Tick Counter Register (32 bit) */
+#define B53_BROADSYNC_SLOT_CNT 0x18
+
+/* BroadSync HD Slot Adjustment Register (32 bit) */
+#define B53_BROADSYNC_SLOT_ADJ 0x1c
+
+/* BroadSync HD Class 5 Bandwidth Control Register */
+#define B53_BROADSYNC_CLS5_BW_CTRL 0x30
+
+/* BroadSync HD Class 4 Bandwidth Control Register */
+#define B53_BROADSYNC_CLS4_BW_CTRL 0x60
+
+/* BroadSync HD Egress Time Stamp Register */
+#define B53_BROADSYNC_EGRESS_TS 0x90
+
+/* BroadSync HD Egress Time Stamp Status Register */
+#define B53_BROADSYNC_EGRESS_TS_STS 0xd0
+
+/* BroadSync HD Link Status Register (16 bit) */
+#define B53_BROADSYNC_LINK_STS 0xe0
+
/*************************************************************************
* EEE Configuration Page Registers
*************************************************************************/
--
2.20.1
next prev parent reply other threads:[~2021-11-09 9:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 9:50 [PATCH v2 0/7] Add PTP support for BCM53128 switch Martin Kaistra
2021-11-09 9:50 ` Martin Kaistra [this message]
2021-11-09 10:10 ` [PATCH v2 1/7] net: dsa: b53: Add BroadSync HD register definitions Kurt Kanzenbach
2021-11-09 18:04 ` Florian Fainelli
2021-11-10 8:19 ` Martin Kaistra
2021-11-09 9:50 ` [PATCH v2 2/7] net: dsa: b53: Move struct b53_device to include/linux/dsa/b53.h Martin Kaistra
2021-11-09 18:05 ` Florian Fainelli
2021-11-09 18:11 ` Florian Fainelli
2021-11-09 18:15 ` Vladimir Oltean
2021-11-09 18:20 ` Florian Fainelli
2021-11-09 18:49 ` Vladimir Oltean
2021-11-09 9:50 ` [PATCH v2 3/7] timecounter: allow for non-power of two overflow Martin Kaistra
2021-11-24 20:55 ` Thomas Gleixner
2021-11-09 9:50 ` [PATCH v2 4/7] net: dsa: b53: Add PHC clock support Martin Kaistra
2021-11-09 18:08 ` Florian Fainelli
2021-11-09 9:50 ` [PATCH v2 5/7] net: dsa: b53: Add logic for RX timestamping Martin Kaistra
2021-11-09 18:07 ` Florian Fainelli
2021-11-10 8:43 ` Martin Kaistra
2021-11-09 9:50 ` [PATCH v2 6/7] net: dsa: b53: Add logic for TX timestamping Martin Kaistra
2021-11-09 11:12 ` Vladimir Oltean
2021-11-10 7:14 ` Kurt Kanzenbach
2021-11-10 13:05 ` Vladimir Oltean
2021-11-10 13:30 ` Vladimir Oltean
2021-11-10 13:47 ` Kurt Kanzenbach
2021-11-10 14:00 ` Vladimir Oltean
2021-11-10 15:08 ` Richard Cochran
2021-11-10 15:23 ` Vladimir Oltean
2021-11-10 12:57 ` Vladimir Oltean
2021-11-09 9:50 ` [PATCH v2 7/7] net: dsa: b53: Expose PTP timestamping ioctls to userspace Martin Kaistra
2021-11-09 10:39 ` [PATCH v2 0/7] Add PTP support for BCM53128 switch Vladimir Oltean
2021-11-09 11:13 ` Martin Kaistra
2021-11-09 18:13 ` Florian Fainelli
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=20211109095013.27829-2-martin.kaistra@linutronix.de \
--to=martin.kaistra@linutronix.de \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=john.stultz@linaro.org \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=richardcochran@gmail.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=vivien.didelot@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.