netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yangbo Lu <yangbo.lu@nxp.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Yangbo Lu <yangbo.lu@nxp.com>,
	"David S . Miller" <davem@davemloft.net>,
	Richard Cochran <richardcochran@gmail.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Subject: [PATCH 5/6] net: mscc: ocelot: add wave programming registers definitions
Date: Fri, 20 Mar 2020 18:37:25 +0800	[thread overview]
Message-ID: <20200320103726.32559-6-yangbo.lu@nxp.com> (raw)
In-Reply-To: <20200320103726.32559-1-yangbo.lu@nxp.com>

Add wave programming registers definitions for Ocelot platforms.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 drivers/net/dsa/ocelot/felix_vsc9959.c  | 2 ++
 drivers/net/ethernet/mscc/ocelot_regs.c | 2 ++
 include/soc/mscc/ocelot.h               | 2 ++
 include/soc/mscc/ocelot_ptp.h           | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index b4078f3..4fe707e 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -313,6 +313,8 @@ static const u32 vsc9959_ptp_regmap[] = {
 	REG(PTP_PIN_TOD_SEC_MSB,           0x000004),
 	REG(PTP_PIN_TOD_SEC_LSB,           0x000008),
 	REG(PTP_PIN_TOD_NSEC,              0x00000c),
+	REG(PTP_PIN_WF_HIGH_PERIOD,        0x000014),
+	REG(PTP_PIN_WF_LOW_PERIOD,         0x000018),
 	REG(PTP_CFG_MISC,                  0x0000a0),
 	REG(PTP_CLK_CFG_ADJ_CFG,           0x0000a4),
 	REG(PTP_CLK_CFG_ADJ_FREQ,          0x0000a8),
diff --git a/drivers/net/ethernet/mscc/ocelot_regs.c b/drivers/net/ethernet/mscc/ocelot_regs.c
index b88b589..ed4dd01 100644
--- a/drivers/net/ethernet/mscc/ocelot_regs.c
+++ b/drivers/net/ethernet/mscc/ocelot_regs.c
@@ -239,6 +239,8 @@ static const u32 ocelot_ptp_regmap[] = {
 	REG(PTP_PIN_TOD_SEC_MSB,           0x000004),
 	REG(PTP_PIN_TOD_SEC_LSB,           0x000008),
 	REG(PTP_PIN_TOD_NSEC,              0x00000c),
+	REG(PTP_PIN_WF_HIGH_PERIOD,        0x000014),
+	REG(PTP_PIN_WF_LOW_PERIOD,         0x000018),
 	REG(PTP_CFG_MISC,                  0x0000a0),
 	REG(PTP_CLK_CFG_ADJ_CFG,           0x0000a4),
 	REG(PTP_CLK_CFG_ADJ_FREQ,          0x0000a8),
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 0ad61e3..bcce278 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -385,6 +385,8 @@ enum ocelot_reg {
 	PTP_PIN_TOD_SEC_MSB,
 	PTP_PIN_TOD_SEC_LSB,
 	PTP_PIN_TOD_NSEC,
+	PTP_PIN_WF_HIGH_PERIOD,
+	PTP_PIN_WF_LOW_PERIOD,
 	PTP_CFG_MISC,
 	PTP_CLK_CFG_ADJ_CFG,
 	PTP_CLK_CFG_ADJ_FREQ,
diff --git a/include/soc/mscc/ocelot_ptp.h b/include/soc/mscc/ocelot_ptp.h
index 2dd27f0..3dd63d2 100644
--- a/include/soc/mscc/ocelot_ptp.h
+++ b/include/soc/mscc/ocelot_ptp.h
@@ -14,6 +14,8 @@
 #define PTP_PIN_TOD_SEC_MSB_RSZ		PTP_PIN_CFG_RSZ
 #define PTP_PIN_TOD_SEC_LSB_RSZ		PTP_PIN_CFG_RSZ
 #define PTP_PIN_TOD_NSEC_RSZ		PTP_PIN_CFG_RSZ
+#define PTP_PIN_WF_HIGH_PERIOD_RSZ	PTP_PIN_CFG_RSZ
+#define PTP_PIN_WF_LOW_PERIOD_RSZ	PTP_PIN_CFG_RSZ
 
 #define PTP_PIN_CFG_DOM			BIT(0)
 #define PTP_PIN_CFG_SYNC		BIT(2)
-- 
2.7.4


  parent reply	other threads:[~2020-03-20 10:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 10:37 [PATCH 0/6] Support programmable pins for Ocelot PTP driver Yangbo Lu
2020-03-20 10:37 ` [PATCH 1/6] ptp: move ocelot ptp clock code out of Ethernet driver Yangbo Lu
2020-03-20 16:37   ` Vladimir Oltean
2020-03-24  4:46     ` Y.b. Lu
2020-03-20 21:31   ` kbuild test robot
2020-03-20 23:03   ` kbuild test robot
2020-03-20 10:37 ` [PATCH 2/6] MAINTAINERS: add entry for Microsemi Ocelot PTP driver Yangbo Lu
2020-03-20 17:28   ` Alexandre Belloni
2020-03-24  4:50     ` Y.b. Lu
2020-03-20 10:37 ` [PATCH 3/6] net: mscc: ocelot: fix timestamp info if ptp clock does not work Yangbo Lu
2020-03-20 10:37 ` [PATCH 4/6] net: mscc: ocelot: redefine PTP pins Yangbo Lu
2020-03-20 10:37 ` Yangbo Lu [this message]
2020-03-20 10:37 ` [PATCH 6/6] ptp_ocelot: support 4 programmable pins Yangbo Lu
2020-03-20 13:20   ` Vladimir Oltean
2020-03-24  5:21     ` Y.b. Lu
2020-03-24 13:19       ` Richard Cochran
2020-03-25  3:20         ` Y.b. Lu
2020-03-24  9:24     ` Horatiu Vultur
2020-03-24 13:07   ` Richard Cochran
2020-03-25  3:08     ` Y.b. Lu
2020-03-25 13:41       ` Richard Cochran
2020-03-26  9:34         ` Y.b. Lu
2020-03-26 13:59           ` Richard Cochran
2020-03-27  5:47             ` Y.b. Lu
2020-03-31  4:18               ` Y.b. Lu
2020-03-25 13:15   ` Richard Cochran
2020-03-26  9:25     ` Y.b. Lu

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=20200320103726.32559-6-yangbo.lu@nxp.com \
    --to=yangbo.lu@nxp.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.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).