blob: 54bbe43ebbad085f82b02e9ccb897d504b75bc1d [file] [log] [blame]
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09001/*
2 * UniPhier SC (System Control) block registers
3 *
Masahiro Yamada85ab6072016-07-22 20:20:11 +09004 * Copyright (C) 2011-2015 Panasonic Corporation
5 * Copyright (C) 2015-2016 Socionext Inc.
6 * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09007 *
8 * SPDX-License-Identifier: GPL-2.0+
9 */
10
11#ifndef ARCH_SC_REGS_H
12#define ARCH_SC_REGS_H
13
14#define SC_BASE_ADDR 0x61840000
15
Masahiro Yamadad5167d52015-09-22 00:27:40 +090016#define SC_DPLLOSCCTRL (SC_BASE_ADDR | 0x1110)
17#define SC_DPLLOSCCTRL_DPLLST (0x1 << 1)
18#define SC_DPLLOSCCTRL_DPLLEN (0x1 << 0)
19
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090020#define SC_DPLLCTRL (SC_BASE_ADDR | 0x1200)
21#define SC_DPLLCTRL_SSC_EN (0x1 << 31)
22#define SC_DPLLCTRL_FOUTMODE_MASK (0xf << 16)
23#define SC_DPLLCTRL_SSC_RATE (0x1 << 15)
24
25#define SC_DPLLCTRL2 (SC_BASE_ADDR | 0x1204)
26#define SC_DPLLCTRL2_NRSTDS (0x1 << 28)
27
28#define SC_DPLLCTRL3 (SC_BASE_ADDR | 0x1208)
29#define SC_DPLLCTRL3_LPFSEL_COEF2 (0x0 << 31)
30#define SC_DPLLCTRL3_LPFSEL_COEF3 (0x1 << 31)
31
32#define SC_UPLLCTRL (SC_BASE_ADDR | 0x1210)
33
34#define SC_VPLL27ACTRL (SC_BASE_ADDR | 0x1270)
35#define SC_VPLL27ACTRL2 (SC_BASE_ADDR | 0x1274)
36#define SC_VPLL27ACTRL3 (SC_BASE_ADDR | 0x1278)
37
38#define SC_VPLL27BCTRL (SC_BASE_ADDR | 0x1290)
39#define SC_VPLL27BCTRL2 (SC_BASE_ADDR | 0x1294)
40#define SC_VPLL27BCTRL3 (SC_BASE_ADDR | 0x1298)
41
42#define SC_RSTCTRL (SC_BASE_ADDR | 0x2000)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090043#define SC_RSTCTRL_NRST_USB3B0 (0x1 << 17) /* USB3 #0 bus */
44#define SC_RSTCTRL_NRST_USB3C0 (0x1 << 16) /* USB3 #0 core */
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090045#define SC_RSTCTRL_NRST_ETHER (0x1 << 12)
Masahiro Yamada36563e62015-02-27 02:26:53 +090046#define SC_RSTCTRL_NRST_STDMAC (0x1 << 10)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090047#define SC_RSTCTRL_NRST_GIO (0x1 << 6)
Masahiro Yamadad5167d52015-09-22 00:27:40 +090048/* Pro4 or older */
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090049#define SC_RSTCTRL_NRST_UMC1 (0x1 << 5)
50#define SC_RSTCTRL_NRST_UMC0 (0x1 << 4)
51#define SC_RSTCTRL_NRST_NAND (0x1 << 2)
52
53#define SC_RSTCTRL2 (SC_BASE_ADDR | 0x2004)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090054#define SC_RSTCTRL2_NRST_USB3B1 (0x1 << 17) /* USB3 #1 bus */
55#define SC_RSTCTRL2_NRST_USB3C1 (0x1 << 16) /* USB3 #1 core */
56
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090057#define SC_RSTCTRL3 (SC_BASE_ADDR | 0x2008)
58
Masahiro Yamadad5167d52015-09-22 00:27:40 +090059/* Pro5 or newer */
60#define SC_RSTCTRL4 (SC_BASE_ADDR | 0x200c)
61#define SC_RSTCTRL4_NRST_UMCSB (0x1 << 12) /* UMC system bus */
62#define SC_RSTCTRL4_NRST_UMCA2 (0x1 << 10) /* UMC ch2 standby */
63#define SC_RSTCTRL4_NRST_UMCA1 (0x1 << 9) /* UMC ch1 standby */
64#define SC_RSTCTRL4_NRST_UMCA0 (0x1 << 8) /* UMC ch0 standby */
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090065#define SC_RSTCTRL4_NRST_UMC32 (0x1 << 6) /* UMC ch2 */
Masahiro Yamadad5167d52015-09-22 00:27:40 +090066#define SC_RSTCTRL4_NRST_UMC31 (0x1 << 5) /* UMC ch1 */
67#define SC_RSTCTRL4_NRST_UMC30 (0x1 << 4) /* UMC ch0 */
68
Masahiro Yamada85ab6072016-07-22 20:20:11 +090069#define SC_RSTCTRL5 (SC_BASE_ADDR | 0x2010)
70
71#define SC_RSTCTRL6 (SC_BASE_ADDR | 0x2014)
72
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090073#define SC_CLKCTRL (SC_BASE_ADDR | 0x2104)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090074#define SC_CLKCTRL_CEN_USB31 (0x1 << 17) /* USB3 #1 */
75#define SC_CLKCTRL_CEN_USB30 (0x1 << 16) /* USB3 #0 */
Masahiro Yamada40adf0a2015-02-27 02:26:50 +090076#define SC_CLKCTRL_CEN_ETHER (0x1 << 12)
77#define SC_CLKCTRL_CEN_MIO (0x1 << 11)
Masahiro Yamada36563e62015-02-27 02:26:53 +090078#define SC_CLKCTRL_CEN_STDMAC (0x1 << 10)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090079#define SC_CLKCTRL_CEN_GIO (0x1 << 6)
Masahiro Yamadad5167d52015-09-22 00:27:40 +090080/* Pro4 or older */
Masahiro Yamada40adf0a2015-02-27 02:26:50 +090081#define SC_CLKCTRL_CEN_UMC (0x1 << 4)
82#define SC_CLKCTRL_CEN_NAND (0x1 << 2)
83#define SC_CLKCTRL_CEN_SBC (0x1 << 1)
84#define SC_CLKCTRL_CEN_PERI (0x1 << 0)
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090085
Masahiro Yamadad5167d52015-09-22 00:27:40 +090086/* Pro5 or newer */
87#define SC_CLKCTRL4 (SC_BASE_ADDR | 0x210c)
88#define SC_CLKCTRL4_CEN_UMCSB (0x1 << 12) /* UMC system bus */
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090089#define SC_CLKCTRL4_CEN_UMC2 (0x1 << 2) /* UMC ch2 */
Masahiro Yamadad5167d52015-09-22 00:27:40 +090090#define SC_CLKCTRL4_CEN_UMC1 (0x1 << 1) /* UMC ch1 */
91#define SC_CLKCTRL4_CEN_UMC0 (0x1 << 0) /* UMC ch0 */
92
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090093/* System reset control register */
94#define SC_IRQTIMSET (SC_BASE_ADDR | 0x3000)
95#define SC_SLFRSTSEL (SC_BASE_ADDR | 0x3010)
96#define SC_SLFRSTCTL (SC_BASE_ADDR | 0x3014)
97
98#endif /* ARCH_SC_REGS_H */