18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* ********************************************************************* 38c2ecf20Sopenharmony_ci * SB1250 Board Support Package 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Register Definitions File: sb1250_regs.h 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This module contains the addresses of the on-chip peripherals 88c2ecf20Sopenharmony_ci * on the SB1250. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * SB1250 specification level: 01/02/2002 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci ********************************************************************* 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * Copyright 2000,2001,2002,2003 158c2ecf20Sopenharmony_ci * Broadcom Corporation. All rights reserved. 168c2ecf20Sopenharmony_ci * 178c2ecf20Sopenharmony_ci ********************************************************************* */ 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#ifndef _SB1250_REGS_H 218c2ecf20Sopenharmony_ci#define _SB1250_REGS_H 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#include <asm/sibyte/sb1250_defs.h> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/* ********************************************************************* 278c2ecf20Sopenharmony_ci * Some general notes: 288c2ecf20Sopenharmony_ci * 298c2ecf20Sopenharmony_ci * For the most part, when there is more than one peripheral 308c2ecf20Sopenharmony_ci * of the same type on the SOC, the constants below will be 318c2ecf20Sopenharmony_ci * offsets from the base of each peripheral. For example, 328c2ecf20Sopenharmony_ci * the MAC registers are described as offsets from the first 338c2ecf20Sopenharmony_ci * MAC register, and there will be a MAC_REGISTER() macro 348c2ecf20Sopenharmony_ci * to calculate the base address of a given MAC. 358c2ecf20Sopenharmony_ci * 368c2ecf20Sopenharmony_ci * The information in this file is based on the SB1250 SOC 378c2ecf20Sopenharmony_ci * manual version 0.2, July 2000. 388c2ecf20Sopenharmony_ci ********************************************************************* */ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* ********************************************************************* 428c2ecf20Sopenharmony_ci * Memory Controller Registers 438c2ecf20Sopenharmony_ci ********************************************************************* */ 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci/* 468c2ecf20Sopenharmony_ci * XXX: can't remove MC base 0 if 112x, since it's used by other macros, 478c2ecf20Sopenharmony_ci * since there is one reg there (but it could get its addr/offset constant). 488c2ecf20Sopenharmony_ci */ 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ 518c2ecf20Sopenharmony_ci#define A_MC_BASE_0 0x0010051000 528c2ecf20Sopenharmony_ci#define A_MC_BASE_1 0x0010052000 538c2ecf20Sopenharmony_ci#define MC_REGISTER_SPACING 0x1000 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#define A_MC_BASE(ctlid) ((ctlid)*MC_REGISTER_SPACING+A_MC_BASE_0) 568c2ecf20Sopenharmony_ci#define A_MC_REGISTER(ctlid, reg) (A_MC_BASE(ctlid)+(reg)) 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci#define R_MC_CONFIG 0x0000000100 598c2ecf20Sopenharmony_ci#define R_MC_DRAMCMD 0x0000000120 608c2ecf20Sopenharmony_ci#define R_MC_DRAMMODE 0x0000000140 618c2ecf20Sopenharmony_ci#define R_MC_TIMING1 0x0000000160 628c2ecf20Sopenharmony_ci#define R_MC_TIMING2 0x0000000180 638c2ecf20Sopenharmony_ci#define R_MC_CS_START 0x00000001A0 648c2ecf20Sopenharmony_ci#define R_MC_CS_END 0x00000001C0 658c2ecf20Sopenharmony_ci#define R_MC_CS_INTERLEAVE 0x00000001E0 668c2ecf20Sopenharmony_ci#define S_MC_CS_STARTEND 16 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#define R_MC_CSX_BASE 0x0000000200 698c2ecf20Sopenharmony_ci#define R_MC_CSX_ROW 0x0000000000 /* relative to CSX_BASE, above */ 708c2ecf20Sopenharmony_ci#define R_MC_CSX_COL 0x0000000020 /* relative to CSX_BASE, above */ 718c2ecf20Sopenharmony_ci#define R_MC_CSX_BA 0x0000000040 /* relative to CSX_BASE, above */ 728c2ecf20Sopenharmony_ci#define MC_CSX_SPACING 0x0000000060 /* relative to CSX_BASE, above */ 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci#define R_MC_CS0_ROW 0x0000000200 758c2ecf20Sopenharmony_ci#define R_MC_CS0_COL 0x0000000220 768c2ecf20Sopenharmony_ci#define R_MC_CS0_BA 0x0000000240 778c2ecf20Sopenharmony_ci#define R_MC_CS1_ROW 0x0000000260 788c2ecf20Sopenharmony_ci#define R_MC_CS1_COL 0x0000000280 798c2ecf20Sopenharmony_ci#define R_MC_CS1_BA 0x00000002A0 808c2ecf20Sopenharmony_ci#define R_MC_CS2_ROW 0x00000002C0 818c2ecf20Sopenharmony_ci#define R_MC_CS2_COL 0x00000002E0 828c2ecf20Sopenharmony_ci#define R_MC_CS2_BA 0x0000000300 838c2ecf20Sopenharmony_ci#define R_MC_CS3_ROW 0x0000000320 848c2ecf20Sopenharmony_ci#define R_MC_CS3_COL 0x0000000340 858c2ecf20Sopenharmony_ci#define R_MC_CS3_BA 0x0000000360 868c2ecf20Sopenharmony_ci#define R_MC_CS_ATTR 0x0000000380 878c2ecf20Sopenharmony_ci#define R_MC_TEST_DATA 0x0000000400 888c2ecf20Sopenharmony_ci#define R_MC_TEST_ECC 0x0000000420 898c2ecf20Sopenharmony_ci#define R_MC_MCLK_CFG 0x0000000500 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci#endif /* 1250 & 112x */ 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci/* ********************************************************************* 948c2ecf20Sopenharmony_ci * L2 Cache Control Registers 958c2ecf20Sopenharmony_ci ********************************************************************* */ 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE_1250_112x /* This L2C only on 1250/112x */ 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci#define A_L2_READ_TAG 0x0010040018 1008c2ecf20Sopenharmony_ci#define A_L2_ECC_TAG 0x0010040038 1018c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 1028c2ecf20Sopenharmony_ci#define A_L2_READ_MISC 0x0010040058 1038c2ecf20Sopenharmony_ci#endif /* 1250 PASS3 || 112x PASS1 */ 1048c2ecf20Sopenharmony_ci#define A_L2_WAY_DISABLE 0x0010041000 1058c2ecf20Sopenharmony_ci#define A_L2_MAKEDISABLE(x) (A_L2_WAY_DISABLE | (((~(x))&0x0F) << 8)) 1068c2ecf20Sopenharmony_ci#define A_L2_MGMT_TAG_BASE 0x00D0000000 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 1098c2ecf20Sopenharmony_ci#define A_L2_CACHE_DISABLE 0x0010042000 1108c2ecf20Sopenharmony_ci#define A_L2_MAKECACHEDISABLE(x) (A_L2_CACHE_DISABLE | (((x)&0x0F) << 8)) 1118c2ecf20Sopenharmony_ci#define A_L2_MISC_CONFIG 0x0010043000 1128c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 */ 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci/* Backward-compatibility definitions. */ 1158c2ecf20Sopenharmony_ci/* XXX: discourage people from using these constants. */ 1168c2ecf20Sopenharmony_ci#define A_L2_READ_ADDRESS A_L2_READ_TAG 1178c2ecf20Sopenharmony_ci#define A_L2_EEC_ADDRESS A_L2_ECC_TAG 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci#endif 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci/* ********************************************************************* 1238c2ecf20Sopenharmony_ci * PCI Interface Registers 1248c2ecf20Sopenharmony_ci ********************************************************************* */ 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE_1250_112x /* This PCI/HT only on 1250/112x */ 1278c2ecf20Sopenharmony_ci#define A_PCI_TYPE00_HEADER 0x00DE000000 1288c2ecf20Sopenharmony_ci#define A_PCI_TYPE01_HEADER 0x00DE000800 1298c2ecf20Sopenharmony_ci#endif 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci/* ********************************************************************* 1338c2ecf20Sopenharmony_ci * Ethernet DMA and MACs 1348c2ecf20Sopenharmony_ci ********************************************************************* */ 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci#define A_MAC_BASE_0 0x0010064000 1378c2ecf20Sopenharmony_ci#define A_MAC_BASE_1 0x0010065000 1388c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE_CHIP(1250) 1398c2ecf20Sopenharmony_ci#define A_MAC_BASE_2 0x0010066000 1408c2ecf20Sopenharmony_ci#endif /* 1250 */ 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci#define MAC_SPACING 0x1000 1438c2ecf20Sopenharmony_ci#define MAC_DMA_TXRX_SPACING 0x0400 1448c2ecf20Sopenharmony_ci#define MAC_DMA_CHANNEL_SPACING 0x0100 1458c2ecf20Sopenharmony_ci#define DMA_RX 0 1468c2ecf20Sopenharmony_ci#define DMA_TX 1 1478c2ecf20Sopenharmony_ci#define MAC_NUM_DMACHAN 2 /* channels per direction */ 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci/* XXX: not correct; depends on SOC type. */ 1508c2ecf20Sopenharmony_ci#define MAC_NUM_PORTS 3 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci#define A_MAC_CHANNEL_BASE(macnum) \ 1538c2ecf20Sopenharmony_ci (A_MAC_BASE_0 + \ 1548c2ecf20Sopenharmony_ci MAC_SPACING*(macnum)) 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci#define A_MAC_REGISTER(macnum,reg) \ 1578c2ecf20Sopenharmony_ci (A_MAC_BASE_0 + \ 1588c2ecf20Sopenharmony_ci MAC_SPACING*(macnum) + (reg)) 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci#define R_MAC_DMA_CHANNELS 0x800 /* Relative to A_MAC_CHANNEL_BASE */ 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci#define A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) \ 1648c2ecf20Sopenharmony_ci ((A_MAC_CHANNEL_BASE(macnum)) + \ 1658c2ecf20Sopenharmony_ci R_MAC_DMA_CHANNELS + \ 1668c2ecf20Sopenharmony_ci (MAC_DMA_TXRX_SPACING*(txrx)) + \ 1678c2ecf20Sopenharmony_ci (MAC_DMA_CHANNEL_SPACING*(chan))) 1688c2ecf20Sopenharmony_ci 1698c2ecf20Sopenharmony_ci#define R_MAC_DMA_CHANNEL_BASE(txrx, chan) \ 1708c2ecf20Sopenharmony_ci (R_MAC_DMA_CHANNELS + \ 1718c2ecf20Sopenharmony_ci (MAC_DMA_TXRX_SPACING*(txrx)) + \ 1728c2ecf20Sopenharmony_ci (MAC_DMA_CHANNEL_SPACING*(chan))) 1738c2ecf20Sopenharmony_ci 1748c2ecf20Sopenharmony_ci#define A_MAC_DMA_REGISTER(macnum, txrx, chan, reg) \ 1758c2ecf20Sopenharmony_ci (A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) + \ 1768c2ecf20Sopenharmony_ci (reg)) 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci#define R_MAC_DMA_REGISTER(txrx, chan, reg) \ 1798c2ecf20Sopenharmony_ci (R_MAC_DMA_CHANNEL_BASE(txrx, chan) + \ 1808c2ecf20Sopenharmony_ci (reg)) 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ci/* 1838c2ecf20Sopenharmony_ci * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE 1848c2ecf20Sopenharmony_ci */ 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci#define R_MAC_DMA_CONFIG0 0x00000000 1878c2ecf20Sopenharmony_ci#define R_MAC_DMA_CONFIG1 0x00000008 1888c2ecf20Sopenharmony_ci#define R_MAC_DMA_DSCR_BASE 0x00000010 1898c2ecf20Sopenharmony_ci#define R_MAC_DMA_DSCR_CNT 0x00000018 1908c2ecf20Sopenharmony_ci#define R_MAC_DMA_CUR_DSCRA 0x00000020 1918c2ecf20Sopenharmony_ci#define R_MAC_DMA_CUR_DSCRB 0x00000028 1928c2ecf20Sopenharmony_ci#define R_MAC_DMA_CUR_DSCRADDR 0x00000030 1938c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 1948c2ecf20Sopenharmony_ci#define R_MAC_DMA_OODPKTLOST_RX 0x00000038 /* rx only */ 1958c2ecf20Sopenharmony_ci#endif /* 1250 PASS3 || 112x PASS1 */ 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci/* 1988c2ecf20Sopenharmony_ci * RMON Counters 1998c2ecf20Sopenharmony_ci */ 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ci#define R_MAC_RMON_TX_BYTES 0x00000000 2028c2ecf20Sopenharmony_ci#define R_MAC_RMON_COLLISIONS 0x00000008 2038c2ecf20Sopenharmony_ci#define R_MAC_RMON_LATE_COL 0x00000010 2048c2ecf20Sopenharmony_ci#define R_MAC_RMON_EX_COL 0x00000018 2058c2ecf20Sopenharmony_ci#define R_MAC_RMON_FCS_ERROR 0x00000020 2068c2ecf20Sopenharmony_ci#define R_MAC_RMON_TX_ABORT 0x00000028 2078c2ecf20Sopenharmony_ci/* Counter #6 (0x30) now reserved */ 2088c2ecf20Sopenharmony_ci#define R_MAC_RMON_TX_BAD 0x00000038 2098c2ecf20Sopenharmony_ci#define R_MAC_RMON_TX_GOOD 0x00000040 2108c2ecf20Sopenharmony_ci#define R_MAC_RMON_TX_RUNT 0x00000048 2118c2ecf20Sopenharmony_ci#define R_MAC_RMON_TX_OVERSIZE 0x00000050 2128c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_BYTES 0x00000080 2138c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_MCAST 0x00000088 2148c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_BCAST 0x00000090 2158c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_BAD 0x00000098 2168c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_GOOD 0x000000A0 2178c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_RUNT 0x000000A8 2188c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_OVERSIZE 0x000000B0 2198c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_FCS_ERROR 0x000000B8 2208c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_LENGTH_ERROR 0x000000C0 2218c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_CODE_ERROR 0x000000C8 2228c2ecf20Sopenharmony_ci#define R_MAC_RMON_RX_ALIGN_ERROR 0x000000D0 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci/* Updated to spec 0.2 */ 2258c2ecf20Sopenharmony_ci#define R_MAC_CFG 0x00000100 2268c2ecf20Sopenharmony_ci#define R_MAC_THRSH_CFG 0x00000108 2278c2ecf20Sopenharmony_ci#define R_MAC_VLANTAG 0x00000110 2288c2ecf20Sopenharmony_ci#define R_MAC_FRAMECFG 0x00000118 2298c2ecf20Sopenharmony_ci#define R_MAC_EOPCNT 0x00000120 2308c2ecf20Sopenharmony_ci#define R_MAC_FIFO_PTRS 0x00000128 2318c2ecf20Sopenharmony_ci#define R_MAC_ADFILTER_CFG 0x00000200 2328c2ecf20Sopenharmony_ci#define R_MAC_ETHERNET_ADDR 0x00000208 2338c2ecf20Sopenharmony_ci#define R_MAC_PKT_TYPE 0x00000210 2348c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 2358c2ecf20Sopenharmony_ci#define R_MAC_ADMASK0 0x00000218 2368c2ecf20Sopenharmony_ci#define R_MAC_ADMASK1 0x00000220 2378c2ecf20Sopenharmony_ci#endif /* 1250 PASS3 || 112x PASS1 || 1480 */ 2388c2ecf20Sopenharmony_ci#define R_MAC_HASH_BASE 0x00000240 2398c2ecf20Sopenharmony_ci#define R_MAC_ADDR_BASE 0x00000280 2408c2ecf20Sopenharmony_ci#define R_MAC_CHLO0_BASE 0x00000300 2418c2ecf20Sopenharmony_ci#define R_MAC_CHUP0_BASE 0x00000320 2428c2ecf20Sopenharmony_ci#define R_MAC_ENABLE 0x00000400 2438c2ecf20Sopenharmony_ci#define R_MAC_STATUS 0x00000408 2448c2ecf20Sopenharmony_ci#define R_MAC_INT_MASK 0x00000410 2458c2ecf20Sopenharmony_ci#define R_MAC_TXD_CTL 0x00000420 2468c2ecf20Sopenharmony_ci#define R_MAC_MDIO 0x00000428 2478c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 2488c2ecf20Sopenharmony_ci#define R_MAC_STATUS1 0x00000430 2498c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 || 1480 */ 2508c2ecf20Sopenharmony_ci#define R_MAC_DEBUG_STATUS 0x00000448 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_ci#define MAC_HASH_COUNT 8 2538c2ecf20Sopenharmony_ci#define MAC_ADDR_COUNT 8 2548c2ecf20Sopenharmony_ci#define MAC_CHMAP_COUNT 4 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci/* ********************************************************************* 2588c2ecf20Sopenharmony_ci * DUART Registers 2598c2ecf20Sopenharmony_ci ********************************************************************* */ 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ 2638c2ecf20Sopenharmony_ci#define R_DUART_NUM_PORTS 2 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci#define A_DUART 0x0010060000 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci#define DUART_CHANREG_SPACING 0x100 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_ci#define A_DUART_CHANREG(chan, reg) \ 2708c2ecf20Sopenharmony_ci (A_DUART + DUART_CHANREG_SPACING * ((chan) + 1) + (reg)) 2718c2ecf20Sopenharmony_ci#endif /* 1250 & 112x */ 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_ci#define R_DUART_MODE_REG_1 0x000 2748c2ecf20Sopenharmony_ci#define R_DUART_MODE_REG_2 0x010 2758c2ecf20Sopenharmony_ci#define R_DUART_STATUS 0x020 2768c2ecf20Sopenharmony_ci#define R_DUART_CLK_SEL 0x030 2778c2ecf20Sopenharmony_ci#define R_DUART_CMD 0x050 2788c2ecf20Sopenharmony_ci#define R_DUART_RX_HOLD 0x060 2798c2ecf20Sopenharmony_ci#define R_DUART_TX_HOLD 0x070 2808c2ecf20Sopenharmony_ci 2818c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 2828c2ecf20Sopenharmony_ci#define R_DUART_FULL_CTL 0x040 2838c2ecf20Sopenharmony_ci#define R_DUART_OPCR_X 0x080 2848c2ecf20Sopenharmony_ci#define R_DUART_AUXCTL_X 0x090 2858c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 || 1480 */ 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_ci/* 2898c2ecf20Sopenharmony_ci * The IMR and ISR can't be addressed with A_DUART_CHANREG, 2908c2ecf20Sopenharmony_ci * so use these macros instead. 2918c2ecf20Sopenharmony_ci */ 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ 2948c2ecf20Sopenharmony_ci#define DUART_IMRISR_SPACING 0x20 2958c2ecf20Sopenharmony_ci#define DUART_INCHNG_SPACING 0x10 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci#define A_DUART_CTRLREG(reg) \ 2988c2ecf20Sopenharmony_ci (A_DUART + DUART_CHANREG_SPACING * 3 + (reg)) 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_ci#define R_DUART_IMRREG(chan) \ 3018c2ecf20Sopenharmony_ci (R_DUART_IMR_A + (chan) * DUART_IMRISR_SPACING) 3028c2ecf20Sopenharmony_ci#define R_DUART_ISRREG(chan) \ 3038c2ecf20Sopenharmony_ci (R_DUART_ISR_A + (chan) * DUART_IMRISR_SPACING) 3048c2ecf20Sopenharmony_ci#define R_DUART_INCHREG(chan) \ 3058c2ecf20Sopenharmony_ci (R_DUART_IN_CHNG_A + (chan) * DUART_INCHNG_SPACING) 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci#define A_DUART_IMRREG(chan) A_DUART_CTRLREG(R_DUART_IMRREG(chan)) 3088c2ecf20Sopenharmony_ci#define A_DUART_ISRREG(chan) A_DUART_CTRLREG(R_DUART_ISRREG(chan)) 3098c2ecf20Sopenharmony_ci#define A_DUART_INCHREG(chan) A_DUART_CTRLREG(R_DUART_INCHREG(chan)) 3108c2ecf20Sopenharmony_ci#endif /* 1250 & 112x */ 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_ci#define R_DUART_AUX_CTRL 0x010 3138c2ecf20Sopenharmony_ci#define R_DUART_ISR_A 0x020 3148c2ecf20Sopenharmony_ci#define R_DUART_IMR_A 0x030 3158c2ecf20Sopenharmony_ci#define R_DUART_ISR_B 0x040 3168c2ecf20Sopenharmony_ci#define R_DUART_IMR_B 0x050 3178c2ecf20Sopenharmony_ci#define R_DUART_OUT_PORT 0x060 3188c2ecf20Sopenharmony_ci#define R_DUART_OPCR 0x070 3198c2ecf20Sopenharmony_ci#define R_DUART_IN_PORT 0x080 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ci#define R_DUART_SET_OPR 0x0B0 3228c2ecf20Sopenharmony_ci#define R_DUART_CLEAR_OPR 0x0C0 3238c2ecf20Sopenharmony_ci#define R_DUART_IN_CHNG_A 0x0D0 3248c2ecf20Sopenharmony_ci#define R_DUART_IN_CHNG_B 0x0E0 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ci 3278c2ecf20Sopenharmony_ci/* 3288c2ecf20Sopenharmony_ci * These constants are the absolute addresses. 3298c2ecf20Sopenharmony_ci */ 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci#define A_DUART_MODE_REG_1_A 0x0010060100 3328c2ecf20Sopenharmony_ci#define A_DUART_MODE_REG_2_A 0x0010060110 3338c2ecf20Sopenharmony_ci#define A_DUART_STATUS_A 0x0010060120 3348c2ecf20Sopenharmony_ci#define A_DUART_CLK_SEL_A 0x0010060130 3358c2ecf20Sopenharmony_ci#define A_DUART_CMD_A 0x0010060150 3368c2ecf20Sopenharmony_ci#define A_DUART_RX_HOLD_A 0x0010060160 3378c2ecf20Sopenharmony_ci#define A_DUART_TX_HOLD_A 0x0010060170 3388c2ecf20Sopenharmony_ci 3398c2ecf20Sopenharmony_ci#define A_DUART_MODE_REG_1_B 0x0010060200 3408c2ecf20Sopenharmony_ci#define A_DUART_MODE_REG_2_B 0x0010060210 3418c2ecf20Sopenharmony_ci#define A_DUART_STATUS_B 0x0010060220 3428c2ecf20Sopenharmony_ci#define A_DUART_CLK_SEL_B 0x0010060230 3438c2ecf20Sopenharmony_ci#define A_DUART_CMD_B 0x0010060250 3448c2ecf20Sopenharmony_ci#define A_DUART_RX_HOLD_B 0x0010060260 3458c2ecf20Sopenharmony_ci#define A_DUART_TX_HOLD_B 0x0010060270 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci#define A_DUART_INPORT_CHNG 0x0010060300 3488c2ecf20Sopenharmony_ci#define A_DUART_AUX_CTRL 0x0010060310 3498c2ecf20Sopenharmony_ci#define A_DUART_ISR_A 0x0010060320 3508c2ecf20Sopenharmony_ci#define A_DUART_IMR_A 0x0010060330 3518c2ecf20Sopenharmony_ci#define A_DUART_ISR_B 0x0010060340 3528c2ecf20Sopenharmony_ci#define A_DUART_IMR_B 0x0010060350 3538c2ecf20Sopenharmony_ci#define A_DUART_OUT_PORT 0x0010060360 3548c2ecf20Sopenharmony_ci#define A_DUART_OPCR 0x0010060370 3558c2ecf20Sopenharmony_ci#define A_DUART_IN_PORT 0x0010060380 3568c2ecf20Sopenharmony_ci#define A_DUART_ISR 0x0010060390 3578c2ecf20Sopenharmony_ci#define A_DUART_IMR 0x00100603A0 3588c2ecf20Sopenharmony_ci#define A_DUART_SET_OPR 0x00100603B0 3598c2ecf20Sopenharmony_ci#define A_DUART_CLEAR_OPR 0x00100603C0 3608c2ecf20Sopenharmony_ci#define A_DUART_INPORT_CHNG_A 0x00100603D0 3618c2ecf20Sopenharmony_ci#define A_DUART_INPORT_CHNG_B 0x00100603E0 3628c2ecf20Sopenharmony_ci 3638c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 3648c2ecf20Sopenharmony_ci#define A_DUART_FULL_CTL_A 0x0010060140 3658c2ecf20Sopenharmony_ci#define A_DUART_FULL_CTL_B 0x0010060240 3668c2ecf20Sopenharmony_ci 3678c2ecf20Sopenharmony_ci#define A_DUART_OPCR_A 0x0010060180 3688c2ecf20Sopenharmony_ci#define A_DUART_OPCR_B 0x0010060280 3698c2ecf20Sopenharmony_ci 3708c2ecf20Sopenharmony_ci#define A_DUART_INPORT_CHNG_DEBUG 0x00100603F0 3718c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 */ 3728c2ecf20Sopenharmony_ci 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_ci/* ********************************************************************* 3758c2ecf20Sopenharmony_ci * Synchronous Serial Registers 3768c2ecf20Sopenharmony_ci ********************************************************************* */ 3778c2ecf20Sopenharmony_ci 3788c2ecf20Sopenharmony_ci 3798c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE_1250_112x /* sync serial only on 1250/112x */ 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_ci#define A_SER_BASE_0 0x0010060400 3828c2ecf20Sopenharmony_ci#define A_SER_BASE_1 0x0010060800 3838c2ecf20Sopenharmony_ci#define SER_SPACING 0x400 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_ci#define SER_DMA_TXRX_SPACING 0x80 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_ci#define SER_NUM_PORTS 2 3888c2ecf20Sopenharmony_ci 3898c2ecf20Sopenharmony_ci#define A_SER_CHANNEL_BASE(sernum) \ 3908c2ecf20Sopenharmony_ci (A_SER_BASE_0 + \ 3918c2ecf20Sopenharmony_ci SER_SPACING*(sernum)) 3928c2ecf20Sopenharmony_ci 3938c2ecf20Sopenharmony_ci#define A_SER_REGISTER(sernum,reg) \ 3948c2ecf20Sopenharmony_ci (A_SER_BASE_0 + \ 3958c2ecf20Sopenharmony_ci SER_SPACING*(sernum) + (reg)) 3968c2ecf20Sopenharmony_ci 3978c2ecf20Sopenharmony_ci 3988c2ecf20Sopenharmony_ci#define R_SER_DMA_CHANNELS 0 /* Relative to A_SER_BASE_x */ 3998c2ecf20Sopenharmony_ci 4008c2ecf20Sopenharmony_ci#define A_SER_DMA_CHANNEL_BASE(sernum,txrx) \ 4018c2ecf20Sopenharmony_ci ((A_SER_CHANNEL_BASE(sernum)) + \ 4028c2ecf20Sopenharmony_ci R_SER_DMA_CHANNELS + \ 4038c2ecf20Sopenharmony_ci (SER_DMA_TXRX_SPACING*(txrx))) 4048c2ecf20Sopenharmony_ci 4058c2ecf20Sopenharmony_ci#define A_SER_DMA_REGISTER(sernum, txrx, reg) \ 4068c2ecf20Sopenharmony_ci (A_SER_DMA_CHANNEL_BASE(sernum, txrx) + \ 4078c2ecf20Sopenharmony_ci (reg)) 4088c2ecf20Sopenharmony_ci 4098c2ecf20Sopenharmony_ci 4108c2ecf20Sopenharmony_ci/* 4118c2ecf20Sopenharmony_ci * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE 4128c2ecf20Sopenharmony_ci */ 4138c2ecf20Sopenharmony_ci 4148c2ecf20Sopenharmony_ci#define R_SER_DMA_CONFIG0 0x00000000 4158c2ecf20Sopenharmony_ci#define R_SER_DMA_CONFIG1 0x00000008 4168c2ecf20Sopenharmony_ci#define R_SER_DMA_DSCR_BASE 0x00000010 4178c2ecf20Sopenharmony_ci#define R_SER_DMA_DSCR_CNT 0x00000018 4188c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCRA 0x00000020 4198c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCRB 0x00000028 4208c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCRADDR 0x00000030 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_ci#define R_SER_DMA_CONFIG0_RX 0x00000000 4238c2ecf20Sopenharmony_ci#define R_SER_DMA_CONFIG1_RX 0x00000008 4248c2ecf20Sopenharmony_ci#define R_SER_DMA_DSCR_BASE_RX 0x00000010 4258c2ecf20Sopenharmony_ci#define R_SER_DMA_DSCR_COUNT_RX 0x00000018 4268c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCR_A_RX 0x00000020 4278c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCR_B_RX 0x00000028 4288c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCR_ADDR_RX 0x00000030 4298c2ecf20Sopenharmony_ci 4308c2ecf20Sopenharmony_ci#define R_SER_DMA_CONFIG0_TX 0x00000080 4318c2ecf20Sopenharmony_ci#define R_SER_DMA_CONFIG1_TX 0x00000088 4328c2ecf20Sopenharmony_ci#define R_SER_DMA_DSCR_BASE_TX 0x00000090 4338c2ecf20Sopenharmony_ci#define R_SER_DMA_DSCR_COUNT_TX 0x00000098 4348c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCR_A_TX 0x000000A0 4358c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCR_B_TX 0x000000A8 4368c2ecf20Sopenharmony_ci#define R_SER_DMA_CUR_DSCR_ADDR_TX 0x000000B0 4378c2ecf20Sopenharmony_ci 4388c2ecf20Sopenharmony_ci#define R_SER_MODE 0x00000100 4398c2ecf20Sopenharmony_ci#define R_SER_MINFRM_SZ 0x00000108 4408c2ecf20Sopenharmony_ci#define R_SER_MAXFRM_SZ 0x00000110 4418c2ecf20Sopenharmony_ci#define R_SER_ADDR 0x00000118 4428c2ecf20Sopenharmony_ci#define R_SER_USR0_ADDR 0x00000120 4438c2ecf20Sopenharmony_ci#define R_SER_USR1_ADDR 0x00000128 4448c2ecf20Sopenharmony_ci#define R_SER_USR2_ADDR 0x00000130 4458c2ecf20Sopenharmony_ci#define R_SER_USR3_ADDR 0x00000138 4468c2ecf20Sopenharmony_ci#define R_SER_CMD 0x00000140 4478c2ecf20Sopenharmony_ci#define R_SER_TX_RD_THRSH 0x00000160 4488c2ecf20Sopenharmony_ci#define R_SER_TX_WR_THRSH 0x00000168 4498c2ecf20Sopenharmony_ci#define R_SER_RX_RD_THRSH 0x00000170 4508c2ecf20Sopenharmony_ci#define R_SER_LINE_MODE 0x00000178 4518c2ecf20Sopenharmony_ci#define R_SER_DMA_ENABLE 0x00000180 4528c2ecf20Sopenharmony_ci#define R_SER_INT_MASK 0x00000190 4538c2ecf20Sopenharmony_ci#define R_SER_STATUS 0x00000188 4548c2ecf20Sopenharmony_ci#define R_SER_STATUS_DEBUG 0x000001A8 4558c2ecf20Sopenharmony_ci#define R_SER_RX_TABLE_BASE 0x00000200 4568c2ecf20Sopenharmony_ci#define SER_RX_TABLE_COUNT 16 4578c2ecf20Sopenharmony_ci#define R_SER_TX_TABLE_BASE 0x00000300 4588c2ecf20Sopenharmony_ci#define SER_TX_TABLE_COUNT 16 4598c2ecf20Sopenharmony_ci 4608c2ecf20Sopenharmony_ci/* RMON Counters */ 4618c2ecf20Sopenharmony_ci#define R_SER_RMON_TX_BYTE_LO 0x000001C0 4628c2ecf20Sopenharmony_ci#define R_SER_RMON_TX_BYTE_HI 0x000001C8 4638c2ecf20Sopenharmony_ci#define R_SER_RMON_RX_BYTE_LO 0x000001D0 4648c2ecf20Sopenharmony_ci#define R_SER_RMON_RX_BYTE_HI 0x000001D8 4658c2ecf20Sopenharmony_ci#define R_SER_RMON_TX_UNDERRUN 0x000001E0 4668c2ecf20Sopenharmony_ci#define R_SER_RMON_RX_OVERFLOW 0x000001E8 4678c2ecf20Sopenharmony_ci#define R_SER_RMON_RX_ERRORS 0x000001F0 4688c2ecf20Sopenharmony_ci#define R_SER_RMON_RX_BADADDR 0x000001F8 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_ci#endif /* 1250/112x */ 4718c2ecf20Sopenharmony_ci 4728c2ecf20Sopenharmony_ci/* ********************************************************************* 4738c2ecf20Sopenharmony_ci * Generic Bus Registers 4748c2ecf20Sopenharmony_ci ********************************************************************* */ 4758c2ecf20Sopenharmony_ci 4768c2ecf20Sopenharmony_ci#define IO_EXT_CFG_COUNT 8 4778c2ecf20Sopenharmony_ci 4788c2ecf20Sopenharmony_ci#define A_IO_EXT_BASE 0x0010061000 4798c2ecf20Sopenharmony_ci#define A_IO_EXT_REG(r) (A_IO_EXT_BASE + (r)) 4808c2ecf20Sopenharmony_ci 4818c2ecf20Sopenharmony_ci#define A_IO_EXT_CFG_BASE 0x0010061000 4828c2ecf20Sopenharmony_ci#define A_IO_EXT_MULT_SIZE_BASE 0x0010061100 4838c2ecf20Sopenharmony_ci#define A_IO_EXT_START_ADDR_BASE 0x0010061200 4848c2ecf20Sopenharmony_ci#define A_IO_EXT_TIME_CFG0_BASE 0x0010061600 4858c2ecf20Sopenharmony_ci#define A_IO_EXT_TIME_CFG1_BASE 0x0010061700 4868c2ecf20Sopenharmony_ci 4878c2ecf20Sopenharmony_ci#define IO_EXT_REGISTER_SPACING 8 4888c2ecf20Sopenharmony_ci#define A_IO_EXT_CS_BASE(cs) (A_IO_EXT_CFG_BASE+IO_EXT_REGISTER_SPACING*(cs)) 4898c2ecf20Sopenharmony_ci#define R_IO_EXT_REG(reg, cs) ((cs)*IO_EXT_REGISTER_SPACING + (reg)) 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_ci#define R_IO_EXT_CFG 0x0000 4928c2ecf20Sopenharmony_ci#define R_IO_EXT_MULT_SIZE 0x0100 4938c2ecf20Sopenharmony_ci#define R_IO_EXT_START_ADDR 0x0200 4948c2ecf20Sopenharmony_ci#define R_IO_EXT_TIME_CFG0 0x0600 4958c2ecf20Sopenharmony_ci#define R_IO_EXT_TIME_CFG1 0x0700 4968c2ecf20Sopenharmony_ci 4978c2ecf20Sopenharmony_ci 4988c2ecf20Sopenharmony_ci#define A_IO_INTERRUPT_STATUS 0x0010061A00 4998c2ecf20Sopenharmony_ci#define A_IO_INTERRUPT_DATA0 0x0010061A10 5008c2ecf20Sopenharmony_ci#define A_IO_INTERRUPT_DATA1 0x0010061A18 5018c2ecf20Sopenharmony_ci#define A_IO_INTERRUPT_DATA2 0x0010061A20 5028c2ecf20Sopenharmony_ci#define A_IO_INTERRUPT_DATA3 0x0010061A28 5038c2ecf20Sopenharmony_ci#define A_IO_INTERRUPT_ADDR0 0x0010061A30 5048c2ecf20Sopenharmony_ci#define A_IO_INTERRUPT_ADDR1 0x0010061A40 5058c2ecf20Sopenharmony_ci#define A_IO_INTERRUPT_PARITY 0x0010061A50 5068c2ecf20Sopenharmony_ci#define A_IO_PCMCIA_CFG 0x0010061A60 5078c2ecf20Sopenharmony_ci#define A_IO_PCMCIA_STATUS 0x0010061A70 5088c2ecf20Sopenharmony_ci#define A_IO_DRIVE_0 0x0010061300 5098c2ecf20Sopenharmony_ci#define A_IO_DRIVE_1 0x0010061308 5108c2ecf20Sopenharmony_ci#define A_IO_DRIVE_2 0x0010061310 5118c2ecf20Sopenharmony_ci#define A_IO_DRIVE_3 0x0010061318 5128c2ecf20Sopenharmony_ci#define A_IO_DRIVE_BASE A_IO_DRIVE_0 5138c2ecf20Sopenharmony_ci#define IO_DRIVE_REGISTER_SPACING 8 5148c2ecf20Sopenharmony_ci#define R_IO_DRIVE(x) ((x)*IO_DRIVE_REGISTER_SPACING) 5158c2ecf20Sopenharmony_ci#define A_IO_DRIVE(x) (A_IO_DRIVE_BASE + R_IO_DRIVE(x)) 5168c2ecf20Sopenharmony_ci 5178c2ecf20Sopenharmony_ci#define R_IO_INTERRUPT_STATUS 0x0A00 5188c2ecf20Sopenharmony_ci#define R_IO_INTERRUPT_DATA0 0x0A10 5198c2ecf20Sopenharmony_ci#define R_IO_INTERRUPT_DATA1 0x0A18 5208c2ecf20Sopenharmony_ci#define R_IO_INTERRUPT_DATA2 0x0A20 5218c2ecf20Sopenharmony_ci#define R_IO_INTERRUPT_DATA3 0x0A28 5228c2ecf20Sopenharmony_ci#define R_IO_INTERRUPT_ADDR0 0x0A30 5238c2ecf20Sopenharmony_ci#define R_IO_INTERRUPT_ADDR1 0x0A40 5248c2ecf20Sopenharmony_ci#define R_IO_INTERRUPT_PARITY 0x0A50 5258c2ecf20Sopenharmony_ci#define R_IO_PCMCIA_CFG 0x0A60 5268c2ecf20Sopenharmony_ci#define R_IO_PCMCIA_STATUS 0x0A70 5278c2ecf20Sopenharmony_ci 5288c2ecf20Sopenharmony_ci/* ********************************************************************* 5298c2ecf20Sopenharmony_ci * GPIO Registers 5308c2ecf20Sopenharmony_ci ********************************************************************* */ 5318c2ecf20Sopenharmony_ci 5328c2ecf20Sopenharmony_ci#define A_GPIO_CLR_EDGE 0x0010061A80 5338c2ecf20Sopenharmony_ci#define A_GPIO_INT_TYPE 0x0010061A88 5348c2ecf20Sopenharmony_ci#define A_GPIO_INPUT_INVERT 0x0010061A90 5358c2ecf20Sopenharmony_ci#define A_GPIO_GLITCH 0x0010061A98 5368c2ecf20Sopenharmony_ci#define A_GPIO_READ 0x0010061AA0 5378c2ecf20Sopenharmony_ci#define A_GPIO_DIRECTION 0x0010061AA8 5388c2ecf20Sopenharmony_ci#define A_GPIO_PIN_CLR 0x0010061AB0 5398c2ecf20Sopenharmony_ci#define A_GPIO_PIN_SET 0x0010061AB8 5408c2ecf20Sopenharmony_ci 5418c2ecf20Sopenharmony_ci#define A_GPIO_BASE 0x0010061A80 5428c2ecf20Sopenharmony_ci 5438c2ecf20Sopenharmony_ci#define R_GPIO_CLR_EDGE 0x00 5448c2ecf20Sopenharmony_ci#define R_GPIO_INT_TYPE 0x08 5458c2ecf20Sopenharmony_ci#define R_GPIO_INPUT_INVERT 0x10 5468c2ecf20Sopenharmony_ci#define R_GPIO_GLITCH 0x18 5478c2ecf20Sopenharmony_ci#define R_GPIO_READ 0x20 5488c2ecf20Sopenharmony_ci#define R_GPIO_DIRECTION 0x28 5498c2ecf20Sopenharmony_ci#define R_GPIO_PIN_CLR 0x30 5508c2ecf20Sopenharmony_ci#define R_GPIO_PIN_SET 0x38 5518c2ecf20Sopenharmony_ci 5528c2ecf20Sopenharmony_ci/* ********************************************************************* 5538c2ecf20Sopenharmony_ci * SMBus Registers 5548c2ecf20Sopenharmony_ci ********************************************************************* */ 5558c2ecf20Sopenharmony_ci 5568c2ecf20Sopenharmony_ci#define A_SMB_XTRA_0 0x0010060000 5578c2ecf20Sopenharmony_ci#define A_SMB_XTRA_1 0x0010060008 5588c2ecf20Sopenharmony_ci#define A_SMB_FREQ_0 0x0010060010 5598c2ecf20Sopenharmony_ci#define A_SMB_FREQ_1 0x0010060018 5608c2ecf20Sopenharmony_ci#define A_SMB_STATUS_0 0x0010060020 5618c2ecf20Sopenharmony_ci#define A_SMB_STATUS_1 0x0010060028 5628c2ecf20Sopenharmony_ci#define A_SMB_CMD_0 0x0010060030 5638c2ecf20Sopenharmony_ci#define A_SMB_CMD_1 0x0010060038 5648c2ecf20Sopenharmony_ci#define A_SMB_START_0 0x0010060040 5658c2ecf20Sopenharmony_ci#define A_SMB_START_1 0x0010060048 5668c2ecf20Sopenharmony_ci#define A_SMB_DATA_0 0x0010060050 5678c2ecf20Sopenharmony_ci#define A_SMB_DATA_1 0x0010060058 5688c2ecf20Sopenharmony_ci#define A_SMB_CONTROL_0 0x0010060060 5698c2ecf20Sopenharmony_ci#define A_SMB_CONTROL_1 0x0010060068 5708c2ecf20Sopenharmony_ci#define A_SMB_PEC_0 0x0010060070 5718c2ecf20Sopenharmony_ci#define A_SMB_PEC_1 0x0010060078 5728c2ecf20Sopenharmony_ci 5738c2ecf20Sopenharmony_ci#define A_SMB_0 0x0010060000 5748c2ecf20Sopenharmony_ci#define A_SMB_1 0x0010060008 5758c2ecf20Sopenharmony_ci#define SMB_REGISTER_SPACING 0x8 5768c2ecf20Sopenharmony_ci#define A_SMB_BASE(idx) (A_SMB_0+(idx)*SMB_REGISTER_SPACING) 5778c2ecf20Sopenharmony_ci#define A_SMB_REGISTER(idx, reg) (A_SMB_BASE(idx)+(reg)) 5788c2ecf20Sopenharmony_ci 5798c2ecf20Sopenharmony_ci#define R_SMB_XTRA 0x0000000000 5808c2ecf20Sopenharmony_ci#define R_SMB_FREQ 0x0000000010 5818c2ecf20Sopenharmony_ci#define R_SMB_STATUS 0x0000000020 5828c2ecf20Sopenharmony_ci#define R_SMB_CMD 0x0000000030 5838c2ecf20Sopenharmony_ci#define R_SMB_START 0x0000000040 5848c2ecf20Sopenharmony_ci#define R_SMB_DATA 0x0000000050 5858c2ecf20Sopenharmony_ci#define R_SMB_CONTROL 0x0000000060 5868c2ecf20Sopenharmony_ci#define R_SMB_PEC 0x0000000070 5878c2ecf20Sopenharmony_ci 5888c2ecf20Sopenharmony_ci/* ********************************************************************* 5898c2ecf20Sopenharmony_ci * Timer Registers 5908c2ecf20Sopenharmony_ci ********************************************************************* */ 5918c2ecf20Sopenharmony_ci 5928c2ecf20Sopenharmony_ci/* 5938c2ecf20Sopenharmony_ci * Watchdog timers 5948c2ecf20Sopenharmony_ci */ 5958c2ecf20Sopenharmony_ci 5968c2ecf20Sopenharmony_ci#define A_SCD_WDOG_0 0x0010020050 5978c2ecf20Sopenharmony_ci#define A_SCD_WDOG_1 0x0010020150 5988c2ecf20Sopenharmony_ci#define SCD_WDOG_SPACING 0x100 5998c2ecf20Sopenharmony_ci#define SCD_NUM_WDOGS 2 6008c2ecf20Sopenharmony_ci#define A_SCD_WDOG_BASE(w) (A_SCD_WDOG_0+SCD_WDOG_SPACING*(w)) 6018c2ecf20Sopenharmony_ci#define A_SCD_WDOG_REGISTER(w, r) (A_SCD_WDOG_BASE(w) + (r)) 6028c2ecf20Sopenharmony_ci 6038c2ecf20Sopenharmony_ci#define R_SCD_WDOG_INIT 0x0000000000 6048c2ecf20Sopenharmony_ci#define R_SCD_WDOG_CNT 0x0000000008 6058c2ecf20Sopenharmony_ci#define R_SCD_WDOG_CFG 0x0000000010 6068c2ecf20Sopenharmony_ci 6078c2ecf20Sopenharmony_ci#define A_SCD_WDOG_INIT_0 0x0010020050 6088c2ecf20Sopenharmony_ci#define A_SCD_WDOG_CNT_0 0x0010020058 6098c2ecf20Sopenharmony_ci#define A_SCD_WDOG_CFG_0 0x0010020060 6108c2ecf20Sopenharmony_ci 6118c2ecf20Sopenharmony_ci#define A_SCD_WDOG_INIT_1 0x0010020150 6128c2ecf20Sopenharmony_ci#define A_SCD_WDOG_CNT_1 0x0010020158 6138c2ecf20Sopenharmony_ci#define A_SCD_WDOG_CFG_1 0x0010020160 6148c2ecf20Sopenharmony_ci 6158c2ecf20Sopenharmony_ci/* 6168c2ecf20Sopenharmony_ci * Generic timers 6178c2ecf20Sopenharmony_ci */ 6188c2ecf20Sopenharmony_ci 6198c2ecf20Sopenharmony_ci#define A_SCD_TIMER_0 0x0010020070 6208c2ecf20Sopenharmony_ci#define A_SCD_TIMER_1 0x0010020078 6218c2ecf20Sopenharmony_ci#define A_SCD_TIMER_2 0x0010020170 6228c2ecf20Sopenharmony_ci#define A_SCD_TIMER_3 0x0010020178 6238c2ecf20Sopenharmony_ci#define SCD_NUM_TIMERS 4 6248c2ecf20Sopenharmony_ci#define A_SCD_TIMER_BASE(w) (A_SCD_TIMER_0+0x08*((w)&1)+0x100*(((w)&2)>>1)) 6258c2ecf20Sopenharmony_ci#define A_SCD_TIMER_REGISTER(w, r) (A_SCD_TIMER_BASE(w) + (r)) 6268c2ecf20Sopenharmony_ci 6278c2ecf20Sopenharmony_ci#define R_SCD_TIMER_INIT 0x0000000000 6288c2ecf20Sopenharmony_ci#define R_SCD_TIMER_CNT 0x0000000010 6298c2ecf20Sopenharmony_ci#define R_SCD_TIMER_CFG 0x0000000020 6308c2ecf20Sopenharmony_ci 6318c2ecf20Sopenharmony_ci#define A_SCD_TIMER_INIT_0 0x0010020070 6328c2ecf20Sopenharmony_ci#define A_SCD_TIMER_CNT_0 0x0010020080 6338c2ecf20Sopenharmony_ci#define A_SCD_TIMER_CFG_0 0x0010020090 6348c2ecf20Sopenharmony_ci 6358c2ecf20Sopenharmony_ci#define A_SCD_TIMER_INIT_1 0x0010020078 6368c2ecf20Sopenharmony_ci#define A_SCD_TIMER_CNT_1 0x0010020088 6378c2ecf20Sopenharmony_ci#define A_SCD_TIMER_CFG_1 0x0010020098 6388c2ecf20Sopenharmony_ci 6398c2ecf20Sopenharmony_ci#define A_SCD_TIMER_INIT_2 0x0010020170 6408c2ecf20Sopenharmony_ci#define A_SCD_TIMER_CNT_2 0x0010020180 6418c2ecf20Sopenharmony_ci#define A_SCD_TIMER_CFG_2 0x0010020190 6428c2ecf20Sopenharmony_ci 6438c2ecf20Sopenharmony_ci#define A_SCD_TIMER_INIT_3 0x0010020178 6448c2ecf20Sopenharmony_ci#define A_SCD_TIMER_CNT_3 0x0010020188 6458c2ecf20Sopenharmony_ci#define A_SCD_TIMER_CFG_3 0x0010020198 6468c2ecf20Sopenharmony_ci 6478c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 6488c2ecf20Sopenharmony_ci#define A_SCD_SCRATCH 0x0010020C10 6498c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 */ 6508c2ecf20Sopenharmony_ci 6518c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 6528c2ecf20Sopenharmony_ci#define A_SCD_ZBBUS_CYCLE_COUNT 0x0010030000 6538c2ecf20Sopenharmony_ci#define A_SCD_ZBBUS_CYCLE_CP0 0x0010020C00 6548c2ecf20Sopenharmony_ci#define A_SCD_ZBBUS_CYCLE_CP1 0x0010020C08 6558c2ecf20Sopenharmony_ci#endif 6568c2ecf20Sopenharmony_ci 6578c2ecf20Sopenharmony_ci/* ********************************************************************* 6588c2ecf20Sopenharmony_ci * System Control Registers 6598c2ecf20Sopenharmony_ci ********************************************************************* */ 6608c2ecf20Sopenharmony_ci 6618c2ecf20Sopenharmony_ci#define A_SCD_SYSTEM_REVISION 0x0010020000 6628c2ecf20Sopenharmony_ci#define A_SCD_SYSTEM_CFG 0x0010020008 6638c2ecf20Sopenharmony_ci#define A_SCD_SYSTEM_MANUF 0x0010038000 6648c2ecf20Sopenharmony_ci 6658c2ecf20Sopenharmony_ci/* ********************************************************************* 6668c2ecf20Sopenharmony_ci * System Address Trap Registers 6678c2ecf20Sopenharmony_ci ********************************************************************* */ 6688c2ecf20Sopenharmony_ci 6698c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_INDEX 0x00100200B0 6708c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_REG 0x00100200B8 6718c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_UP_0 0x0010020400 6728c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_UP_1 0x0010020408 6738c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_UP_2 0x0010020410 6748c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_UP_3 0x0010020418 6758c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_DOWN_0 0x0010020420 6768c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_DOWN_1 0x0010020428 6778c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_DOWN_2 0x0010020430 6788c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_DOWN_3 0x0010020438 6798c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_CFG_0 0x0010020440 6808c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_CFG_1 0x0010020448 6818c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_CFG_2 0x0010020450 6828c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_CFG_3 0x0010020458 6838c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 6848c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_REG_DEBUG 0x0010020460 6858c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 || 1480 */ 6868c2ecf20Sopenharmony_ci 6878c2ecf20Sopenharmony_ci#define ADDR_TRAP_SPACING 8 6888c2ecf20Sopenharmony_ci#define NUM_ADDR_TRAP 4 6898c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_UP(n) (A_ADDR_TRAP_UP_0 + ((n) * ADDR_TRAP_SPACING)) 6908c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_DOWN(n) (A_ADDR_TRAP_DOWN_0 + ((n) * ADDR_TRAP_SPACING)) 6918c2ecf20Sopenharmony_ci#define A_ADDR_TRAP_CFG(n) (A_ADDR_TRAP_CFG_0 + ((n) * ADDR_TRAP_SPACING)) 6928c2ecf20Sopenharmony_ci 6938c2ecf20Sopenharmony_ci 6948c2ecf20Sopenharmony_ci/* ********************************************************************* 6958c2ecf20Sopenharmony_ci * System Interrupt Mapper Registers 6968c2ecf20Sopenharmony_ci ********************************************************************* */ 6978c2ecf20Sopenharmony_ci 6988c2ecf20Sopenharmony_ci#define A_IMR_CPU0_BASE 0x0010020000 6998c2ecf20Sopenharmony_ci#define A_IMR_CPU1_BASE 0x0010022000 7008c2ecf20Sopenharmony_ci#define IMR_REGISTER_SPACING 0x2000 7018c2ecf20Sopenharmony_ci#define IMR_REGISTER_SPACING_SHIFT 13 7028c2ecf20Sopenharmony_ci 7038c2ecf20Sopenharmony_ci#define A_IMR_MAPPER(cpu) (A_IMR_CPU0_BASE+(cpu)*IMR_REGISTER_SPACING) 7048c2ecf20Sopenharmony_ci#define A_IMR_REGISTER(cpu, reg) (A_IMR_MAPPER(cpu)+(reg)) 7058c2ecf20Sopenharmony_ci 7068c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_DIAG 0x0010 7078c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_LDT 0x0018 7088c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_MASK 0x0028 7098c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_TRACE 0x0038 7108c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_SOURCE_STATUS 0x0040 7118c2ecf20Sopenharmony_ci#define R_IMR_LDT_INTERRUPT_SET 0x0048 7128c2ecf20Sopenharmony_ci#define R_IMR_LDT_INTERRUPT 0x0018 7138c2ecf20Sopenharmony_ci#define R_IMR_LDT_INTERRUPT_CLR 0x0020 7148c2ecf20Sopenharmony_ci#define R_IMR_MAILBOX_CPU 0x00c0 7158c2ecf20Sopenharmony_ci#define R_IMR_ALIAS_MAILBOX_CPU 0x1000 7168c2ecf20Sopenharmony_ci#define R_IMR_MAILBOX_SET_CPU 0x00C8 7178c2ecf20Sopenharmony_ci#define R_IMR_ALIAS_MAILBOX_SET_CPU 0x1008 7188c2ecf20Sopenharmony_ci#define R_IMR_MAILBOX_CLR_CPU 0x00D0 7198c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_STATUS_BASE 0x0100 7208c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_STATUS_COUNT 7 7218c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_MAP_BASE 0x0200 7228c2ecf20Sopenharmony_ci#define R_IMR_INTERRUPT_MAP_COUNT 64 7238c2ecf20Sopenharmony_ci 7248c2ecf20Sopenharmony_ci/* 7258c2ecf20Sopenharmony_ci * these macros work together to build the address of a mailbox 7268c2ecf20Sopenharmony_ci * register, e.g., A_MAILBOX_REGISTER(R_IMR_MAILBOX_SET_CPU,1) 7278c2ecf20Sopenharmony_ci * for mbox_0_set_cpu2 returns 0x00100240C8 7288c2ecf20Sopenharmony_ci */ 7298c2ecf20Sopenharmony_ci#define A_MAILBOX_REGISTER(reg,cpu) \ 7308c2ecf20Sopenharmony_ci (A_IMR_CPU0_BASE + (cpu * IMR_REGISTER_SPACING) + reg) 7318c2ecf20Sopenharmony_ci 7328c2ecf20Sopenharmony_ci/* ********************************************************************* 7338c2ecf20Sopenharmony_ci * System Performance Counter Registers 7348c2ecf20Sopenharmony_ci ********************************************************************* */ 7358c2ecf20Sopenharmony_ci 7368c2ecf20Sopenharmony_ci#define A_SCD_PERF_CNT_CFG 0x00100204C0 7378c2ecf20Sopenharmony_ci#define A_SCD_PERF_CNT_0 0x00100204D0 7388c2ecf20Sopenharmony_ci#define A_SCD_PERF_CNT_1 0x00100204D8 7398c2ecf20Sopenharmony_ci#define A_SCD_PERF_CNT_2 0x00100204E0 7408c2ecf20Sopenharmony_ci#define A_SCD_PERF_CNT_3 0x00100204E8 7418c2ecf20Sopenharmony_ci 7428c2ecf20Sopenharmony_ci#define SCD_NUM_PERF_CNT 4 7438c2ecf20Sopenharmony_ci#define SCD_PERF_CNT_SPACING 8 7448c2ecf20Sopenharmony_ci#define A_SCD_PERF_CNT(n) (A_SCD_PERF_CNT_0+(n*SCD_PERF_CNT_SPACING)) 7458c2ecf20Sopenharmony_ci 7468c2ecf20Sopenharmony_ci/* ********************************************************************* 7478c2ecf20Sopenharmony_ci * System Bus Watcher Registers 7488c2ecf20Sopenharmony_ci ********************************************************************* */ 7498c2ecf20Sopenharmony_ci 7508c2ecf20Sopenharmony_ci#define A_SCD_BUS_ERR_STATUS 0x0010020880 7518c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 7528c2ecf20Sopenharmony_ci#define A_SCD_BUS_ERR_STATUS_DEBUG 0x00100208D0 7538c2ecf20Sopenharmony_ci#define A_BUS_ERR_STATUS_DEBUG 0x00100208D0 7548c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 */ 7558c2ecf20Sopenharmony_ci#define A_BUS_ERR_DATA_0 0x00100208A0 7568c2ecf20Sopenharmony_ci#define A_BUS_ERR_DATA_1 0x00100208A8 7578c2ecf20Sopenharmony_ci#define A_BUS_ERR_DATA_2 0x00100208B0 7588c2ecf20Sopenharmony_ci#define A_BUS_ERR_DATA_3 0x00100208B8 7598c2ecf20Sopenharmony_ci#define A_BUS_L2_ERRORS 0x00100208C0 7608c2ecf20Sopenharmony_ci#define A_BUS_MEM_IO_ERRORS 0x00100208C8 7618c2ecf20Sopenharmony_ci 7628c2ecf20Sopenharmony_ci/* ********************************************************************* 7638c2ecf20Sopenharmony_ci * System Debug Controller Registers 7648c2ecf20Sopenharmony_ci ********************************************************************* */ 7658c2ecf20Sopenharmony_ci 7668c2ecf20Sopenharmony_ci#define A_SCD_JTAG_BASE 0x0010000000 7678c2ecf20Sopenharmony_ci 7688c2ecf20Sopenharmony_ci/* ********************************************************************* 7698c2ecf20Sopenharmony_ci * System Trace Buffer Registers 7708c2ecf20Sopenharmony_ci ********************************************************************* */ 7718c2ecf20Sopenharmony_ci 7728c2ecf20Sopenharmony_ci#define A_SCD_TRACE_CFG 0x0010020A00 7738c2ecf20Sopenharmony_ci#define A_SCD_TRACE_READ 0x0010020A08 7748c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT_0 0x0010020A20 7758c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT_1 0x0010020A28 7768c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT_2 0x0010020A30 7778c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT_3 0x0010020A38 7788c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE_0 0x0010020A40 7798c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE_1 0x0010020A48 7808c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE_2 0x0010020A50 7818c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE_3 0x0010020A58 7828c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT_4 0x0010020A60 7838c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT_5 0x0010020A68 7848c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT_6 0x0010020A70 7858c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT_7 0x0010020A78 7868c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE_4 0x0010020A80 7878c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE_5 0x0010020A88 7888c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 7898c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 7908c2ecf20Sopenharmony_ci 7918c2ecf20Sopenharmony_ci#define TRACE_REGISTER_SPACING 8 7928c2ecf20Sopenharmony_ci#define TRACE_NUM_REGISTERS 8 7938c2ecf20Sopenharmony_ci#define A_SCD_TRACE_EVENT(n) (((n) & 4) ? \ 7948c2ecf20Sopenharmony_ci (A_SCD_TRACE_EVENT_4 + (((n) & 3) * TRACE_REGISTER_SPACING)) : \ 7958c2ecf20Sopenharmony_ci (A_SCD_TRACE_EVENT_0 + ((n) * TRACE_REGISTER_SPACING))) 7968c2ecf20Sopenharmony_ci#define A_SCD_TRACE_SEQUENCE(n) (((n) & 4) ? \ 7978c2ecf20Sopenharmony_ci (A_SCD_TRACE_SEQUENCE_4 + (((n) & 3) * TRACE_REGISTER_SPACING)) : \ 7988c2ecf20Sopenharmony_ci (A_SCD_TRACE_SEQUENCE_0 + ((n) * TRACE_REGISTER_SPACING))) 7998c2ecf20Sopenharmony_ci 8008c2ecf20Sopenharmony_ci/* ********************************************************************* 8018c2ecf20Sopenharmony_ci * System Generic DMA Registers 8028c2ecf20Sopenharmony_ci ********************************************************************* */ 8038c2ecf20Sopenharmony_ci 8048c2ecf20Sopenharmony_ci#define A_DM_0 0x0010020B00 8058c2ecf20Sopenharmony_ci#define A_DM_1 0x0010020B20 8068c2ecf20Sopenharmony_ci#define A_DM_2 0x0010020B40 8078c2ecf20Sopenharmony_ci#define A_DM_3 0x0010020B60 8088c2ecf20Sopenharmony_ci#define DM_REGISTER_SPACING 0x20 8098c2ecf20Sopenharmony_ci#define DM_NUM_CHANNELS 4 8108c2ecf20Sopenharmony_ci#define A_DM_BASE(idx) (A_DM_0 + ((idx) * DM_REGISTER_SPACING)) 8118c2ecf20Sopenharmony_ci#define A_DM_REGISTER(idx, reg) (A_DM_BASE(idx) + (reg)) 8128c2ecf20Sopenharmony_ci 8138c2ecf20Sopenharmony_ci#define R_DM_DSCR_BASE 0x0000000000 8148c2ecf20Sopenharmony_ci#define R_DM_DSCR_COUNT 0x0000000008 8158c2ecf20Sopenharmony_ci#define R_DM_CUR_DSCR_ADDR 0x0000000010 8168c2ecf20Sopenharmony_ci#define R_DM_DSCR_BASE_DEBUG 0x0000000018 8178c2ecf20Sopenharmony_ci 8188c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 8198c2ecf20Sopenharmony_ci#define A_DM_PARTIAL_0 0x0010020ba0 8208c2ecf20Sopenharmony_ci#define A_DM_PARTIAL_1 0x0010020ba8 8218c2ecf20Sopenharmony_ci#define A_DM_PARTIAL_2 0x0010020bb0 8228c2ecf20Sopenharmony_ci#define A_DM_PARTIAL_3 0x0010020bb8 8238c2ecf20Sopenharmony_ci#define DM_PARTIAL_REGISTER_SPACING 0x8 8248c2ecf20Sopenharmony_ci#define A_DM_PARTIAL(idx) (A_DM_PARTIAL_0 + ((idx) * DM_PARTIAL_REGISTER_SPACING)) 8258c2ecf20Sopenharmony_ci#endif /* 1250 PASS3 || 112x PASS1 */ 8268c2ecf20Sopenharmony_ci 8278c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 8288c2ecf20Sopenharmony_ci#define A_DM_CRC_0 0x0010020b80 8298c2ecf20Sopenharmony_ci#define A_DM_CRC_1 0x0010020b90 8308c2ecf20Sopenharmony_ci#define DM_CRC_REGISTER_SPACING 0x10 8318c2ecf20Sopenharmony_ci#define DM_CRC_NUM_CHANNELS 2 8328c2ecf20Sopenharmony_ci#define A_DM_CRC_BASE(idx) (A_DM_CRC_0 + ((idx) * DM_CRC_REGISTER_SPACING)) 8338c2ecf20Sopenharmony_ci#define A_DM_CRC_REGISTER(idx, reg) (A_DM_CRC_BASE(idx) + (reg)) 8348c2ecf20Sopenharmony_ci 8358c2ecf20Sopenharmony_ci#define R_CRC_DEF_0 0x00 8368c2ecf20Sopenharmony_ci#define R_CTCP_DEF_0 0x08 8378c2ecf20Sopenharmony_ci#endif /* 1250 PASS3 || 112x PASS1 */ 8388c2ecf20Sopenharmony_ci 8398c2ecf20Sopenharmony_ci/* ********************************************************************* 8408c2ecf20Sopenharmony_ci * Physical Address Map 8418c2ecf20Sopenharmony_ci ********************************************************************* */ 8428c2ecf20Sopenharmony_ci 8438c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE_1250_112x 8448c2ecf20Sopenharmony_ci#define A_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) 8458c2ecf20Sopenharmony_ci#define A_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) 8468c2ecf20Sopenharmony_ci#define A_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) 8478c2ecf20Sopenharmony_ci#define A_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) 8488c2ecf20Sopenharmony_ci#define A_PHYS_GENBUS _SB_MAKE64(0x0010090000) 8498c2ecf20Sopenharmony_ci#define A_PHYS_GENBUS_END _SB_MAKE64(0x0040000000) 8508c2ecf20Sopenharmony_ci#define A_PHYS_LDTPCI_IO_MATCH_BYTES_32 _SB_MAKE64(0x0040000000) 8518c2ecf20Sopenharmony_ci#define A_PHYS_LDTPCI_IO_MATCH_BITS_32 _SB_MAKE64(0x0060000000) 8528c2ecf20Sopenharmony_ci#define A_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) 8538c2ecf20Sopenharmony_ci#define A_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) 8548c2ecf20Sopenharmony_ci#define A_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) 8558c2ecf20Sopenharmony_ci#define A_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) 8568c2ecf20Sopenharmony_ci#define A_PHYS_LDT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) 8578c2ecf20Sopenharmony_ci#define A_PHYS_LDTPCI_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) 8588c2ecf20Sopenharmony_ci#define A_PHYS_LDTPCI_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) 8598c2ecf20Sopenharmony_ci#define A_PHYS_LDT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) 8608c2ecf20Sopenharmony_ci#define A_PHYS_LDTPCI_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) 8618c2ecf20Sopenharmony_ci#define A_PHYS_LDTPCI_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) 8628c2ecf20Sopenharmony_ci#define A_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) 8638c2ecf20Sopenharmony_ci#define A_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) 8648c2ecf20Sopenharmony_ci#define A_PHYS_LDT_EXP _SB_MAKE64(0x8000000000) 8658c2ecf20Sopenharmony_ci#define A_PHYS_PCI_FULLACCESS_BYTES _SB_MAKE64(0xF000000000) 8668c2ecf20Sopenharmony_ci#define A_PHYS_PCI_FULLACCESS_BITS _SB_MAKE64(0xF100000000) 8678c2ecf20Sopenharmony_ci#define A_PHYS_RESERVED _SB_MAKE64(0xF200000000) 8688c2ecf20Sopenharmony_ci#define A_PHYS_RESERVED_SPECIAL_LDT _SB_MAKE64(0xFD00000000) 8698c2ecf20Sopenharmony_ci 8708c2ecf20Sopenharmony_ci#define A_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) 8718c2ecf20Sopenharmony_ci#define PHYS_L2CACHE_NUM_WAYS 4 8728c2ecf20Sopenharmony_ci#define A_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000080000) 8738c2ecf20Sopenharmony_ci#define A_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0180000) 8748c2ecf20Sopenharmony_ci#define A_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D01A0000) 8758c2ecf20Sopenharmony_ci#define A_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D01C0000) 8768c2ecf20Sopenharmony_ci#define A_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D01E0000) 8778c2ecf20Sopenharmony_ci#endif 8788c2ecf20Sopenharmony_ci 8798c2ecf20Sopenharmony_ci 8808c2ecf20Sopenharmony_ci#endif 881