⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_stpvr2_stapp_hw.cfg

📁 Lan9118以太网芯片linux驱动程序
💻 CFG
📖 第 1 页 / 共 3 页
字号:
	poke  0x2020 0x36c9
	poke  0x2024 0x5690
	poke  0x2028 0x5F09
	poke  0x202C 0x0000
	poke  0x2030 0x36c9
	poke  0x2034 0x5690
	poke  0x2038 0x5F09
	poke  0x203C 0x0000
write EMI init done for mb282 board
}

##############################################################################
############ 5514 ############################################################
##############################################################################
## initialise the EMI of EVAL 5514 : 16Megabytes SDRAM(bank0) + 16Megabytes SDRAM(bank1) + 16Megabytes flash
proc eval5514EMIInit {
	write Initializing the EMI on 5514 board
	sti551XMemoryInit
	poke -d 0x202ff830   0xf7             ## Reconfigure bank 3 top address
	poke -d 0x202ff840   0xfb             ## Reconfigure bank 4 top address
##	poke -d 0x20010028   0x2A             ## Max pad drive strength
	poke -d 0x20010028   0x3F             ## Max pad drive strength
	## Bank 0
##	poke -d 0x20200100   0x0400432a
	poke -d 0x20200100   0x0000432a
	poke -d 0x20200108   0x0001fff8
	poke -d 0x20200110   0x00000020
	poke -d 0x20200118   0x00010929
	## Bank 1
##	poke -d 0x20200140   0x0400432a
	poke -d 0x20200140   0x0000432a
	poke -d 0x20200148   0x0001fff8
	poke -d 0x20200150   0x00000020
	poke -d 0x20200158   0x00010929
	## Bank 2
##	poke -d 0x20200180   0x000106d9
##	poke -d 0x20200188   0x02000000
##	poke -d 0x20200190   0x03112222
##	poke -d 0x20200198   0x00000209

## Bank 2 for Ethernet STEM
	write configuring region 2 for ethernet STEM
	##poke -d 0x20200180   0x041086e9
	##poke -d 0x20200188   0x06002200
	##poke -d 0x20200190   0x06002200
	##poke -d 0x20200198   0x00000000
	write Configured for DB558
	poke -d 0x20200180   0x041086e9       ## was 0x000106d9
  	poke -d 0x20200188   0x0e024400       ## 0x02000000
  	poke -d 0x20200190   0x0e024400       ## 0x03112222
  	poke -d 0x20200198   0x00000000       ## 0x00000209

	## write Config Bank 4 as EPLD
	poke -d 0x20200200   0x000106c9
	poke -d 0x20200208   0x02000000
	poke -d 0x20200210   0x03112222
	poke -d 0x20200218   0x00000209

	## Bank 5
##	poke -d 0x20200240   0x000106cc       ## configured for 32bit flash- burst mode off- burst size 16bytes
##	poke -d 0x20200248   0x02111111
##	poke -d 0x20200250   0x03112222
##	poke -d 0x20200258   0x00000188

	poke -d 0x20200240   0x001016e9       ## configured for 32bit flash normal!
	poke -d 0x20200248   0x9d200000
	poke -d 0x20200250   0x9d220000
	poke -d 0x20200258   0x00000000

	## Others
	poke -d 0x20200020   0x00000000       ## EMI4.LOCK
##	poke -d 0x20200028   0x000a8013       ## EMI4.GENCFG - locks chip 1
##	poke -d 0x20200028   0x00028013       ## EMI4.GENCFG   - also works
##	poke -d 0x20200028   0x00000003       ## EMI4.GENCFG - works
##	poke -d 0x20200028   0x00000003       ## EMI4.GENCFG
	poke -d 0x20200028   0x00000103       ## EMI4.GENCFG  adr shift bank 2
	poke -d 0x20200038   0x00320032       ## EMI4.SDRAMODEREG
	poke -d 0x20200048   0x00000fff       ## EMI4.REFRESHINIT
	poke -d 0x20200050   0x00000000       ## EMI4.FLASHCLKSEL
	poke -d 0x20200058   0x00000000       ## EMI4.SDRAMCLKSEL
	poke -d 0x20200060   0x00000000       ## EMI4.MPXCLKSEL
	poke -d 0x20200068   0x00000001       ## EMI4.CLKENABLE
	poke -d 0x20200040   0x00000001       ## EMI4.SDRAMINIT
	write EMI done for EVAL 5514 board
}

##############################################################################
############ 5516 ############################################################
##############################################################################
## initialise the EMI of EVAL 5516 : 32Megabytes SDRAM(bank0) 16Megabytes flash
proc eval5516EMIInit {
	write Initializing the EMI on 5516 board
	## Reconfigure EMI Bank Sizes through EMI_BUFFER registers
	sti551XMemoryInit

	## Reconfigure EMI Bank Sizes through EMI_BUFFER registers
	poke -d 0x202ff830   0xFD             ## Reconfigure bank 3 top address (0x70000000-0x7dffffff)
	poke -d 0x202ff840   0xF7             ## Reconfigure bank 4 top address (0x7e000000-0x7effffff)
	## Bank 0                             ## configured for 32Mb sdram (non-subdecoded)
	poke -d 0x20200100   0x00004352       ## EMIConfigData0.
	poke -d 0x20200108   0x0007FFFC       ## EMIConfigData1. Page address mask.
	poke -d 0x20200110   0x00000020       ## EMIConfigData2. Precharge time (bits 7:4 => 1 to 16 sdram cycles)
	poke -d 0x20200118   0x0001092a       ## EMIConfigData3. SDRAM memory read/write parameters
	## Bank 1                             ## STEM0. Configured as 16-bit peripheral
	##poke -d 0x20200140   0x002006f1       ##Device=Per,32bit bus,BE=inactive,OE=activeread,CS=activeboth,BusRel=0,Datadrivedelay=0,latchpoint=3cyc,WaitPol=acthigh,WE_use_OE_config=0
	##poke -d 0x20200148   0x1f200044       ##Read BEe1=BEe2=OEe1=OEe2=0,CSe1=CSe2=2phases,Access=8cycles
	##poke -d 0x20200150   0x1f220000       ##Write BEe1=BEe2=OEe1=OEe2=0,CSe1=CSe2=2phases,Access=8cycles
	##poke -d 0x20200158   0x0000000a


##   write Configured for DB558  ##16 bit
##  	poke -d 0x20200140   0x041086f1  ##   0x042196f1
##   poke -d 0x20200148   0x06024400
##   poke -d 0x20200150   0x06024400
##  	poke -d 0x20200158   0x00000000  ##   0x0000000b

	write BK1 Configured for DB558  ##16 bit
  	poke -d 0x20200140   0x041096f1  ##   0x042196f1
  	poke -d 0x20200148   0x10024400  ##   0x9f004400
  	poke -d 0x20200150   0x10024400  ##   0x9f002200
  	poke -d 0x20200158   0x00000000  ##   0x0000000b

	## Bank 2 - STEM1 Configured as 16-bit peripheral
##	poke -d 0x20200180   0x001116f1       ## EMIConfigData0. Peripheral format settings
##poke -d 0x20200188   0x04112121       ## EMIConfigData1. Peripheral read configuration
##	poke -d 0x20200190   0x05112222       ## EMIConfigData2. Peripheral write configuration
##	poke -d 0x20200198   0x0000000a       ## EMIConfigData3. Peripheral read/write configuration

	write BK2 Configured for DB558  ##16 bit
  	poke -d 0x20200180   0x041096f1  ##   0x042196f1
  	poke -d 0x20200188   0x10024400  ##   0x9f004400
  	poke -d 0x20200190   0x10024400  ##   0x9f002200
  	poke -d 0x20200198   0x00000000  ##   0x0000000b

	## Bank 3 - ATAPI/DVB-CI. Configured as 16-bit peripheral
##	poke -d 0x202001c0   0x001116f1       ## EMIConfigData0. Peripheral format settings
##	poke -d 0x202001c8   0x04112121       ## EMIConfigData1. Peripheral read configuration
##	poke -d 0x202001d0   0x05112222       ## EMIConfigData2. Peripheral write configuration
##	poke -d 0x202001d8   0x0000000a       ## EMIConfigData3. Peripheral read/write configuration

	poke -d 0x202001c0   0x010f8791       ## EMIConfigData0. Peripheral format settings
	poke -d 0x202001c8   0xbe028f21       ## EMIConfigData1. Peripheral read configuration
	poke -d 0x202001d0   0xbe028f22       ## EMIConfigData2. Peripheral write configuration
	poke -d 0x202001d8   0x0000000a       ## EMIConfigData3. Peripheral read/write configuration

	## Bank 4 - Configured as 16-bit flash normal
##	poke -d 0x20200200   0x00000e91
##	poke -d 0x20200208   0x10004000
##	poke -d 0x20200210   0x10220000
##	poke -d 0x20200218   0x00000040

	## Bank 5 - Configured as 16-bit flash normal take it
##	poke -d 0x20200240   0x00000e91
##	poke -d 0x20200248   0x10004000
##	poke -d 0x20200250   0x10220000
##	poke -d 0x20200258   0x00000040

    poke -d 0x20200240   0x00008E91
	poke -d 0x20200248   0x14122300
	poke -d 0x20200250   0x14122300
	poke -d 0x20200258   0x00000040

    ## Bank 5 - Configured as 16-bit burst flash 16 bytes burst
##	poke -d 0x20200240   0x04000E94
##	poke -d 0x20200248   0x86000000
##	poke -d 0x20200250   0x86000300
##	poke -d 0x20200258   0x00000189

	## Others
	poke -d 0x20200020   0x00000000       ## EMI4.LOCK
##	poke -d 0x20010028   0x0000002A       ## CONFIG.CTRL.E, set SDRAM 16 bit bus
	poke -d 0x20010028   0x00000000       ## CONFIG.CTRL.E, set SDRAM 16 bit bus
	poke -d 0x20200028   0x000007c1       ## EMI4.GENCFG, shift for all banks enabled
	poke -d 0x20200038   0x00320032       ## EMI4.SDRAMMODEREG CAS=2, Burst Length=4
	poke -d 0x20200048   0x00000275       ## EMI4.REFRESHINIT
	##added 1 10 02
	config_E_val = peek -q 0x20010028
   config_E_val |= 0x00020000            ## Set bit 17, leave others unchanged.
   poke -d 0x20010028   (config_E_val)   ## Gen Config E register.

	##poke -d 0x20200048   0x00000fff       ## EMI4.REFRESHINIT
	##end add
##	poke -d 0x20200050   0x00000001       ## EMI4.FLASHCLKSEL
	poke -d 0x20200050   0x00000000       ## EMI4.FLASHCLKSEL
	poke -d 0x20200058   0x00000000       ## EMI4.SDRAMCLKSEL
	poke -d 0x20200060   0x00000000       ## EMI4.MPXCLKSEL
	poke -d 0x20200068   0x00000001       ## EMI4.CLKENABLE
	poke -d 0x20200040   0x00000001       ## EMI4.SDRAMINIT
	write EMI done for EVAL 5516 board
}

##############################################################################
############ 5517 ############################################################
##############################################################################
## initialise the EMI of EVAL 5517 : 32Megabytes SDRAM(bank0) 8 Megabytes flash
proc eval5517EMIInit {
	write Initializing the EMI on 5516-17 board
	## Reconfigure EMI Bank Sizes through EMI_BUFFER registers
	sti551XMemoryInit
	## Reconfigure EMI Bank Sizes through EMI_BUFFER registers
	poke -d 0x202ff830   0xFD             ## Reconfigure bank 3 top address (0x70000000-0x7dffffff)
	poke -d 0x202ff840   0xFE             ## Reconfigure bank 4 top address (0x7e000000-0x7effffff)
	## Bank 0                             ## configured for 32Mb sdram (non-subdecoded)
	poke -d 0x20200100   0x00004352       ## EMIConfigData0.
	poke -d 0x20200108   0x000FFFFC       ## EMIConfigData1. Page address mask.
	poke -d 0x20200110   0x00000020       ## EMIConfigData2. Precharge time (bits 7:4 => 1 to 16 sdram cycles)
	poke -d 0x20200118   0x0001092a       ## EMIConfigData3. SDRAM memory read/write parameters

	## Bank 1                             ## STEM0. Configured as 16-bit peripheral
	##poke -d 0x20200140   0x002006f1       ##Device=Per,32bit bus,BE=inactive,OE=activeread,CS=activeboth,BusRel=0,Datadrivedelay=0,latchpoint=3cyc,WaitPol=acthigh,WE_use_OE_config=0
	##poke -d 0x20200148   0x1f200044       ##Read BEe1=BEe2=OEe1=OEe2=0,CSe1=CSe2=2phases,Access=8cycles
	##poke -d 0x20200150   0x1f220000       ##Write BEe1=BEe2=OEe1=OEe2=0,CSe1=CSe2=2phases,Access=8cycles
	##poke -d 0x20200158   0x0000000a

	##write BK1 Configured for DB558  ##16 bit
  	##poke -d 0x20200140   0x041086f1  ##   0x042196f1
   ##poke -d 0x20200148   0x06024400
   ##poke -d 0x20200150   0x06024400
  	##poke -d 0x20200158   0x00000000  ##   0x0000000b
	write BK1 Configured for DB558  ##16 bit
  	poke -d 0x20200140   0x041096f1  ##   0x042196f1
  	poke -d 0x20200148   0x10024400  ##   0x9f004400
  	poke -d 0x20200150   0x10024400  ##   0x9f002200
  	poke -d 0x20200158   0x00000000  ##   0x0000000b
	## Bank 2 - STEM1 Configured as 16-bit peripheral
	##poke -d 0x20200180   0x001116f1       ## EMIConfigData0. Peripheral format settings
	##poke -d 0x20200188   0x04112121       ## EMIConfigData1. Peripheral read configuration
	##poke -d 0x20200190   0x05112222       ## EMIConfigData2. Peripheral write configuration
	##poke -d 0x20200198   0x0000000a       ## EMIConfigData3. Peripheral read/write configuration

	write BK2 Configured for DB558  ##16 bit
  	poke -d 0x20200180   0x041096f1  ##   0x042196f1
  	poke -d 0x20200188   0x10024400  ##   0x9f004400
  	poke -d 0x20200190   0x10024400  ##   0x9f002200
  	poke -d 0x20200198   0x00000000  ##   0x0000000b

	## Bank 3 - ATAPI/DVB-CI. Configured as 16-bit peripheral
	poke -d 0x202001c0   0x010f8791       ## EMIConfigData0. Peripheral format settings
	poke -d 0x202001c8   0xbe028f21       ## EMIConfigData1. Peripheral read configuration
	poke -d 0x202001d0   0xbe028f22       ## EMIConfigData2. Peripheral write configuration
	poke -d 0x202001d8   0x0000000a       ## EMIConfigData3. Peripheral read/write configuration

	## Bank 4 - Configured as 16-bit flash normal
	poke -d 0x20200200   0x00000e91
	poke -d 0x20200208   0x10004000
	poke -d 0x20200210   0x10220000
	poke -d 0x20200218   0x00000040

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -