1/*  *********************************************************************
2    *  Broadcom Common Firmware Environment (CFE)
3    *
4    *  SOC chip definitions			File: bcm5836.h
5    *
6    *  Constants and macros specific to this SOC
7    *
8    *********************************************************************
9    *
10    *  Copyright 2003,2004
11    *  Broadcom Corporation. All rights reserved.
12    *
13    *  This software is furnished under license and may be used and
14    *  copied only in accordance with the following terms and
15    *  conditions.  Subject to these conditions, you may download,
16    *  copy, install, use, modify and distribute modified or unmodified
17    *  copies of this software in source and/or binary form.  No title
18    *  or ownership is transferred hereby.
19    *
20    *  1) Any source code used, modified or distributed must reproduce
21    *     and retain this copyright notice and list of conditions
22    *     as they appear in the source file.
23    *
24    *  2) No right is granted to use any trade name, trademark, or
25    *     logo of Broadcom Corporation.  The "Broadcom Corporation"
26    *     name may not be used to endorse or promote products derived
27    *     from this software without the prior written permission of
28    *     Broadcom Corporation.
29    *
30    *  3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
31    *     IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
32    *     WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
33    *     PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT
34    *     SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN
35    *     PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT,
36    *     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37    *     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
38    *     GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
39    *     BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
40    *     OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
41    *     TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF
42    *     THE POSSIBILITY OF SUCH DAMAGE.
43    ********************************************************************* */
44
45#ifndef _BCM5836_H_
46#define _BCM5836_H_
47
48/* Define the chip, to match legacy #ifdef's. */
49#define BCM5836  1
50
51/* Define the chip family */
52#define BCM47XX  1
53#define BCM47xx  1
54
55/* BCM5836 Address map */
56#define BCM5836_SDRAM		0x00000000 /* 0-128MB Physical SDRAM */
57#define BCM5836_PCI_MEM		0x08000000 /* Host Mode PCI mem space (64MB)*/
58#define BCM5836_PCI_CFG		0x0c000000 /* Host Mode PCI cfg space (64MB)*/
59#define BCM5836_PCI_DMA		0x40000000 /* Client Mode PCI mem space (1GB)*/
60#define	BCM5836_SDRAM_SWAPPED	0x10000000 /* Byteswapped Physical SDRAM */
61#define BCM5836_ENUM		0x18000000 /* Beginning of core enum space */
62
63/* BCM5836 Core register space */
64#define BCM5836_REG_CHIPC	0x18000000 /* Chipcommon  registers */
65#define BCM5836_REG_EMAC0	0x18001000 /* Ethernet MAC0 core registers */
66#define BCM5836_REG_EMAC1	0x18002000 /* Ethernet MAC1 core registers */
67#define BCM5836_REG_USB		0x18003000 /* USB core registers */
68#define BCM5836_REG_PCI		0x18004000 /* PCI core registers */
69#define BCM5836_REG_MIPS33	0x18005000 /* MIPS core registers */
70#define BCM5836_REG_CODEC	0x18006000 /* AC97 Codec Core registers */
71#define BCM5836_REG_IPSEC	0x18007000 /* BCM582x CryptoCore registers */
72#define BCM5836_REG_MEMC	0x18008000 /* MEMC core registers */
73
74#define BCM5836_REG_UARTS       (BCM5836_REG_CHIPC + 0x300) /* UART regs */
75
76#define	BCM5836_EJTAG		0xff200000 /* MIPS EJTAG space (2M) */
77
78/* Internal 16550-compatible UARTs */
79#define BCM5836_UART0		(BCM5836_REG_UARTS + 0x00000000)
80#define BCM5836_UART1		(BCM5836_REG_UARTS + 0x00000100)
81
82/* Registers common to MIPS33 Core used in 5365 and 4704 */
83#define MIPS33_EXTIF_REGION           0x1A000000 /* Chipcommon EXTIF region*/
84#define MIPS33_FLASH_REGION_AUX       0x1C000000 /* FLASH Region 2*/
85#define MIPS33_FLASH_REGION           0x1FC00000 /* Boot FLASH Region  */
86
87/* bcm4704 mapping to generic sb_bp identifiers */
88/* XXX It would be better to discover this dynamically. */
89
90/* BSP Abstraction, pickup names via bsp_config.h. */
91
92#define SB_ENUM_BASE            BCM5836_ENUM
93
94#define SB_CHIPC_BASE           BCM5836_REG_CHIPC
95#define SB_ENET0_BASE           BCM5836_REG_EMAC0
96#define SB_ENET1_BASE           BCM5836_REG_EMAC1
97#define SB_IPSEC_BASE           BCM5836_REG_IPSEC
98#define SB_USB_BASE             BCM5836_REG_USB
99#define SB_PCI_BASE             BCM5836_REG_PCI
100#define SB_MIPS33_BASE          BCM5836_REG_MIPS33
101#define SB_MEMC_BASE            BCM5836_REG_MEMC
102
103#define SB_EXTIF_SPACE          MIPS33_EXTIF_REGION
104#define SB_FLASH_SPACE          MIPS33_FLASH_REGION
105
106#endif /* _BCM5836_H_ */
107