ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0268-net-dsa-ocelot-define-PTP-registers-for-felix_vsc995.patch
1 From bd8d12b3bc7b5d63132a6d5da0890c6fc3bcad7e Mon Sep 17 00:00:00 2001
2 From: Yangbo Lu <yangbo.lu@nxp.com>
3 Date: Wed, 20 Nov 2019 16:23:17 +0800
4 Subject: [PATCH] net: dsa: ocelot: define PTP registers for felix_vsc9959
5
6 This patch is to define PTP registers for felix_vsc9959.
7
8 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
9 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
10 Signed-off-by: David S. Miller <davem@davemloft.net>
11 ---
12  drivers/net/dsa/ocelot/felix_vsc9959.c | 16 ++++++++++++++++
13  1 file changed, 16 insertions(+)
14
15 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c
16 +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
17 @@ -282,6 +282,16 @@ static const u32 vsc9959_sys_regmap[] =
18         REG_RESERVED(SYS_CM_DATA),
19  };
20  
21 +static const u32 vsc9959_ptp_regmap[] = {
22 +       REG(PTP_PIN_CFG,                   0x000000),
23 +       REG(PTP_PIN_TOD_SEC_MSB,           0x000004),
24 +       REG(PTP_PIN_TOD_SEC_LSB,           0x000008),
25 +       REG(PTP_PIN_TOD_NSEC,              0x00000c),
26 +       REG(PTP_CFG_MISC,                  0x0000a0),
27 +       REG(PTP_CLK_CFG_ADJ_CFG,           0x0000a4),
28 +       REG(PTP_CLK_CFG_ADJ_FREQ,          0x0000a8),
29 +};
30 +
31  static const u32 vsc9959_gcb_regmap[] = {
32         REG(GCB_SOFT_RST,                       0x000004),
33  };
34 @@ -293,6 +303,7 @@ static const u32 *vsc9959_regmap[] = {
35         [REW]   = vsc9959_rew_regmap,
36         [SYS]   = vsc9959_sys_regmap,
37         [S2]    = vsc9959_s2_regmap,
38 +       [PTP]   = vsc9959_ptp_regmap,
39         [GCB]   = vsc9959_gcb_regmap,
40  };
41  
42 @@ -330,6 +341,11 @@ static struct resource vsc9959_target_io
43                 .end    = 0x00603ff,
44                 .name   = "s2",
45         },
46 +       [PTP] = {
47 +               .start  = 0x0090000,
48 +               .end    = 0x00900cb,
49 +               .name   = "ptp",
50 +       },
51         [GCB] = {
52                 .start  = 0x0070000,
53                 .end    = 0x00701ff,