2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-10-03 10:21:06 +00:00
|
|
|
/*
|
|
|
|
* UniPhier SC (System Control) block registers
|
|
|
|
*
|
2016-07-22 11:20:11 +00:00
|
|
|
* Copyright (C) 2011-2015 Panasonic Corporation
|
|
|
|
* Copyright (C) 2015-2016 Socionext Inc.
|
|
|
|
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
2014-10-03 10:21:06 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ARCH_SC_REGS_H
|
|
|
|
#define ARCH_SC_REGS_H
|
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/compiler.h>
|
|
|
|
#define sc_base ((void __iomem *)SC_BASE)
|
|
|
|
#endif
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_BASE 0x61840000
|
|
|
|
|
|
|
|
#define SC_DPLLCTRL 0x1200
|
2014-10-03 10:21:06 +00:00
|
|
|
#define SC_DPLLCTRL_SSC_EN (0x1 << 31)
|
|
|
|
#define SC_DPLLCTRL_FOUTMODE_MASK (0xf << 16)
|
|
|
|
#define SC_DPLLCTRL_SSC_RATE (0x1 << 15)
|
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_DPLLCTRL2 0x1204
|
2014-10-03 10:21:06 +00:00
|
|
|
#define SC_DPLLCTRL2_NRSTDS (0x1 << 28)
|
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_DPLLCTRL3 0x1208
|
2014-10-03 10:21:06 +00:00
|
|
|
#define SC_DPLLCTRL3_LPFSEL_COEF2 (0x0 << 31)
|
|
|
|
#define SC_DPLLCTRL3_LPFSEL_COEF3 (0x1 << 31)
|
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_UPLLCTRL 0x1210
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_VPLL27ACTRL 0x1270
|
|
|
|
#define SC_VPLL27ACTRL2 0x1274
|
|
|
|
#define SC_VPLL27ACTRL3 0x1278
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_VPLL27BCTRL 0x1290
|
|
|
|
#define SC_VPLL27BCTRL2 0x1294
|
|
|
|
#define SC_VPLL27BCTRL3 0x1298
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_RSTCTRL 0x2000
|
2015-02-26 17:26:58 +00:00
|
|
|
#define SC_RSTCTRL_NRST_USB3B0 (0x1 << 17) /* USB3 #0 bus */
|
|
|
|
#define SC_RSTCTRL_NRST_USB3C0 (0x1 << 16) /* USB3 #0 core */
|
2014-10-03 10:21:06 +00:00
|
|
|
#define SC_RSTCTRL_NRST_ETHER (0x1 << 12)
|
2015-02-26 17:26:58 +00:00
|
|
|
#define SC_RSTCTRL_NRST_GIO (0x1 << 6)
|
2015-09-21 15:27:40 +00:00
|
|
|
/* Pro4 or older */
|
2014-10-03 10:21:06 +00:00
|
|
|
#define SC_RSTCTRL_NRST_UMC1 (0x1 << 5)
|
|
|
|
#define SC_RSTCTRL_NRST_UMC0 (0x1 << 4)
|
|
|
|
#define SC_RSTCTRL_NRST_NAND (0x1 << 2)
|
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_RSTCTRL2 0x2004
|
2015-02-26 17:26:58 +00:00
|
|
|
#define SC_RSTCTRL2_NRST_USB3B1 (0x1 << 17) /* USB3 #1 bus */
|
|
|
|
#define SC_RSTCTRL2_NRST_USB3C1 (0x1 << 16) /* USB3 #1 core */
|
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_RSTCTRL3 0x2008
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2015-09-21 15:27:40 +00:00
|
|
|
/* Pro5 or newer */
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_RSTCTRL4 0x200c
|
2015-09-21 15:27:40 +00:00
|
|
|
#define SC_RSTCTRL4_NRST_UMCSB (0x1 << 12) /* UMC system bus */
|
|
|
|
#define SC_RSTCTRL4_NRST_UMCA2 (0x1 << 10) /* UMC ch2 standby */
|
|
|
|
#define SC_RSTCTRL4_NRST_UMCA1 (0x1 << 9) /* UMC ch1 standby */
|
|
|
|
#define SC_RSTCTRL4_NRST_UMCA0 (0x1 << 8) /* UMC ch0 standby */
|
2015-09-21 15:27:41 +00:00
|
|
|
#define SC_RSTCTRL4_NRST_UMC32 (0x1 << 6) /* UMC ch2 */
|
2015-09-21 15:27:40 +00:00
|
|
|
#define SC_RSTCTRL4_NRST_UMC31 (0x1 << 5) /* UMC ch1 */
|
|
|
|
#define SC_RSTCTRL4_NRST_UMC30 (0x1 << 4) /* UMC ch0 */
|
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_RSTCTRL5 0x2010
|
2016-07-22 11:20:11 +00:00
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_RSTCTRL6 0x2014
|
2016-07-22 11:20:11 +00:00
|
|
|
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_CLKCTRL 0x2104
|
2015-02-26 17:26:58 +00:00
|
|
|
#define SC_CLKCTRL_CEN_USB31 (0x1 << 17) /* USB3 #1 */
|
|
|
|
#define SC_CLKCTRL_CEN_USB30 (0x1 << 16) /* USB3 #0 */
|
2015-02-26 17:26:50 +00:00
|
|
|
#define SC_CLKCTRL_CEN_ETHER (0x1 << 12)
|
2015-02-26 17:26:58 +00:00
|
|
|
#define SC_CLKCTRL_CEN_GIO (0x1 << 6)
|
2015-09-21 15:27:40 +00:00
|
|
|
/* Pro4 or older */
|
2015-02-26 17:26:50 +00:00
|
|
|
#define SC_CLKCTRL_CEN_UMC (0x1 << 4)
|
|
|
|
#define SC_CLKCTRL_CEN_NAND (0x1 << 2)
|
|
|
|
#define SC_CLKCTRL_CEN_SBC (0x1 << 1)
|
|
|
|
#define SC_CLKCTRL_CEN_PERI (0x1 << 0)
|
2014-10-03 10:21:06 +00:00
|
|
|
|
2015-09-21 15:27:40 +00:00
|
|
|
/* Pro5 or newer */
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_CLKCTRL4 0x210c
|
2015-09-21 15:27:40 +00:00
|
|
|
#define SC_CLKCTRL4_CEN_UMCSB (0x1 << 12) /* UMC system bus */
|
2015-09-21 15:27:41 +00:00
|
|
|
#define SC_CLKCTRL4_CEN_UMC2 (0x1 << 2) /* UMC ch2 */
|
2015-09-21 15:27:40 +00:00
|
|
|
#define SC_CLKCTRL4_CEN_UMC1 (0x1 << 1) /* UMC ch1 */
|
|
|
|
#define SC_CLKCTRL4_CEN_UMC0 (0x1 << 0) /* UMC ch0 */
|
|
|
|
|
2014-10-03 10:21:06 +00:00
|
|
|
/* System reset control register */
|
2019-07-10 11:07:41 +00:00
|
|
|
#define SC_IRQTIMSET 0x3000
|
|
|
|
#define SC_SLFRSTSEL 0x3010
|
|
|
|
#define SC_SLFRSTCTL 0x3014
|
2014-10-03 10:21:06 +00:00
|
|
|
|
|
|
|
#endif /* ARCH_SC_REGS_H */
|