blob: cc2dd27abf20dc423db45b55c96ef6eee719af56 [file] [log] [blame]
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09001/*
2 * UniPhier UMC (Universal Memory Controller) registers
3 *
4 * Copyright (C) 2011-2014 Panasonic Corporation
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9#ifndef ARCH_UMC_REGS_H
10#define ARCH_UMC_REGS_H
11
Masahiro Yamadaf734aa92016-02-26 14:21:52 +090012#include <linux/bitops.h>
13
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090014#define UMC_CPURST 0x00000700
15#define UMC_IDSRST 0x0000070C
16#define UMC_IXMRST 0x00000714
17#define UMC_HDMRST 0x00000718
18#define UMC_MDMRST 0x0000071C
19#define UMC_HDDRST 0x00000720
20#define UMC_MDDRST 0x00000724
21#define UMC_SIORST 0x00000728
22#define UMC_GIORST 0x0000072C
23#define UMC_HD2RST 0x00000734
24#define UMC_VIORST 0x0000073C
25#define UMC_FRCRST 0x00000748 /* LD4/sLD8 */
26#define UMC_DVCRST 0x00000748 /* Pro4 */
27#define UMC_RGLRST 0x00000750
28#define UMC_VPERST 0x00000758
29#define UMC_AIORST 0x00000764
30#define UMC_DMDRST 0x00000770
31
32#define UMC_HDMCHSEL 0x00000898
33#define UMC_MDMCHSEL 0x0000089C
34#define UMC_DVCCHSEL 0x000008C8
35#define UMC_DMDCHSEL 0x000008F0
36
37#define UMC_CLKEN_SSIF_FETCH 0x0000C060
38#define UMC_CLKEN_SSIF_COMQUE0 0x0000C064
39#define UMC_CLKEN_SSIF_COMWC0 0x0000C068
40#define UMC_CLKEN_SSIF_COMRC0 0x0000C06C
41#define UMC_CLKEN_SSIF_COMQUE1 0x0000C070
42#define UMC_CLKEN_SSIF_COMWC1 0x0000C074
43#define UMC_CLKEN_SSIF_COMRC1 0x0000C078
44#define UMC_CLKEN_SSIF_WC 0x0000C07C
45#define UMC_CLKEN_SSIF_RC 0x0000C080
46#define UMC_CLKEN_SSIF_DST 0x0000C084
47
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090048#define UMC_CMDCTLA 0x00000000
49#define UMC_CMDCTLB 0x00000004
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090050#define UMC_INITSET 0x00000014
Masahiro Yamadaf734aa92016-02-26 14:21:52 +090051#define UMC_INITSET_INIT1EN BIT(1) /* init without power-on wait */
52#define UMC_INITSET_INIT0EN BIT(0) /* init with power-on wait */
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090053#define UMC_INITSTAT 0x00000018
Masahiro Yamadaf734aa92016-02-26 14:21:52 +090054#define UMC_INITSTAT_INIT1ST BIT(1) /* init without power-on wait */
55#define UMC_INITSTAT_INIT0ST BIT(0) /* init with power-on wait */
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090056#define UMC_SPCCTLA 0x00000030
57#define UMC_SPCCTLB 0x00000034
58#define UMC_SPCSETA 0x00000038
59#define UMC_SPCSETB 0x0000003C
Masahiro Yamada99d80982016-01-17 15:03:29 +090060#define UMC_SPCSETB_AREFMD_MASK (0x3) /* Auto Refresh Mode */
61#define UMC_SPCSETB_AREFMD_ARB (0x0) /* control by arbitor */
62#define UMC_SPCSETB_AREFMD_CONT (0x1) /* control by DRAMCONT */
63#define UMC_SPCSETB_AREFMD_REG (0x2) /* control by register */
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090064#define UMC_SPCSETC 0x00000040
65#define UMC_SPCSETD 0x00000044
66#define UMC_SPCSTATA 0x00000050
67#define UMC_SPCSTATB 0x00000054
68#define UMC_SPCSTATC 0x00000058
69#define UMC_ACSSETA 0x00000060
70#define UMC_FLOWCTLA 0x00000400
71#define UMC_FLOWCTLB 0x00000404
72#define UMC_FLOWCTLC 0x00000408
73#define UMC_FLOWCTLG 0x00000508
Masahiro Yamada99d80982016-01-17 15:03:29 +090074#define UMC_FLOWCTLOB0 0x00000520
75#define UMC_FLOWCTLOB1 0x00000524
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090076#define UMC_RDATACTL_D0 0x00000600
Masahiro Yamada99d80982016-01-17 15:03:29 +090077#define UMC_RDATACTL_RADLTY_SHIFT 4
78#define UMC_RDATACTL_RADLTY_MASK (0xf << (UMC_RDATACTL_RADLTY_SHIFT))
79#define UMC_RDATACTL_RAD2LTY_SHIFT 8
80#define UMC_RDATACTL_RAD2LTY_MASK (0xf << (UMC_RDATACTL_RAD2LTY_SHIFT))
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090081#define UMC_WDATACTL_D0 0x00000604
82#define UMC_RDATACTL_D1 0x00000608
83#define UMC_WDATACTL_D1 0x0000060C
84#define UMC_DATASET 0x00000610
Masahiro Yamada99d80982016-01-17 15:03:29 +090085#define UMC_RESPCTL 0x00000624
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090086#define UMC_DCCGCTL 0x00000720
87#define UMC_DICGCTLA 0x00000724
88#define UMC_DICGCTLB 0x00000728
Masahiro Yamada99d80982016-01-17 15:03:29 +090089#define UMC_ERRMASKA 0x00000958
90#define UMC_ERRMASKB 0x0000095c
91#define UMC_BSICMAPSET 0x00000988
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090092#define UMC_DIOCTLA 0x00000C00
Masahiro Yamada99d80982016-01-17 15:03:29 +090093#define UMC_DIOCTLA_CTL_NRST BIT(8) /* ctl_rst_n */
94#define UMC_DIOCTLA_CFG_NRST BIT(0) /* cfg_rst_n */
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090095#define UMC_DFICUPDCTLA 0x00000C20
96
Masahiro Yamada99d80982016-01-17 15:03:29 +090097/* UM registers */
98#define UMC_MBUS0 0x00080004
99#define UMC_MBUS1 0x00081004
100#define UMC_MBUS2 0x00082004
101#define UMC_MBUS3 0x00083004
102
103/* UD registers */
104#define UMC_BITPERPIXELMODE_D0 0x010
105#define UMC_PAIR1DOFF_D0 0x054
106
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +0900107#endif