• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (c) 2011 Comelit Group SpA, Luca Ceresoli <luca.ceresoli@comelit.it>
4  */
5 
6 #ifndef _OMAP3_REGS_H
7 #define _OMAP3_REGS_H
8 
9 /*
10  * Register definitions for OMAP3 processors.
11  */
12 
13 /*
14  * GPMC_CONFIG1 - GPMC_CONFIG7
15  */
16 
17 /* Values for GPMC_CONFIG1 - signal control parameters */
18 #define WRAPBURST                     (1 << 31)
19 #define READMULTIPLE                  (1 << 30)
20 #define READTYPE                      (1 << 29)
21 #define WRITEMULTIPLE                 (1 << 28)
22 #define WRITETYPE                     (1 << 27)
23 #define CLKACTIVATIONTIME(x)          (((x) & 3) << 25)
24 #define ATTACHEDDEVICEPAGELENGTH(x)   (((x) & 3) << 23)
25 #define WAITREADMONITORING            (1 << 22)
26 #define WAITWRITEMONITORING           (1 << 21)
27 #define WAITMONITORINGTIME(x)         (((x) & 3) << 18)
28 #define WAITPINSELECT(x)              (((x) & 3) << 16)
29 #define DEVICESIZE(x)                 (((x) & 3) << 12)
30 #define DEVICESIZE_8BIT               DEVICESIZE(0)
31 #define DEVICESIZE_16BIT              DEVICESIZE(1)
32 #define DEVICETYPE(x)                 (((x) & 3) << 10)
33 #define DEVICETYPE_NOR                DEVICETYPE(0)
34 #define DEVICETYPE_NAND               DEVICETYPE(2)
35 #define MUXADDDATA                    (1 << 9)
36 #define TIMEPARAGRANULARITY           (1 << 4)
37 #define GPMCFCLKDIVIDER(x)            (((x) & 3) << 0)
38 
39 /* Values for GPMC_CONFIG2 - CS timing */
40 #define CSWROFFTIME(x)   (((x) & 0x1f) << 16)
41 #define CSRDOFFTIME(x)   (((x) & 0x1f) <<  8)
42 #define CSEXTRADELAY     (1 << 7)
43 #define CSONTIME(x)      (((x) &  0xf) <<  0)
44 
45 /* Values for GPMC_CONFIG3 - nADV timing */
46 #define ADVWROFFTIME(x)  (((x) & 0x1f) << 16)
47 #define ADVRDOFFTIME(x)  (((x) & 0x1f) <<  8)
48 #define ADVEXTRADELAY    (1 << 7)
49 #define ADVONTIME(x)     (((x) &  0xf) <<  0)
50 
51 /* Values for GPMC_CONFIG4 - nWE and nOE timing */
52 #define WEOFFTIME(x)     (((x) & 0x1f) << 24)
53 #define WEEXTRADELAY     (1 << 23)
54 #define WEONTIME(x)      (((x) &  0xf) << 16)
55 #define OEOFFTIME(x)     (((x) & 0x1f) <<  8)
56 #define OEEXTRADELAY     (1 << 7)
57 #define OEONTIME(x)      (((x) &  0xf) <<  0)
58 
59 /* Values for GPMC_CONFIG5 - RdAccessTime and CycleTime timing */
60 #define PAGEBURSTACCESSTIME(x)  (((x) &  0xf) << 24)
61 #define RDACCESSTIME(x)         (((x) & 0x1f) << 16)
62 #define WRCYCLETIME(x)          (((x) & 0x1f) <<  8)
63 #define RDCYCLETIME(x)          (((x) & 0x1f) <<  0)
64 
65 /* Values for GPMC_CONFIG6 - misc timings */
66 #define WRACCESSTIME(x)        (((x) & 0x1f) << 24)
67 #define WRDATAONADMUXBUS(x)    (((x) &  0xf) << 16)
68 #define CYCLE2CYCLEDELAY(x)    (((x) &  0xf) <<  8)
69 #define CYCLE2CYCLESAMECSEN    (1 << 7)
70 #define CYCLE2CYCLEDIFFCSEN    (1 << 6)
71 #define BUSTURNAROUND(x)       (((x) &  0xf) <<  0)
72 
73 /* Values for GPMC_CONFIG7 - CS address mapping configuration */
74 #define MASKADDRESS(x)         (((x) &  0xf) <<  8)
75 #define CSVALID                (1 << 6)
76 #define BASEADDRESS(x)         (((x) & 0x3f) <<  0)
77 
78 #endif /* _OMAP3_REGS_H */
79