blob: ee6677a0e54e65e53a0e08922e66c1c30177ab52 [file] [log] [blame]
Jim Liu147c0002022-09-27 16:45:15 +08001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * System Global Control Register definitions
4 * Copyright (c) 2022 Nuvoton Technology Corp.
5 */
6
7#ifndef _NPCM_GCR_H_
8#define _NPCM_GCR_H_
9
10#define NPCM_GCR_BA 0xF0800000
11
12/* On-Chip ARBEL NPCM8XX VERSIONS */
13#define ARBEL_Z1 0x00A35850
14#define ARBEL_A1 0x04a35850
15#define ARBEL_NPCM845 0x00000000
16#define ARBEL_NPCM830 0x00300395
17#define ARBEL_NPCM810 0x00000220
18
19#define MFSEL4_ESPISEL BIT(8)
20#define MFSEL1_LPCSEL BIT(26)
21#define INTCR2_WDC BIT(21)
22
23struct npcm_gcr {
24 unsigned int pdid;
25 unsigned int pwron;
26 unsigned int swstrps;
27 unsigned int rsvd1[2];
28 unsigned int miscpe;
29 unsigned int spldcnt;
30 unsigned int rsvd2[1];
31 unsigned int flockr2;
32 unsigned int flockr3;
33 unsigned int rsvd3[3];
34 unsigned int a35_mode;
35 unsigned int spswc;
36 unsigned int intcr;
37 unsigned int intsr;
38 unsigned int obscr1;
39 unsigned int obsdr1;
40 unsigned int rsvd4[1];
41 unsigned int hifcr;
42 unsigned int rsvd5[3];
43 unsigned int intcr2;
44 unsigned int rsvd6[1];
45 unsigned int srcnt;
46 unsigned int ressr;
47 unsigned int rlockr1;
48 unsigned int flockr1;
49 unsigned int dscnt;
50 unsigned int mdlr;
51 unsigned int scrpad_c;
52 unsigned int scrpad_b;
53 unsigned int rsvd7[4];
54 unsigned int daclvlr;
55 unsigned int intcr3;
56 unsigned int pcirctl;
57 unsigned int rsvd8[2];
58 unsigned int vsintr;
59 unsigned int rsvd9[1];
60 unsigned int sd2sur1;
61 unsigned int sd2sur2;
62 unsigned int sd2irv3;
63 unsigned int intcr4;
64 unsigned int obscr2;
65 unsigned int obsdr2;
66 unsigned int rsvd10[5];
67 unsigned int i2csegsel;
68 unsigned int i2csegctl;
69 unsigned int vsrcr;
70 unsigned int mlockr;
71 unsigned int rsvd11[8];
72 unsigned int etsr;
73 unsigned int dft1r;
74 unsigned int dft2r;
75 unsigned int dft3r;
76 unsigned int edffsr;
77 unsigned int rsvd12[1];
78 unsigned int intcrpce3;
79 unsigned int intcrpce2;
80 unsigned int intcrpce0;
81 unsigned int intcrpce1;
82 unsigned int dactest;
83 unsigned int scrpad;
84 unsigned int usb1phyctl;
85 unsigned int usb2phyctl;
86 unsigned int usb3phyctl;
87 unsigned int intsr2;
88 unsigned int intcrpce2b;
89 unsigned int intcrpce0b;
90 unsigned int intcrpce1b;
91 unsigned int intcrpce3b;
92 unsigned int rsvd13[4];
93 unsigned int intcrpce2c;
94 unsigned int intcrpce0c;
95 unsigned int intcrpce1c;
96 unsigned int intcrpce3c;
97 unsigned int rsvd14[40];
98 unsigned int sd2irv4;
99 unsigned int sd2irv5;
100 unsigned int sd2irv6;
101 unsigned int sd2irv7;
102 unsigned int sd2irv8;
103 unsigned int sd2irv9;
104 unsigned int sd2irv10;
105 unsigned int sd2irv11;
106 unsigned int rsvd15[8];
107 unsigned int mfsel1;
108 unsigned int mfsel2;
109 unsigned int mfsel3;
110 unsigned int mfsel4;
111 unsigned int mfsel5;
112 unsigned int mfsel6;
113 unsigned int mfsel7;
114 unsigned int rsvd16[1];
115 unsigned int mfsel_lk1;
116 unsigned int mfsel_lk2;
117 unsigned int mfsel_lk3;
118 unsigned int mfsel_lk4;
119 unsigned int mfsel_lk5;
120 unsigned int mfsel_lk6;
121 unsigned int mfsel_lk7;
122 unsigned int rsvd17[1];
123 unsigned int mfsel_set1;
124 unsigned int mfsel_set2;
125 unsigned int mfsel_set3;
126 unsigned int mfsel_set4;
127 unsigned int mfsel_set5;
128 unsigned int mfsel_set6;
129 unsigned int mfsel_set7;
130 unsigned int rsvd18[1];
131 unsigned int mfsel_clr1;
132 unsigned int mfsel_clr2;
133 unsigned int mfsel_clr3;
134 unsigned int mfsel_clr4;
135 unsigned int mfsel_clr5;
136 unsigned int mfsel_clr6;
137 unsigned int mfsel_clr7;
138 };
139
140#endif