Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # reset to known state
- reset
- pause 100
- # initialise ecc on ocram. uncomment to perform ecc check.
- #memory set 0x3f000000++0x3ffff %quad 0xffffffff #sysram0
- #memory set 0x3f040000++0x3ffff %quad 0xffffffff #sysram1
- memory 0x40048220 0x400ae4d0 noverify
- # select pll as system clock
- memory set 0x4006b02c 0 0x78 # power up fxosc
- # wait ((data.long(0x4006b004))&0x20)==0x20 #wait for fxosc to lock
- pause 500ms
- memory set 0x4006b008 0 0x20 # set fxosc as fast clock
- # enable all clocks gates from ccm
- memory set 0x4006b040 0 0xffffffff
- memory set 0x4006b044 0 0xffffffff
- memory set 0x4006b048 0 0xffffffff
- memory set 0x4006b04c 0 0xffffffff
- memory set 0x4006b050 0 0xffffffff
- memory set 0x4006b054 0 0xffffffff
- memory set 0x4006b058 0 0xffffffff
- memory set 0x4006b05c 0 0xffffffff
- memory set 0x4006b060 0 0xffffffff
- memory set 0x4006b064 0 0xffffffff
- memory set 0x4006b068 0 0xffffffff
- memory set 0x4006b06c 0 0xffffffff
- memory set 0x40050270 0 0x2001 # pll1
- # wait ((data.long(0x40050270))&0x80000000)==0x80000000 #wait for lock
- pause 500ms
- memory set 0x40050030 0 0x2001 # pll2
- # wait ((data.long(40050030))&0x80000000)==0x80000000 #wait for lock
- pause 500ms
- memory set 0x40050010 0 0x3040 # pll3
- # wait ((data.long(40050010))&0x80000000)==0x80000000 #wait for lock
- pause 500ms
- memory set 0x40050070 0 0x00002031 # anadig_pll_audio_ctrl: pll4
- pause 500ms
- memory set 0x400500e0 0 0x00002001 # anadig_pll_enet_ctrl: pll5
- pause 500ms
- memory set 0x400500a0 0 0x00002028 # anadig_pll_video_ctrl: pll6
- pause 500ms
- # wait ((data.long(0x400502c0))&0xff)==0x7c #wait for lock
- # enable all pfds sources and set sysclk as pll1 pfd3 for 396mhz
- memory set 0x4006b000 0 0x00010005 # ccm_ccr: firc_en=1 and oscnt=5
- memory set 0x4006b008 0 0x0003ff24 # ccm_ccsr: pll1 uses pll1_pfd3, enable all pll1 and pll2, select fast clock, and sys_clock_sel use pll1
- memory set 0x4006b00c 0 0x00000850 # ccm_cacrr: arm_div=0 (div by 1), bus_div=2 (div by 3), ipg_div value is 1 (div by 2), pll4 value is 1 (div 4)
- #########################################################################
- ### ddr_iomuxvoid
- #########################################################################
- memory set 0x400482B0 0 0x00000140 # VF610_PAD_DDR_D2__DDR_D_2
- memory set 0x4004825C 0 0x00000140 # VF610_PAD_DDR_A0__DDR_A_0
- memory set 0x40048240 0 0x00000140 # VF610_PAD_DDR_A7__DDR_A_7
- memory set 0x400482A0 0 0x00000140 # VF610_PAD_DDR_D6__DDR_D_6
- memory set 0x4004827C 0 0x00000140 # VF610_PAD_DDR_D15__DDR_D_15
- memory set 0x400482BC 0 0x00000140 # VF610_PAD_DDR_DQM1__DDR_DQM_1
- memory set 0x400482C0 0 0x00000140 # VF610_PAD_DDR_DQM0__DDR_DQM_0
- memory set 0x40048258 0 0x00000140 # VF610_PAD_DDR_A12__DDR_A_12
- memory set 0x40048244 0 0x00000140 # VF610_PAD_DDR_A6__DDR_A_6
- memory set 0x40048290 0 0x00000140 # VF610_PAD_DDR_D10__DDR_D_10
- memory set 0x40048294 0 0x00000140 # VF610_PAD_DDR_D9__DDR_D_9
- memory set 0x400482B8 0 0x00000140 # VF610_PAD_DDR_D0__DDR_D_0
- memory set 0x4004828C 0 0x00000140 # VF610_PAD_DDR_D11__DDR_D_11
- memory set 0x40048298 0 0x00000140 # VF610_PAD_DDR_D8__DDR_D_8
- memory set 0x40048280 0 0x00000140 # VF610_PAD_DDR_D14__DDR_D_14
- memory set 0x40048284 0 0x00000140 # VF610_PAD_DDR_D13__DDR_D_13
- memory set 0x4004823C 0 0x00000140 # VF610_PAD_DDR_A8__DDR_A_8
- memory set 0x400482C8 0 0x0001014c # VF610_PAD_DDR_DQS0__DDR_DQS_0
- memory set 0x400482C4 0 0x0001014c # VF610_PAD_DDR_DQS1__DDR_DQS_1
- memory set 0x40048248 0 0x00000140 # VF610_PAD_DDR_A5__DDR_A_5
- memory set 0x400482A4 0 0x00000140 # VF610_PAD_DDR_D5__DDR_D_5
- memory set 0x40048274 0 0x00010140 # VF610_PAD_DDR_CLK__DDR_CLK_0
- memory set 0x40048288 0 0x00000140 # VF610_PAD_DDR_D12__DDR_D_12
- memory set 0x4004824C 0 0x00000140 # VF610_PAD_DDR_A4__DDR_A_4
- memory set 0x40048250 0 0x00000140 # VF610_PAD_DDR_A3__DDR_A_3
- memory set 0x40048270 0 0x00000140 # VF610_PAD_DDR_CKE__DDR_CKE_0
- memory set 0x40048254 0 0x00000140 # VF610_PAD_DDR_A12__DDR_A_2
- memory set 0x400482AC 0 0x00000140 # VF610_PAD_DDR_D3__DDR_D_3
- memory set 0x40048278 0 0x00000140 # VF610_PAD_DDR_CS__DDR_CS_B_0
- memory set 0x40048238 0 0x00000140 # VF610_PAD_DDR_A9__DDR_A_9
- memory set 0x400482A8 0 0x00000140 # VF610_PAD_DDR_D4__DDR_D_4
- memory set 0x400482B4 0 0x00000140 # VF610_PAD_DDR_D1__DDR_D_1
- memory set 0x4004829C 0 0x00000140 # VF610_PAD_DDR_D7__DDR_D_7
- #########################################################################
- #########################################################################
- ### ddr_init2
- #########################################################################
- memory set 0x400AE000 0 0x00000500 # DDRMC_CR00
- memory set 0x400AE008 0 0x00000028 # DDRMC_CR02
- memory set 0x400AE00C 0 0x00013880 # DDRMC_CR03
- memory set 0x400AE010 0 0x00000190 # DDRMC_CR04
- memory set 0x400AE014 0 0x00000fa0 # DDRMC_CR05
- memory set 0x400AE030 0 0x00000306 # DDRMC_CR12
- memory set 0x400AE034 0 0x18040202 # DDRMC_CR13
- memory set 0x400AE038 0 0x14110311 # DDRMC_CR14
- memory set 0x400AE040 0 0x05030000 # DDRMC_CR16
- memory set 0x400AE044 0 0x006d6005 # DDRMC_CR17
- memory set 0x400AE048 0 0x00000603 # DDRMC_CR18
- memory set 0x400AE050 0 0x01000000 # DDRMC_CR20
- memory set 0x400AE054 0 0x00070101 # DDRMC_CR21
- memory set 0x400AE058 0 0x000e0000 # DDRMC_CR22
- memory set 0x400AE05C 0 0x03020000 # DDRMC_CR23
- memory set 0x400AE060 0 0x00000008 # DDRMC_CR24
- memory set 0x400AE064 0 0x00010000 # DDRMC_CR25
- memory set 0x400AE068 0 0x0c300034 # DDRMC_CR26
- memory set 0x400AE070 0 0x00000005 # DDRMC_CR28
- memory set 0x400AE074 0 0x00000003 # DDRMC_CR29
- memory set 0x400AE078 0 0x0000000a # DDRMC_CR30
- memory set 0x400AE07C 0 0x00380038 # DDRMC_CR31
- memory set 0x400AE084 0 0x00010000 # DDRMC_CR33
- memory set 0x400AE088 0 0x02020200 # DDRMC_CR34
- memory set 0x400AE098 0 0x00000000 # DDRMC_CR38
- memory set 0x400AE09C 0 0x04001000 # DDRMC_CR39
- memory set 0x400AE0A4 0 0x00000001 # DDRMC_CR41
- memory set 0x400AE0B4 0 0x00000000 # DDRMC_CR45
- memory set 0x400AE0B8 0 0x00000000 # DDRMC_CR46
- memory set 0x400AE0BC 0 0x00000000 # DDRMC_CR47
- memory set 0x400AE0C0 0 0x00230000 # DDRMC_CR48
- memory set 0x400AE0C4 0 0x00000004 # DDRMC_CR49
- memory set 0x400AE0CC 0 0x00010000 # DDRMC_CR51
- memory set 0x400AE0D0 0 0x00000000 # DDRMC_CR52
- memory set 0x400AE0E4 0 0x00000000 # DDRMC_CR57
- memory set 0x400AE0E8 0 0x00000000 # DDRMC_CR58
- memory set 0x400AE108 0 0x00900190 # DDRMC_CR66
- memory set 0x400AE10C 0 0x00000024 # DDRMC_CR67
- memory set 0x400AE114 0 0x00000200 # DDRMC_CR69
- memory set 0x400AE118 0 0x00000080 # DDRMC_CR70
- memory set 0x400AE11C 0 0x00001400 # DDRMC_CR71
- memory set 0x400AE120 0 0x01000000 # DDRMC_CR72
- memory set 0x400AE124 0 0x0a010300 # DDRMC_CR73
- memory set 0x400AE128 0 0x0101ffff # DDRMC_CR74
- memory set 0x400AE12C 0 0x01010101 # DDRMC_CR75
- memory set 0x400AE130 0 0x03030101 # DDRMC_CR76
- memory set 0x400AE134 0 0x01000001 # DDRMC_CR77
- memory set 0x400AE138 0 0x0001000c # DDRMC_CR78
- memory set 0x400AE13C 0 0x01000000 # DDRMC_CR79
- memory set 0x400AE148 0 0x1fffffff # DDRMC_CR82
- memory set 0x400AE15C 0 0x01010000 # DDRMC_CR87
- memory set 0x400AE16C 0 0x03030300 # DDRMC_CR91
- memory set 0x400AE170 0 0x00010303 # DDRMC_CR92
- memory set 0x400AE180 0 0x00002819 # DDRMC_CR96
- memory set 0x400AE1A4 0 0x00202000 # DDRMC_CR105
- memory set 0x400AE1B8 0 0x00002020 # DDRMC_CR110
- memory set 0x400AE1C8 0 0x00000000 # DDRMC_CR114
- memory set 0x400AE1F4 0 0x00000000 # DDRMC_CR125
- memory set 0x400AE1F8 0 0x00000c00 # DDRMC_CR126
- memory set 0x400AE1FC 0 0x00000000 # DDRMC_CR127
- memory set 0x400AE20C 0 0x00000000 # DDRMC_CR131
- memory set 0x400AE210 0 0x00000305 # DDRMC_CR132
- memory set 0x400AE224 0 0x00020000 # DDRMC_CR137
- memory set 0x400AE268 0 0x68283000 # DDRMC_CR154
- #########################################################################
- pause 100ms
- #########################################################################
- ### ddr_phy_init2
- #########################################################################
- memory set 0x400AE400 0 0x00000027 # DDRMC_PHY00
- memory set 0x400AE404 0 0x00000027 # DDRMC_PHY01
- memory set 0x400AE408 0 0x0038005a # DDRMC_PHY02
- memory set 0x400AE40C 0 0x00040404 # DDRMC_PHY03
- memory set 0x400AE410 0 0x00002700 # DDRMC_PHY04
- memory set 0x400AE440 0 0x00000027 # DDRMC_PHY16
- memory set 0x400AE444 0 0x00000027 # DDRMC_PHY17
- memory set 0x400AE448 0 0x0038005a # DDRMC_PHY18
- memory set 0x400AE44C 0 0x00040404 # DDRMC_PHY19
- memory set 0x400AE450 0 0x00002700 # DDRMC_PHY20
- memory set 0x400AE480 0 0x00000027 # DDRMC_PHY32
- memory set 0x400AE484 0 0x00000027 # DDRMC_PHY33
- memory set 0x400AE488 0 0x0038005a # DDRMC_PHY34
- memory set 0x400AE48C 0 0x00040404 # DDRMC_PHY35
- memory set 0x400AE490 0 0x00002700 # DDRMC_PHY36
- memory set 0x400AE4C4 0 0x00040007 # DDRMC_PHY49
- memory set 0x400AE4C8 0 0x00002900 # DDRMC_PHY50
- memory set 0x400AE4D0 0 0x00000000 # DDRMC_PHY52
- #########################################################################
- #########################################################################
- ### ddr_init2 end
- #########################################################################
- pause 100ms
- memory set 0x400ae0b4 0 0x01060000
- ### pause 100ms
- memory set 0x400ae148 0 0x1FFFFFFF
- memory set 0x400ae000 0 0x00000501
- pause 100ms
- memory set 0x400ae114 0 0x00000102
- pause 100ms
- #########################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement