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 __BCM63148_MAP_PART_H
25 #define __BCM63148_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 GICD_PHYS_BASE (REG_BASE + 0x00031000)
42 #define GICC_PHYS_BASE (REG_BASE + 0x00032000)
44 #define B15_CTRL_PHYS_BASE (REG_BASE + 0x00020000)
45 #define B15_PHYS_BASE (REG_BASE + 0x00030000)
48 #define PERF_PHYS_BASE (PER_BASE + 0x00008000) /* chip control */
49 #define TIMR_PHYS_BASE (PER_BASE + 0x00008080) /* timer registers */
50 #define BOOTLUT_PHYS_BASE (PER_BASE + 0x00010000)
52 #define PMC_BASE PMC_PHYS_BASE
53 #define PROC_MON_BASE PROC_MON_PHYS_BASE
54 #define TIMR_BASE TIMR_PHYS_BASE
55 #define BOOTLUT_BASE BOOTLUT_PHYS_BASE
56 #define B15_CTRL_BASE B15_CTRL_PHYS_BASE
57 #define B15_BASE B15_PHYS_BASE
58 #define GICC_BASE GICC_PHYS_BASE
59 #define GICD_BASE GICD_PHYS_BASE
63 * Power Management Control
65 typedef struct PmcCtrlReg
{
68 uint32 l1Irq4keStatus
;
70 uint32 l1IrqMipsStatus
;
82 #define PMC_CTRL_GP_FLASH_BOOT_STALL 0x00000080
90 uint32 dma0_3FifoStatus
;
91 uint32 unused0
[3]; /* 0x4c-0x57 */
93 uint32 l1IrqMips1Mask
;
101 uint32 addr1WndwBaseIn
;
102 uint32 addr1WndwBaseOut
;
103 uint32 addr2WndwMask
;
104 uint32 addr2WndwBaseIn
;
106 uint32 addr2WndwBaseOut
;
111 uint32 eb2ubusTimeout
;
112 uint32 m4keCoreStatus
;
114 uint32 ubSlaveTimeout
;
118 uint32 ubusErrorOutMask
;
119 uint32 diagCaptStopMask
;
137 uint32 unused1
[4]; /* 0xe4-0xf3 */
139 uint32 iopPeriphBaseAddr
;
141 uint32 unused2
; /* 0xfc-0xff */
144 typedef struct PmcOutFifoReg
{
145 uint32 msgCtrl
; /* 0x00 */
146 uint32 msgSts
; /* 0x04 */
147 uint32 unused
[14]; /* 0x08-0x3f */
148 uint32 msgData
[16]; /* 0x40-0x7c */
151 typedef struct PmcInFifoReg
{
152 uint32 msgCtrl
; /* 0x00 */
153 uint32 msgSts
; /* 0x04 */
154 uint32 unused
[13]; /* 0x08-0x3b */
155 uint32 msgLast
; /* 0x3c */
156 uint32 msgData
[16]; /* 0x40-0x7c */
159 typedef struct PmcDmaReg
{
172 typedef struct PmcTokenReg
{
183 typedef struct PmcPerfPowReg
{
190 uint32 instnComplete
;
203 uint32 freqScalarCtrl
;
205 uint32 freqScalarMask
;
208 typedef struct PmcDQMReg
{
211 uint32 _4keLowWtmkIrqMask
;
212 uint32 mipsLowWtmkIrqMask
;
213 uint32 lowWtmkIrqMask
;
215 uint32 _4keNotEmptyIrqMask
;
216 uint32 mipsNotEmptyIrqMask
;
217 uint32 notEmptyIrqSts
;
221 uint32 nextAvailMask
;
222 uint32 nextAvailQueue
;
223 uint32 mips1LowWtmkIrqMask
;
225 uint32 mips1NotEmptyIrqMask
;
226 uint32 autoSrcPidInsert
;
229 typedef struct PmcCntReg
{
231 uint32 unused
[6]; /* 0x28-0x3f */
236 typedef struct PmcDqmQCtrlReg
{
243 typedef struct PmcDqmQDataReg
{
247 typedef struct PmcDqmQMibReg
{
249 uint32 qNumEmpty
[32];
250 uint32 qNumPushed
[32];
254 uint32 baseReserved
; /* 0x0000 */
255 uint32 unused0
[1023];
256 PmcCtrlReg ctrl
; /* 0x1000 */
258 PmcOutFifoReg outFifo
; /* 0x1100 */
259 uint32 unused1
[32]; /* 0x1180-0x11ff */
260 PmcInFifoReg inFifo
; /* 0x1200 */
261 uint32 unused2
[32]; /* 0x1280-0x12ff */
263 PmcDmaReg dma
[2]; /* 0x1300 */
264 uint32 unused3
[48]; /* 0x1340-0x13ff */
266 PmcTokenReg token
; /* 0x1400 */
267 uint32 unused4
[121]; /* 0x141c-0x15ff */
269 PmcPerfPowReg perfPower
; /* 0x1600 */
270 uint32 unused5
[47]; /* 0x1644-0x16ff */
272 uint32 msgId
[32]; /* 0x1700 */
273 uint32 unused6
[32]; /* 0x1780-0x17ff */
275 PmcDQMReg dqm
; /* 0x1800 */
276 uint32 unused7
[50]; /* 0x1838-0x18ff */
278 PmcCntReg hwCounter
; /* 0x1900 */
279 uint32 unused8
[46]; /* 0x1948-0x19ff */
281 PmcDqmQCtrlReg dqmQCtrl
[32]; /* 0x1a00 */
282 PmcDqmQDataReg dqmQData
[32]; /* 0x1c00 */
283 uint32 unused9
[64]; /* 0x1e00-0x1eff */
285 uint32 qStatus
[32]; /* 0x1f00 */
286 uint32 unused10
[32]; /* 0x1f80-0x1fff */
288 PmcDqmQMibReg qMib
; /* 0x2000 */
289 uint32 unused11
[1952]; /* 0x2180-0x3ffff */
291 uint32 sharedMem
[8192]; /* 0x4000-0xbffc */
294 #define PMC ((volatile Pmc * const) PMC_BASE)
297 * Process Monitor Module
299 typedef struct PMRingOscillatorControl
{
307 } PMRingOscillatorControl
;
309 #define RCAL_0P25UM_HORZ 0
310 #define RCAL_0P25UM_VERT 1
311 #define RCAL_0P5UM_HORZ 2
312 #define RCAL_0P5UM_VERT 3
313 #define RCAL_1UM_HORZ 4
314 #define RCAL_1UM_VERT 5
315 #define PMMISC_RMON_EXT_REG ((RCAL_1UM_VERT + 1)/2)
316 #define PMMISC_RMON_VALID_MASK (0x1<<16)
317 typedef struct PMMiscControl
{
324 typedef struct PMSSBMasterControl
{
326 #define PMC_SSBM_CONTROL_SSB_START (1<<15)
327 #define PMC_SSBM_CONTROL_SSB_ADPRE (1<<13)
328 #define PMC_SSBM_CONTROL_SSB_EN (1<<12)
329 #define PMC_SSBM_CONTROL_SSB_CMD_SHIFT (10)
330 #define PMC_SSBM_CONTROL_SSB_CMD_MASK (0x3 << PMC_SSBM_CONTROL_SSB_CMD_SHIFT)
331 #define PMC_SSBM_CONTROL_SSB_CMD_READ (2)
332 #define PMC_SSBM_CONTROL_SSB_CMD_WRITE (1)
333 #define PMC_SSBM_CONTROL_SSB_ADDR_SHIFT (0)
334 #define PMC_SSBM_CONTROL_SSB_ADDR_MASK (0x3ff << PMC_SSBM_CONTROL_SSB_ADDR_SHIFT)
337 } PMSSBMasterControl
;
339 typedef struct PMEctrControl
{
347 typedef struct PMBMaster
{
349 #define PMC_PMBM_START (1 << 31)
350 #define PMC_PMBM_TIMEOUT (1 << 30)
351 #define PMC_PMBM_SLAVE_ERR (1 << 29)
352 #define PMC_PMBM_BUSY (1 << 28)
353 #define PMC_PMBM_Read (0 << 20)
354 #define PMC_PMBM_Write (1 << 20)
361 typedef struct PMAPVTMONControl
{
378 typedef struct PMUBUSCfg
{
383 typedef struct ProcessMonitorRegs
{
384 uint32 MonitorCtrl
; /* 0x00 */
386 PMRingOscillatorControl ROSC
; /* 0x20 */
388 PMMiscControl Misc
; /* 0x40 */
389 PMSSBMasterControl SSBMaster
; /* 0x60 */
391 PMEctrControl Ectr
; /* 0x80 */
393 PMBMaster PMBM
[2]; /* 0xc0 */
394 PMAPVTMONControl APvtmonCtrl
; /* 0x100 */
396 PMUBUSCfg UBUSCfg
; /* 0x160 */
397 } ProcessMonitorRegs
;
399 #define PROCMON ((volatile ProcessMonitorRegs * const) PROC_MON_BASE)
405 typedef struct Timer
{
406 uint32 TimerCtl0
; /* 0x00 */
407 uint32 TimerCtl1
; /* 0x04 */
408 uint32 TimerCtl2
; /* 0x08 */
409 uint32 TimerCtl3
; /* 0x0c */
410 #define TIMERENABLE (1 << 31)
411 #define RSTCNTCLR (1 << 30)
413 uint32 TimerCnt0
; /* 0x10 */
414 uint32 TimerCnt1
; /* 0x14 */
415 uint32 TimerCnt2
; /* 0x18 */
416 uint32 TimerCnt3
; /* 0x1c */
417 #define TIMER_COUNT_MASK 0x3FFFFFFF
419 uint32 TimerMask
; /* 0x20 */
420 #define TIMER0EN (1 << 0)
421 #define TIMER1EN (1 << 1)
422 #define TIMER2EN (1 << 2)
423 #define TIMER3EN (1 << 3)
425 uint32 TimerInts
; /* 0x24 */
426 #define TIMER0 (1 << 0)
427 #define TIMER1 (1 << 1)
428 #define TIMER2 (1 << 2)
429 #define TIMER3 (1 << 3)
430 #define WATCHDOG (1 << 4)
432 uint32 WatchDogDefCount
; /* 0x28 */
434 /* Write 0xff00 0x00ff to Start timer
435 * Write 0xee00 0x00ee to Stop and re-load default count
436 * Read from this register returns current watch dog count
438 uint32 WatchDogCtl
; /* 0x2c */
440 /* Number of 50-MHz ticks for WD Reset pulse to last */
441 uint32 WDResetCount
; /* 0x30 */
442 uint32 SoftRst
; /* 0x34 */
443 #define SOFT_RESET (1 << 0)
444 uint32 ResetStatus
; /* 0x38 */
445 #define PCIE_RESET_STATUS 0x10000000
446 #define SW_RESET_STATUS 0x20000000
447 #define HW_RESET_STATUS 0x40000000
448 #define POR_RESET_STATUS 0x80000000
449 #define RESET_STATUS_MASK 0xF0000000
452 #define TIMER ((volatile Timer * const) TIMR_BASE)
457 typedef struct B15ArchRegion
{
461 uint32 access_right_ctrl
;
464 typedef struct B15Arch
{
465 B15ArchRegion region
[8];
470 typedef struct B15CpuBusRange
{
471 #define ULIMIT_SHIFT 4
472 #define BUSNUM_MASK 0x0000000FU
474 #define BUSNUM_UBUS 1
475 #define BUSNUM_RBUS 2
476 #define BUSNUM_RSVD 3
477 #define BUSNUM_MCP0 4
478 #define BUSNUM_MCP1 5
479 #define BUSNUM_MCP2 6
485 typedef struct B15CpuAccessRightViol
{
489 } B15CpuAccessRightViol
;
491 typedef struct B15CpuBPCMAVS
{
493 uint32 bpcm_capability
;
496 uint32 avs_rosc_ctrl
;
497 uint32 avs_rosc_threshold
;
502 typedef struct B15CpuCtrl
{
503 B15CpuBusRange bus_range
[11]; /* 0x0 */
504 uint32 secure_reset_hndshake
;
505 uint32 secure_soft_reset
;
506 B15CpuAccessRightViol access_right_viol
[2]; /* 0x60 */
509 uint32 rac_flush
; /* 0x80 */
510 uint32 cpu_power_cfg
;
511 uint32 cpu0_pwr_zone_ctrl
;
512 uint32 cpu1_pwr_zone_ctrl
;
513 uint32 cpu2_pwr_zone_ctrl
; /* 0x90 */
514 uint32 cpu3_pwr_zone_ctrl
;
515 uint32 l2biu_pwr_zone_ctrl
;
516 uint32 cpu0_pwr_zone_cfg1
;
517 uint32 cpu0_pwr_zone_cfg2
; /* 0xa0 */
518 uint32 cpu1_pwr_zone_cfg1
;
519 uint32 cpu1_pwr_zone_cfg2
;
520 uint32 cpu2_pwr_zone_cfg1
;
521 uint32 cpu2_pwr_zone_cfg2
; /* 0xb0 */
522 uint32 cpu3_pwr_zone_cfg1
;
523 uint32 cpu3_pwr_zone_cfg2
;
524 uint32 l2biu_pwr_zone_cfg1
;
525 uint32 l2biu_pwr_zone_cfg2
; /* 0xc0 */
526 uint32 cpu0_pwr_freq_scalar_ctrl
;
527 uint32 cpu1_pwr_freq_scalar_ctrl
;
528 uint32 cpu2_pwr_freq_scalar_ctrl
;
529 uint32 cpu3_pwr_freq_scalar_ctrl
; /* 0xd0 */
530 uint32 l2biu_pwr_freq_scalar_ctrl
;
531 B15CpuBPCMAVS cpu_bpcm_avs
[4]; /* 0xd8 */
532 B15CpuBPCMAVS l2biu_bpcm_avs
; /* 0x158 */
533 uint32 reset_cfg
; /* 0x178 */
535 uint32 misc_cfg
; /* 0x180 */
537 uint32 therm_throttle_temp
;
538 uint32 term_throttle_irq_cfg
;
539 uint32 therm_irq_high
; /* 0x190 */
540 uint32 therm_irq_low
;
541 uint32 therm_misc_threshold
;
542 uint32 therm_irq_misc
;
543 uint32 defeature
; /* 0x1a0 */
544 uint32 defeature_key
;
545 uint32 debug_rom_addr
;
546 uint32 debug_self_addr
;
547 uint32 debug_tracectrl
; /* 0x1b0 */
550 uint32 ubus_cfg_window
[8]; /* 0x1bc */
551 uint32 ubus_cfg
; /* 0x1dc */
553 uint32 scratch
; /* 0x3fc */
556 typedef struct B15Ctrl
{
557 uint32 unused0
[1024];
558 B15Arch arch
; /* 0x1000 */
560 B15CpuCtrl cpu_ctrl
; /* 0x2000 */
563 #define B15CTRL ((volatile B15Ctrl *const) B15_CTRL_BASE)
565 #endif /* __ASSEMBLER__ */