source: umon/ports/beagleboneblack/am335x.h @ b8ffb40

Last change on this file since b8ffb40 was b8ffb40, checked in by Ed Sutter <edsutterjr@…>, on 07/14/15 at 02:11:27

BBB: Changes to support runtime blinking LED.

  • Property mode set to 100644
File size: 45.2 KB
Line 
1/**
2 * @file
3 *
4 * @brief AM335x Register Base Addresses and Offsets
5 *
6 * @ingroup am335x
7 */
8
9/*
10 * Copyright (C) 2015 Jarielle Catbagan <jcatbagan93@gmail.com>
11 *
12 * The license and distribution terms for this file may be
13 * found in the file LICENSE in this distribution or at
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 *
17 * Description: This file contains register base addresses and offsets as
18 * well as access macros for the AM335x on-chip peripherals.  Peripherals
19 * not used by Umon have not been test (and may not be defined). Use
20 * these defines with caution!
21 */
22
23#ifndef AM335X_H
24#define AM335X_H
25
26#include "bits.h"
27
28
29/*===========================================================================*/
30/* AM335x device identification and feature enumeration */
31/*===========================================================================*/
32#define AM335X_DEVICE_IDENTIFICATION    0x44E10600
33#define AM335X_DEVICE_FEATURE           0x44E10604
34/*===========================================================================*/
35
36
37/*===========================================================================*/
38/* L3 and L4 Interconnects */
39/*===========================================================================*/
40#define L3F_CFG_REGS_BASE               0x44000000
41#define L3S_CFG_REGS_BASE               0x44800000
42#define L4_WKUP_BASE                    0x44C00000
43#define L4_PER_BASE                     0x48000000
44#define L4_FAST_BASE                    0x4A000000
45/*===========================================================================*/
46
47
48/*===========================================================================*/
49/* EMIF0 Configuration Registers */
50/*===========================================================================*/
51#define EMIF0_BASE                      0x4C000000
52#define EMIFO_REG(_x_)                  *(vulong *)(EMIFO_BASE + _x_)
53/*---------------------------------------------------------------------------*/
54/* EMIFO Register offsets */
55#define EMIF_MOD_ID_REV                 0x0000
56#define STATUS                          0x0004
57#define SDRAM_CONFIG                    0x0008
58#define SDRAM_CONFIG_2                  0x000C
59#define SDRAM_REF_CTRL                  0x0010
60#define SDRAM_REF_CTRL_SHOW             0x0014
61#define SDRAM_TIM_1                     0x0018
62#define SDRAM_TIM_1_SHDW                0x001C
63#define SDRAM_TIM_2                     0x0020
64#define SDRAM_TIM_2_SHDW                0x0024
65#define SDRAM_TIM_3                     0x0028
66#define SDRAM_TIM_3_SHDW                0x002C
67#define PWR_MGMT_CTRL                   0x0038
68#define PWR_MGMT_CTRL_SHDW              0x003C
69#define INTERFACE_CONFIG                0x0054
70#define INTERFACE_CONFIG_VAL_1          0x0058
71#define INTERFACE_CONFIG_VAL_2          0x005C
72#define PERF_CNT_1                      0x0080
73#define PERF_CNT_2                      0x0084
74#define PERF_CNT_CFG                    0x0088
75#define PERF_CNT_SEL                    0x008C
76#define PERF_CNT_TIM                    0x0090
77#define READ_IDLE_CTRL                  0x0098
78#define READ_IDLE_CTRL_SHDW             0x009C
79#define IRQSTATUS_RAW_SYS               0x00A4
80#define IRQSTATUS_SYS                   0x00AC
81#define IRQENABLE_SET_SYS               0x00B4
82#define IRQENABLE_CLR_SYS               0x00BC
83#define ZQ_CONFIG                       0x00C8
84#define RW_LVL_RAMP_WNDW                0x00D4
85#define RW_LVL_RAMP_CTRL                0x00D8
86#define RW_LVL_CTRL                     0x00DC
87#define DDR_PHY_CTRL_1                  0x00E4
88#define DDR_PHY_CTRL_1_SHDW             0x00E8
89#define PRIORITY_TO_CLASS_SRVC_MAP      0x0100
90#define CONN_ID_TO_CLASS_SRVC_1_MAP     0x0104
91#define CONN_ID_TO_CLASS_SRVC_2_MAP     0x0108
92#define RW_EXEC_THRESHOLD               0x0120
93/*===========================================================================*/
94
95
96/*===========================================================================*/
97/* McASPx Data Registers */
98/*===========================================================================*/
99#define MCASP0_DATA_REGS_BASE           0x46000000
100#define MCASP1_DATE_REGS_BASE           0x46400000
101/*===========================================================================*/
102
103
104/*===========================================================================*/
105/* L4_WKUP Peripherals */
106/*===========================================================================*/
107/* Clock Module Peripheral Registers */
108#define CM_PER_BASE                     (L4_WKUP_BASE + 0x00200000)
109#define CM_PER_REG(_x_)                 *(vulong *)(CM_PER_BASE + _x_)
110/* Clock Module Wakeup Registers */
111#define CM_WKUP_BASE                    (L4_WKUP_BASE + 0x00200400)
112#define CM_WKUP_REG(_x_)                *(vulong *)(CM_WKUP_BASE + _x_)
113/* Clock Module PLL Registers */
114#define CM_DPLL_BASE                    (L4_WKUP_BASE + 0x00200500)
115#define CM_DPLL_REG(_x_)                *(vulong *)(CM_DPLL_BASE + _x_)
116/* Clock Module MPU Registers */
117#define CM_MPU_BASE                     (L4_WKUP_BASE + 0x00200600)
118#define CM_MPU_REG(_x_)                 *(vulong *)(CM_MPU_BASE + _x_)
119/* Clock Module Device Registers */
120#define CM_DEVICE_BASE                  (L4_WKUP_BASE + 0x00200700)
121#define CM_DEVICE_REG(_x_)              *(vulong *)(CM_DEVICE_BASE + _x_)
122/* Clock Module RTC Registers */
123#define CM_RTC_BASE                     (L4_WKUP_BASE + 0x00200800)
124#define CM_RTC_REG(_x_)                 *(vulong *)(CM_RTC_BASE + _x_)
125/* Clock Module Graphics Controller Registers */
126#define CM_GFX_BASE                     (L4_WKUP_BASE + 0x00200900)
127#define CM_GFX_REG(_x_)                 *(vulong *)(CM_GFX_BASE + _x_)
128/* Clock Module Efuse Registers */
129#define CM_CEFUSE_BASE                  (L4_WKUP_BASE + 0x00200A00)
130#define CM_CEFUSE_REG(_x_)              *(vulong *)(CM_CEFUSE_BASE + _x_)
131/* Power Reset Module Interrupt Registers */
132#define PRM_IRQ_BASE                    (L4_WKUP_BASE + 0x00200B00)
133#define PRM_IRQ_REG(_x_)                *(vulong *)(PRM_IRQ_BASE + _x_)
134/* Power Reset Module Peripheral Registers */
135#define PRM_PER_BASE                    (L4_WKUP_BASE + 0x00200C00)
136#define PRM_PER_REG(_x_)                *(vulong *)(PRM_PER_BASE + _x_)
137/* Power Reset Module Wakeup Registers */
138#define PRM_WKUP_BASE                   (L4_WKUP_BASE + 0x00200D00)
139#define PRM_WKUP_REG(_x_)               *(vulong *)(PRM_WKUP_BASE + _x_)
140/* Power Reset Module MPU Registers */
141#define PRM_MPU_BASE                    (L4_WKUP_BASE + 0x00200E00)
142#define PRM_MPU_REG(_x_)                *(vulong *)(PRM_MPU_BASE + _x_)
143/* Power Reset Module Device Registers */
144#define PRM_DEV_BASE                    (L4_WKUP_BASE + 0x00200F00)
145#define PRM_DEV_REG(_x_)                *(vulong *)(PRM_DEV_BASE + _x_)
146/* Power Reset Module RTC Registers */
147#define PRM_RTC_BASE                    (L4_WKUP_BASE + 0x00201000)
148#define PRM_RTC_REG(_x_)                *(vulong *)(PRM_RTC_BASE + _x_)
149/* Power Reset Module Graphics Controller Registers */
150#define PRM_GFX_BASE                    (L4_WKUP_BASE + 0x00201100)
151#define PRM_GFX_REG(_x_)                *(vulong *)(PRM_GFX_BASE + _x_)
152/* Power Reset Module Efuse Registers */
153#define PRM_CEFUSE_BASE                 (L4_WKUP_BASE + 0x00201200)
154#define PRM_CEFUSE_REG(_x_)             *(vulong *)(PRM_CEFUSE_BASE + _x_)
155/* DMTimer0 Registers */
156#define DMTIMER0_BASE                   (L4_WKUP_BASE + 0x00205000)
157#define DMTIMER0_REG(_x_)               *(vulong *)(DMTIMER0_BASE + _x_)
158/* UART0 Registers */
159#define UART0_BASE                      (L4_WKUP_BASE + 0x00209000)
160#define UART0_REG(_x_)                  *(vulong *)(UART0_BASE + _x_)
161/* I2C0 Registers */
162#define I2C0_BASE                       (L4_WKUP_BASE + 0x0020B000)
163#define I2C0_REG(_x_)                   *(vulong *)(I2C0_BASE + _x_)
164/* ADC_TSC Registers */
165#define ADC_TSC_BASE                    (L4_WKUP_BASE + 0x0020D000)
166#define ADC_TSC_REG(_x_)                *(vulong *)(ADC_TSC_BASE + _x_)
167/* Control Module */
168#define CNTL_MODULE_BASE                (L4_WKUP_BASE + 0x00210000)
169#define CNTL_MODULE_REG(_x_)            *(vulong *)(CNTL_MODULE_BASE + _x_)
170/* DDR2/3/mDDR PHY Registers */
171#define DDR_PHY_BASE                    (L4_WKUP_BASE + 0x00212000)
172#define DDR_PHY_REG(_x_)                *(vulong *)(DDR_PHY_BASE + _x_)
173/* DMTimer1 1ms Registers */
174#define DMTIMER1_1MS_BASE               (L4_WKUP_BASE + 0x00231000)
175#define DMTIMER1_1MS_REG(_x_)           *(vulong *)(DMTIMER1_1MS_BASE + _x_)
176/* L3 Registers */
177#define SMARTREFLEX0_BASE               (L4_WKUP_BASE + 0x00237000)
178#define SMARTREFLEX0_REG(_x_)           *(vulong *)(SMARTREFLEX0_BASE + _x_)
179#define SMARTREFLEX1_BASE               (L4_WKUP_BASE + 0x00239000)
180#define SMARTREFLEX1_REG(_x_)           *(vulong *)(SMARTREFLEX1_BASE + _x_)
181/* RTC Registers */
182#define RTCSS_BASE                      (L4_WKUP_BASE + 0x0023E000)
183#define RTCSS_REG(_x_)                  *(vulong *)(RTCSS_BASE + _x_)
184/* Debug Registers */
185#define DEBUGSS_HWMSTR1_BASE            (L4_WKUP_BASE + 0x00240000)
186#define DEBUGSS_HWMSTR1_REG(_x_)        *(vulong *)(DEBUGSS_HWMSTR1_BASE + _x_)
187/*===========================================================================*/
188
189
190/*===========================================================================*/
191/* CM_WKUP Registers */
192/*===========================================================================*/
193#define CM_WKUP_CLKSTCTRL               0x00
194#define CM_WKUP_CONTROL_CLKCTRL         0x04
195#define CM_WKUP_GPIO0_CLKCTRL           0x08
196#define CM_WKUP_L4WKUP_CLKCTRL          0x0C
197#define CM_WKUP_TIMER0_CLKCTRL          0x10
198#define CM_WKUP_DEBUGSS_CLKCTRL         0x14
199#define CM_L3_AON_CLKSTCTRL             0x18
200#define CM_AUTOIDLE_DPLL_MPU            0x1C
201#define CM_IDLEST_DPLL_MPU              0x20
202#define CM_SSC_DELTAMSTEP_DPLL_MPU      0x24
203#define CM_SSC_MODFREQDIV_DPLL_MPU      0x28
204#define CM_CLKSEL_DPLL_MPU              0x2C
205#define CM_AUTOIDLE_DPLL_DDR            0x30
206#define CM_IDLEST_DPLL_DDR              0x34
207#define CM_SSC_DELTAMSTEP_DPLL_DDR      0x38
208#define CM_SSC_MODFREQDIV_DPLL_DDR      0x3C
209#define CM_CLKSEL_DPLL_DDR              0x40
210#define CM_AUTOIDLE_DPLL_DISP           0x44
211#define CM_IDLEST_DPLL_DISP             0x48
212#define CM_SSC_DELTAMSTEP_DPLL_DISP     0x4C
213#define CM_SSC_MODFREQDIV_DPLL_DISP     0x50
214#define CM_CLKSEL_DPLL_DISP             0x54
215#define CM_AUTOIDLE_DPLL_CORE           0x58
216#define CM_IDLEST_DPLL_CORE             0x5C
217#define CM_SSC_DELTAMSTEP_DPLL_CORE     0x60
218#define CM_SSC_MODFREQDIV_DPLL_CORE     0x64
219#define CM_CLKSEL_DPLL_CORE             0x68
220#define CM_AUTOIDLE_DPLL_PER            0x6C
221#define CM_IDLEST_DPLL_PER              0x70
222#define CM_SSC_DELTAMSTEP_DPLL_PER      0x74
223#define CM_SSC_MODFREQDIV_DPLL_PER      0x78
224#define CM_CLKDCOLDO_DPLL_PER           0x7C
225#define CM_DIV_M4_DPLL_CORE             0x80
226#define CM_DIV_M5_DPLL_CORE             0x84
227#define CM_CLKMODE_DPLL_MPU             0x88
228#define CM_CLKMODE_DPLL_PER             0x8C
229#define CM_CLKMODE_DPLL_CORE            0x90
230#define CM_CLKMODE_DPLL_DDR             0x94
231#define CM_CLKMODE_DPLL_DISP            0x98
232#define CM_CLKSEL_DPLL_PERIPH           0x9C
233#define CM_DIV_M2_DPLL_DDR              0xA0
234#define CM_DIV_M3_DPLL_DISP             0xA4
235#define CM_DIV_M3_DPLL_MPU              0xA8
236#define CM_DIV_M3_DPLL_PER              0xAC
237#define CM_WKUP_WKUP_M3_CLKCTRL         0xB0
238#define CM_WKUP_UART0_CLKCTRL           0xB4
239#define CM_WKUP_I2C0_CLKCTRL            0xB8
240#define CM_WKUP_ADC_TSC_CLKCTRL         0xBC
241#define CM_WKUP_SMARTREFLEX0_CLKCT      0xC0
242#define CM_WKUP_TIMER1_CLKCTRL          0xC4
243#define CM_WKUP_SMARTREFLEX1_CLKCT      0xC8
244#define CM_L4_WKUP_AON_CLKSTCTRL        0xCC
245#define CM_WKUP_WDT1_CLKCTRL            0xD4
246#define CM_DIV_M6_DPLL_CORE             0xD8
247/*===========================================================================*/
248
249
250/*===========================================================================*/
251/* Control Module Registers */
252/*===========================================================================*/
253#define CONF_GPMC_A5                    0x0854
254#define CONF_GPMC_A6                    0x0858
255#define CONF_GPMC_A7                    0x085c
256#define CONF_GPMC_A8                    0x0860
257#define CONF_UART0_RXD                  0x0970
258#define CONF_UART0_TXD                  0x0974
259/*===========================================================================*/
260
261
262/*===========================================================================*/
263/* Pad control bits: */
264/*===========================================================================*/
265#define SLEWSLOW                        (1 << 6)
266#define SLEWFAST                        0
267#define RX_ON                           (1 << 5)
268#define RX_OFF                          0
269#define PULLUP                          (1 << 4)
270#define PULLDOWN                        0
271#define PULL_OFF                        (1 << 3)
272#define PULL_ON                         0
273#define MUXMODE_0                       (0 & 7)
274#define MUXMODE_1                       (1 & 7)
275#define MUXMODE_2                       (2 & 7)
276#define MUXMODE_3                       (3 & 7)
277#define MUXMODE_4                       (4 & 7)
278#define MUXMODE_5                       (5 & 7)
279#define MUXMODE_6                       (6 & 7)
280#define MUXMODE_7                       (7 & 7)
281/*===========================================================================*/
282
283
284/*===========================================================================*/
285/* L4_PER Peripherals */
286/*===========================================================================*/
287/* UART1 Registers */
288#define UART1_BASE                      (L4_PER_BASE + 0x00022000)
289#define UART1_REG(_x_)                  *(vulong *)(UART1_BASE + _x_)
290/* UART2 Registers */
291#define UART2_BASE                      (L4_PER_BASE + 0x00024000)
292#define UART2_REG(_x_)                  *(vulong *)(UART2_BASE + _x_)
293/* I2C1 Registers */
294#define I2C1_BASE                       (L4_PER_BASE + 0x0002A000)
295#define I2C1_REG(_x_)                   *(vulong *)(I2C1_BASE + _x_)
296/* McSPI0 Registers */
297#define MCSPI0_BASE                     (L4_PER_BASE + 0x00030000)
298#define MCSPI0_REG(_x_)                 *(vulong *)(MCSPI0_BASE + _x_)
299/* McASP0 CFG Registers */
300#define MCASP0_CFG_BASE                 (L4_PER_BASE + 0x00038000)
301#define MCASP0_CFG_REG(_x_)             *(vulong *)(MCASP0_CFG_BASE + _x_)
302/* McASP1 CFG Registers */
303#define MCASP1_CFG_BASE                 (L4_PER_BASE + 0x0003C000)
304#define MCASP1_CFG_REG(_x_)             *(vulong *)(MCASP1_CFG_BASE + _x_)
305/* DMTimer2 Registers */
306#define DMTIMER2_BASE                   (L4_PER_BASE + 0x00040000)
307#define DMTIMER2_REG(_x_)               *(vulong *)(DMTIMER2_BASE + _x_)
308/* DMTimer3 Registers */
309#define DMTIMER3_BASE                   (L4_PER_BASE + 0x00042000)
310#define DMTIMER3_REG(_x_)               *(vulong *)(DMTIMER3_BASE + _x_)
311/* DMTimer4 Registers */
312#define DMTIMER4_BASE                   (L4_PER_BASE + 0x00044000)
313#define DMTIMER4_REG(_x_)               *(vulong *)(DMTIMER4_BASE + _x_)
314/* DMTimer5 Registers */
315#define DMTIMER5_BASE                   (L4_PER_BASE + 0x00046000)
316#define DMTIMER5_REG(_x_)               *(vulong *)(DMTIMER5_BASE + _x_)
317/* DMTimer6 Registers */
318#define DMTIMER6_BASE                   (L4_PER_BASE + 0x00048000)
319#define DMTIMER6_REG(_x_)               *(vulong *)(DMTIMER6_BASE + _x_)
320/* DMTimer7 Registers */
321#define DMTIMER7_BASE                   (L4_PER_BASE + 0x0004A000)
322#define DMTIMER7_REG(_x_)               *(vulong *)(DMTIMER7_BASE + _x_)
323/* MMCHS0 Registers */
324#define MMCHS0_BASE                     (L4_PER_BASE + 0x00060000)
325#define MMCHS0_REG(_x_)                 *(vulong *)(MMCHS0_BASE + _x_)
326/* ELM Registers */
327#define ELM_BASE                        (L4_PER_BASE + 0x00080000)
328#define ELM_REG(_x_)                    *(vulong *)(ELM_BASE + _x_)
329/* Mailbox 0 Registers */
330#define MAILBOX0_BASE                   (L4_PER_BASE + 0x000C8000)
331#define MAILBOX0_REG(_x_)               *(vulong *)(MAILBOX0_BASE + _x_)
332/* Spinlock Registers */
333#define SPINLOCK_BASE                   (L4_PER_BASE + 0x000CA000)
334#define SPINLOCK_REG(_x_)               *(vulong *)(SPINLOCK_BASE + _x_)
335/* OCP Watchpoint Registers */
336#define OCP_WATCHPOINT_BASE             (L4_PER_BASE + 0x0018C000)
337#define OCP_WATCHPOINT_REG(_x_)         *(vulong *)(OCP_WATCHPOINT_BASE + _x_)
338/* I2C2 Registers */
339#define I2C2_BASE                       (L4_PER_BASE + 0x0019C000)
340#define I2C2_REG(_x_)                   *(vulong *)(I2C2_BASE + _x_)
341/* McSPI1 Registers */
342#define MCSPI1_BASE                     (L4_PER_BASE + 0x001A0000)
343#define MCSPI1_REG(_x_)                 *(vulong *)(MSCPI1_BASE + _x_)
344/* UART3 Registers */
345#define UART3_BASE                      (L4_PER_BASE + 0x001A6000)
346#define UART3_REG(_x_)                  *(vulong *)(UART3_BASE + _x_)
347/* UART4 Registers */
348#define UART4_BASE                      (L4_PER_BASE + 0x001A8000)
349#define UART4_REG(_x_)                  *(vulong *)(UART4_BASE + _x_)
350/* UART5 Registers */
351#define UART5_BASE                      (L4_PER_BASE + 0x001AA000)
352#define UART5_REG(_x_)                  *(vulong *)(UART5_BASE + _x_)
353/* DCAN0 Registers */
354#define DCAN0_BASE                      (L4_PER_BASE + 0x001CC000)
355#define DCAN0_REG(_x_)                  *(vulong *)(DCAN0_BASE + _x_)
356/* DCAN1 Registers */
357#define DCAN1_BASE                      (L4_PER_BASE + 0x001D0000)
358#define DCAN1_REG(_x_)                  *(vulong *)(DCAN1_BASE + _x_)
359/* Interrupt Controller Registers */
360#define INTCPS_BASE                     (L4_PER_BASE + 0x00200000)
361#define INTCPS_REG(_x_)                 *(vulong *)(INTCPS_BASE + _x_)
362/* MPUSS Config Register */
363#define MPUSS_BASE                      (L4_PER_BASE + 0x00240000)
364#define MPUSS_REG(_x_)                  *(vulong *)(MPUSS_BASE + _x_)
365/* PWMSS0 Configuration Registers */
366#define PWMSS0_BASE                     (L4_PER_BASE + 0x00300000)
367#define PWMSS0_REG(_x_)                 *(vulong *)(PWMSS0_BASE + _x_)
368/* PWMSS eCAP0 Registers */
369#define ECAP0_BASE                      (L4_PER_BASE + 0x00300100)
370#define ECAP0_REG(_x_)                  *(vulong *)(ECAP0_BASE + _x_)
371/* PWMSS eQEP0 Registers */
372#define EQEP0_BASE                      (L4_PER_BASE + 0x00300180)
373#define EQEP0_REG(_x_)                  *(vulong *)(EQEP0_BASE + _x_)
374/* PWMSS ePWM0 Registers */
375#define EPWM0_BASE                      (L4_PER_BASE + 0x00300200)
376#define EPWM0_REG(_x_)                  *(vulong *)(EPWM0_BASE + _x_)
377/* PWMSS1 Configuration Registers */
378#define PWMSS1_BASE                     (L4_PER_BASE + 0x00302000)
379#define PWMSS1_REG(_x_)                 *(vulong *)(PWMSS1_BASE + _x_)
380/* PWMSS eCAP1 Registers */
381#define ECAP1_BASE                      (L4_PER_BASE + 0x00302100)
382#define ECAP1_REG(_x_)                  *(vulong *)(ECAP1_BASE + _x_)
383/* PWMSS eQEP1 Registers */
384#define EQEP1_BASE                      (L4_PER_BASE + 0x00302180)
385#define EQEP1_REG(_x_)                  *(vulong *)(EQEP1_BASE + _x_)
386/* PWMSS ePWM1 Registers */
387#define EPWM1_BASE                      (L4_PER_BASE + 0x00302200)
388#define EPWM1_REG(_x_)                  *(vulong *)(EPwM_BASE + _x_)
389/* PWMSS2 Configuration Registers */
390#define PWMSS2_BASE                     (L4_PER_BASE + 0x00304000)
391#define PWMSS2_REG(_x_)                 *(vulong *)(PWMSS2_BASE + _x_)
392/* PWMSS eCAP2 Registers */
393#define ECAP2_BASE                      (L4_PER_BASE + 0x00304100)
394#define ECAP2_REG(_x_)                  *(vulong *)(ECAP2_BASE + _x_)
395/* PWMSS eQEP2 Registers */
396#define EQEP2_BASE                      (L4_PER_BASE + 0x00304180)
397#define EQEP2_REG(_x_)                  *(vulong *)(EQEP2_BASE + _x_)
398/* PWMSS ePWM2 Registers */
399#define EPWM2_BASE                      (L4_PER_BASE + 0x00304200)
400#define EPWM2_REG(_x_)                  *(vulong *)(EPWM2_BASE + _x_)
401/* LCD Contoller Registers */
402#define LCD_CNTLR_BASE                  (L4_PER_BASE + 0x0030E000)
403#define LCD_CNTLR_REG(_x_)              *(vulong *)(LCD_CNTLR_BASE + _x_)
404/*===========================================================================*/
405
406
407/*===========================================================================*/
408/* L4_FAST Peripherals */
409/*===========================================================================*/
410#define L4_FAST_BASE                    0x4A000000
411/* Ethernet Switch Subsystem Registers */
412#define CPSW_SS_BASE                    (LF_FAST_BASE + 0x00100000)
413#define CPSW_SS_REG(_x_)                *(vulong *)(CPSW_SS_BASE + _x_)
414/* Ethernet Switch Port Control Registers */
415#define CPSW_PORT_BASE                  (LF_FAST_BASE + 0x00100100)
416#define CPSW_PORT_REG(_x_)              *(vulong *)(CPSW_PORT_BASE + _x_)
417/* CPPI DMA Controller Module Registers */
418#define CPSW_CPDMA_BASE                 (LF_FAST_BASE + 0x00100800)
419#define CPSW_CPDMA_REG(_x_)             *(vulong *)(CPSW_CPDMA_BASE + _x_)
420/* Ethernet Statistics Registers */
421#define CPSW_STATS_BASE                 (LF_FAST_BASE + 0x00100900)
422#define CPSW_STATS_REG(_x_)             *(vulong *)(CPSW_STATS_BASE + _x_)
423/* CPPI DMA State RAM Registers */
424#define CPSW_STATERAM_BASE              (LF_FAST_BASE + 0x00100A00)
425#define CPSW_STATERAM_REG(_x_)          *(vulong *)(CPSW_STATERAM_BASE + _x_)
426/* Ethenet Time Sync Module Registers */
427#define CPSW_CPTS_BASE                  (LF_FAST_BASE + 0x00100C00)
428#define CPSW_CPTS_REG(_x_)              *(vulong *)(CPSW_CPTS_BASE + _x_)
429/* Ethernet Address Lookup Engine Registers */
430#define CPSW_ALE_BASE                   (LF_FAST_BASE + 0x00100D00)
431#define CPSW_ALE_REG(_x_)               *(vulong *)(CPSW_ALE_BASE + _x_)
432/* Ethernet Silver for Port 1 Registers */
433#define CPSW_SL1_BASE                   (LF_FAST_BASE + 0x00100D80)
434#define CPSW_SL1_REG(_x_)               *(vulong *)(CPSW_SL1_BASE + _x_)
435/* Ethernet Silver for Port 2 Registers */
436#define CPSW_SL2_BASE                   (LF_FAST_BASE + 0x00100DC0)
437#define CPSW_SL2_REG(_x_)               *(vulong *)(CPSW_SL2_BASE + _x_)
438/* Ethernet MDIO Controller Registers */
439#define MDIO_BASE                       (LF_FAST_BASE + 0x00101000)
440#define MDIO_REG(_x_)                   *(vulong *)(MDIO_BASE + _x_)
441/* Ethernet Subsystem Wrapper for RMII/RGMII Registers */
442#define CPSW_WR_BASE                    (LF_FAST_BASE + 0x00101200)
443#define CPSW_WR_REG(_x_)                *(vulong *)(CPSW_WR_BASE + _x_)
444/*===========================================================================*/
445
446
447/*===========================================================================*/
448/* UART Register offsets */
449/*===========================================================================*/
450        /* Transmit Holding Register (write only) */
451#define UART_THR                0x00
452        /* Receive Holding Register (read only) */
453#define UART_RHR                0x00
454        /* Baud divisor lower byte (read/write) */
455#define UART_DLL                0x00
456        /* Interrupt Enable Register (read/write) */
457#define UART_IER                0x04
458        /* Baud divisor higher byte (read/write) */
459#define UART_DLH                0x04
460        /* Enhanced Feature Register */
461#define UART_EFR                0x08
462        /* Interrupt Identification Register (read only) */
463#define UART_IIR                0x08
464        /* FIFO Control Register (write only) */
465#define UART_FCR                0x08
466        /* Line Control Register (read/write) */
467#define UART_LCR                0x0C
468        /* Modem Control Register (read/write) */
469#define UART_MCR                0x10
470        /* XON1/ADDR1 Register */
471#define UART_XON1_ADDR1         0x10
472        /* XON2/ADDR2 Register */
473#define UART_XON2_ADDR2         0x14
474        /* Line Status Register (read only) */
475#define UART_LSR                0x14
476        /* Transmission Control Register */
477#define UART_TCR                0x18
478        /* Modem Status Register (read only) */
479#define UART_MSR                0x18
480        /* XOFF1 Register */
481#define UART_XOFF1              0x18
482        /* Scratch Pad Register (read/write) */
483#define UART_SPR                0x1C
484        /* Trigger Level Register */
485#define UART_TLR                0x1C
486        /* XOFF2 Register */
487#define UART_XOFF2              0x1C
488        /* Mode Definition Register 1 */
489#define UART_MDR1               0x20
490        /* Mode Definition Register 2 */
491#define UART_MDR2               0x24
492        /* Transmit Frame Length Register Low (IrDA modes only) */
493#define UART_TXFLL              0x28
494        /* Status FIFO Line Status Register (IrDA modes only) */
495#define UART_SFLSR              0x28
496        /* Resume Register (IR-IrDA and IR-CIR modes only) */
497#define UART_RESUME             0x2C
498        /* Transmit Frame Length Register High (IrDA modes only) */
499#define UART_TXFLH              0x2C
500        /* Receive Frame Length Register Low (IrDA modes only) */
501#define UART_RXFLL              0x30
502        /* Status FIFO Register Low (IrDA modes only) */
503#define UART_SFREGL             0x30
504        /* Status FIFO Register High (IrDA modes only) */
505#define UART_SFREGH             0x34
506        /* Receive Frame Length Register High (IrDA modes only) */
507#define UART_RXFLH              0x34
508        /* BOF Control Register (IrDA modes only_ */
509#define UART_BLR                0x38
510        /* UART Autobauding Status Register (UART autobauding
511           mode only */
512#define UART_UASR               0x38
513        /* Auxiliary Control Register (IrDA-CIR modes only) */
514#define UART_ACREG              0x3C
515        /* Supplementary Control Register */
516#define UART_SCR                0x40
517        /* Supplementary Status Register */
518#define UART_SSR                0x44
519        /* BOF Length Register (IR-IrDA and IR-CIR modes only) */
520#define UART_EBLR               0x48
521        /* Module Version Register */
522#define UART_MVR                0x50
523        /* System Configuration Register */
524#define UART_SYSC               0x54
525        /* System Status Register */
526#define UART_SYSS               0x58
527        /* Wake-up Enable Register */
528#define UART_WER                0x5C
529        /* Carrier Frequency Prescalar Register */
530#define UART_CFPS               0x60
531        /* Received FIFO Level Register */
532#define UART_RXFIFO_LVL         0x64
533        /* Transmit FIFO Level Register */
534#define UART_TXFIFO_LVL         0x68
535        /* IER2 Register */
536#define UART_IER2               0x6C
537        /* ISR2 Register */
538#define UART_ISR2               0x70
539        /* FREQ_SEL Register */
540#define UART_FREQ_SEL           0x74
541        /* Mode Definition Register 3 */
542#define UART_MDR3               0x80
543        /* TX DMA Threshold Register */
544#define UART_TX_DMA_THRESHOLD   0x84
545/*===========================================================================*/
546
547
548/*===========================================================================*/
549/* USB */
550/*===========================================================================*/
551#define USB_SUBSYS_BASE_ADDR            0x47400000
552/*---------------------------------------------------------------------------*/
553/* USB Subsystem Registers offset */
554#define USBSS_BASE_REG_OFFSET           0x0000
555#define USBSS_REVREG                    0x0000
556#define USBSS_SYSCONFIG                 0x0010
557#define USBSS_IRQSTATRAW                0x0024
558#define USBSS_IRQSTAT                   0x0028
559#define USBSS_IRQENABLER                0x002C
560#define USBSS_IRQCLEARR                 0x0030
561#define USBSS_IRQDMATHOLDTX00           0x0100
562#define USBSS_IRQDMATHOLDTX01           0x0104
563#define USBSS_IRQDMATHOLDTX02           0x0108
564#define USBSS_IRQDMATHOLDTX03           0x010C
565#define USBSS_IRQDMATHOLDRX00           0x0110
566#define USBSS_IRQDMATHOLDRX01           0x0114
567#define USBSS_IRQDMATHOLDRX02           0x0118
568#define USBSS_IRQDMATHOLDRX03           0x011C
569#define USBSS_IRQDMATHOLDTX10           0x0120
570#define USBSS_IRQDMATHOLDTX11           0x0124
571#define USBSS_IRQDMATHOLDTX12           0x0128
572#define USBSS_IRQDMATHOLDTX13           0x012C
573#define USBSS_IRQDMATHOLDRX10           0x0130
574#define USBSS_IRQDMATHOLDRX11           0x0134
575#define USBSS_IRQDMATHOLDRX12           0x0138
576#define USBSS_IRQDMATHOLDRX13           0x013C
577#define USBSS_IRQDMAENABLE0             0x0140
578#define USBSS_IRQDMAENABLE1             0x0144
579#define USBSS_IRQFRAMETHOLDTX00         0x0200
580#define USBSS_IRQFRAMETHOLDTX01         0x0204
581#define USBSS_IRQFRAMETHOLDTX02         0x0208
582#define USBSS_IRQFRAMETHOLDTX03         0x020C
583#define USBSS_IRQFRAMETHOLDRX00         0x0210
584#define USBSS_IRQFRAMETHOLDRX01         0x0214
585#define USBSS_IRQFRAMETHOLDRX02         0x0218
586#define USBSS_IRQFRAMETHOLDRX03         0x021C
587#define USBSS_IRQFRAMETHOLDTX10         0x0220
588#define USBSS_IRQFRAMETHOLDTX11         0x0224
589#define USBSS_IRQFRAMETHOLDTX12         0x0228
590#define USBSS_IRQFRAMETHOLDTX13         0x022C
591#define USBSS_IRQFRAMETHOLDRX10         0x0230
592#define USBSS_IRQFRAMETHOLDRX11         0x0234
593#define USBSS_IRQFRAMETHOLDRX12         0x0238
594#define USBSS_IRQFRAMETHOLDRX13         0x023C
595#define USBSS_IRQFRAMEENABLE0           0x0240
596#define USBSS_IRQFRAMEENABLE1           0x0244
597/*---------------------------------------------------------------------------*/
598/* USB Controller Registers offset  */
599#define USBCNTLR_USB0_BASE_REG_OFFSET   0x1000 /* USB0 */
600#define USBCNTLR_USB1_BASE_REG_OFFSET   0x1800 /* USB1 */
601#define USBCNTLR_REV                    0x0000
602#define USBCNTLR_CTRL                   0x0014
603#define USBCNTLR_STAT                   0x0018
604#define USBCNTLR_IRQMSTAT               0x0020
605#define USBCNTLR_IRQSTATRAW0            0x0028
606#define USBCNTLR_IRQSTATRAW1            0x002C
607#define USBCNTLR_IRQSTAT0               0x0030
608#define USBCNTLR_IRQSTAT1               0x0034
609#define USBCNTLR_IRQENABLESET0          0x0038
610#define USBCNTLR_IRQENABLESET1          0x003C
611#define USBCNTLR_IRQENABLECLR0          0x0040
612#define USBCNTLR_IRQENABLECLR1          0x0044
613#define USBCNTLR_TXMODE                 0x0070
614#define USBCNTLR_RXMODE                 0x0074
615#define USBCNTLR_GENRNDISEP1            0x0080
616#define USBCNTLR_GENRNDISEP2            0x0084
617#define USBCNTLR_GENRNDISEP3            0x0088
618#define USBCNTLR_GENRNDISEP4            0x008C
619#define USBCNTLR_GENRNDISEP5            0x0090
620#define USBCNTLR_GENRNDISEP6            0x0094
621#define USBCNTLR_GENRNDISEP7            0x0098
622#define USBCNTLR_GENRNDISEP8            0x009C
623#define USBCNTLR_GENRNDISEP9            0x00A0
624#define USBCNTLR_GENRNDISEP10           0x00A4
625#define USBCNTLR_GENRNDISEP11           0x00A8
626#define USBCNTLR_GENRNDISEP12           0x00AC
627#define USBCNTLR_GENRNDISEP13           0x00B0
628#define USBCNTLR_GENRNDISEP14           0x00B4
629#define USBCNTLR_GENRNDISEP15           0x00B8
630#define USBCNTLR_AUTOREQ                0x00D0
631#define USBCNTLR_SRPFIXTIME             0x00D4
632#define USBCNTLR_TDOWN                  0x00D8
633#define USBCNTLR_UTMI                   0x00E0
634#define USBCNTLR_MGCUTMILB              0x00E4
635#define USBCNTLR_MODE                   0x00E8
636/*---------------------------------------------------------------------------*/
637/* USB PHY Registers offset */
638#define USBPHY_USB0_BASE_REG_OFFSET     0x1300 /* USB0 */
639#define USBPHY_USB1_BASE_REG_OFFSET     0x1B00 /* USB1 */
640#define USBPHY_TERMINATION_CNTL         0x0000
641#define USBPHY_RX_CALIB                 0x0004
642#define USBPHY_DLLHS_2                  0x0008
643#define USBPHY_RX_TEST_2                0x000C
644#define USBPHY_CHRG_DET                 0x0014
645#define USBPHY_PWR_CNTL                 0x0018
646#define USBPHY_UTMI_INTERFACE_CNTL_1    0x001C
647#define USBPHY_UTMI_INTERFACE_CNTL_2    0x0020
648#define USBPHY_BIST                     0x0024
649#define USBPHY_BIST_CRC                 0x0028
650#define USBPHY_CDR_BIST2                0x002C
651#define USBPHY_GPIO                     0x0030
652#define USBPHY_DLLHS                    0x0034
653#define USBPHY_USB2PHYCM_CONFIG         0x003C
654#define USBPHY_AD_INTERFACE_REG1        0x0044
655#define USBPHY_AD_INTERFACE_REG2        0x0048
656#define USBPHY_AD_INTERFACE_REG3        0x004C
657#define USBPHY_ANA_CONFIG2              0x0054
658/*---------------------------------------------------------------------------*/
659/* USB Core Registers offset */
660#define USBCORE_USB0_BASE_REG_OFFSET    0x1400
661#define USBCORE_USB1_BASE_REG_OFFSET    0x1C00
662/*---------------------------------------------------------------------------*/
663/* USB CPPI DMA Controller Registers offset */
664#define USBCPPIDMACNTLR_BASE_REG_OFFSET 0x2000
665#define USBCPPIDMACNTLR_DMAREVID        0x0000
666#define USBCPPIDMACNTLR_TDFDQ           0x0004
667#define USBCPPIDMACNTLR_DMAEMU          0x0008
668#define USBCPPIDMACNTLR_TXGCR0          0x0800
669#define USBCPPIDMACNTLR_RXGCR0          0x0808
670#define USBCPPIDMACNTLR_RXHPCRA0        0x080C
671#define USBCPPIDMACNTLR_RXHPCRB0        0x0810
672#define USBCPPIDMACNTLR_TXGCR1          0x0820
673#define USBCPPIDMACNTLR_RXGCR1          0x0828
674#define USBCPPIDMACNTLR_RXHPCRA1        0x082C
675#define USBCPPIDMACNTLR_RXHPCRB1        0x0830
676#define USBCPPIDMACNTLR_TXGCR2          0x0840
677#define USBCPPIDMACNTLR_RXGCR2          0x0848
678#define USBCPPIDMACNTLR_RXHPCRA2        0x084C
679#define USBCPPIDMACNTLR_RXHPCRB2        0x0850
680#define USBCPPIDMACNTLR_TXGCR3          0x0860
681#define USBCPPIDMACNTLR_RXGCR3          0x0868
682#define USBCPPIDMACNTLR_RXHPCRA3        0x086C
683#define USBCPPIDMACNTLR_RXHPCRB3        0x0870
684#define USBCPPIDMACNTLR_TXGCR4          0x0880
685#define USBCPPIDMACNTLR_RXGCR4          0x0888
686#define USBCPPIDMACNTLR_RXHPCRA4        0x088C
687#define USBCPPIDMACNTLR_RXHPCRB4        0x0890
688#define USBCPPIDMACNTLR_TXGCR5          0x08A0
689#define USBCPPIDMACNTLR_RXGCR5          0x08A8
690#define USBCPPIDMACNTLR_RXHPCRA5        0x08AC
691#define USBCPPIDMACNTLR_RXHPCRB5        0x08B0
692#define USBCPPIDMACNTLR_TXGCR6          0x08C0
693#define USBCPPIDMACNTLR_RXGCR6          0x08C8
694#define USBCPPIDMACNTLR_RXHPCRA6        0x08CC
695#define USBCPPIDMACNTLR_RXHPCRB6        0x08D0
696#define USBCPPIDMACNTLR_TXGCR7          0x08E0
697#define USBCPPIDMACNTLR_RXGCR7          0x08E8
698#define USBCPPIDMACNTLR_RXHPCRA7        0x08EC
699#define USBCPPIDMACNTLR_RXHPCRB7        0x08F0
700#define USBCPPIDMACNTLR_TXGCR8          0x0900
701#define USBCPPIDMACNTLR_RXGCR8          0x0908
702#define USBCPPIDMACNTLR_RXHPCRA8        0x090C
703#define USBCPPIDMACNTLR_RXHPCRB8        0x0910
704#define USBCPPIDMACNTLR_TXGCR9          0x0920
705#define USBCPPIDMACNTLR_RXGCR9          0x0928
706#define USBCPPIDMACNTLR_RXHPCRA9        0x092C
707#define USBCPPIDMACNTLR_RXHPCRB9        0x0930
708#define USBCPPIDMACNTLR_TXGCR10         0x0940
709#define USBCPPIDMACNTLR_RXGCR10         0x0948
710#define USBCPPIDMACNTLR_RXHPCRA10       0x094C
711#define USBCPPIDMACNTLR_RXHPCRB10       0x0950
712#define USBCPPIDMACNTLR_TXGCR11         0x0960
713#define USBCPPIDMACNTLR_RXGCR11         0x0968
714#define USBCPPIDMACNTLR_RXHPCRA11       0x096C
715#define USBCPPIDMACNTLR_RXHPCRB11       0x0970
716#define USBCPPIDMACNTLR_TXGCR12         0x0980
717#define USBCPPIDMACNTLR_RXGCR12         0x0988
718#define USBCPPIDMACNTLR_RXHPCRA12       0x098C
719#define USBCPPIDMACNTLR_RXHPCRB12       0x0990
720#define USBCPPIDMACNTLR_TXGCR13         0x09A0
721#define USBCPPIDMACNTLR_RXGCR13         0x09A8
722#define USBCPPIDMACNTLR_RXHPCRA13       0x09AC
723#define USBCPPIDMACNTLR_RXHPCRB13       0x09B0
724#define USBCPPIDMACNTLR_TXGCR14         0x09C0
725#define USBCPPIDMACNTLR_RXGCR14         0x09C8
726#define USBCPPIDMACNTLR_RXHPCRA14       0x09CC
727#define USBCPPIDMACNTLR_RXHPCRB14       0x09D0
728#define USBCPPIDMACNTLR_TXGCR15         0x09E0
729#define USBCPPIDMACNTLR_RXGCR15         0x09E8
730#define USBCPPIDMACNTLR_RXHPCRA15       0x09EC
731#define USBCPPIDMACNTLR_RXHPCRB15       0x09F0
732#define USBCPPIDMACNTLR_TXGCR16         0x0A00
733#define USBCPPIDMACNTLR_RXGCR16         0x0A08
734#define USBCPPIDMACNTLR_RXHPCRA16       0x0A0C
735#define USBCPPIDMACNTLR_RXHPCRB16       0x0A10
736#define USBCPPIDMACNTLR_TXGCR17         0x0A20
737#define USBCPPIDMACNTLR_RXGCR17         0x0A28
738#define USBCPPIDMACNTLR_RXHPCRA17       0x0A2C
739#define USBCPPIDMACNTLR_RXHPCRB17       0x0A30
740#define USBCPPIDMACNTLR_TXGCR18         0x0A40
741#define USBCPPIDMACNTLR_RXGCR18         0x0A48
742#define USBCPPIDMACNTLR_RXHPCRA18       0x0A4C
743#define USBCPPIDMACNTLR_RXHPCRB18       0x0A50
744#define USBCPPIDMACNTLR_TXGCR19         0x0A60
745#define USBCPPIDMACNTLR_RXGCR19         0x0A68
746#define USBCPPIDMACNTLR_RXHPCRA19       0x0A6C
747#define USBCPPIDMACNTLR_RXHPCRB19       0x0A70
748#define USBCPPIDMACNTLR_TXGCR20         0x0A80
749#define USBCPPIDMACNTLR_RXGCR20         0x0A88
750#define USBCPPIDMACNTLR_RXHPCRA20       0x0A8C
751#define USBCPPIDMACNTLR_RXHPCRB20       0x0A90
752#define USBCPPIDMACNTLR_TXGCR21         0x0AA0
753#define USBCPPIDMACNTLR_RXGCR21         0x0AA8
754#define USBCPPIDMACNTLR_RXHPCRA21       0x0AAC
755#define USBCPPIDMACNTLR_RXHPCRB21       0x0AB0
756#define USBCPPIDMACNTLR_TXGCR22         0x0AC0
757#define USBCPPIDMACNTLR_RXGCR22         0x0AC8
758#define USBCPPIDMACNTLR_RXHPCRA22       0x0ACC
759#define USBCPPIDMACNTLR_RXHPCRB22       0x0AD0
760#define USBCPPIDMACNTLR_TXGCR23         0x0AE0
761#define USBCPPIDMACNTLR_RXGCR23         0x0AE8
762#define USBCPPIDMACNTLR_RXHPCRA23       0x0AEC
763#define USBCPPIDMACNTLR_RXHPCRB23       0x0AF0
764#define USBCPPIDMACNTLR_TXGCR24         0x0B00
765#define USBCPPIDMACNTLR_RXGCR24         0x0B08
766#define USBCPPIDMACNTLR_RXHPCRA24       0x0B0C
767#define USBCPPIDMACNTLR_RXHPCRB24       0x0B10
768#define USBCPPIDMACNTLR_TXGCR25         0x0B20
769#define USBCPPIDMACNTLR_RXGCR25         0x0B28
770#define USBCPPIDMACNTLR_RXHPCRA25       0x0B2C
771#define USBCPPIDMACNTLR_RXHPCRB25       0x0B30
772#define USBCPPIDMACNTLR_TXGCR26         0x0B40
773#define USBCPPIDMACNTLR_RXGCR26         0x0B48
774#define USBCPPIDMACNTLR_RXHPCRA26       0x0B4C
775#define USBCPPIDMACNTLR_RXHPCRB26       0x0B50
776#define USBCPPIDMACNTLR_TXGCR27         0x0B60
777#define USBCPPIDMACNTLR_RXGCR27         0x0B68
778#define USBCPPIDMACNTLR_RXHPCRA27       0x0B6C
779#define USBCPPIDMACNTLR_RXHPCRB27       0x0B70
780#define USBCPPIDMACNTLR_TXGCR28         0x0B80
781#define USBCPPIDMACNTLR_RXGCR28         0x0B88
782#define USBCPPIDMACNTLR_RXHPCRA28       0x0B8C
783#define USBCPPIDMACNTLR_RXHPCRB28       0x0B90
784#define USBCPPIDMACNTLR_TXGCR29         0x0BA0
785#define USBCPPIDMACNTLR_RXGCR29         0x0BA8
786#define USBCPPIDMACNTLR_RXHPCRA29       0x0BAC
787#define USBCPPIDMACNTLR_RXHPCRB29       0x0BB0
788/*---------------------------------------------------------------------------*/
789/* USB CPPI DMA Scheduler Registers offset */
790#define USBCPPIDMASCHED_BASE_REG_OFFSET 0x3000
791#define USBCPPIDMASCHED_CNTL            0x0000
792/*---------------------------------------------------------------------------*/
793/* USB Queue Manager Registers offset */
794#define USBQUEUEMNGER_BASEREG_OFFSET    0x4000
795#define USBQUEUEMNGER_QMGRREVID         0x0000
796#define USBQUEUEMNGER_QMGRRST           0x0008
797#define USBQUEUEMNGER_FDNSCO            0x0020
798#define USBQUEUEMNGER_FDNSC1            0x0024
799#define USBQUEUEMNGER_FDNSC2            0x0028
800#define USBQUEUEMNGER_FDNSC3            0x002C
801#define USBQUEUEMNGER_FDNSC4            0x0030
802#define USBQUEUEMNGER_FDNSC5            0x0034
803#define USBQUEUEMNGER_FDNSC6            0x0038
804#define USBQUEUEMNGER_FDNSC7            0x003C
805#define USBQUEUEMNGER_LRAM0BASE         0x0080
806#define USBQUEUEMNGER_LRAM0SIZE         0x0084
807#define USBQUEUEMNGER_LRAM1BASE         0x0088
808#define USBQUEUEMNGER_PEND0             0x0090
809#define USBQUEUEMNGER_PEND1             0x0094
810#define USBQUEUEMNGER_PEND2             0x0098
811#define USBQUEUEMNGER_PEND3             0x009C
812#define USBQUEUEMNGER_PEND4             0x00A0
813#define USBQUEUEMNGER_QMEMRBASE0        0x1000
814#define USBQUEUEMNGER_QMEMCNTL0         0x1004
815#define USBQUEUEMNGER_QMEMRBASE1        0x1010
816#define USBQUEUEMNGER_QMEMCNTL1         0x1014
817#define USBQUEUEMNGER_QMEMRBASE2        0x1020
818#define USBQUEUEMNGER_QMEMCNTL2         0x1024
819#define USBQUEUEMNGER_QMEMRBASE3        0x1030
820#define USBQUEUEMNGER_QMEMCNTL3         0x1034
821#define USBQUEUEMNGER_QMEMRBASE4        0x1040
822#define USBQUEUEMNGER_QMEMCNTL4         0x1044
823#define USBQUEUEMNGER_QMEMRBASE5        0x1050
824#define USBQUEUEMNGER_QMEMCNTL5         0x1054
825#define USBQUEUEMNGER_QMEMRBASE6        0x1060
826#define USBQUEUEMNGER_QMEMCNTL6         0x1064
827#define USBQUEUEMNGER_QMEMRBASE7        0x1070
828#define USBQUEUEMNGER_QMEMCNTL7         0x1074
829/*===========================================================================*/
830
831
832/*===========================================================================*/
833/* SPI */
834/*===========================================================================*/
835        /* Revision Register */
836#define MCSPI_REVISION                  0x0000
837        /* System Configuration Register */
838#define MCSPI_SYSCONFIG                 0x0110
839        /* System Status Register */
840#define MCSPI_SYSSTATUS                 0x0114
841        /* Interrupt Status Register offset */
842#define MCSPI_IRQSTATUS                 0x0118
843/*---------------------------------------------------------------------------*/
844/* Interrupt Status Register bit defines */
845#define MCSPI_IRQSTATUS_RX3_FULL        BIT14
846#define MCSPI_IRQSTATUS_TX3_UNDERFLOW   BIT13
847#define MCSPI_IRQSTATUS_TX3_EMPTY       BIT12
848#define MCSPI_IRQSTATUS_RX2_FULL        BIT10
849#define MCSPI_IRQSTATUS_TX2_UNDERFLOW   BIT9
850#define MCSPI_IRQSTATUS_TX2_EMPTY       BIT8
851#define MCSPI_IRQSTATUS_RX1_FULL        BIT6
852#define MCSPI_IRQSTATUS_TX1_UNDERFLOW   BIT5
853#define MCSPI_IRQSTATUS_TX1_EMPTY       BIT4
854#define MCSPI_IRQSTATUS_RX0_OVERFLOW    BIT3
855#define MCSPI_IRQSTATUS_RX0_FULL        BIT2
856#define MCSPI_IRQSTATUS_TX0_UNDERFLOW   BIT1
857#define MCSPI_IRQSTATUS_TX0_EMPTY       BIT0
858        /* Interrupt Enable Register offset */
859#define MCSPI_IRQENABLE                 0x011C
860        /* System Register offset */
861#define MCSPI_SYST                      0x0124
862        /* Module Control Register offset */
863#define MCSPI_MODULCTRL                 0x0128
864/*---------------------------------------------------------------------------*/
865/* Configuration Registers offset */
866
867        /* Channel 0 Configuration Register offset */
868#define MCSPI_CH0CONF                   0x012C
869        /* Channel 1 Configuration Register offset */
870#define MCSPI_CH1CONF                   0x0140
871        /* Channel 2 Configuration Register offset */
872#define MCSPI_CH2CONF                   0x0154
873        /* Channel 3 Configuration Register offset */
874#define MCSPI_CH3CONF                   0x0168
875
876
877/* Configuration Register bit defines */
878
879        /* 1 = One clock cycle granularity */
880#define MCSPI_CHXCONF_CLKG              BIT29
881        /* 1 = FIFO buffer is used to Receive data */
882#define MCSPI_CHXCONF_FFER              BIT28
883        /* 1 = FIFO buffer is used to Transmit data */
884#define MCSPI_CHXCONF_FFEW              BIT27
885        /* 0.5 clock cycles between CS toggling and first (or last) edge
886           of SPI clock */
887#define MCSPI_CHXCONF_TCS_0_5           (0x00 << 25)
888        /* 1.5 clock cycles between CS toggling and first (or last) edge
889           of SPI clock */
890#define MCSPI_CHXCONF_TCS_1_5           (0x01 << 25)
891        /* 2.5 clock cycles between CS toggling and first (or last) edge
892           of SPI clock */
893#define MCSPI_CHXCONF_TCS_2_5           (0x02 << 25)
894        /* 3.5 clock cycles between CS toggling and first (or last) edge
895           of SPI clock */
896#define MCSPI_CHXCONF_TCS_3_5           (0x03 << 25)
897        /* 1 = Start bit polarity is held to 1 during SPI transfer */
898#define MCSPI_CHXCONF_SBPOL             BIT24
899        /* 1 = Start bit added before SPI transfer
900           0 = default length specified by WL */
901#define MCSPI_CHXCONF_SBE               BIT23
902        /* Slave select detection enabled on CS0 */
903#define MCSPI_CHXCONF_SPIENSLV_0        (0x00 << 21)
904        /* Slave select detection enabled on CS1 */
905#define MCSPI_CHXCONF_SPIENSLV_1        (0x01 << 21)
906        /* Slave select detection enabled on CS2 */
907#define MCSPI_CHXCONF_SPIENSLV_2        (0x02 << 21)
908        /* Slave select detection enabled on CS3 */
909#define MCSPI_CHXCONF_SPIENSLV_3        (0x03 << 21)
910        /* 1 = CSx high when EPOL is 0 and low whel EPOL is 1 */
911#define MCSPI_CHXCONF_FORCE             BIT20
912        /* Turbo is activated */
913#define MCSPI_CHXCONF_TURBO             BIT19
914        /* 1 = spim_simo selected for reception
915           0 = spim_somi selected for reception */
916#define MCSPI_CHXCONF_IS                BIT18
917        /* 1 = no transmission on spim_simo
918           0 = spim_simo selected for transmission */
919#define MCSPI_CHXCONF_DPE1              BIT17
920        /* 1 = no transmission on spim_somi
921           0 = spim_somi selected for transmission */
922#define MCSPI_CHXCONF_DPE0              BIT16
923        /* 1 = DMA read request enabled */
924#define MCSPI_CHXCONF_DMAR              BIT15
925        /* 1 = DMA write request enabled */
926#define MCSPI_CHXCONF_DMAW              BIT14
927        /* Transmit and receive mode */
928#define MCSPI_CHXCONF_TRM_TR            (0x00 << 12)
929        /* Receive-only mode */
930#define MCSPI_CHXCONF_TRM_RO            (0x01 << 12)
931        /* Transmit-only mode */
932#define MCSPI_CHXCONF_TRM_TO            (0x02 << 12)
933        /* SPI word length, 0x7 = 8-bit */
934#define MCSPI_CHXCONF_WL(_x_)           ((_x_ & 0x1f) << 7)
935        /* 1 = SPIM_CSx is low during active state,
936           0 = high during active state */
937#define MCSPI_CHxCONF_EPOL              BIT6
938        /* Frequency divider for spim_clk */
939#define MCSPI_CHXCONF_CLKD(_x_)         ((_x_ & 0xf) << 2)
940        /* 1 = spim_clk is low during active state
941           0 = high during active state */
942#define MCSPI_CHXCONF_POL               BIT1
943        /* 1 = data latched on even-numbered edges
944           0 = data latched on odd-numbered edges */
945#define MCSPI_CHXCONF_PHA               BIT0
946/*---------------------------------------------------------------------------*/
947/* Status Registers offset */
948#define MCSPI_CH0STAT                   0x0130  // Channel 0 Status Register
949#define MCSPI_CH1STAT                   0x0144  // Channel 1 Status Register
950#define MCSPI_CH2STAT                   0x0158  // Channel 2 Status Register
951#define MCSPI_CH3STAT                   0x016C  // Channel 3 Status Register
952/* Status Register bit defines */
953#define MCSPI_CHXSAT_RXF_FULL           BIT6
954#define MCSPI_CHXSAT_RXF_EMPTY          BIT5
955#define MCSPI_CHXSAT_TXF_FULL           BIT4
956#define MCSPI_CHXSAT_TXF_EMPTY          BIT3
957#define MCSPI_CHXSAT_EOT                BIT2
958#define MCSPI_CHXSAT_TX0_EMPTY          BIT1
959#define MCSPI_CHXSAT_RX0_FULL           BIT0
960/*---------------------------------------------------------------------------*/
961/* Control Registers offset */
962#define MCSPI_CH0CTRL           0x0134  // Channel 0 Control Register offset
963#define MCSPI_CH1CTRL           0x0148  // Channel 1 Control Register offset
964#define MCSPI_CH2CTRL           0x015C  // Channel 2 Control Register offset
965#define MCSPI_CH3CTRL           0x0170  // Channel 3 Control Register offset
966/*---------------------------------------------------------------------------*/
967/* FIFO Buffer Registers offset */
968
969        /* Channel 0 FIFO Transmit Buffer Register offset */
970#define MCSPI_TX0               0x0138
971        /* Channel 0 FIFO Receive Buffer Register offset */
972#define MCSPI_RX0               0x013C
973        /* Channel 1 FIFO Transmit Buffer Register offset */
974#define MCSPI_TX1               0x014C
975        /* Channel 1 FIFO Receive Buffer Register offset */
976#define MCSPI_RX1               0x0150
977        /* Channel 2 FIFO Transmit Buffer Register offset */
978#define MCSPI_TX2               0x0160
979        /* Channel 2 FIFO Receive Buffer Register offset */
980#define MCSPI_RX2               0x0164
981        /* Channel 3 FIFO Transmit Buffer Register offset */
982#define MCSPI_TX3               0x0174
983        /* Channel 3 FIFO Receive Buffer Register offset */
984#define MCSPI_RX3               0x0178
985/*---------------------------------------------------------------------------*/
986        /* Transfer Levels Register */
987#define MCSPI_XFERLEVEL         0x017C
988        /* DMA Address Aligned FIFO Transmitter Register */
989#define MCSPI_DAFTX             0x0180
990        /* DMA Address Aligned FIFO Receiver Register */
991#define MCSPI_DAFRX             0x01A0
992/*===========================================================================*/
993
994
995/*===========================================================================*/
996/* General Purpose I/O */
997/*===========================================================================*/
998/* GPIO0 Registers */
999#define GPIO0_BASE                      (L4_WKUP_BASE + 0x00207000)
1000#define GPIO0_REG(_x_)                  *(vulong *)(GPIO0_BASE + _x_)
1001/* GPIO1 Registers */
1002#define GPIO1_BASE                      (L4_PER_BASE + 0x0004C000)
1003#define GPIO1_REG(_x_)                  *(vulong *)(GPIO1_BASE + _x_)
1004/* GPIO2 Registers */
1005#define GPIO2_BASE                      (L4_PER_BASE + 0x001AC000)
1006#define GPIO2_REG(_x_)                  *(vulong *)(GPIO2_BASE + _x_)
1007/* GPIO3 Registers */
1008#define GPIO3_BASE                      (L4_PER_BASE + 0x001AE000)
1009#define GPIO3_REG(_x_)                  *(vulong *)(GPIO3_BASE + _x_)
1010/*---------------------------------------------------------------------------*/
1011/* GPIOx Register offsets */
1012#define GPIOX_REVISION                  0x0000
1013#define GPIOX_SYSCONFIG                 0x0010
1014#define GPIOX_EOI                       0x0020
1015#define GPIOX_IRQSTATUS_RAW_0           0x0024
1016#define GPIOX_IRQSTATUS_RAW_1           0x0028
1017#define GPIOX_IRQSTATUS_0               0x002C
1018#define GPIOX_IRQSTATUS_1               0x0030
1019#define GPIOX_IRQSTATUS_SET_0           0x0034
1020#define GPIOX_IRQSTATUS_SET_1           0x0038
1021#define GPIOX_IRQSTATUS_CLR_0           0x003C
1022#define GPIOX_IRQSTATUS_CLR_1           0x0040
1023#define GPIOX_IRQWAKEN_0                0x0044
1024#define GPIOX_IRQWAKEN_1                0x0048
1025#define GPIOX_SYSSTATUS                 0x0114
1026#define GPIOX_CTRL                      0x0130
1027#define GPIOX_OE                        0x0134
1028#define GPIOX_DATAIN                    0x0138
1029#define GPIOX_DATAOUT                   0x013C
1030#define GPIOX_LEVELDETECT0              0x0140
1031#define GPIOX_LEVELDETECT1              0x0144
1032#define GPIOX_RISINGDETECT              0x0148
1033#define GPIOX_FALLINGDETECT             0x014C
1034#define GPIOX_DEBOUNCEENABLE            0x0150
1035#define GPIOX_DEBOUNCINGTIME            0x0154
1036#define GPIOX_CLEARDATAOUT              0x0190
1037#define GPIOX_SETDATAOUT                0x0194
1038/*===========================================================================*/
1039
1040
1041/*===========================================================================*/
1042/* Watchdog Timer */
1043/*===========================================================================*/
1044/* Watchdog Timer Registers offset*/
1045#define WDT1_BASE                       (L4_WKUP_BASE + 0x00235000)
1046#define WDT1_REG(_x_)                   *(vulong *)(WDT1_BASE + _x_)
1047/*---------------------------------------------------------------------------*/
1048/* WatchDog Timer Register offsets */
1049
1050        /* Watchdow Identification Register */
1051#define WDT1_WIDR                       0x00
1052        /* Watchdog System Control Register */
1053#define WDT1_WDSC                       0x10
1054        /* Watchdog Status Register */
1055#define WDT1_WDST                       0x14
1056        /* Watchdog Interrupt Status Register */
1057#define WDT1_WISR                       0x18
1058        /* Watchdog Interrupt Enable Register */
1059#define WDT1_WIER                       0x1C
1060        /* Watchdog Control Register */
1061#define WDT1_WCLR                       0x24
1062        /* Watchdog Counter Register */
1063#define WDT1_WCRR                       0x28
1064        /* Watchdog Load Register */
1065#define WDT1_WLDR                       0x2C
1066        /* Watchdog Trigger Register */
1067#define WDT1_WTGR                       0x30
1068        /* Watchdog Write Posting Bits Register */
1069#define WDT1_WWPS                       0x34
1070        /* Watchdog Delay Configuration Register */
1071#define WDT1_WDLY                       0x44
1072        /* Watchdog Start/Stop Register */
1073#define WDT1_WSPR                       0x48
1074        /* Watchdog Raw Interrupt Status Register */
1075#define WDT1_WIRQSTATRAW                0x54
1076        /* Watchdog Interrupt Status Register */
1077#define WDT1_WIRQSTAT                   0x58
1078        /* Watchdog Interrupt Enable Set Register */
1079#define WDT1_WIRQENSET                  0x5C
1080        /* Watchdog Interrupt Enable Clear Register */
1081#define WDT1_WIRQENCLR                  0x60
1082/*===========================================================================*/
1083
1084
1085/*===========================================================================*/
1086/* MMC */
1087/*===========================================================================*/
1088/* MMC Registers offset */
1089#define MMC1_BASE                       (L4_PER_BASE + 0x001D8000)
1090#define MMC1_REG(_x_)                   *(vulong *)(MMC1_BASE + _x_)
1091/*---------------------------------------------------------------------------*/
1092/* MMC Register offsets */
1093
1094        /* System Configuration */
1095#define SD_SYSCONFIG                    0x0110
1096        /* System Status */
1097#define SD_SYSSTATUS                    0x0114
1098        /* Card Status Response Error */
1099#define SD_CSRE                         0x0124
1100        /* System Test */
1101#define SD_SYSTEST                      0x0128
1102        /* Configuration */
1103#define SD_CON                          0x012C
1104        /* Power Counter */
1105#define SD_PWCNT                        0x0130
1106        /* SDMA System Address */
1107#define SD_SDMASA                       0x0200
1108        /* Transfer Length Configuration */
1109#define SD_BLK                          0x0204
1110        /* Command Argument */
1111#define SD_ARG                          0x0208
1112        /* Command and Transfer Mode */
1113#define SD_CMD                          0x020C
1114        /* Command Response 0 and 1 */
1115#define SD_RSP10                        0x0210
1116        /* Command Response 2 and 3 */
1117#define SD_RSP32                        0x0214
1118        /* Command Response 4 and 5 */
1119#define SD_RSP54                        0x0218
1120        /* Command Response 6 and 7 */
1121#define SD_RSP76                        0x021C
1122        /* Data */
1123#define SD_DATA                         0x0220
1124        /* Present State */
1125#define SD_PSTATE                       0x0224
1126        /* Host Control */
1127#define SD_HCTL                         0x0228
1128        /* SD System Control */
1129#define SD_SYSCTL                       0x022C
1130        /* SD Interrupt Status */
1131#define SD_STAT                         0x0230
1132        /* SD Interrupt Enable */
1133#define SD_IE                           0x0234
1134        /* SD Interrupt Enable Set */
1135#define SD_ISE                          0x0238
1136        /* Auto CMD12 Error Status */
1137#define SD_AC12                         0x023C
1138        /* Capabilities */
1139#define SD_CAPA                         0x0240
1140        /* Maximum Current Capabilities */
1141#define SD_CUR_CAPA                     0x0148
1142        /* Force Event */
1143#define SD_FE                           0x0250
1144        /* ADMA Error Status */
1145#define SD_ADMAES                       0x0254
1146        /* ADMA System Address Low bits */
1147#define SD_ADMASAL                      0x0258
1148        /* ADMA System Address High bits */
1149#define SD_ADMASAH                      0x025C
1150        /* Versions */
1151#define SD_REV                          0x02FC
1152/*===========================================================================*/
1153
1154#endif /* AM335X_H */
Note: See TracBrowser for help on using the repository browser.