File indexing completed on 2025-05-11 08:23:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef __GEN83xx_HWREG_VALS_h
0035 #define __GEN83xx_HWREG_VALS_h
0036
0037 #include <mpc83xx/mpc83xx.h>
0038 #include <bsp.h>
0039
0040 #ifdef MPC83XX_HAS_NAND_LP_FLASH_ON_CS0
0041 #define MPC83XX_RCWHR_BOOT_DEVICE (RCWHR_ROMLOC_LB08 | RCWHR_RLEXT_NAND)
0042 #else
0043 #define MPC83XX_RCWHR_BOOT_DEVICE (RCWHR_ROMLOC_LB16 | RCWHR_RLEXT_LGCY)
0044 #endif
0045
0046
0047
0048
0049 #if defined(MPC83XX_BOARD_MPC8349EAMDS)
0050
0051
0052
0053
0054
0055
0056 #define GEN83xx_DUART_AVAIL_MASK 0x03
0057
0058
0059 #define NEED_LOW_LEVEL_INIT
0060
0061
0062
0063 #define BSP_CLKIN_FRQ 66000000L
0064 #define RCFG_SYSPLL_MF 4
0065 #define RCFG_COREPLL_MF 4
0066
0067
0068
0069
0070 #define RESET_CONF_WRD_L (RCWLR_LBIUCM_1_1 | \
0071 RCWLR_DDRCM_1_1 | \
0072 RCWLR_SPMF(RCFG_SYSPLL_MF) | \
0073 RCWLR_COREPLL(RCFG_COREPLL_MF))
0074
0075 #define RESET_CONF_WRD_H (RCWHR_PCI_HOST | \
0076 RCWHR_PCI_32 | \
0077 RCWHR_PCI1ARB_EN | \
0078 RCWHR_PCI2ARB_EN | \
0079 RCWHR_CORE_EN | \
0080 RCWHR_BMS_LOW | \
0081 RCWHR_BOOTSEQ_NONE | \
0082 RCWHR_SW_DIS | \
0083 MPC83XX_RCWHR_BOOT_DEVICE | \
0084 RCWHR_TSEC1M_GMII | \
0085 RCWHR_TSEC2M_GMII | \
0086 RCWHR_ENDIAN_BIG | \
0087 RCWHR_LALE_NORM | \
0088 RCWHR_LDP_PAR)
0089 #elif defined(MPC83XX_BOARD_HSC_CM01)
0090
0091
0092
0093
0094
0095
0096 #define GEN83xx_DUART_AVAIL_MASK 0x01
0097
0098
0099 #define NEED_LOW_LEVEL_INIT
0100
0101
0102
0103 #define BSP_CLKIN_FRQ 30000000L
0104 #define RCFG_SYSPLL_MF 11
0105 #define RCFG_COREPLL_MF 4
0106
0107
0108
0109 #define RESET_CONF_WRD_L (RCWLR_LBIUCM_1_1 | \
0110 RCWLR_DDRCM_1_1 | \
0111 RCWLR_SPMF(RCFG_SYSPLL_MF) | \
0112 RCWLR_COREPLL(RCFG_COREPLL_MF))
0113
0114 #define RESET_CONF_WRD_H (RCWHR_PCI_HOST | \
0115 RCWHR_PCI_32 | \
0116 RCWHR_PCI1ARB_DIS | \
0117 RCWHR_PCI2ARB_DIS | \
0118 RCWHR_CORE_EN | \
0119 RCWHR_BMS_LOW | \
0120 RCWHR_BOOTSEQ_NONE | \
0121 RCWHR_SW_DIS | \
0122 MPC83XX_RCWHR_BOOT_DEVICE | \
0123 RCWHR_TSEC1M_RGMII | \
0124 RCWHR_TSEC2M_GMII | \
0125 RCWHR_ENDIAN_BIG | \
0126 RCWHR_LALE_EARLY | \
0127 RCWHR_LDP_SPC)
0128
0129 #elif defined(MPC83XX_BOARD_BR_UID)
0130
0131
0132
0133
0134
0135
0136 #define GEN83xx_DUART_AVAIL_MASK 0x01
0137
0138
0139 #define NEED_LOW_LEVEL_INIT
0140
0141
0142
0143 #define BSP_CLKIN_FRQ 25000000L
0144 #define RCFG_SYSPLL_MF 5
0145 #define RCFG_COREPLL_MF 5
0146
0147
0148
0149 #define RESET_CONF_WRD_L \
0150 (RCWLR_LBIUCM_1_1 \
0151 | RCWLR_DDRCM_2_1 \
0152 | RCWLR_SPMF(RCFG_SYSPLL_MF) \
0153 | RCWLR_COREPLL(RCFG_COREPLL_MF) \
0154 | RCWLR_CEVCOD_1_2 \
0155 | RCWLR_CEPMF(8) \
0156 )
0157
0158 #define RESET_CONF_WRD_H (RCWHR_PCI_HOST | \
0159 RCWHR_PCI_32 | \
0160 RCWHR_PCI1ARB_DIS | \
0161 RCWHR_CORE_EN | \
0162 RCWHR_BMS_LOW | \
0163 RCWHR_BOOTSEQ_NONE | \
0164 RCWHR_SW_DIS | \
0165 MPC83XX_RCWHR_BOOT_DEVICE | \
0166 RCWHR_ENDIAN_BIG)
0167
0168 #elif defined( HAS_UBOOT)
0169
0170
0171
0172 #else
0173
0174 #error "board type not defined"
0175
0176 #endif
0177
0178 #if defined(MPC83XX_BOARD_MPC8349EAMDS)
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190
0191 #define LBLAWBAR0_VAL 0xFE000000
0192 #define LBLAWAR0_VAL 0x80000016
0193 #define LBLAWBAR1_VAL 0xF8000000
0194 #define LBLAWAR1_VAL 0x8000000E
0195 #define LBLAWBAR2_VAL 0xF0000000
0196 #define LBLAWAR2_VAL 0x80000019
0197 #define DDRLAWBAR0_VAL 0x00000000
0198 #define DDRLAWAR0_VAL 0x8000001B
0199
0200
0201
0202
0203 #define BR0_VAL 0xFE001001
0204 #define OR0_VAL 0xFF806FF7
0205 #define BR1_VAL 0xF8000801
0206 #define OR1_VAL 0xFFFFE8F0
0207 #define BR2_VAL 0xF0001861
0208 #define OR2_VAL 0xFC006901
0209
0210
0211
0212
0213 #define MRPTR_VAL 0x20000000
0214 #define LSRT_VAL 0x32000000
0215 #define LSDMR_VAL 0x4062D733
0216 #define LCRR_VAL 0x80000004
0217
0218
0219
0220
0221
0222 #define CS2_BNDS_VAL 0x00000007
0223 #define CS3_BNDS_VAL 0x0008000F
0224 #define CS2_CONFIG_VAL 0x80000101
0225 #define CS3_CONFIG_VAL 0x80000101
0226 #define TIMING_CFG_1_VAL 0x36333321
0227 #define TIMING_CFG_2_VAL 0x00000800
0228 #define DDR_SDRAM_CFG_VAL 0xC2000000
0229 #define DDR_SDRAM_MODE_VAL 0x00000022
0230 #define DDR_SDRAM_INTTVL_VAL 0x045B0100
0231 #define DDR_SDRAM_CLK_CNTL_VAL 0x00000000
0232
0233 #elif defined(MPC83XX_BOARD_HSC_CM01)
0234
0235
0236
0237
0238
0239
0240
0241
0242
0243 #define FPGA_CONFIG_START 0xF8000000
0244 #define FPGA_CONFIG_SIZE 0x01000000
0245
0246 #define FPGA_REGISTER_START 0xF9000000
0247 #define FPGA_REGISTER_SIZE 0x00800000
0248
0249 #define FPGA_FIFO_START 0xF9800000
0250 #define FPGA_FIFO_SIZE 0x00800000
0251
0252 #define FPGA_START (FPGA_CONFIG_START)
0253
0254 #define FPGA_SIZE (0x02000000)
0255 #define FPGA_END (FPGA_START+FPGA_SIZE-1)
0256
0257
0258
0259
0260
0261
0262 #define LBLAWBAR0_VAL bsp_rom_start
0263 #define LBLAWAR0_VAL 0x80000018
0264 #define LBLAWBAR1_VAL (FPGA_CONFIG_START)
0265 #define LBLAWAR1_VAL 0x80000018
0266 #define DDRLAWBAR0_VAL bsp_ram_start
0267 #define DDRLAWAR0_VAL 0x8000001B
0268
0269
0270
0271
0272 #define BR0_VAL (0xFE000000 | 0x01001)
0273 #define OR0_VAL 0xFE000E54
0274
0275 #define BR2_VAL (FPGA_CONFIG_START | 0x01881)
0276 #define OR2_VAL 0xFFFF9100
0277
0278
0279 #define BR3_VAL (FPGA_REGISTER_START | 0x018A1)
0280 #define OR3_VAL 0xFF801100
0281
0282
0283 #define BR4_VAL (FPGA_FIFO_START | 0x018C1)
0284 #define OR4_VAL 0xFF801100
0285
0286
0287
0288
0289 #define MRPTR_VAL 0x20000000
0290 #define LSRT_VAL 0x32000000
0291 #define LSDMR_VAL 0x4062D733
0292 #define LCRR_VAL 0x80010004
0293
0294
0295
0296
0297
0298 #define DDRCDR_VAL 0x00000001
0299 #define CS0_BNDS_VAL 0x0000000F
0300 #define CS0_CONFIG_VAL 0x80810102
0301 #define TIMING_CFG_0_VAL 0x00420802
0302 #define TIMING_CFG_1_VAL 0x3735A322
0303 #define TIMING_CFG_2_VAL 0x2F9044C7
0304 #define DDR_SDRAM_CFG_2_VAL 0x00401000
0305 #define DDR_SDRAM_MODE_VAL 0x44521632
0306 #define DDR_SDRAM_CLK_CNTL_VAL 0x01800000
0307 #define DDR_SDRAM_CFG_VAL 0x63000008
0308
0309 #define DDR_ERR_DISABLE_VAL 0x0000008D
0310 #define DDR_ERR_DISABLE_VAL2 0x00000089
0311 #define DDR_SDRAM_DATA_INIT_VAL 0xC01DCAFE
0312 #define DDR_SDRAM_INIT_ADDR_VAL 0
0313 #define DDR_SDRAM_INTERVAL_VAL 0x05080000
0314
0315 #elif defined(MPC83XX_BOARD_BR_UID)
0316
0317
0318
0319
0320
0321
0322
0323
0324
0325
0326
0327
0328
0329 #define LBLAWBAR0_VAL bsp_rom_start
0330 #define LBLAWAR0_VAL 0x80000018
0331 #define DDRLAWBAR0_VAL bsp_ram_start
0332 #define DDRLAWAR0_VAL 0x8000001B
0333
0334
0335
0336
0337
0338
0339
0340 #define LCRR_VAL 0x80010002
0341
0342
0343
0344
0345
0346 #define DDRCDR_VAL 0x00000001
0347 #define CS0_BNDS_VAL 0x0000000F
0348 #define CS0_CONFIG_VAL 0x80014202
0349 #define TIMING_CFG_0_VAL 0x00220802
0350 #define TIMING_CFG_1_VAL 0x26259222
0351 #define TIMING_CFG_2_VAL 0x111048C7
0352 #define DDR_SDRAM_CFG_2_VAL 0x00401000
0353 #define DDR_SDRAM_MODE_VAL 0x200F1632
0354 #define DDR_SDRAM_MODE_2_VAL 0x40006000
0355 #define DDR_SDRAM_CLK_CNTL_VAL 0x01800000
0356 #define DDR_SDRAM_CFG_VAL 0x43100008
0357
0358 #define DDR_ERR_DISABLE_VAL 0x0000008D
0359 #define DDR_ERR_DISABLE_VAL2 0x00000089
0360 #define DDR_SDRAM_DATA_INIT_VAL 0xC01DCAFE
0361 #define DDR_SDRAM_INIT_ADDR_VAL 0
0362 #define DDR_SDRAM_INTERVAL_VAL 0x01E8222E
0363
0364 #elif defined( HAS_UBOOT)
0365
0366
0367
0368 #else
0369
0370 #error "board type not defined"
0371
0372 #endif
0373
0374
0375
0376
0377
0378 #if MPC83XX_CHIP_TYPE != 8309
0379 #define BSP_SYSPLL_CKID (((mpc83xx.clk.spmr>>(31-8))&0x01)+1)
0380 #else
0381
0382 #define BSP_SYSPLL_CKID 1
0383 #endif
0384
0385 #define BSP_SYSPLL_MF ((mpc83xx.clk.spmr>>(31-7))&0x0f)
0386
0387 #define BSP_COREPLL_MF ((mpc83xx.clk.spmr>>(31-15))&0x7f)
0388
0389 #endif