blob: b105335f693108ad2a45dddf64217e9f9ab2bb68 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Masahiro Yamada5894ca02014-10-03 19:21:06 +09002/*
3 * UniPhier SC (System Control) block registers
4 *
Masahiro Yamada29d63a52016-07-22 20:20:11 +09005 * Copyright (C) 2011-2015 Panasonic Corporation
6 * Copyright (C) 2015-2016 Socionext Inc.
7 * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada5894ca02014-10-03 19:21:06 +09008 */
9
10#ifndef ARCH_SC_REGS_H
11#define ARCH_SC_REGS_H
12
13#define SC_BASE_ADDR 0x61840000
14
Masahiro Yamada28f40d42015-09-22 00:27:40 +090015#define SC_DPLLOSCCTRL (SC_BASE_ADDR | 0x1110)
16#define SC_DPLLOSCCTRL_DPLLST (0x1 << 1)
17#define SC_DPLLOSCCTRL_DPLLEN (0x1 << 0)
18
Masahiro Yamada5894ca02014-10-03 19:21:06 +090019#define SC_DPLLCTRL (SC_BASE_ADDR | 0x1200)
20#define SC_DPLLCTRL_SSC_EN (0x1 << 31)
21#define SC_DPLLCTRL_FOUTMODE_MASK (0xf << 16)
22#define SC_DPLLCTRL_SSC_RATE (0x1 << 15)
23
24#define SC_DPLLCTRL2 (SC_BASE_ADDR | 0x1204)
25#define SC_DPLLCTRL2_NRSTDS (0x1 << 28)
26
27#define SC_DPLLCTRL3 (SC_BASE_ADDR | 0x1208)
28#define SC_DPLLCTRL3_LPFSEL_COEF2 (0x0 << 31)
29#define SC_DPLLCTRL3_LPFSEL_COEF3 (0x1 << 31)
30
31#define SC_UPLLCTRL (SC_BASE_ADDR | 0x1210)
32
33#define SC_VPLL27ACTRL (SC_BASE_ADDR | 0x1270)
34#define SC_VPLL27ACTRL2 (SC_BASE_ADDR | 0x1274)
35#define SC_VPLL27ACTRL3 (SC_BASE_ADDR | 0x1278)
36
37#define SC_VPLL27BCTRL (SC_BASE_ADDR | 0x1290)
38#define SC_VPLL27BCTRL2 (SC_BASE_ADDR | 0x1294)
39#define SC_VPLL27BCTRL3 (SC_BASE_ADDR | 0x1298)
40
41#define SC_RSTCTRL (SC_BASE_ADDR | 0x2000)
Masahiro Yamada15351632015-02-27 02:26:58 +090042#define SC_RSTCTRL_NRST_USB3B0 (0x1 << 17) /* USB3 #0 bus */
43#define SC_RSTCTRL_NRST_USB3C0 (0x1 << 16) /* USB3 #0 core */
Masahiro Yamada5894ca02014-10-03 19:21:06 +090044#define SC_RSTCTRL_NRST_ETHER (0x1 << 12)
Masahiro Yamada15351632015-02-27 02:26:58 +090045#define SC_RSTCTRL_NRST_GIO (0x1 << 6)
Masahiro Yamada28f40d42015-09-22 00:27:40 +090046/* Pro4 or older */
Masahiro Yamada5894ca02014-10-03 19:21:06 +090047#define SC_RSTCTRL_NRST_UMC1 (0x1 << 5)
48#define SC_RSTCTRL_NRST_UMC0 (0x1 << 4)
49#define SC_RSTCTRL_NRST_NAND (0x1 << 2)
50
51#define SC_RSTCTRL2 (SC_BASE_ADDR | 0x2004)
Masahiro Yamada15351632015-02-27 02:26:58 +090052#define SC_RSTCTRL2_NRST_USB3B1 (0x1 << 17) /* USB3 #1 bus */
53#define SC_RSTCTRL2_NRST_USB3C1 (0x1 << 16) /* USB3 #1 core */
54
Masahiro Yamada5894ca02014-10-03 19:21:06 +090055#define SC_RSTCTRL3 (SC_BASE_ADDR | 0x2008)
56
Masahiro Yamada28f40d42015-09-22 00:27:40 +090057/* Pro5 or newer */
58#define SC_RSTCTRL4 (SC_BASE_ADDR | 0x200c)
59#define SC_RSTCTRL4_NRST_UMCSB (0x1 << 12) /* UMC system bus */
60#define SC_RSTCTRL4_NRST_UMCA2 (0x1 << 10) /* UMC ch2 standby */
61#define SC_RSTCTRL4_NRST_UMCA1 (0x1 << 9) /* UMC ch1 standby */
62#define SC_RSTCTRL4_NRST_UMCA0 (0x1 << 8) /* UMC ch0 standby */
Masahiro Yamada019df872015-09-22 00:27:41 +090063#define SC_RSTCTRL4_NRST_UMC32 (0x1 << 6) /* UMC ch2 */
Masahiro Yamada28f40d42015-09-22 00:27:40 +090064#define SC_RSTCTRL4_NRST_UMC31 (0x1 << 5) /* UMC ch1 */
65#define SC_RSTCTRL4_NRST_UMC30 (0x1 << 4) /* UMC ch0 */
66
Masahiro Yamada29d63a52016-07-22 20:20:11 +090067#define SC_RSTCTRL5 (SC_BASE_ADDR | 0x2010)
68
69#define SC_RSTCTRL6 (SC_BASE_ADDR | 0x2014)
70
Masahiro Yamada5894ca02014-10-03 19:21:06 +090071#define SC_CLKCTRL (SC_BASE_ADDR | 0x2104)
Masahiro Yamada15351632015-02-27 02:26:58 +090072#define SC_CLKCTRL_CEN_USB31 (0x1 << 17) /* USB3 #1 */
73#define SC_CLKCTRL_CEN_USB30 (0x1 << 16) /* USB3 #0 */
Masahiro Yamadaf267b812015-02-27 02:26:50 +090074#define SC_CLKCTRL_CEN_ETHER (0x1 << 12)
Masahiro Yamada15351632015-02-27 02:26:58 +090075#define SC_CLKCTRL_CEN_GIO (0x1 << 6)
Masahiro Yamada28f40d42015-09-22 00:27:40 +090076/* Pro4 or older */
Masahiro Yamadaf267b812015-02-27 02:26:50 +090077#define SC_CLKCTRL_CEN_UMC (0x1 << 4)
78#define SC_CLKCTRL_CEN_NAND (0x1 << 2)
79#define SC_CLKCTRL_CEN_SBC (0x1 << 1)
80#define SC_CLKCTRL_CEN_PERI (0x1 << 0)
Masahiro Yamada5894ca02014-10-03 19:21:06 +090081
Masahiro Yamada28f40d42015-09-22 00:27:40 +090082/* Pro5 or newer */
83#define SC_CLKCTRL4 (SC_BASE_ADDR | 0x210c)
84#define SC_CLKCTRL4_CEN_UMCSB (0x1 << 12) /* UMC system bus */
Masahiro Yamada019df872015-09-22 00:27:41 +090085#define SC_CLKCTRL4_CEN_UMC2 (0x1 << 2) /* UMC ch2 */
Masahiro Yamada28f40d42015-09-22 00:27:40 +090086#define SC_CLKCTRL4_CEN_UMC1 (0x1 << 1) /* UMC ch1 */
87#define SC_CLKCTRL4_CEN_UMC0 (0x1 << 0) /* UMC ch0 */
88
Masahiro Yamada5894ca02014-10-03 19:21:06 +090089/* System reset control register */
90#define SC_IRQTIMSET (SC_BASE_ADDR | 0x3000)
91#define SC_SLFRSTSEL (SC_BASE_ADDR | 0x3010)
92#define SC_SLFRSTCTL (SC_BASE_ADDR | 0x3014)
93
94#endif /* ARCH_SC_REGS_H */