2 <:copyright-BRCM:2013:DUAL/GPL:standard
4 Copyright (c) 2013 Broadcom
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License, version 2, as published by
9 the Free Software Foundation (the "GPL").
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
17 A copy of the GPL is available at http://www.broadcom.com/licenses/GPLv2.php, or by
18 writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
24 #ifndef __BCM63138_MAP_PART_H
25 #define __BCM63138_MAP_PART_H
33 #define PER_BASE 0xfffe0000
34 #define REG_BASE 0x80000000
36 #define MEMC_PHYS_BASE (REG_BASE + 0x00002000) /* DDR IO Buf Control */
37 #define MEMC_SIZE 0x20000
39 #define PMC_PHYS_BASE (REG_BASE + 0x00400000)
40 #define PROC_MON_PHYS_BASE (REG_BASE + 0x00480000)
41 #define GICC_PHYS_BASE (REG_BASE + 0x0001e100)
42 #define GICD_PHYS_BASE (REG_BASE + 0x0001f000)
44 #define PERF_PHYS_BASE (PER_BASE + 0x00008000) /* chip control */
45 #define TIMR_PHYS_BASE (PER_BASE + 0x00008080) /* timer registers */
46 #define BOOTLUT_PHYS_BASE (PER_BASE + 0x00010000)
48 #define PMC_BASE PMC_PHYS_BASE
49 #define PROC_MON_BASE PROC_MON_PHYS_BASE
50 #define TIMR_BASE TIMR_PHYS_BASE
51 #define BOOTLUT_BASE BOOTLUT_PHYS_BASE
52 #define GICC_BASE GICC_PHYS_BASE
53 #define GICD_BASE GICD_PHYS_BASE
59 * Power Management Control
61 typedef struct PmcCtrlReg
{
64 uint32 l1Irq4keStatus
;
66 uint32 l1IrqMipsStatus
;
78 #define PMC_CTRL_GP_FLASH_BOOT_STALL 0x00000080
86 uint32 dma0_3FifoStatus
;
87 uint32 unused0
[3]; /* 0x4c-0x57 */
89 uint32 l1IrqMips1Mask
;
97 uint32 addr1WndwBaseIn
;
98 uint32 addr1WndwBaseOut
;
100 uint32 addr2WndwBaseIn
;
102 uint32 addr2WndwBaseOut
;
107 uint32 eb2ubusTimeout
;
108 uint32 m4keCoreStatus
;
110 uint32 ubSlaveTimeout
;
114 uint32 ubusErrorOutMask
;
115 uint32 diagCaptStopMask
;
133 uint32 unused1
[4]; /* 0xe4-0xf3 */
135 uint32 iopPeriphBaseAddr
;
137 uint32 unused2
; /* 0xfc-0xff */
140 typedef struct PmcOutFifoReg
{
141 uint32 msgCtrl
; /* 0x00 */
142 uint32 msgSts
; /* 0x04 */
143 uint32 unused
[14]; /* 0x08-0x3f */
144 uint32 msgData
[16]; /* 0x40-0x7c */
147 typedef struct PmcInFifoReg
{
148 uint32 msgCtrl
; /* 0x00 */
149 uint32 msgSts
; /* 0x04 */
150 uint32 unused
[13]; /* 0x08-0x3b */
151 uint32 msgLast
; /* 0x3c */
152 uint32 msgData
[16]; /* 0x40-0x7c */
155 typedef struct PmcDmaReg
{
168 typedef struct PmcTokenReg
{
179 typedef struct PmcPerfPowReg
{
186 uint32 instnComplete
;
199 uint32 freqScalarCtrl
;
201 uint32 freqScalarMask
;
204 typedef struct PmcDQMReg
{
207 uint32 _4keLowWtmkIrqMask
;
208 uint32 mipsLowWtmkIrqMask
;
209 uint32 lowWtmkIrqMask
;
211 uint32 _4keNotEmptyIrqMask
;
212 uint32 mipsNotEmptyIrqMask
;
213 uint32 notEmptyIrqSts
;
217 uint32 nextAvailMask
;
218 uint32 nextAvailQueue
;
219 uint32 mips1LowWtmkIrqMask
;
221 uint32 mips1NotEmptyIrqMask
;
222 uint32 autoSrcPidInsert
;
225 typedef struct PmcCntReg
{
227 uint32 unused
[6]; /* 0x28-0x3f */
232 typedef struct PmcDqmQCtrlReg
{
239 typedef struct PmcDqmQDataReg
{
243 typedef struct PmcDqmQMibReg
{
245 uint32 qNumEmpty
[32];
246 uint32 qNumPushed
[32];
250 uint32 baseReserved
; /* 0x0000 */
251 uint32 unused0
[1023];
252 PmcCtrlReg ctrl
; /* 0x1000 */
254 PmcOutFifoReg outFifo
; /* 0x1100 */
255 uint32 unused1
[32]; /* 0x1180-0x11ff */
256 PmcInFifoReg inFifo
; /* 0x1200 */
257 uint32 unused2
[32]; /* 0x1280-0x12ff */
259 PmcDmaReg dma
[2]; /* 0x1300 */
260 uint32 unused3
[48]; /* 0x1340-0x13ff */
262 PmcTokenReg token
; /* 0x1400 */
263 uint32 unused4
[121]; /* 0x141c-0x15ff */
265 PmcPerfPowReg perfPower
; /* 0x1600 */
266 uint32 unused5
[47]; /* 0x1644-0x16ff */
268 uint32 msgId
[32]; /* 0x1700 */
269 uint32 unused6
[32]; /* 0x1780-0x17ff */
271 PmcDQMReg dqm
; /* 0x1800 */
272 uint32 unused7
[50]; /* 0x1838-0x18ff */
274 PmcCntReg hwCounter
; /* 0x1900 */
275 uint32 unused8
[46]; /* 0x1948-0x19ff */
277 PmcDqmQCtrlReg dqmQCtrl
[32]; /* 0x1a00 */
278 PmcDqmQDataReg dqmQData
[32]; /* 0x1c00 */
279 uint32 unused9
[64]; /* 0x1e00-0x1eff */
281 uint32 qStatus
[32]; /* 0x1f00 */
282 uint32 unused10
[32]; /* 0x1f80-0x1fff */
284 PmcDqmQMibReg qMib
; /* 0x2000 */
285 uint32 unused11
[1952]; /* 0x2180-0x3ffff */
287 uint32 sharedMem
[8192]; /* 0x4000-0xbffc */
290 #define PMC ((volatile Pmc * const) PMC_BASE)
295 * Process Monitor Module
297 typedef struct PMRingOscillatorControl
{
305 } PMRingOscillatorControl
;
307 #define RCAL_0P25UM_HORZ 0
308 #define RCAL_0P25UM_VERT 1
309 #define RCAL_0P5UM_HORZ 2
310 #define RCAL_0P5UM_VERT 3
311 #define RCAL_1UM_HORZ 4
312 #define RCAL_1UM_VERT 5
313 #define PMMISC_RMON_EXT_REG ((RCAL_1UM_VERT + 1)/2)
314 #define PMMISC_RMON_VALID_MASK (0x1<<16)
315 typedef struct PMMiscControl
{
322 typedef struct PMSSBMasterControl
{
324 #define PMC_SSBM_CONTROL_SSB_START (1<<15)
325 #define PMC_SSBM_CONTROL_SSB_ADPRE (1<<13)
326 #define PMC_SSBM_CONTROL_SSB_EN (1<<12)
327 #define PMC_SSBM_CONTROL_SSB_CMD_SHIFT (10)
328 #define PMC_SSBM_CONTROL_SSB_CMD_MASK (0x3 << PMC_SSBM_CONTROL_SSB_CMD_SHIFT)
329 #define PMC_SSBM_CONTROL_SSB_CMD_READ (2)
330 #define PMC_SSBM_CONTROL_SSB_CMD_WRITE (1)
331 #define PMC_SSBM_CONTROL_SSB_ADDR_SHIFT (0)
332 #define PMC_SSBM_CONTROL_SSB_ADDR_MASK (0x3ff << PMC_SSBM_CONTROL_SSB_ADDR_SHIFT)
335 } PMSSBMasterControl
;
337 typedef struct PMEctrControl
{
345 typedef struct PMBMaster
{
347 #define PMC_PMBM_START (1 << 31)
348 #define PMC_PMBM_TIMEOUT (1 << 30)
349 #define PMC_PMBM_SLAVE_ERR (1 << 29)
350 #define PMC_PMBM_BUSY (1 << 28)
351 #define PMC_PMBM_Read (0 << 20)
352 #define PMC_PMBM_Write (1 << 20)
359 typedef struct PMAPVTMONControl
{
376 typedef struct PMUBUSCfg
{
381 typedef struct ProcessMonitorRegs
{
382 uint32 MonitorCtrl
; /* 0x00 */
384 PMRingOscillatorControl ROSC
; /* 0x20 */
386 PMMiscControl Misc
; /* 0x40 */
387 PMSSBMasterControl SSBMaster
; /* 0x60 */
389 PMEctrControl Ectr
; /* 0x80 */
391 PMBMaster PMBM
[2]; /* 0xc0 */
392 PMAPVTMONControl APvtmonCtrl
; /* 0x100 */
394 PMUBUSCfg UBUSCfg
; /* 0x160 */
395 } ProcessMonitorRegs
;
397 #define PROCMON ((volatile ProcessMonitorRegs * const) PROC_MON_BASE)
403 typedef struct Timer
{
404 uint32 TimerCtl0
; /* 0x00 */
405 uint32 TimerCtl1
; /* 0x04 */
406 uint32 TimerCtl2
; /* 0x08 */
407 uint32 TimerCtl3
; /* 0x0c */
408 #define TIMERENABLE (1 << 31)
409 #define RSTCNTCLR (1 << 30)
411 uint32 TimerCnt0
; /* 0x10 */
412 uint32 TimerCnt1
; /* 0x14 */
413 uint32 TimerCnt2
; /* 0x18 */
414 uint32 TimerCnt3
; /* 0x1c */
415 #define TIMER_COUNT_MASK 0x3FFFFFFF
417 uint32 TimerMask
; /* 0x20 */
418 #define TIMER0EN (1 << 0)
419 #define TIMER1EN (1 << 1)
420 #define TIMER2EN (1 << 2)
421 #define TIMER3EN (1 << 3)
423 uint32 TimerInts
; /* 0x24 */
424 #define TIMER0 (1 << 0)
425 #define TIMER1 (1 << 1)
426 #define TIMER2 (1 << 2)
427 #define TIMER3 (1 << 3)
428 #define WATCHDOG (1 << 4)
430 uint32 WatchDogDefCount
; /* 0x28 */
432 /* Write 0xff00 0x00ff to Start timer
433 * Write 0xee00 0x00ee to Stop and re-load default count
434 * Read from this register returns current watch dog count
436 uint32 WatchDogCtl
; /* 0x2c */
438 /* Number of 50-MHz ticks for WD Reset pulse to last */
439 uint32 WDResetCount
; /* 0x30 */
440 uint32 SoftRst
; /* 0x34 */
441 #define SOFT_RESET (1 << 0)
442 uint32 ResetStatus
; /* 0x38 */
443 #define PCIE_RESET_STATUS 0x10000000
444 #define SW_RESET_STATUS 0x20000000
445 #define HW_RESET_STATUS 0x40000000
446 #define POR_RESET_STATUS 0x80000000
447 #define RESET_STATUS_MASK 0xF0000000
450 #define TIMER ((volatile Timer * const) TIMR_BASE)
452 #endif /* __ASSEMBLER__ */