1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#ifndef _AM33XX_CPU_H
20#define _AM33XX_CPU_H
21
22#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
23#include <asm/types.h>
24#endif
25
26#include <asm/arch/hardware.h>
27
28#define BIT(x) (1 << x)
29#define CL_BIT(x) (0 << x)
30
31
32#define TCLR_ST BIT(0)
33#define TCLR_AR BIT(1)
34#define TCLR_PRE BIT(5)
35#define TCLR_PTV_SHIFT (2)
36#define TCLR_PRE_DISABLE CL_BIT(5)
37
38
39#define DEVICE_MASK (BIT(8) | BIT(9) | BIT(10))
40#define TST_DEVICE 0x0
41#define EMU_DEVICE 0x1
42#define HS_DEVICE 0x2
43#define GP_DEVICE 0x3
44
45
46#define AM335X 0xB944
47#define DEVICE_ID 0x44E10600
48
49
50#define SYSBOOT_MASK (BIT(0) | BIT(1) | BIT(2)\
51 | BIT(3) | BIT(4))
52
53
54#ifdef CONFIG_AM33XX
55#define PRM_RSTCTRL 0x44E00F00
56#define PRM_RSTST 0x44E00F08
57#endif
58#define PRM_RSTCTRL_RESET 0x01
59#define PRM_RSTST_WARM_RESET_MASK 0x232
60
61#ifndef __KERNEL_STRICT_NAMES
62#ifndef __ASSEMBLY__
63
64struct cm_wkuppll {
65 unsigned int wkclkstctrl;
66 unsigned int wkctrlclkctrl;
67 unsigned int wkgpio0clkctrl;
68 unsigned int wkl4wkclkctrl;
69 unsigned int resv2[4];
70 unsigned int idlestdpllmpu;
71 unsigned int resv3[2];
72 unsigned int clkseldpllmpu;
73 unsigned int resv4[1];
74 unsigned int idlestdpllddr;
75 unsigned int resv5[2];
76 unsigned int clkseldpllddr;
77 unsigned int resv6[4];
78 unsigned int clkseldplldisp;
79 unsigned int resv7[1];
80 unsigned int idlestdpllcore;
81 unsigned int resv8[2];
82 unsigned int clkseldpllcore;
83 unsigned int resv9[1];
84 unsigned int idlestdpllper;
85 unsigned int resv10[3];
86 unsigned int divm4dpllcore;
87 unsigned int divm5dpllcore;
88 unsigned int clkmoddpllmpu;
89 unsigned int clkmoddpllper;
90 unsigned int clkmoddpllcore;
91 unsigned int clkmoddpllddr;
92 unsigned int clkmoddplldisp;
93 unsigned int clkseldpllper;
94 unsigned int divm2dpllddr;
95 unsigned int divm2dplldisp;
96 unsigned int divm2dpllmpu;
97 unsigned int divm2dpllper;
98 unsigned int resv11[1];
99 unsigned int wkup_uart0ctrl;
100 unsigned int wkup_i2c0ctrl;
101 unsigned int resv12[7];
102 unsigned int divm6dpllcore;
103};
104
105
106
107
108
109struct cm_perpll {
110 unsigned int l4lsclkstctrl;
111 unsigned int l3sclkstctrl;
112 unsigned int l4fwclkstctrl;
113 unsigned int l3clkstctrl;
114 unsigned int resv1;
115 unsigned int cpgmac0clkctrl;
116 unsigned int lcdclkctrl;
117 unsigned int usb0clkctrl;
118 unsigned int resv2;
119 unsigned int tptc0clkctrl;
120 unsigned int emifclkctrl;
121 unsigned int ocmcramclkctrl;
122 unsigned int gpmcclkctrl;
123 unsigned int mcasp0clkctrl;
124 unsigned int uart5clkctrl;
125 unsigned int mmc0clkctrl;
126 unsigned int elmclkctrl;
127 unsigned int i2c2clkctrl;
128 unsigned int i2c1clkctrl;
129 unsigned int spi0clkctrl;
130 unsigned int spi1clkctrl;
131 unsigned int resv3[3];
132 unsigned int l4lsclkctrl;
133 unsigned int l4fwclkctrl;
134 unsigned int mcasp1clkctrl;
135 unsigned int uart1clkctrl;
136 unsigned int uart2clkctrl;
137 unsigned int uart3clkctrl;
138 unsigned int uart4clkctrl;
139 unsigned int timer7clkctrl;
140 unsigned int timer2clkctrl;
141 unsigned int timer3clkctrl;
142 unsigned int timer4clkctrl;
143 unsigned int resv4[8];
144 unsigned int gpio1clkctrl;
145 unsigned int gpio2clkctrl;
146 unsigned int gpio3clkctrl;
147 unsigned int resv5;
148 unsigned int tpccclkctrl;
149 unsigned int dcan0clkctrl;
150 unsigned int dcan1clkctrl;
151 unsigned int resv6[2];
152 unsigned int emiffwclkctrl;
153 unsigned int resv7[2];
154 unsigned int l3instrclkctrl;
155 unsigned int l3clkctrl;
156 unsigned int resv8[4];
157 unsigned int mmc1clkctrl;
158 unsigned int mmc2clkctrl;
159 unsigned int resv9[8];
160 unsigned int l4hsclkstctrl;
161 unsigned int l4hsclkctrl;
162 unsigned int resv10[8];
163 unsigned int cpswclkstctrl;
164};
165
166
167struct cm_dpll {
168 unsigned int resv1[2];
169 unsigned int clktimer2clk;
170};
171
172
173struct wd_timer {
174 unsigned int resv1[4];
175 unsigned int wdtwdsc;
176 unsigned int wdtwdst;
177 unsigned int wdtwisr;
178 unsigned int wdtwier;
179 unsigned int wdtwwer;
180 unsigned int wdtwclr;
181 unsigned int wdtwcrr;
182 unsigned int wdtwldr;
183 unsigned int wdtwtgr;
184 unsigned int wdtwwps;
185 unsigned int resv2[3];
186 unsigned int wdtwdly;
187 unsigned int wdtwspr;
188 unsigned int resv3[1];
189 unsigned int wdtwqeoi;
190 unsigned int wdtwqstar;
191 unsigned int wdtwqsta;
192 unsigned int wdtwqens;
193 unsigned int wdtwqenc;
194 unsigned int resv4[39];
195 unsigned int wdt_unfr;
196};
197
198
199struct gptimer {
200 unsigned int tidr;
201 unsigned char res1[12];
202 unsigned int tiocp_cfg;
203 unsigned char res2[12];
204 unsigned int tier;
205 unsigned int tistatr;
206 unsigned int tistat;
207 unsigned int tisr;
208 unsigned int tcicr;
209 unsigned int twer;
210 unsigned int tclr;
211 unsigned int tcrr;
212 unsigned int tldr;
213 unsigned int ttgr;
214 unsigned int twpc;
215 unsigned int tmar;
216 unsigned int tcar1;
217 unsigned int tscir;
218 unsigned int tcar2;
219};
220
221
222struct uart_sys {
223 unsigned int resv1[21];
224 unsigned int uartsyscfg;
225 unsigned int uartsyssts;
226};
227
228
229struct vtp_reg {
230 unsigned int vtp0ctrlreg;
231};
232
233
234struct ctrl_stat {
235 unsigned int resv1[16];
236 unsigned int statusreg;
237 unsigned int resv2[51];
238 unsigned int secure_emif_sdram_config;
239};
240
241
242#define OMAP_GPIO_REVISION 0x0000
243#define OMAP_GPIO_SYSCONFIG 0x0010
244#define OMAP_GPIO_SYSSTATUS 0x0114
245#define OMAP_GPIO_IRQSTATUS1 0x002c
246#define OMAP_GPIO_IRQSTATUS2 0x0030
247#define OMAP_GPIO_CTRL 0x0130
248#define OMAP_GPIO_OE 0x0134
249#define OMAP_GPIO_DATAIN 0x0138
250#define OMAP_GPIO_DATAOUT 0x013c
251#define OMAP_GPIO_LEVELDETECT0 0x0140
252#define OMAP_GPIO_LEVELDETECT1 0x0144
253#define OMAP_GPIO_RISINGDETECT 0x0148
254#define OMAP_GPIO_FALLINGDETECT 0x014c
255#define OMAP_GPIO_DEBOUNCE_EN 0x0150
256#define OMAP_GPIO_DEBOUNCE_VAL 0x0154
257#define OMAP_GPIO_CLEARDATAOUT 0x0190
258#define OMAP_GPIO_SETDATAOUT 0x0194
259
260
261struct ctrl_dev {
262 unsigned int deviceid;
263 unsigned int resv1[11];
264 unsigned int macid0l;
265 unsigned int macid0h;
266 unsigned int macid1l;
267 unsigned int macid1h;
268 unsigned int resv2[4];
269 unsigned int miisel;
270};
271#endif
272#endif
273
274#endif
275