blob: 20878e2d1c7cd246408517078afed7083bff7927 [file] [log] [blame]
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09001/*
2 * UniPhier SC (System Control) block registers
3 *
Masahiro Yamada046d8fd2015-02-27 02:26:58 +09004 * Copyright (C) 2011-2015 Panasonic Corporation
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09005 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef ARCH_SC_REGS_H
10#define ARCH_SC_REGS_H
11
12#define SC_BASE_ADDR 0x61840000
13
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090014#define SC_DPLLCTRL (SC_BASE_ADDR | 0x1200)
15#define SC_DPLLCTRL_SSC_EN (0x1 << 31)
16#define SC_DPLLCTRL_FOUTMODE_MASK (0xf << 16)
17#define SC_DPLLCTRL_SSC_RATE (0x1 << 15)
18
19#define SC_DPLLCTRL2 (SC_BASE_ADDR | 0x1204)
20#define SC_DPLLCTRL2_NRSTDS (0x1 << 28)
21
22#define SC_DPLLCTRL3 (SC_BASE_ADDR | 0x1208)
23#define SC_DPLLCTRL3_LPFSEL_COEF2 (0x0 << 31)
24#define SC_DPLLCTRL3_LPFSEL_COEF3 (0x1 << 31)
25
26#define SC_UPLLCTRL (SC_BASE_ADDR | 0x1210)
27
28#define SC_VPLL27ACTRL (SC_BASE_ADDR | 0x1270)
29#define SC_VPLL27ACTRL2 (SC_BASE_ADDR | 0x1274)
30#define SC_VPLL27ACTRL3 (SC_BASE_ADDR | 0x1278)
31
32#define SC_VPLL27BCTRL (SC_BASE_ADDR | 0x1290)
33#define SC_VPLL27BCTRL2 (SC_BASE_ADDR | 0x1294)
34#define SC_VPLL27BCTRL3 (SC_BASE_ADDR | 0x1298)
35
36#define SC_RSTCTRL (SC_BASE_ADDR | 0x2000)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090037#define SC_RSTCTRL_NRST_USB3B0 (0x1 << 17) /* USB3 #0 bus */
38#define SC_RSTCTRL_NRST_USB3C0 (0x1 << 16) /* USB3 #0 core */
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090039#define SC_RSTCTRL_NRST_ETHER (0x1 << 12)
Masahiro Yamada36563e62015-02-27 02:26:53 +090040#define SC_RSTCTRL_NRST_STDMAC (0x1 << 10)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090041#define SC_RSTCTRL_NRST_GIO (0x1 << 6)
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090042#define SC_RSTCTRL_NRST_UMC1 (0x1 << 5)
43#define SC_RSTCTRL_NRST_UMC0 (0x1 << 4)
44#define SC_RSTCTRL_NRST_NAND (0x1 << 2)
45
46#define SC_RSTCTRL2 (SC_BASE_ADDR | 0x2004)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090047#define SC_RSTCTRL2_NRST_USB3B1 (0x1 << 17) /* USB3 #1 bus */
48#define SC_RSTCTRL2_NRST_USB3C1 (0x1 << 16) /* USB3 #1 core */
49
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090050#define SC_RSTCTRL3 (SC_BASE_ADDR | 0x2008)
51
52#define SC_CLKCTRL (SC_BASE_ADDR | 0x2104)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090053#define SC_CLKCTRL_CEN_USB31 (0x1 << 17) /* USB3 #1 */
54#define SC_CLKCTRL_CEN_USB30 (0x1 << 16) /* USB3 #0 */
Masahiro Yamada40adf0a2015-02-27 02:26:50 +090055#define SC_CLKCTRL_CEN_ETHER (0x1 << 12)
56#define SC_CLKCTRL_CEN_MIO (0x1 << 11)
Masahiro Yamada36563e62015-02-27 02:26:53 +090057#define SC_CLKCTRL_CEN_STDMAC (0x1 << 10)
Masahiro Yamada046d8fd2015-02-27 02:26:58 +090058#define SC_CLKCTRL_CEN_GIO (0x1 << 6)
Masahiro Yamada40adf0a2015-02-27 02:26:50 +090059#define SC_CLKCTRL_CEN_UMC (0x1 << 4)
60#define SC_CLKCTRL_CEN_NAND (0x1 << 2)
61#define SC_CLKCTRL_CEN_SBC (0x1 << 1)
62#define SC_CLKCTRL_CEN_PERI (0x1 << 0)
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090063
64/* System reset control register */
65#define SC_IRQTIMSET (SC_BASE_ADDR | 0x3000)
66#define SC_SLFRSTSEL (SC_BASE_ADDR | 0x3010)
67#define SC_SLFRSTCTL (SC_BASE_ADDR | 0x3014)
68
69#endif /* ARCH_SC_REGS_H */