From: Yangbo Lu <yangbo.lu@nxp.com>
To: netdev@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
"David S . Miller" <davem@davemloft.net>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Richard Cochran <richardcochran@gmail.com>
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Subject: [PATCH 4/5] net: dsa: ocelot: define PTP registers for felix_vsc9959
Date: Wed, 20 Nov 2019 16:23:17 +0800 [thread overview]
Message-ID: <20191120082318.3909-5-yangbo.lu@nxp.com> (raw)
In-Reply-To: <20191120082318.3909-1-yangbo.lu@nxp.com>
This patch is to define PTP registers for felix_vsc9959.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
drivers/net/dsa/ocelot/felix_vsc9959.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index d67bd14..b9758b0 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -282,6 +282,16 @@ static const u32 vsc9959_sys_regmap[] = {
REG_RESERVED(SYS_CM_DATA),
};
+static const u32 vsc9959_ptp_regmap[] = {
+ REG(PTP_PIN_CFG, 0x000000),
+ REG(PTP_PIN_TOD_SEC_MSB, 0x000004),
+ REG(PTP_PIN_TOD_SEC_LSB, 0x000008),
+ REG(PTP_PIN_TOD_NSEC, 0x00000c),
+ REG(PTP_CFG_MISC, 0x0000a0),
+ REG(PTP_CLK_CFG_ADJ_CFG, 0x0000a4),
+ REG(PTP_CLK_CFG_ADJ_FREQ, 0x0000a8),
+};
+
static const u32 vsc9959_gcb_regmap[] = {
REG(GCB_SOFT_RST, 0x000004),
};
@@ -293,6 +303,7 @@ static const u32 *vsc9959_regmap[] = {
[REW] = vsc9959_rew_regmap,
[SYS] = vsc9959_sys_regmap,
[S2] = vsc9959_s2_regmap,
+ [PTP] = vsc9959_ptp_regmap,
[GCB] = vsc9959_gcb_regmap,
};
@@ -330,6 +341,11 @@ static struct resource vsc9959_target_io_res[] = {
.end = 0x00603ff,
.name = "s2",
},
+ [PTP] = {
+ .start = 0x0090000,
+ .end = 0x00900cb,
+ .name = "ptp",
+ },
[GCB] = {
.start = 0x0070000,
.end = 0x00701ff,
--
2.7.4
next prev parent reply other threads:[~2019-11-20 8:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 8:23 [PATCH 0/5] Support PTP clock and hardware timestamping for DSA Felix driver Yangbo Lu
2019-11-20 8:23 ` [PATCH 1/5] net: mscc: ocelot: export ocelot_hwstamp_get/set functions Yangbo Lu
2019-11-21 2:40 ` Andrew Lunn
2019-11-21 4:03 ` Florian Fainelli
2019-11-20 8:23 ` [PATCH 2/5] net: mscc: ocelot: convert to use ocelot_get_txtstamp() Yangbo Lu
2019-11-21 2:41 ` Andrew Lunn
2019-11-21 4:04 ` Florian Fainelli
2019-11-20 8:23 ` [PATCH 3/5] net: mscc: ocelot: convert to use ocelot_port_add_txtstamp_skb() Yangbo Lu
2019-11-21 2:43 ` Andrew Lunn
2019-11-21 4:04 ` Florian Fainelli
2019-11-20 8:23 ` Yangbo Lu [this message]
2019-11-21 2:49 ` [PATCH 4/5] net: dsa: ocelot: define PTP registers for felix_vsc9959 Andrew Lunn
2019-11-21 3:20 ` Y.b. Lu
2019-11-21 4:04 ` Florian Fainelli
2019-11-20 8:23 ` [PATCH 5/5] net: dsa: ocelot: add hardware timestamping support for Felix Yangbo Lu
2019-11-21 2:56 ` Andrew Lunn
2019-11-21 3:29 ` Y.b. Lu
2019-11-21 22:39 ` [PATCH 0/5] Support PTP clock and hardware timestamping for DSA Felix driver David Miller
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=20191120082318.3909-5-yangbo.lu@nxp.com \
--to=yangbo.lu@nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--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).