bcm1480_regs.h 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903
  1. /* *********************************************************************
  2. * BCM1255/BCM1280/BCM1455/BCM1480 Board Support Package
  3. *
  4. * Register Definitions File: bcm1480_regs.h
  5. *
  6. * This module contains the addresses of the on-chip peripherals
  7. * on the BCM1280 and BCM1480.
  8. *
  9. * BCM1480 specification level: 1X55_1X80-UM100-D4 (11/24/03)
  10. *
  11. *********************************************************************
  12. *
  13. * Copyright 2000,2001,2002,2003
  14. * Broadcom Corporation. All rights reserved.
  15. *
  16. * This program is free software; you can redistribute it and/or
  17. * modify it under the terms of the GNU General Public License as
  18. * published by the Free Software Foundation; either version 2 of
  19. * the License, or (at your option) any later version.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with this program; if not, write to the Free Software
  28. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  29. * MA 02111-1307 USA
  30. ********************************************************************* */
  31. #ifndef _BCM1480_REGS_H
  32. #define _BCM1480_REGS_H
  33. #include <asm/sibyte/sb1250_defs.h>
  34. /* *********************************************************************
  35. * Pull in the BCM1250's registers since a great deal of the 1480's
  36. * functions are the same as the BCM1250.
  37. ********************************************************************* */
  38. #include <asm/sibyte/sb1250_regs.h>
  39. /* *********************************************************************
  40. * Some general notes:
  41. *
  42. * Register addresses are grouped by function and follow the order
  43. * of the User Manual.
  44. *
  45. * For the most part, when there is more than one peripheral
  46. * of the same type on the SOC, the constants below will be
  47. * offsets from the base of each peripheral. For example,
  48. * the MAC registers are described as offsets from the first
  49. * MAC register, and there will be a MAC_REGISTER() macro
  50. * to calculate the base address of a given MAC.
  51. *
  52. * The information in this file is based on the BCM1X55/BCM1X80
  53. * User Manual, Document 1X55_1X80-UM100-R, 22/12/03.
  54. *
  55. * This file is basically a "what's new" header file. Since the
  56. * BCM1250 and the new BCM1480 (and derivatives) share many common
  57. * features, this file contains only what's new or changed from
  58. * the 1250. (above, you can see that we include the 1250 symbols
  59. * to get the base functionality).
  60. *
  61. * In software, be sure to use the correct symbols, particularly
  62. * for blocks that are different between the two chip families.
  63. * All BCM1480-specific symbols have _BCM1480_ in their names,
  64. * and all BCM1250-specific and "base" functions that are common in
  65. * both chips have no special names (this is for compatibility with
  66. * older include files). Therefore, if you're working with the
  67. * SCD, which is very different on each chip, A_SCD_xxx implies
  68. * the BCM1250 version and A_BCM1480_SCD_xxx implies the BCM1480
  69. * version.
  70. ********************************************************************* */
  71. /* *********************************************************************
  72. * Memory Controller Registers (Section 6)
  73. ********************************************************************* */
  74. #define A_BCM1480_MC_BASE_0 0x0010050000
  75. #define A_BCM1480_MC_BASE_1 0x0010051000
  76. #define A_BCM1480_MC_BASE_2 0x0010052000
  77. #define A_BCM1480_MC_BASE_3 0x0010053000
  78. #define BCM1480_MC_REGISTER_SPACING 0x1000
  79. #define A_BCM1480_MC_BASE(ctlid) (A_BCM1480_MC_BASE_0+(ctlid)*BCM1480_MC_REGISTER_SPACING)
  80. #define A_BCM1480_MC_REGISTER(ctlid, reg) (A_BCM1480_MC_BASE(ctlid)+(reg))
  81. #define R_BCM1480_MC_CONFIG 0x0000000100
  82. #define R_BCM1480_MC_CS_START 0x0000000120
  83. #define R_BCM1480_MC_CS_END 0x0000000140
  84. #define S_BCM1480_MC_CS_STARTEND 24
  85. #define R_BCM1480_MC_CS01_ROW0 0x0000000180
  86. #define R_BCM1480_MC_CS01_ROW1 0x00000001A0
  87. #define R_BCM1480_MC_CS23_ROW0 0x0000000200
  88. #define R_BCM1480_MC_CS23_ROW1 0x0000000220
  89. #define R_BCM1480_MC_CS01_COL0 0x0000000280
  90. #define R_BCM1480_MC_CS01_COL1 0x00000002A0
  91. #define R_BCM1480_MC_CS23_COL0 0x0000000300
  92. #define R_BCM1480_MC_CS23_COL1 0x0000000320
  93. #define R_BCM1480_MC_CSX_BASE 0x0000000180
  94. #define R_BCM1480_MC_CSX_ROW0 0x0000000000 /* relative to CSX_BASE */
  95. #define R_BCM1480_MC_CSX_ROW1 0x0000000020 /* relative to CSX_BASE */
  96. #define R_BCM1480_MC_CSX_COL0 0x0000000100 /* relative to CSX_BASE */
  97. #define R_BCM1480_MC_CSX_COL1 0x0000000120 /* relative to CSX_BASE */
  98. #define BCM1480_MC_CSX_SPACING 0x0000000080 /* CS23 relative to CS01 */
  99. #define R_BCM1480_MC_CS01_BA 0x0000000380
  100. #define R_BCM1480_MC_CS23_BA 0x00000003A0
  101. #define R_BCM1480_MC_DRAMCMD 0x0000000400
  102. #define R_BCM1480_MC_DRAMMODE 0x0000000420
  103. #define R_BCM1480_MC_CLOCK_CFG 0x0000000440
  104. #define R_BCM1480_MC_MCLK_CFG R_BCM1480_MC_CLOCK_CFG
  105. #define R_BCM1480_MC_TEST_DATA 0x0000000480
  106. #define R_BCM1480_MC_TEST_ECC 0x00000004A0
  107. #define R_BCM1480_MC_TIMING1 0x00000004C0
  108. #define R_BCM1480_MC_TIMING2 0x00000004E0
  109. #define R_BCM1480_MC_DLL_CFG 0x0000000500
  110. #define R_BCM1480_MC_DRIVE_CFG 0x0000000520
  111. #if SIBYTE_HDR_FEATURE(1480, PASS2)
  112. #define R_BCM1480_MC_ODT 0x0000000460
  113. #define R_BCM1480_MC_ECC_STATUS 0x0000000540
  114. #endif
  115. /* Global registers (single instance) */
  116. #define A_BCM1480_MC_GLB_CONFIG 0x0010054100
  117. #define A_BCM1480_MC_GLB_INTLV 0x0010054120
  118. #define A_BCM1480_MC_GLB_ECC_STATUS 0x0010054140
  119. #define A_BCM1480_MC_GLB_ECC_ADDR 0x0010054160
  120. #define A_BCM1480_MC_GLB_ECC_CORRECT 0x0010054180
  121. #define A_BCM1480_MC_GLB_PERF_CNT_CONTROL 0x00100541A0
  122. /* *********************************************************************
  123. * L2 Cache Control Registers (Section 5)
  124. ********************************************************************* */
  125. #define A_BCM1480_L2_BASE 0x0010040000
  126. #define A_BCM1480_L2_READ_TAG 0x0010040018
  127. #define A_BCM1480_L2_ECC_TAG 0x0010040038
  128. #define A_BCM1480_L2_MISC0_VALUE 0x0010040058
  129. #define A_BCM1480_L2_MISC1_VALUE 0x0010040078
  130. #define A_BCM1480_L2_MISC2_VALUE 0x0010040098
  131. #define A_BCM1480_L2_MISC_CONFIG 0x0010040040 /* x040 */
  132. #define A_BCM1480_L2_CACHE_DISABLE 0x0010040060 /* x060 */
  133. #define A_BCM1480_L2_MAKECACHEDISABLE(x) (A_BCM1480_L2_CACHE_DISABLE | (((x)&0xF) << 12))
  134. #define A_BCM1480_L2_WAY_ENABLE_3_0 0x0010040080 /* x080 */
  135. #define A_BCM1480_L2_WAY_ENABLE_7_4 0x00100400A0 /* x0A0 */
  136. #define A_BCM1480_L2_MAKE_WAY_ENABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((x)&0xF) << 12))
  137. #define A_BCM1480_L2_MAKE_WAY_ENABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((x)&0xF) << 12))
  138. #define A_BCM1480_L2_MAKE_WAY_DISABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((~x)&0xF) << 12))
  139. #define A_BCM1480_L2_MAKE_WAY_DISABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((~x)&0xF) << 12))
  140. #define A_BCM1480_L2_WAY_LOCAL_3_0 0x0010040100 /* x100 */
  141. #define A_BCM1480_L2_WAY_LOCAL_7_4 0x0010040120 /* x120 */
  142. #define A_BCM1480_L2_WAY_REMOTE_3_0 0x0010040140 /* x140 */
  143. #define A_BCM1480_L2_WAY_REMOTE_7_4 0x0010040160 /* x160 */
  144. #define A_BCM1480_L2_WAY_AGENT_3_0 0x00100400C0 /* xxC0 */
  145. #define A_BCM1480_L2_WAY_AGENT_7_4 0x00100400E0 /* xxE0 */
  146. #define A_BCM1480_L2_WAY_ENABLE(A, banks) (A | (((~(banks))&0x0F) << 8))
  147. #define A_BCM1480_L2_BANK_BASE 0x00D0300000
  148. #define A_BCM1480_L2_BANK_ADDRESS(b) (A_BCM1480_L2_BANK_BASE | (((b)&0x7)<<17))
  149. #define A_BCM1480_L2_MGMT_TAG_BASE 0x00D0000000
  150. /* *********************************************************************
  151. * PCI-X Interface Registers (Section 7)
  152. ********************************************************************* */
  153. #define A_BCM1480_PCI_BASE 0x0010061400
  154. #define A_BCM1480_PCI_RESET 0x0010061400
  155. #define A_BCM1480_PCI_DLL 0x0010061500
  156. #define A_BCM1480_PCI_TYPE00_HEADER 0x002E000000
  157. /* *********************************************************************
  158. * Ethernet MAC Registers (Section 11) and DMA Registers (Section 10.6)
  159. ********************************************************************* */
  160. /* No register changes with Rev.C BCM1250, but one additional MAC */
  161. #define A_BCM1480_MAC_BASE_2 0x0010066000
  162. #ifndef A_MAC_BASE_2
  163. #define A_MAC_BASE_2 A_BCM1480_MAC_BASE_2
  164. #endif
  165. #define A_BCM1480_MAC_BASE_3 0x0010067000
  166. #define A_MAC_BASE_3 A_BCM1480_MAC_BASE_3
  167. #define R_BCM1480_MAC_DMA_OODPKTLOST 0x00000038
  168. #ifndef R_MAC_DMA_OODPKTLOST
  169. #define R_MAC_DMA_OODPKTLOST R_BCM1480_MAC_DMA_OODPKTLOST
  170. #endif
  171. /* *********************************************************************
  172. * DUART Registers (Section 14)
  173. ********************************************************************* */
  174. /* No significant differences from BCM1250, two DUARTs */
  175. /* Conventions, per user manual:
  176. * DUART generic, channels A,B,C,D
  177. * DUART0 implementing channels A,B
  178. * DUART1 inplementing channels C,D
  179. */
  180. #define BCM1480_DUART_NUM_PORTS 4
  181. #define A_BCM1480_DUART0 0x0010060000
  182. #define A_BCM1480_DUART1 0x0010060400
  183. #define A_BCM1480_DUART(chan) ((((chan)&2) == 0)? A_BCM1480_DUART0 : A_BCM1480_DUART1)
  184. #define BCM1480_DUART_CHANREG_SPACING 0x100
  185. #define A_BCM1480_DUART_CHANREG(chan, reg) \
  186. (A_BCM1480_DUART(chan) + \
  187. BCM1480_DUART_CHANREG_SPACING * (((chan) & 1) + 1) + (reg))
  188. #define A_BCM1480_DUART_CTRLREG(chan, reg) \
  189. (A_BCM1480_DUART(chan) + \
  190. BCM1480_DUART_CHANREG_SPACING * 3 + (reg))
  191. #define DUART_IMRISR_SPACING 0x20
  192. #define DUART_INCHNG_SPACING 0x10
  193. #define R_BCM1480_DUART_IMRREG(chan) \
  194. (R_DUART_IMR_A + ((chan) & 1) * DUART_IMRISR_SPACING)
  195. #define R_BCM1480_DUART_ISRREG(chan) \
  196. (R_DUART_ISR_A + ((chan) & 1) * DUART_IMRISR_SPACING)
  197. #define R_BCM1480_DUART_INCHREG(chan) \
  198. (R_DUART_IN_CHNG_A + ((chan) & 1) * DUART_INCHNG_SPACING)
  199. #define A_BCM1480_DUART_IMRREG(chan) \
  200. (A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_IMRREG(chan)))
  201. #define A_BCM1480_DUART_ISRREG(chan) \
  202. (A_BCM1480_DUART_CTRLREG((chan), R_BCM1480_DUART_ISRREG(chan)))
  203. #define A_BCM1480_DUART_IN_PORT(chan) \
  204. (A_BCM1480_DUART_CTRLREG((chan), R_DUART_IN_PORT))
  205. /*
  206. * These constants are the absolute addresses.
  207. */
  208. #define A_BCM1480_DUART_MODE_REG_1_C 0x0010060400
  209. #define A_BCM1480_DUART_MODE_REG_2_C 0x0010060410
  210. #define A_BCM1480_DUART_STATUS_C 0x0010060420
  211. #define A_BCM1480_DUART_CLK_SEL_C 0x0010060430
  212. #define A_BCM1480_DUART_FULL_CTL_C 0x0010060440
  213. #define A_BCM1480_DUART_CMD_C 0x0010060450
  214. #define A_BCM1480_DUART_RX_HOLD_C 0x0010060460
  215. #define A_BCM1480_DUART_TX_HOLD_C 0x0010060470
  216. #define A_BCM1480_DUART_OPCR_C 0x0010060480
  217. #define A_BCM1480_DUART_AUX_CTRL_C 0x0010060490
  218. #define A_BCM1480_DUART_MODE_REG_1_D 0x0010060500
  219. #define A_BCM1480_DUART_MODE_REG_2_D 0x0010060510
  220. #define A_BCM1480_DUART_STATUS_D 0x0010060520
  221. #define A_BCM1480_DUART_CLK_SEL_D 0x0010060530
  222. #define A_BCM1480_DUART_FULL_CTL_D 0x0010060540
  223. #define A_BCM1480_DUART_CMD_D 0x0010060550
  224. #define A_BCM1480_DUART_RX_HOLD_D 0x0010060560
  225. #define A_BCM1480_DUART_TX_HOLD_D 0x0010060570
  226. #define A_BCM1480_DUART_OPCR_D 0x0010060580
  227. #define A_BCM1480_DUART_AUX_CTRL_D 0x0010060590
  228. #define A_BCM1480_DUART_INPORT_CHNG_CD 0x0010060600
  229. #define A_BCM1480_DUART_AUX_CTRL_CD 0x0010060610
  230. #define A_BCM1480_DUART_ISR_C 0x0010060620
  231. #define A_BCM1480_DUART_IMR_C 0x0010060630
  232. #define A_BCM1480_DUART_ISR_D 0x0010060640
  233. #define A_BCM1480_DUART_IMR_D 0x0010060650
  234. #define A_BCM1480_DUART_OUT_PORT_CD 0x0010060660
  235. #define A_BCM1480_DUART_OPCR_CD 0x0010060670
  236. #define A_BCM1480_DUART_IN_PORT_CD 0x0010060680
  237. #define A_BCM1480_DUART_ISR_CD 0x0010060690
  238. #define A_BCM1480_DUART_IMR_CD 0x00100606A0
  239. #define A_BCM1480_DUART_SET_OPR_CD 0x00100606B0
  240. #define A_BCM1480_DUART_CLEAR_OPR_CD 0x00100606C0
  241. #define A_BCM1480_DUART_INPORT_CHNG_C 0x00100606D0
  242. #define A_BCM1480_DUART_INPORT_CHNG_D 0x00100606E0
  243. /* *********************************************************************
  244. * Generic Bus Registers (Section 15) and PCMCIA Registers (Section 16)
  245. ********************************************************************* */
  246. #define A_BCM1480_IO_PCMCIA_CFG_B 0x0010061A58
  247. #define A_BCM1480_IO_PCMCIA_STATUS_B 0x0010061A68
  248. /* *********************************************************************
  249. * GPIO Registers (Section 17)
  250. ********************************************************************* */
  251. /* One additional GPIO register, placed _before_ the BCM1250's GPIO block base */
  252. #define A_BCM1480_GPIO_INT_ADD_TYPE 0x0010061A78
  253. #define R_BCM1480_GPIO_INT_ADD_TYPE (-8)
  254. #define A_GPIO_INT_ADD_TYPE A_BCM1480_GPIO_INT_ADD_TYPE
  255. #define R_GPIO_INT_ADD_TYPE R_BCM1480_GPIO_INT_ADD_TYPE
  256. /* *********************************************************************
  257. * SMBus Registers (Section 18)
  258. ********************************************************************* */
  259. /* No changes from BCM1250 */
  260. /* *********************************************************************
  261. * Timer Registers (Sections 4.6)
  262. ********************************************************************* */
  263. /* BCM1480 has two additional watchdogs */
  264. /* Watchdog timers */
  265. #define A_BCM1480_SCD_WDOG_2 0x0010022050
  266. #define A_BCM1480_SCD_WDOG_3 0x0010022150
  267. #define BCM1480_SCD_NUM_WDOGS 4
  268. #define A_BCM1480_SCD_WDOG_BASE(w) (A_BCM1480_SCD_WDOG_0+((w)&2)*0x1000 + ((w)&1)*0x100)
  269. #define A_BCM1480_SCD_WDOG_REGISTER(w, r) (A_BCM1480_SCD_WDOG_BASE(w) + (r))
  270. #define A_BCM1480_SCD_WDOG_INIT_2 0x0010022050
  271. #define A_BCM1480_SCD_WDOG_CNT_2 0x0010022058
  272. #define A_BCM1480_SCD_WDOG_CFG_2 0x0010022060
  273. #define A_BCM1480_SCD_WDOG_INIT_3 0x0010022150
  274. #define A_BCM1480_SCD_WDOG_CNT_3 0x0010022158
  275. #define A_BCM1480_SCD_WDOG_CFG_3 0x0010022160
  276. /* BCM1480 has two additional compare registers */
  277. #define A_BCM1480_SCD_ZBBUS_CYCLE_COUNT A_SCD_ZBBUS_CYCLE_COUNT
  278. #define A_BCM1480_SCD_ZBBUS_CYCLE_CP_BASE 0x0010020C00
  279. #define A_BCM1480_SCD_ZBBUS_CYCLE_CP0 A_SCD_ZBBUS_CYCLE_CP0
  280. #define A_BCM1480_SCD_ZBBUS_CYCLE_CP1 A_SCD_ZBBUS_CYCLE_CP1
  281. #define A_BCM1480_SCD_ZBBUS_CYCLE_CP2 0x0010020C10
  282. #define A_BCM1480_SCD_ZBBUS_CYCLE_CP3 0x0010020C18
  283. /* *********************************************************************
  284. * System Control Registers (Section 4.2)
  285. ********************************************************************* */
  286. /* Scratch register in different place */
  287. #define A_BCM1480_SCD_SCRATCH 0x100200A0
  288. /* *********************************************************************
  289. * System Address Trap Registers (Section 4.9)
  290. ********************************************************************* */
  291. /* No changes from BCM1250 */
  292. /* *********************************************************************
  293. * System Interrupt Mapper Registers (Sections 4.3-4.5)
  294. ********************************************************************* */
  295. #define A_BCM1480_IMR_CPU0_BASE 0x0010020000
  296. #define A_BCM1480_IMR_CPU1_BASE 0x0010022000
  297. #define A_BCM1480_IMR_CPU2_BASE 0x0010024000
  298. #define A_BCM1480_IMR_CPU3_BASE 0x0010026000
  299. #define BCM1480_IMR_REGISTER_SPACING 0x2000
  300. #define BCM1480_IMR_REGISTER_SPACING_SHIFT 13
  301. #define A_BCM1480_IMR_MAPPER(cpu) (A_BCM1480_IMR_CPU0_BASE+(cpu)*BCM1480_IMR_REGISTER_SPACING)
  302. #define A_BCM1480_IMR_REGISTER(cpu, reg) (A_BCM1480_IMR_MAPPER(cpu)+(reg))
  303. /* Most IMR registers are 128 bits, implemented as non-contiguous
  304. 64-bit registers high (_H) and low (_L) */
  305. #define BCM1480_IMR_HL_SPACING 0x1000
  306. #define R_BCM1480_IMR_INTERRUPT_DIAG_H 0x0010
  307. #define R_BCM1480_IMR_LDT_INTERRUPT_H 0x0018
  308. #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_H 0x0020
  309. #define R_BCM1480_IMR_INTERRUPT_MASK_H 0x0028
  310. #define R_BCM1480_IMR_INTERRUPT_TRACE_H 0x0038
  311. #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_H 0x0040
  312. #define R_BCM1480_IMR_LDT_INTERRUPT_SET 0x0048
  313. #define R_BCM1480_IMR_MAILBOX_0_CPU 0x00C0
  314. #define R_BCM1480_IMR_MAILBOX_0_SET_CPU 0x00C8
  315. #define R_BCM1480_IMR_MAILBOX_0_CLR_CPU 0x00D0
  316. #define R_BCM1480_IMR_MAILBOX_1_CPU 0x00E0
  317. #define R_BCM1480_IMR_MAILBOX_1_SET_CPU 0x00E8
  318. #define R_BCM1480_IMR_MAILBOX_1_CLR_CPU 0x00F0
  319. #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_H 0x0100
  320. #define BCM1480_IMR_INTERRUPT_STATUS_COUNT 8
  321. #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_H 0x0200
  322. #define BCM1480_IMR_INTERRUPT_MAP_COUNT 64
  323. #define R_BCM1480_IMR_INTERRUPT_DIAG_L 0x1010
  324. #define R_BCM1480_IMR_LDT_INTERRUPT_L 0x1018
  325. #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_L 0x1020
  326. #define R_BCM1480_IMR_INTERRUPT_MASK_L 0x1028
  327. #define R_BCM1480_IMR_INTERRUPT_TRACE_L 0x1038
  328. #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_L 0x1040
  329. #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_L 0x1100
  330. #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_L 0x1200
  331. #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE 0x0010028000
  332. #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU1_BASE 0x0010028100
  333. #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU2_BASE 0x0010028200
  334. #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU3_BASE 0x0010028300
  335. #define BCM1480_IMR_ALIAS_MAILBOX_SPACING 0100
  336. #define A_BCM1480_IMR_ALIAS_MAILBOX(cpu) (A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE + \
  337. (cpu)*BCM1480_IMR_ALIAS_MAILBOX_SPACING)
  338. #define A_BCM1480_IMR_ALIAS_MAILBOX_REGISTER(cpu, reg) (A_BCM1480_IMR_ALIAS_MAILBOX(cpu)+(reg))
  339. #define R_BCM1480_IMR_ALIAS_MAILBOX_0 0x0000
  340. #define R_BCM1480_IMR_ALIAS_MAILBOX_0_SET 0x0008
  341. /*
  342. * these macros work together to build the address of a mailbox
  343. * register, e.g., A_BCM1480_MAILBOX_REGISTER(0,R_BCM1480_IMR_MAILBOX_SET,2)
  344. * for mbox_0_set_cpu2 returns 0x00100240C8
  345. */
  346. #define R_BCM1480_IMR_MAILBOX_CPU 0x00
  347. #define R_BCM1480_IMR_MAILBOX_SET 0x08
  348. #define R_BCM1480_IMR_MAILBOX_CLR 0x10
  349. #define R_BCM1480_IMR_MAILBOX_NUM_SPACING 0x20
  350. #define A_BCM1480_MAILBOX_REGISTER(num, reg, cpu) \
  351. (A_BCM1480_IMR_CPU0_BASE + \
  352. (num * R_BCM1480_IMR_MAILBOX_NUM_SPACING) + \
  353. (cpu * BCM1480_IMR_REGISTER_SPACING) + \
  354. (R_BCM1480_IMR_MAILBOX_0_CPU + reg))
  355. /* *********************************************************************
  356. * System Performance Counter Registers (Section 4.7)
  357. ********************************************************************* */
  358. /* BCM1480 has four more performance counter registers, and two control
  359. registers. */
  360. #define A_BCM1480_SCD_PERF_CNT_BASE 0x00100204C0
  361. #define A_BCM1480_SCD_PERF_CNT_CFG0 0x00100204C0
  362. #define A_BCM1480_SCD_PERF_CNT_CFG_0 A_BCM1480_SCD_PERF_CNT_CFG0
  363. #define A_BCM1480_SCD_PERF_CNT_CFG1 0x00100204C8
  364. #define A_BCM1480_SCD_PERF_CNT_CFG_1 A_BCM1480_SCD_PERF_CNT_CFG1
  365. #define A_BCM1480_SCD_PERF_CNT_0 A_SCD_PERF_CNT_0
  366. #define A_BCM1480_SCD_PERF_CNT_1 A_SCD_PERF_CNT_1
  367. #define A_BCM1480_SCD_PERF_CNT_2 A_SCD_PERF_CNT_2
  368. #define A_BCM1480_SCD_PERF_CNT_3 A_SCD_PERF_CNT_3
  369. #define A_BCM1480_SCD_PERF_CNT_4 0x00100204F0
  370. #define A_BCM1480_SCD_PERF_CNT_5 0x00100204F8
  371. #define A_BCM1480_SCD_PERF_CNT_6 0x0010020500
  372. #define A_BCM1480_SCD_PERF_CNT_7 0x0010020508
  373. #define BCM1480_SCD_NUM_PERF_CNT 8
  374. #define BCM1480_SCD_PERF_CNT_SPACING 8
  375. #define A_BCM1480_SCD_PERF_CNT(n) (A_SCD_PERF_CNT_0+(n*BCM1480_SCD_PERF_CNT_SPACING))
  376. /* *********************************************************************
  377. * System Bus Watcher Registers (Section 4.8)
  378. ********************************************************************* */
  379. /* Same as 1250 except BUS_ERR_STATUS_DEBUG is in a different place. */
  380. #define A_BCM1480_BUS_ERR_STATUS_DEBUG 0x00100208D8
  381. /* *********************************************************************
  382. * System Debug Controller Registers (Section 19)
  383. ********************************************************************* */
  384. /* Same as 1250 */
  385. /* *********************************************************************
  386. * System Trace Unit Registers (Sections 4.10)
  387. ********************************************************************* */
  388. /* Same as 1250 */
  389. /* *********************************************************************
  390. * Data Mover DMA Registers (Section 10.7)
  391. ********************************************************************* */
  392. /* Same as 1250 */
  393. /* *********************************************************************
  394. * HyperTransport Interface Registers (Section 8)
  395. ********************************************************************* */
  396. #define BCM1480_HT_NUM_PORTS 3
  397. #define BCM1480_HT_PORT_SPACING 0x800
  398. #define A_BCM1480_HT_PORT_HEADER(x) (A_BCM1480_HT_PORT0_HEADER + ((x)*BCM1480_HT_PORT_SPACING))
  399. #define A_BCM1480_HT_PORT0_HEADER 0x00FE000000
  400. #define A_BCM1480_HT_PORT1_HEADER 0x00FE000800
  401. #define A_BCM1480_HT_PORT2_HEADER 0x00FE001000
  402. #define A_BCM1480_HT_TYPE00_HEADER 0x00FE002000
  403. /* *********************************************************************
  404. * Node Controller Registers (Section 9)
  405. ********************************************************************* */
  406. #define A_BCM1480_NC_BASE 0x00DFBD0000
  407. #define A_BCM1480_NC_RLD_FIELD 0x00DFBD0000
  408. #define A_BCM1480_NC_RLD_TRIGGER 0x00DFBD0020
  409. #define A_BCM1480_NC_RLD_BAD_ERROR 0x00DFBD0040
  410. #define A_BCM1480_NC_RLD_COR_ERROR 0x00DFBD0060
  411. #define A_BCM1480_NC_RLD_ECC_STATUS 0x00DFBD0080
  412. #define A_BCM1480_NC_RLD_WAY_ENABLE 0x00DFBD00A0
  413. #define A_BCM1480_NC_RLD_RANDOM_LFSR 0x00DFBD00C0
  414. #define A_BCM1480_NC_INTERRUPT_STATUS 0x00DFBD00E0
  415. #define A_BCM1480_NC_INTERRUPT_ENABLE 0x00DFBD0100
  416. #define A_BCM1480_NC_TIMEOUT_COUNTER 0x00DFBD0120
  417. #define A_BCM1480_NC_TIMEOUT_COUNTER_SEL 0x00DFBD0140
  418. #define A_BCM1480_NC_CREDIT_STATUS_REG0 0x00DFBD0200
  419. #define A_BCM1480_NC_CREDIT_STATUS_REG1 0x00DFBD0220
  420. #define A_BCM1480_NC_CREDIT_STATUS_REG2 0x00DFBD0240
  421. #define A_BCM1480_NC_CREDIT_STATUS_REG3 0x00DFBD0260
  422. #define A_BCM1480_NC_CREDIT_STATUS_REG4 0x00DFBD0280
  423. #define A_BCM1480_NC_CREDIT_STATUS_REG5 0x00DFBD02A0
  424. #define A_BCM1480_NC_CREDIT_STATUS_REG6 0x00DFBD02C0
  425. #define A_BCM1480_NC_CREDIT_STATUS_REG7 0x00DFBD02E0
  426. #define A_BCM1480_NC_CREDIT_STATUS_REG8 0x00DFBD0300
  427. #define A_BCM1480_NC_CREDIT_STATUS_REG9 0x00DFBD0320
  428. #define A_BCM1480_NC_CREDIT_STATUS_REG10 0x00DFBE0000
  429. #define A_BCM1480_NC_CREDIT_STATUS_REG11 0x00DFBE0020
  430. #define A_BCM1480_NC_CREDIT_STATUS_REG12 0x00DFBE0040
  431. #define A_BCM1480_NC_SR_TIMEOUT_COUNTER 0x00DFBE0060
  432. #define A_BCM1480_NC_SR_TIMEOUT_COUNTER_SEL 0x00DFBE0080
  433. /* *********************************************************************
  434. * H&R Block Configuration Registers (Section 12.4)
  435. ********************************************************************* */
  436. #define A_BCM1480_HR_BASE_0 0x00DF820000
  437. #define A_BCM1480_HR_BASE_1 0x00DF8A0000
  438. #define A_BCM1480_HR_BASE_2 0x00DF920000
  439. #define BCM1480_HR_REGISTER_SPACING 0x80000
  440. #define A_BCM1480_HR_BASE(idx) (A_BCM1480_HR_BASE_0 + ((idx)*BCM1480_HR_REGISTER_SPACING))
  441. #define A_BCM1480_HR_REGISTER(idx, reg) (A_BCM1480_HR_BASE(idx) + (reg))
  442. #define R_BCM1480_HR_CFG 0x0000000000
  443. #define R_BCM1480_HR_MAPPING 0x0000010010
  444. #define BCM1480_HR_RULE_SPACING 0x0000000010
  445. #define BCM1480_HR_NUM_RULES 16
  446. #define BCM1480_HR_OP_OFFSET 0x0000000100
  447. #define BCM1480_HR_TYPE_OFFSET 0x0000000108
  448. #define R_BCM1480_HR_RULE_OP(idx) (BCM1480_HR_OP_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING))
  449. #define R_BCM1480_HR_RULE_TYPE(idx) (BCM1480_HR_TYPE_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING))
  450. #define BCM1480_HR_LEAF_SPACING 0x0000000010
  451. #define BCM1480_HR_NUM_LEAVES 10
  452. #define BCM1480_HR_LEAF_OFFSET 0x0000000300
  453. #define R_BCM1480_HR_HA_LEAF0(idx) (BCM1480_HR_LEAF_OFFSET + ((idx)*BCM1480_HR_LEAF_SPACING))
  454. #define R_BCM1480_HR_EX_LEAF0 0x00000003A0
  455. #define BCM1480_HR_PATH_SPACING 0x0000000010
  456. #define BCM1480_HR_NUM_PATHS 16
  457. #define BCM1480_HR_PATH_OFFSET 0x0000000600
  458. #define R_BCM1480_HR_PATH(idx) (BCM1480_HR_PATH_OFFSET + ((idx)*BCM1480_HR_PATH_SPACING))
  459. #define R_BCM1480_HR_PATH_DEFAULT 0x0000000700
  460. #define BCM1480_HR_ROUTE_SPACING 8
  461. #define BCM1480_HR_NUM_ROUTES 512
  462. #define BCM1480_HR_ROUTE_OFFSET 0x0000001000
  463. #define R_BCM1480_HR_RT_WORD(idx) (BCM1480_HR_ROUTE_OFFSET + ((idx)*BCM1480_HR_ROUTE_SPACING))
  464. /* checked to here - ehs */
  465. /* *********************************************************************
  466. * Packet Manager DMA Registers (Section 12.5)
  467. ********************************************************************* */
  468. #define A_BCM1480_PM_BASE 0x0010056000
  469. #define A_BCM1480_PMI_LCL_0 0x0010058000
  470. #define A_BCM1480_PMO_LCL_0 0x001005C000
  471. #define A_BCM1480_PMI_OFFSET_0 (A_BCM1480_PMI_LCL_0 - A_BCM1480_PM_BASE)
  472. #define A_BCM1480_PMO_OFFSET_0 (A_BCM1480_PMO_LCL_0 - A_BCM1480_PM_BASE)
  473. #define BCM1480_PM_LCL_REGISTER_SPACING 0x100
  474. #define BCM1480_PM_NUM_CHANNELS 32
  475. #define A_BCM1480_PMI_LCL_BASE(idx) (A_BCM1480_PMI_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING))
  476. #define A_BCM1480_PMI_LCL_REGISTER(idx, reg) (A_BCM1480_PMI_LCL_BASE(idx) + (reg))
  477. #define A_BCM1480_PMO_LCL_BASE(idx) (A_BCM1480_PMO_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING))
  478. #define A_BCM1480_PMO_LCL_REGISTER(idx, reg) (A_BCM1480_PMO_LCL_BASE(idx) + (reg))
  479. #define BCM1480_PM_INT_PACKING 8
  480. #define BCM1480_PM_INT_FUNCTION_SPACING 0x40
  481. #define BCM1480_PM_INT_NUM_FUNCTIONS 3
  482. /*
  483. * DMA channel registers relative to A_BCM1480_PMI_LCL_BASE(n) and A_BCM1480_PMO_LCL_BASE(n)
  484. */
  485. #define R_BCM1480_PM_BASE_SIZE 0x0000000000
  486. #define R_BCM1480_PM_CNT 0x0000000008
  487. #define R_BCM1480_PM_PFCNT 0x0000000010
  488. #define R_BCM1480_PM_LAST 0x0000000018
  489. #define R_BCM1480_PM_PFINDX 0x0000000020
  490. #define R_BCM1480_PM_INT_WMK 0x0000000028
  491. #define R_BCM1480_PM_CONFIG0 0x0000000030
  492. #define R_BCM1480_PM_LOCALDEBUG 0x0000000078
  493. #define R_BCM1480_PM_CACHEABILITY 0x0000000080 /* PMI only */
  494. #define R_BCM1480_PM_INT_CNFG 0x0000000088
  495. #define R_BCM1480_PM_DESC_MERGE_TIMER 0x0000000090
  496. #define R_BCM1480_PM_LOCALDEBUG_PIB 0x00000000F8 /* PMI only */
  497. #define R_BCM1480_PM_LOCALDEBUG_POB 0x00000000F8 /* PMO only */
  498. /*
  499. * Global Registers (Not Channelized)
  500. */
  501. #define A_BCM1480_PMI_GLB_0 0x0010056000
  502. #define A_BCM1480_PMO_GLB_0 0x0010057000
  503. /*
  504. * PM to TX Mapping Register relative to A_BCM1480_PMI_GLB_0 and A_BCM1480_PMO_GLB_0
  505. */
  506. #define R_BCM1480_PM_PMO_MAPPING 0x00000008C8 /* PMO only */
  507. #define A_BCM1480_PM_PMO_MAPPING (A_BCM1480_PMO_GLB_0 + R_BCM1480_PM_PMO_MAPPING)
  508. /*
  509. * Interrupt mapping registers
  510. */
  511. #define A_BCM1480_PMI_INT_0 0x0010056800
  512. #define A_BCM1480_PMI_INT(q) (A_BCM1480_PMI_INT_0 + ((q>>8)<<8))
  513. #define A_BCM1480_PMI_INT_OFFSET_0 (A_BCM1480_PMI_INT_0 - A_BCM1480_PM_BASE)
  514. #define A_BCM1480_PMO_INT_0 0x0010057800
  515. #define A_BCM1480_PMO_INT(q) (A_BCM1480_PMO_INT_0 + ((q>>8)<<8))
  516. #define A_BCM1480_PMO_INT_OFFSET_0 (A_BCM1480_PMO_INT_0 - A_BCM1480_PM_BASE)
  517. /*
  518. * Interrupt registers relative to A_BCM1480_PMI_INT_0 and A_BCM1480_PMO_INT_0
  519. */
  520. #define R_BCM1480_PM_INT_ST 0x0000000000
  521. #define R_BCM1480_PM_INT_MSK 0x0000000040
  522. #define R_BCM1480_PM_INT_CLR 0x0000000080
  523. #define R_BCM1480_PM_MRGD_INT 0x00000000C0
  524. /*
  525. * Debug registers (global)
  526. */
  527. #define A_BCM1480_PM_GLOBALDEBUGMODE_PMI 0x0010056000
  528. #define A_BCM1480_PM_GLOBALDEBUG_PID 0x00100567F8
  529. #define A_BCM1480_PM_GLOBALDEBUG_PIB 0x0010056FF8
  530. #define A_BCM1480_PM_GLOBALDEBUGMODE_PMO 0x0010057000
  531. #define A_BCM1480_PM_GLOBALDEBUG_POD 0x00100577F8
  532. #define A_BCM1480_PM_GLOBALDEBUG_POB 0x0010057FF8
  533. /* *********************************************************************
  534. * Switch performance counters
  535. ********************************************************************* */
  536. #define A_BCM1480_SWPERF_CFG 0xdfb91800
  537. #define A_BCM1480_SWPERF_CNT0 0xdfb91880
  538. #define A_BCM1480_SWPERF_CNT1 0xdfb91888
  539. #define A_BCM1480_SWPERF_CNT2 0xdfb91890
  540. #define A_BCM1480_SWPERF_CNT3 0xdfb91898
  541. /* *********************************************************************
  542. * Switch Trace Unit
  543. ********************************************************************* */
  544. #define A_BCM1480_SWTRC_MATCH_CONTROL_0 0xDFB91000
  545. #define A_BCM1480_SWTRC_MATCH_DATA_VALUE_0 0xDFB91100
  546. #define A_BCM1480_SWTRC_MATCH_DATA_MASK_0 0xDFB91108
  547. #define A_BCM1480_SWTRC_MATCH_TAG_VALUE_0 0xDFB91200
  548. #define A_BCM1480_SWTRC_MATCH_TAG_MAKS_0 0xDFB91208
  549. #define A_BCM1480_SWTRC_EVENT_0 0xDFB91300
  550. #define A_BCM1480_SWTRC_SEQUENCE_0 0xDFB91400
  551. #define A_BCM1480_SWTRC_CFG 0xDFB91500
  552. #define A_BCM1480_SWTRC_READ 0xDFB91508
  553. #define A_BCM1480_SWDEBUG_SCHEDSTOP 0xDFB92000
  554. #define A_BCM1480_SWTRC_MATCH_CONTROL(x) (A_BCM1480_SWTRC_MATCH_CONTROL_0 + ((x)*8))
  555. #define A_BCM1480_SWTRC_EVENT(x) (A_BCM1480_SWTRC_EVENT_0 + ((x)*8))
  556. #define A_BCM1480_SWTRC_SEQUENCE(x) (A_BCM1480_SWTRC_SEQUENCE_0 + ((x)*8))
  557. #define A_BCM1480_SWTRC_MATCH_DATA_VALUE(x) (A_BCM1480_SWTRC_MATCH_DATA_VALUE_0 + ((x)*16))
  558. #define A_BCM1480_SWTRC_MATCH_DATA_MASK(x) (A_BCM1480_SWTRC_MATCH_DATA_MASK_0 + ((x)*16))
  559. #define A_BCM1480_SWTRC_MATCH_TAG_VALUE(x) (A_BCM1480_SWTRC_MATCH_TAG_VALUE_0 + ((x)*16))
  560. #define A_BCM1480_SWTRC_MATCH_TAG_MASK(x) (A_BCM1480_SWTRC_MATCH_TAG_MASK_0 + ((x)*16))
  561. /* *********************************************************************
  562. * High-Speed Port Registers (Section 13)
  563. ********************************************************************* */
  564. #define A_BCM1480_HSP_BASE_0 0x00DF810000
  565. #define A_BCM1480_HSP_BASE_1 0x00DF890000
  566. #define A_BCM1480_HSP_BASE_2 0x00DF910000
  567. #define BCM1480_HSP_REGISTER_SPACING 0x80000
  568. #define A_BCM1480_HSP_BASE(idx) (A_BCM1480_HSP_BASE_0 + ((idx)*BCM1480_HSP_REGISTER_SPACING))
  569. #define A_BCM1480_HSP_REGISTER(idx, reg) (A_BCM1480_HSP_BASE(idx) + (reg))
  570. #define R_BCM1480_HSP_RX_SPI4_CFG_0 0x0000000000
  571. #define R_BCM1480_HSP_RX_SPI4_CFG_1 0x0000000008
  572. #define R_BCM1480_HSP_RX_SPI4_DESKEW_OVERRIDE 0x0000000010
  573. #define R_BCM1480_HSP_RX_SPI4_DESKEW_DATAPATH 0x0000000018
  574. #define R_BCM1480_HSP_RX_SPI4_PORT_INT_EN 0x0000000020
  575. #define R_BCM1480_HSP_RX_SPI4_PORT_INT_STATUS 0x0000000028
  576. #define R_BCM1480_HSP_RX_SPI4_CALENDAR_0 0x0000000200
  577. #define R_BCM1480_HSP_RX_SPI4_CALENDAR_1 0x0000000208
  578. #define R_BCM1480_HSP_RX_PLL_CNFG 0x0000000800
  579. #define R_BCM1480_HSP_RX_CALIBRATION 0x0000000808
  580. #define R_BCM1480_HSP_RX_TEST 0x0000000810
  581. #define R_BCM1480_HSP_RX_DIAG_DETAILS 0x0000000818
  582. #define R_BCM1480_HSP_RX_DIAG_CRC_0 0x0000000820
  583. #define R_BCM1480_HSP_RX_DIAG_CRC_1 0x0000000828
  584. #define R_BCM1480_HSP_RX_DIAG_HTCMD 0x0000000830
  585. #define R_BCM1480_HSP_RX_DIAG_PKTCTL 0x0000000838
  586. #define R_BCM1480_HSP_RX_VIS_FLCTRL_COUNTER 0x0000000870
  587. #define R_BCM1480_HSP_RX_PKT_RAMALLOC_0 0x0000020020
  588. #define R_BCM1480_HSP_RX_PKT_RAMALLOC_1 0x0000020028
  589. #define R_BCM1480_HSP_RX_PKT_RAMALLOC_2 0x0000020030
  590. #define R_BCM1480_HSP_RX_PKT_RAMALLOC_3 0x0000020038
  591. #define R_BCM1480_HSP_RX_PKT_RAMALLOC_4 0x0000020040
  592. #define R_BCM1480_HSP_RX_PKT_RAMALLOC_5 0x0000020048
  593. #define R_BCM1480_HSP_RX_PKT_RAMALLOC_6 0x0000020050
  594. #define R_BCM1480_HSP_RX_PKT_RAMALLOC_7 0x0000020058
  595. #define R_BCM1480_HSP_RX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_RX_PKT_RAMALLOC_0 + 8*(idx))
  596. /* XXX Following registers were shuffled. Renamed/renumbered per errata. */
  597. #define R_BCM1480_HSP_RX_HT_RAMALLOC_0 0x0000020078
  598. #define R_BCM1480_HSP_RX_HT_RAMALLOC_1 0x0000020080
  599. #define R_BCM1480_HSP_RX_HT_RAMALLOC_2 0x0000020088
  600. #define R_BCM1480_HSP_RX_HT_RAMALLOC_3 0x0000020090
  601. #define R_BCM1480_HSP_RX_HT_RAMALLOC_4 0x0000020098
  602. #define R_BCM1480_HSP_RX_HT_RAMALLOC_5 0x00000200A0
  603. #define R_BCM1480_HSP_RX_SPI_WATERMARK_0 0x00000200B0
  604. #define R_BCM1480_HSP_RX_SPI_WATERMARK_1 0x00000200B8
  605. #define R_BCM1480_HSP_RX_SPI_WATERMARK_2 0x00000200C0
  606. #define R_BCM1480_HSP_RX_SPI_WATERMARK_3 0x00000200C8
  607. #define R_BCM1480_HSP_RX_SPI_WATERMARK_4 0x00000200D0
  608. #define R_BCM1480_HSP_RX_SPI_WATERMARK_5 0x00000200D8
  609. #define R_BCM1480_HSP_RX_SPI_WATERMARK_6 0x00000200E0
  610. #define R_BCM1480_HSP_RX_SPI_WATERMARK_7 0x00000200E8
  611. #define R_BCM1480_HSP_RX_SPI_WATERMARK(idx) (R_BCM1480_HSP_RX_SPI_WATERMARK_0 + 8*(idx))
  612. #define R_BCM1480_HSP_RX_VIS_CMDQ_0 0x00000200F0
  613. #define R_BCM1480_HSP_RX_VIS_CMDQ_1 0x00000200F8
  614. #define R_BCM1480_HSP_RX_VIS_CMDQ_2 0x0000020100
  615. #define R_BCM1480_HSP_RX_RAM_READCTL 0x0000020108
  616. #define R_BCM1480_HSP_RX_RAM_READWINDOW 0x0000020110
  617. #define R_BCM1480_HSP_RX_RF_READCTL 0x0000020118
  618. #define R_BCM1480_HSP_RX_RF_READWINDOW 0x0000020120
  619. #define R_BCM1480_HSP_TX_SPI4_CFG_0 0x0000040000
  620. #define R_BCM1480_HSP_TX_SPI4_CFG_1 0x0000040008
  621. #define R_BCM1480_HSP_TX_SPI4_TRAINING_FMT 0x0000040010
  622. #define R_BCM1480_HSP_TX_PKT_RAMALLOC_0 0x0000040020
  623. #define R_BCM1480_HSP_TX_PKT_RAMALLOC_1 0x0000040028
  624. #define R_BCM1480_HSP_TX_PKT_RAMALLOC_2 0x0000040030
  625. #define R_BCM1480_HSP_TX_PKT_RAMALLOC_3 0x0000040038
  626. #define R_BCM1480_HSP_TX_PKT_RAMALLOC_4 0x0000040040
  627. #define R_BCM1480_HSP_TX_PKT_RAMALLOC_5 0x0000040048
  628. #define R_BCM1480_HSP_TX_PKT_RAMALLOC_6 0x0000040050
  629. #define R_BCM1480_HSP_TX_PKT_RAMALLOC_7 0x0000040058
  630. #define R_BCM1480_HSP_TX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_TX_PKT_RAMALLOC_0 + 8*(idx))
  631. #define R_BCM1480_HSP_TX_NPC_RAMALLOC 0x0000040078
  632. #define R_BCM1480_HSP_TX_RSP_RAMALLOC 0x0000040080
  633. #define R_BCM1480_HSP_TX_PC_RAMALLOC 0x0000040088
  634. #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_0 0x0000040090
  635. #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_1 0x0000040098
  636. #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_2 0x00000400A0
  637. #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_0 0x00000400B0
  638. #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_1 0x00000400B8
  639. #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_2 0x00000400C0
  640. #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_3 0x00000400C8
  641. #define R_BCM1480_HSP_TX_PKT_RXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_RXPHITCNT_0 + 8*(idx))
  642. #define R_BCM1480_HSP_TX_HTIO_RXPHITCNT 0x00000400D0
  643. #define R_BCM1480_HSP_TX_HTCC_RXPHITCNT 0x00000400D8
  644. #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 0x00000400E0
  645. #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_1 0x00000400E8
  646. #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_2 0x00000400F0
  647. #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_3 0x00000400F8
  648. #define R_BCM1480_HSP_TX_PKT_TXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 + 8*(idx))
  649. #define R_BCM1480_HSP_TX_HTIO_TXPHITCNT 0x0000040100
  650. #define R_BCM1480_HSP_TX_HTCC_TXPHITCNT 0x0000040108
  651. #define R_BCM1480_HSP_TX_SPI4_CALENDAR_0 0x0000040200
  652. #define R_BCM1480_HSP_TX_SPI4_CALENDAR_1 0x0000040208
  653. #define R_BCM1480_HSP_TX_PLL_CNFG 0x0000040800
  654. #define R_BCM1480_HSP_TX_CALIBRATION 0x0000040808
  655. #define R_BCM1480_HSP_TX_TEST 0x0000040810
  656. #define R_BCM1480_HSP_TX_VIS_CMDQ_0 0x0000040840
  657. #define R_BCM1480_HSP_TX_VIS_CMDQ_1 0x0000040848
  658. #define R_BCM1480_HSP_TX_VIS_CMDQ_2 0x0000040850
  659. #define R_BCM1480_HSP_TX_RAM_READCTL 0x0000040860
  660. #define R_BCM1480_HSP_TX_RAM_READWINDOW 0x0000040868
  661. #define R_BCM1480_HSP_TX_RF_READCTL 0x0000040870
  662. #define R_BCM1480_HSP_TX_RF_READWINDOW 0x0000040878
  663. #define R_BCM1480_HSP_TX_SPI4_PORT_INT_STATUS 0x0000040880
  664. #define R_BCM1480_HSP_TX_SPI4_PORT_INT_EN 0x0000040888
  665. #define R_BCM1480_HSP_TX_NEXT_ADDR_BASE 0x000040400
  666. #define R_BCM1480_HSP_TX_NEXT_ADDR_REGISTER(x) (R_BCM1480_HSP_TX_NEXT_ADDR_BASE+ 8*(x))
  667. /* *********************************************************************
  668. * Physical Address Map (Table 10 and Figure 7)
  669. ********************************************************************* */
  670. #define A_BCM1480_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000)
  671. #define A_BCM1480_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024))
  672. #define A_BCM1480_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000)
  673. #define A_BCM1480_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000)
  674. #define A_BCM1480_PHYS_GENBUS _SB_MAKE64(0x0010090000)
  675. #define A_BCM1480_PHYS_GENBUS_END _SB_MAKE64(0x0028000000)
  676. #define A_BCM1480_PHYS_PCI_MISC_MATCH_BYTES _SB_MAKE64(0x0028000000)
  677. #define A_BCM1480_PHYS_PCI_IACK_MATCH_BYTES _SB_MAKE64(0x0029000000)
  678. #define A_BCM1480_PHYS_PCI_IO_MATCH_BYTES _SB_MAKE64(0x002C000000)
  679. #define A_BCM1480_PHYS_PCI_CFG_MATCH_BYTES _SB_MAKE64(0x002E000000)
  680. #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BYTES _SB_MAKE64(0x002F000000)
  681. #define A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES _SB_MAKE64(0x0030000000)
  682. #define A_BCM1480_PHYS_HT_MEM_MATCH_BYTES _SB_MAKE64(0x0040000000)
  683. #define A_BCM1480_PHYS_HT_MEM_MATCH_BITS _SB_MAKE64(0x0060000000)
  684. #define A_BCM1480_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000)
  685. #define A_BCM1480_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000)
  686. #define A_BCM1480_PHYS_PCI_MISC_MATCH_BITS _SB_MAKE64(0x00A8000000)
  687. #define A_BCM1480_PHYS_PCI_IACK_MATCH_BITS _SB_MAKE64(0x00A9000000)
  688. #define A_BCM1480_PHYS_PCI_IO_MATCH_BITS _SB_MAKE64(0x00AC000000)
  689. #define A_BCM1480_PHYS_PCI_CFG_MATCH_BITS _SB_MAKE64(0x00AE000000)
  690. #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BITS _SB_MAKE64(0x00AF000000)
  691. #define A_BCM1480_PHYS_PCI_MEM_MATCH_BITS _SB_MAKE64(0x00B0000000)
  692. #define A_BCM1480_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000)
  693. #define A_BCM1480_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000)
  694. #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000)
  695. #define A_BCM1480_PHYS_HT_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000)
  696. #define A_BCM1480_PHYS_HT_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000)
  697. #define A_BCM1480_PHYS_HS_SUBSYS _SB_MAKE64(0x00DF000000)
  698. #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000)
  699. #define A_BCM1480_PHYS_HT_IO_MATCH_BITS _SB_MAKE64(0x00FC000000)
  700. #define A_BCM1480_PHYS_HT_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000)
  701. #define A_BCM1480_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000)
  702. #define A_BCM1480_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024))
  703. #define A_BCM1480_PHYS_PCI_UPPER _SB_MAKE64(0x1000000000)
  704. #define A_BCM1480_PHYS_HT_UPPER_MATCH_BYTES _SB_MAKE64(0x2000000000)
  705. #define A_BCM1480_PHYS_HT_UPPER_MATCH_BITS _SB_MAKE64(0x3000000000)
  706. #define A_BCM1480_PHYS_HT_NODE_ALIAS _SB_MAKE64(0x4000000000)
  707. #define A_BCM1480_PHYS_HT_FULLACCESS _SB_MAKE64(0xF000000000)
  708. /* *********************************************************************
  709. * L2 Cache as RAM (Table 54)
  710. ********************************************************************* */
  711. #define A_BCM1480_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000)
  712. #define BCM1480_PHYS_L2CACHE_NUM_WAYS 8
  713. #define A_BCM1480_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000100000)
  714. #define A_BCM1480_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0300000)
  715. #define A_BCM1480_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D0320000)
  716. #define A_BCM1480_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D0340000)
  717. #define A_BCM1480_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D0360000)
  718. #define A_BCM1480_PHYS_L2CACHE_WAY4 _SB_MAKE64(0x00D0380000)
  719. #define A_BCM1480_PHYS_L2CACHE_WAY5 _SB_MAKE64(0x00D03A0000)
  720. #define A_BCM1480_PHYS_L2CACHE_WAY6 _SB_MAKE64(0x00D03C0000)
  721. #define A_BCM1480_PHYS_L2CACHE_WAY7 _SB_MAKE64(0x00D03E0000)
  722. #endif /* _BCM1480_REGS_H */