]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - arch/arm/include/asm/arch-am33xx/cpu.h
arm, am335x: add some missing registers and defines for lcd and epwm support
[karo-tx-uboot.git] / arch / arm / include / asm / arch-am33xx / cpu.h
1 /*
2  * cpu.h
3  *
4  * AM33xx specific header file
5  *
6  * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
7  *
8  * SPDX-License-Identifier:     GPL-2.0+
9  */
10
11 #ifndef _AM33XX_CPU_H
12 #define _AM33XX_CPU_H
13
14 #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
15 #include <asm/types.h>
16 #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */
17
18 #include <asm/arch/hardware.h>
19
20 #define BIT(x)                          (1 << x)
21 #define CL_BIT(x)                       (0 << x)
22
23 /* Timer register bits */
24 #define TCLR_ST                         BIT(0)  /* Start=1 Stop=0 */
25 #define TCLR_AR                         BIT(1)  /* Auto reload */
26 #define TCLR_PRE                        BIT(5)  /* Pre-scaler enable */
27 #define TCLR_PTV_SHIFT                  (2)     /* Pre-scaler shift value */
28 #define TCLR_PRE_DISABLE                CL_BIT(5) /* Pre-scalar disable */
29
30 /* device type */
31 #define DEVICE_MASK                     (BIT(8) | BIT(9) | BIT(10))
32 #define TST_DEVICE                      0x0
33 #define EMU_DEVICE                      0x1
34 #define HS_DEVICE                       0x2
35 #define GP_DEVICE                       0x3
36
37 /* cpu-id for AM33XX and TI81XX family */
38 #define AM335X                          0xB944
39 #define TI81XX                          0xB81E
40 #define DEVICE_ID                       (CTRL_BASE + 0x0600)
41
42 /* This gives the status of the boot mode pins on the evm */
43 #define SYSBOOT_MASK                    (BIT(0) | BIT(1) | BIT(2)\
44                                         | BIT(3) | BIT(4))
45
46 #define PRM_RSTCTRL_RESET               0x01
47 #define PRM_RSTST_WARM_RESET_MASK       0x232
48
49 #ifndef __KERNEL_STRICT_NAMES
50 #ifndef __ASSEMBLY__
51 struct gpmc_cs {
52         u32 config1;            /* 0x00 */
53         u32 config2;            /* 0x04 */
54         u32 config3;            /* 0x08 */
55         u32 config4;            /* 0x0C */
56         u32 config5;            /* 0x10 */
57         u32 config6;            /* 0x14 */
58         u32 config7;            /* 0x18 */
59         u32 nand_cmd;           /* 0x1C */
60         u32 nand_adr;           /* 0x20 */
61         u32 nand_dat;           /* 0x24 */
62         u8 res[8];              /* blow up to 0x30 byte */
63 };
64
65 struct bch_res_0_3 {
66         u32 bch_result_x[4];
67 };
68
69 struct gpmc {
70         u8 res1[0x10];
71         u32 sysconfig;          /* 0x10 */
72         u8 res2[0x4];
73         u32 irqstatus;          /* 0x18 */
74         u32 irqenable;          /* 0x1C */
75         u8 res3[0x20];
76         u32 timeout_control;    /* 0x40 */
77         u8 res4[0xC];
78         u32 config;             /* 0x50 */
79         u32 status;             /* 0x54 */
80         u8 res5[0x8];           /* 0x58 */
81         struct gpmc_cs cs[8];   /* 0x60, 0x90, .. */
82         u8 res6[0x14];          /* 0x1E0 */
83         u32 ecc_config;         /* 0x1F4 */
84         u32 ecc_control;        /* 0x1F8 */
85         u32 ecc_size_config;    /* 0x1FC */
86         u32 ecc1_result;        /* 0x200 */
87         u32 ecc2_result;        /* 0x204 */
88         u32 ecc3_result;        /* 0x208 */
89         u32 ecc4_result;        /* 0x20C */
90         u32 ecc5_result;        /* 0x210 */
91         u32 ecc6_result;        /* 0x214 */
92         u32 ecc7_result;        /* 0x218 */
93         u32 ecc8_result;        /* 0x21C */
94         u32 ecc9_result;        /* 0x220 */
95         u8 res7[12];            /* 0x224 */
96         u32 testmomde_ctrl;     /* 0x230 */
97         u8 res8[12];            /* 0x234 */
98         struct bch_res_0_3 bch_result_0_3[2];   /* 0x240 */
99 };
100
101 /* Used for board specific gpmc initialization */
102 extern struct gpmc *gpmc_cfg;
103
104 #ifndef CONFIG_AM43XX
105 /* Encapsulating core pll registers */
106 struct cm_wkuppll {
107         unsigned int wkclkstctrl;       /* offset 0x00 */
108         unsigned int wkctrlclkctrl;     /* offset 0x04 */
109         unsigned int wkgpio0clkctrl;    /* offset 0x08 */
110         unsigned int wkl4wkclkctrl;     /* offset 0x0c */
111         unsigned int resv2[4];
112         unsigned int idlestdpllmpu;     /* offset 0x20 */
113         unsigned int resv3[2];
114         unsigned int clkseldpllmpu;     /* offset 0x2c */
115         unsigned int resv4[1];
116         unsigned int idlestdpllddr;     /* offset 0x34 */
117         unsigned int resv5[2];
118         unsigned int clkseldpllddr;     /* offset 0x40 */
119         unsigned int resv6[4];
120         unsigned int clkseldplldisp;    /* offset 0x54 */
121         unsigned int resv7[1];
122         unsigned int idlestdpllcore;    /* offset 0x5c */
123         unsigned int resv8[2];
124         unsigned int clkseldpllcore;    /* offset 0x68 */
125         unsigned int resv9[1];
126         unsigned int idlestdpllper;     /* offset 0x70 */
127         unsigned int resv10[2];
128         unsigned int clkdcoldodpllper;  /* offset 0x7c */
129         unsigned int divm4dpllcore;     /* offset 0x80 */
130         unsigned int divm5dpllcore;     /* offset 0x84 */
131         unsigned int clkmoddpllmpu;     /* offset 0x88 */
132         unsigned int clkmoddpllper;     /* offset 0x8c */
133         unsigned int clkmoddpllcore;    /* offset 0x90 */
134         unsigned int clkmoddpllddr;     /* offset 0x94 */
135         unsigned int clkmoddplldisp;    /* offset 0x98 */
136         unsigned int clkseldpllper;     /* offset 0x9c */
137         unsigned int divm2dpllddr;      /* offset 0xA0 */
138         unsigned int divm2dplldisp;     /* offset 0xA4 */
139         unsigned int divm2dpllmpu;      /* offset 0xA8 */
140         unsigned int divm2dpllper;      /* offset 0xAC */
141         unsigned int resv11[1];
142         unsigned int wkup_uart0ctrl;    /* offset 0xB4 */
143         unsigned int wkup_i2c0ctrl;     /* offset 0xB8 */
144         unsigned int resv12[7];
145         unsigned int divm6dpllcore;     /* offset 0xD8 */
146 };
147
148 /**
149  * Encapsulating peripheral functional clocks
150  * pll registers
151  */
152 struct cm_perpll {
153         unsigned int l4lsclkstctrl;     /* offset 0x00 */
154         unsigned int l3sclkstctrl;      /* offset 0x04 */
155         unsigned int l4fwclkstctrl;     /* offset 0x08 */
156         unsigned int l3clkstctrl;       /* offset 0x0c */
157         unsigned int resv1;
158         unsigned int cpgmac0clkctrl;    /* offset 0x14 */
159         unsigned int lcdclkctrl;        /* offset 0x18 */
160         unsigned int usb0clkctrl;       /* offset 0x1C */
161         unsigned int resv2;
162         unsigned int tptc0clkctrl;      /* offset 0x24 */
163         unsigned int emifclkctrl;       /* offset 0x28 */
164         unsigned int ocmcramclkctrl;    /* offset 0x2c */
165         unsigned int gpmcclkctrl;       /* offset 0x30 */
166         unsigned int mcasp0clkctrl;     /* offset 0x34 */
167         unsigned int uart5clkctrl;      /* offset 0x38 */
168         unsigned int mmc0clkctrl;       /* offset 0x3C */
169         unsigned int elmclkctrl;        /* offset 0x40 */
170         unsigned int i2c2clkctrl;       /* offset 0x44 */
171         unsigned int i2c1clkctrl;       /* offset 0x48 */
172         unsigned int spi0clkctrl;       /* offset 0x4C */
173         unsigned int spi1clkctrl;       /* offset 0x50 */
174         unsigned int resv3[3];
175         unsigned int l4lsclkctrl;       /* offset 0x60 */
176         unsigned int l4fwclkctrl;       /* offset 0x64 */
177         unsigned int mcasp1clkctrl;     /* offset 0x68 */
178         unsigned int uart1clkctrl;      /* offset 0x6C */
179         unsigned int uart2clkctrl;      /* offset 0x70 */
180         unsigned int uart3clkctrl;      /* offset 0x74 */
181         unsigned int uart4clkctrl;      /* offset 0x78 */
182         unsigned int timer7clkctrl;     /* offset 0x7C */
183         unsigned int timer2clkctrl;     /* offset 0x80 */
184         unsigned int timer3clkctrl;     /* offset 0x84 */
185         unsigned int timer4clkctrl;     /* offset 0x88 */
186         unsigned int resv4[8];
187         unsigned int gpio1clkctrl;      /* offset 0xAC */
188         unsigned int gpio2clkctrl;      /* offset 0xB0 */
189         unsigned int gpio3clkctrl;      /* offset 0xB4 */
190         unsigned int resv5;
191         unsigned int tpccclkctrl;       /* offset 0xBC */
192         unsigned int dcan0clkctrl;      /* offset 0xC0 */
193         unsigned int dcan1clkctrl;      /* offset 0xC4 */
194         unsigned int resv6[2];
195         unsigned int emiffwclkctrl;     /* offset 0xD0 */
196         unsigned int epwmss0clkctrl;    /* offset 0xD4 */
197         unsigned int epwmss2clkctrl;    /* offset 0xD8 */
198         unsigned int l3instrclkctrl;    /* offset 0xDC */
199         unsigned int l3clkctrl;         /* Offset 0xE0 */
200         unsigned int resv8[4];
201         unsigned int mmc1clkctrl;       /* offset 0xF4 */
202         unsigned int mmc2clkctrl;       /* offset 0xF8 */
203         unsigned int resv9[8];
204         unsigned int l4hsclkstctrl;     /* offset 0x11C */
205         unsigned int l4hsclkctrl;       /* offset 0x120 */
206         unsigned int resv10[8];
207         unsigned int cpswclkstctrl;     /* offset 0x144 */
208         unsigned int lcdcclkstctrl;     /* offset 0x148 */
209 };
210 #else
211 /* Encapsulating core pll registers */
212 struct cm_wkuppll {
213         unsigned int resv0[136];
214         unsigned int wkl4wkclkctrl;     /* offset 0x220 */
215         unsigned int resv1[55];
216         unsigned int wkclkstctrl;       /* offset 0x300 */
217         unsigned int resv2[15];
218         unsigned int wkup_i2c0ctrl;     /* offset 0x340 */
219         unsigned int resv3;
220         unsigned int wkup_uart0ctrl;    /* offset 0x348 */
221         unsigned int resv4[5];
222         unsigned int wkctrlclkctrl;     /* offset 0x360 */
223         unsigned int resv5;
224         unsigned int wkgpio0clkctrl;    /* offset 0x368 */
225
226         unsigned int resv6[109];
227         unsigned int clkmoddpllcore;    /* offset 0x520 */
228         unsigned int idlestdpllcore;    /* offset 0x524 */
229         unsigned int resv61;
230         unsigned int clkseldpllcore;    /* offset 0x52C */
231         unsigned int resv7[2];
232         unsigned int divm4dpllcore;     /* offset 0x538 */
233         unsigned int divm5dpllcore;     /* offset 0x53C */
234         unsigned int divm6dpllcore;     /* offset 0x540 */
235
236         unsigned int resv8[7];
237         unsigned int clkmoddpllmpu;     /* offset 0x560 */
238         unsigned int idlestdpllmpu;     /* offset 0x564 */
239         unsigned int resv9;
240         unsigned int clkseldpllmpu;     /* offset 0x56c */
241         unsigned int divm2dpllmpu;      /* offset 0x570 */
242
243         unsigned int resv10[11];
244         unsigned int clkmoddpllddr;     /* offset 0x5A0 */
245         unsigned int idlestdpllddr;     /* offset 0x5A4 */
246         unsigned int resv11;
247         unsigned int clkseldpllddr;     /* offset 0x5AC */
248         unsigned int divm2dpllddr;      /* offset 0x5B0 */
249
250         unsigned int resv12[11];
251         unsigned int clkmoddpllper;     /* offset 0x5E0 */
252         unsigned int idlestdpllper;     /* offset 0x5E4 */
253         unsigned int resv13;
254         unsigned int clkseldpllper;     /* offset 0x5EC */
255         unsigned int divm2dpllper;      /* offset 0x5F0 */
256         unsigned int resv14[8];
257         unsigned int clkdcoldodpllper;  /* offset 0x614 */
258
259         unsigned int resv15[2];
260         unsigned int clkmoddplldisp;    /* offset 0x620 */
261         unsigned int resv16[2];
262         unsigned int clkseldplldisp;    /* offset 0x62C */
263         unsigned int divm2dplldisp;     /* offset 0x630 */
264 };
265
266 /*
267  * Encapsulating peripheral functional clocks
268  * pll registers
269  */
270 struct cm_perpll {
271         unsigned int l3clkstctrl;       /* offset 0x00 */
272         unsigned int resv0[7];
273         unsigned int l3clkctrl;         /* Offset 0x20 */
274         unsigned int resv1[7];
275         unsigned int l3instrclkctrl;    /* offset 0x40 */
276         unsigned int resv2[3];
277         unsigned int ocmcramclkctrl;    /* offset 0x50 */
278         unsigned int resv3[9];
279         unsigned int tpccclkctrl;       /* offset 0x78 */
280         unsigned int resv4;
281         unsigned int tptc0clkctrl;      /* offset 0x80 */
282
283         unsigned int resv5[7];
284         unsigned int l4hsclkctrl;       /* offset 0x0A0 */
285         unsigned int resv6;
286         unsigned int l4fwclkctrl;       /* offset 0x0A8 */
287         unsigned int resv7[85];
288         unsigned int l3sclkstctrl;      /* offset 0x200 */
289         unsigned int resv8[7];
290         unsigned int gpmcclkctrl;       /* offset 0x220 */
291         unsigned int resv9[5];
292         unsigned int mcasp0clkctrl;     /* offset 0x238 */
293         unsigned int resv10;
294         unsigned int mcasp1clkctrl;     /* offset 0x240 */
295         unsigned int resv11;
296         unsigned int mmc2clkctrl;       /* offset 0x248 */
297         unsigned int resv12[5];
298         unsigned int usb0clkctrl;       /* offset 0x260 */
299         unsigned int resv13[103];
300         unsigned int l4lsclkstctrl;     /* offset 0x400 */
301         unsigned int resv14[7];
302         unsigned int l4lsclkctrl;       /* offset 0x420 */
303         unsigned int resv15;
304         unsigned int dcan0clkctrl;      /* offset 0x428 */
305         unsigned int resv16;
306         unsigned int dcan1clkctrl;      /* offset 0x430 */
307         unsigned int resv17[13];
308         unsigned int elmclkctrl;        /* offset 0x468 */
309
310         unsigned int resv18[3];
311         unsigned int gpio1clkctrl;      /* offset 0x478 */
312         unsigned int resv19;
313         unsigned int gpio2clkctrl;      /* offset 0x480 */
314         unsigned int resv20;
315         unsigned int gpio3clkctrl;      /* offset 0x488 */
316         unsigned int resv21[7];
317
318         unsigned int i2c1clkctrl;       /* offset 0x4A8 */
319         unsigned int resv22;
320         unsigned int i2c2clkctrl;       /* offset 0x4B0 */
321         unsigned int resv23[3];
322         unsigned int mmc0clkctrl;       /* offset 0x4C0 */
323         unsigned int resv24;
324         unsigned int mmc1clkctrl;       /* offset 0x4C8 */
325
326         unsigned int resv25[13];
327         unsigned int spi0clkctrl;       /* offset 0x500 */
328         unsigned int resv26;
329         unsigned int spi1clkctrl;       /* offset 0x508 */
330         unsigned int resv27[9];
331         unsigned int timer2clkctrl;     /* offset 0x530 */
332         unsigned int resv28;
333         unsigned int timer3clkctrl;     /* offset 0x538 */
334         unsigned int resv29;
335         unsigned int timer4clkctrl;     /* offset 0x540 */
336         unsigned int resv30[5];
337         unsigned int timer7clkctrl;     /* offset 0x558 */
338
339         unsigned int resv31[9];
340         unsigned int uart1clkctrl;      /* offset 0x580 */
341         unsigned int resv32;
342         unsigned int uart2clkctrl;      /* offset 0x588 */
343         unsigned int resv33;
344         unsigned int uart3clkctrl;      /* offset 0x590 */
345         unsigned int resv34;
346         unsigned int uart4clkctrl;      /* offset 0x598 */
347         unsigned int resv35;
348         unsigned int uart5clkctrl;      /* offset 0x5A0 */
349         unsigned int resv36[87];
350
351         unsigned int emifclkstctrl;     /* offset 0x700 */
352         unsigned int resv361[7];
353         unsigned int emifclkctrl;       /* offset 0x720 */
354         unsigned int resv37[3];
355         unsigned int emiffwclkctrl;     /* offset 0x730 */
356         unsigned int resv371;
357         unsigned int otfaemifclkctrl;   /* offset 0x738 */
358         unsigned int resv38[57];
359         unsigned int lcdclkctrl;        /* offset 0x820 */
360         unsigned int resv39[183];
361         unsigned int cpswclkstctrl;     /* offset 0xB00 */
362         unsigned int resv40[7];
363         unsigned int cpgmac0clkctrl;    /* offset 0xB20 */
364 };
365 #endif /* CONFIG_AM43XX */
366
367 /* Encapsulating Display pll registers */
368 struct cm_dpll {
369         unsigned int resv1[2];
370         unsigned int clktimer2clk;      /* offset 0x08 */
371         unsigned int resv2[10];
372         unsigned int clklcdcpixelclk;   /* offset 0x34 */
373 };
374
375 /* Control Module RTC registers */
376 struct cm_rtc {
377         unsigned int rtcclkctrl;        /* offset 0x0 */
378         unsigned int clkstctrl;         /* offset 0x4 */
379 };
380
381 /* Watchdog timer registers */
382 struct wd_timer {
383         unsigned int resv1[4];
384         unsigned int wdtwdsc;   /* offset 0x010 */
385         unsigned int wdtwdst;   /* offset 0x014 */
386         unsigned int wdtwisr;   /* offset 0x018 */
387         unsigned int wdtwier;   /* offset 0x01C */
388         unsigned int wdtwwer;   /* offset 0x020 */
389         unsigned int wdtwclr;   /* offset 0x024 */
390         unsigned int wdtwcrr;   /* offset 0x028 */
391         unsigned int wdtwldr;   /* offset 0x02C */
392         unsigned int wdtwtgr;   /* offset 0x030 */
393         unsigned int wdtwwps;   /* offset 0x034 */
394         unsigned int resv2[3];
395         unsigned int wdtwdly;   /* offset 0x044 */
396         unsigned int wdtwspr;   /* offset 0x048 */
397         unsigned int resv3[1];
398         unsigned int wdtwqeoi;  /* offset 0x050 */
399         unsigned int wdtwqstar; /* offset 0x054 */
400         unsigned int wdtwqsta;  /* offset 0x058 */
401         unsigned int wdtwqens;  /* offset 0x05C */
402         unsigned int wdtwqenc;  /* offset 0x060 */
403         unsigned int resv4[39];
404         unsigned int wdt_unfr;  /* offset 0x100 */
405 };
406
407 /* Timer 32 bit registers */
408 struct gptimer {
409         unsigned int tidr;              /* offset 0x00 */
410         unsigned char res1[12];
411         unsigned int tiocp_cfg;         /* offset 0x10 */
412         unsigned char res2[12];
413         unsigned int tier;              /* offset 0x20 */
414         unsigned int tistatr;           /* offset 0x24 */
415         unsigned int tistat;            /* offset 0x28 */
416         unsigned int tisr;              /* offset 0x2c */
417         unsigned int tcicr;             /* offset 0x30 */
418         unsigned int twer;              /* offset 0x34 */
419         unsigned int tclr;              /* offset 0x38 */
420         unsigned int tcrr;              /* offset 0x3c */
421         unsigned int tldr;              /* offset 0x40 */
422         unsigned int ttgr;              /* offset 0x44 */
423         unsigned int twpc;              /* offset 0x48 */
424         unsigned int tmar;              /* offset 0x4c */
425         unsigned int tcar1;             /* offset 0x50 */
426         unsigned int tscir;             /* offset 0x54 */
427         unsigned int tcar2;             /* offset 0x58 */
428 };
429
430 /* RTC Registers */
431 struct rtc_regs {
432         unsigned int res[21];
433         unsigned int osc;               /* offset 0x54 */
434         unsigned int res2[5];
435         unsigned int kick0r;            /* offset 0x6c */
436         unsigned int kick1r;            /* offset 0x70 */
437 };
438
439 /* UART Registers */
440 struct uart_sys {
441         unsigned int resv1[21];
442         unsigned int uartsyscfg;        /* offset 0x54 */
443         unsigned int uartsyssts;        /* offset 0x58 */
444 };
445
446 /* VTP Registers */
447 struct vtp_reg {
448         unsigned int vtp0ctrlreg;
449 };
450
451 /* Control Status Register */
452 struct ctrl_stat {
453         unsigned int resv1[16];
454         unsigned int statusreg;         /* ofset 0x40 */
455         unsigned int resv2[51];
456         unsigned int secure_emif_sdram_config;  /* offset 0x0110 */
457 };
458
459 /* AM33XX GPIO registers */
460 #define OMAP_GPIO_REVISION              0x0000
461 #define OMAP_GPIO_SYSCONFIG             0x0010
462 #define OMAP_GPIO_SYSSTATUS             0x0114
463 #define OMAP_GPIO_IRQSTATUS1            0x002c
464 #define OMAP_GPIO_IRQSTATUS2            0x0030
465 #define OMAP_GPIO_CTRL                  0x0130
466 #define OMAP_GPIO_OE                    0x0134
467 #define OMAP_GPIO_DATAIN                0x0138
468 #define OMAP_GPIO_DATAOUT               0x013c
469 #define OMAP_GPIO_LEVELDETECT0          0x0140
470 #define OMAP_GPIO_LEVELDETECT1          0x0144
471 #define OMAP_GPIO_RISINGDETECT          0x0148
472 #define OMAP_GPIO_FALLINGDETECT         0x014c
473 #define OMAP_GPIO_DEBOUNCE_EN           0x0150
474 #define OMAP_GPIO_DEBOUNCE_VAL          0x0154
475 #define OMAP_GPIO_CLEARDATAOUT          0x0190
476 #define OMAP_GPIO_SETDATAOUT            0x0194
477
478 /* Control Device Register */
479 struct ctrl_dev {
480         unsigned int deviceid;          /* offset 0x00 */
481         unsigned int resv1[7];
482         unsigned int usb_ctrl0;         /* offset 0x20 */
483         unsigned int resv2;
484         unsigned int usb_ctrl1;         /* offset 0x28 */
485         unsigned int resv3;
486         unsigned int macid0l;           /* offset 0x30 */
487         unsigned int macid0h;           /* offset 0x34 */
488         unsigned int macid1l;           /* offset 0x38 */
489         unsigned int macid1h;           /* offset 0x3c */
490         unsigned int resv4[4];
491         unsigned int miisel;            /* offset 0x50 */
492 };
493
494 /* gmii_sel register defines */
495 #define GMII1_SEL_MII           0x0
496 #define GMII1_SEL_RMII          0x1
497 #define GMII1_SEL_RGMII         0x2
498 #define GMII2_SEL_MII           0x0
499 #define GMII2_SEL_RMII          0x4
500 #define GMII2_SEL_RGMII         0x8
501 #define RGMII1_IDMODE           BIT(4)
502 #define RGMII2_IDMODE           BIT(5)
503 #define RMII1_IO_CLK_EN         BIT(6)
504 #define RMII2_IO_CLK_EN         BIT(7)
505
506 #define MII_MODE_ENABLE         (GMII1_SEL_MII | GMII2_SEL_MII)
507 #define RMII_MODE_ENABLE        (GMII1_SEL_RMII | GMII2_SEL_RMII)
508 #define RGMII_MODE_ENABLE       (GMII1_SEL_RGMII | GMII2_SEL_RGMII)
509 #define RGMII_INT_DELAY         (RGMII1_IDMODE | RGMII2_IDMODE)
510 #define RMII_CHIPCKL_ENABLE     (RMII1_IO_CLK_EN | RMII2_IO_CLK_EN)
511
512 /* PWMSS */
513 struct pwmss_regs {
514         unsigned int idver;
515         unsigned int sysconfig;
516         unsigned int clkconfig;
517         unsigned int clkstatus;
518 };
519 #define ECAP_CLK_EN             BIT(0)
520 #define ECAP_CLK_STOP_REQ       BIT(1)
521
522 struct pwmss_ecap_regs {
523         unsigned int tsctr;
524         unsigned int ctrphs;
525         unsigned int cap1;
526         unsigned int cap2;
527         unsigned int cap3;
528         unsigned int cap4;
529         unsigned int resv1[4];
530         unsigned short ecctl1;
531         unsigned short ecctl2;
532 };
533
534 /* Capture Control register 2 */
535 #define ECTRL2_SYNCOSEL_MASK    (0x03 << 6)
536 #define ECTRL2_MDSL_ECAP        BIT(9)
537 #define ECTRL2_CTRSTP_FREERUN   BIT(4)
538 #define ECTRL2_PLSL_LOW         BIT(10)
539 #define ECTRL2_SYNC_EN          BIT(5)
540
541 #endif /* __ASSEMBLY__ */
542 #endif /* __KERNEL_STRICT_NAMES */
543
544 #endif /* _AM33XX_CPU_H */