uboot-sockit-preloader-sample-design.patch 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. From c70f2ebb350da20af1a0ed4b7960b8e5a1952713 Mon Sep 17 00:00:00 2001
  2. From: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
  3. Date: Thu, 20 Feb 2014 11:51:31 -0500
  4. Subject: [PATCH] board: add to sockit a working preloader design
  5. ---
  6. board/altera/socfpga_cyclone5/build.h | 2 +-
  7. board/altera/socfpga_cyclone5/iocsr_config.c | 314 ++++++++++-----------
  8. board/altera/socfpga_cyclone5/pinmux_config.c | 32 +--
  9. board/altera/socfpga_cyclone5/pinmux_config.h | 8 +-
  10. board/altera/socfpga_cyclone5/sdram/sdram_config.h | 14 +-
  11. .../altera/socfpga_cyclone5/sdram/sequencer_auto.h | 16 +-
  12. .../sdram/sequencer_auto_ac_init.c | 16 +-
  13. .../socfpga_cyclone5/sdram/sequencer_defines.h | 34 +--
  14. 8 files changed, 218 insertions(+), 218 deletions(-)
  15. diff --git a/board/altera/socfpga_cyclone5/build.h b/board/altera/socfpga_cyclone5/build.h
  16. index e5d9c3c..a369015 100644
  17. --- a/board/altera/socfpga_cyclone5/build.h
  18. +++ b/board/altera/socfpga_cyclone5/build.h
  19. @@ -29,7 +29,7 @@
  20. * Handoff files must provide user option whether to
  21. * enable watchdog during preloader execution phase
  22. */
  23. -#define CONFIG_PRELOADER_WATCHDOG_ENABLE (0)
  24. +#define CONFIG_PRELOADER_WATCHDOG_ENABLE (1)
  25. /*
  26. * Handoff files must provide user option whether to enable
  27. diff --git a/board/altera/socfpga_cyclone5/iocsr_config.c b/board/altera/socfpga_cyclone5/iocsr_config.c
  28. index fa663e1..90fc154 100644
  29. --- a/board/altera/socfpga_cyclone5/iocsr_config.c
  30. +++ b/board/altera/socfpga_cyclone5/iocsr_config.c
  31. @@ -7,113 +7,113 @@ const unsigned long iocsr_scan_chain0_table[((CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH
  32. 0xC0000000,
  33. 0x0000003F,
  34. 0x00008000,
  35. - 0x00020080,
  36. - 0x08020000,
  37. - 0x08000000,
  38. - 0x00018020,
  39. + 0x00060180,
  40. + 0x18060000,
  41. + 0x18000000,
  42. + 0x00018060,
  43. 0x00000000,
  44. 0x00004000,
  45. - 0x00010040,
  46. - 0x04010000,
  47. - 0x04000000,
  48. - 0x00000010,
  49. - 0x00004010,
  50. + 0x000300C0,
  51. + 0x0C030000,
  52. + 0x0C000000,
  53. + 0x00000030,
  54. + 0x0000C030,
  55. 0x00002000,
  56. - 0x00020000,
  57. - 0x02008000,
  58. - 0x02000000,
  59. - 0x00000008,
  60. - 0x00002008,
  61. + 0x00018060,
  62. + 0x06018000,
  63. + 0x06000000,
  64. + 0x00000018,
  65. + 0x00006018,
  66. 0x00001000,
  67. };
  68. const unsigned long iocsr_scan_chain1_table[((CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH / 32) + 1)] = {
  69. - 0x000C0300,
  70. - 0x10040000,
  71. - 0x100000C0,
  72. - 0x00000040,
  73. - 0x00010040,
  74. + 0x00100000,
  75. + 0x300C0000,
  76. + 0x300000C0,
  77. + 0x000000C0,
  78. + 0x000300C0,
  79. 0x00008000,
  80. 0x00080000,
  81. - 0x18060000,
  82. - 0x18000000,
  83. - 0x00000060,
  84. - 0x00018060,
  85. + 0x20000000,
  86. + 0x00000000,
  87. + 0x00000080,
  88. + 0x00020000,
  89. 0x00004000,
  90. - 0x00010040,
  91. + 0x000300C0,
  92. 0x10000000,
  93. - 0x04000000,
  94. - 0x00000010,
  95. - 0x00004010,
  96. + 0x0C000000,
  97. + 0x00000030,
  98. + 0x0000C030,
  99. 0x00002000,
  100. - 0x06008020,
  101. - 0x02008000,
  102. + 0x06018060,
  103. + 0x06018000,
  104. 0x01FE0000,
  105. 0xF8000000,
  106. 0x00000007,
  107. 0x00001000,
  108. - 0x00004010,
  109. - 0x01004000,
  110. - 0x01000000,
  111. - 0x00003004,
  112. - 0x00001004,
  113. + 0x0000C030,
  114. + 0x0300C000,
  115. + 0x03000000,
  116. + 0x0000300C,
  117. + 0x0000300C,
  118. 0x00000800,
  119. 0x00000000,
  120. 0x00000000,
  121. - 0x00800000,
  122. - 0x00000002,
  123. + 0x01800000,
  124. + 0x00000006,
  125. 0x00002000,
  126. 0x00000400,
  127. 0x00000000,
  128. - 0x00401000,
  129. + 0x00C03000,
  130. 0x00000003,
  131. 0x00000000,
  132. 0x00000000,
  133. 0x00000200,
  134. - 0x00600802,
  135. + 0x00601806,
  136. 0x00000000,
  137. - 0x80200000,
  138. - 0x80000600,
  139. - 0x00000200,
  140. + 0x80600000,
  141. + 0x80000601,
  142. + 0x00000601,
  143. 0x00000100,
  144. - 0x00300401,
  145. - 0xC0100400,
  146. - 0x40100000,
  147. - 0x40000300,
  148. - 0x000C0100,
  149. + 0x00300C03,
  150. + 0xC0300C00,
  151. + 0xC0300000,
  152. + 0xC0000300,
  153. + 0x000C0300,
  154. 0x00000080,
  155. };
  156. const unsigned long iocsr_scan_chain2_table[((CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH / 32) + 1)] = {
  157. - 0x80040100,
  158. + 0x300C0300,
  159. 0x00000000,
  160. 0x0FF00000,
  161. 0x00000000,
  162. - 0x0C010040,
  163. + 0x0C0300C0,
  164. 0x00008000,
  165. - 0x18020080,
  166. - 0x00000000,
  167. - 0x08000000,
  168. - 0x00040020,
  169. - 0x06018060,
  170. + 0x18060180,
  171. + 0x18060000,
  172. + 0x18000000,
  173. + 0x00018060,
  174. + 0x00018060,
  175. 0x00004000,
  176. - 0x0C010040,
  177. - 0x04010000,
  178. + 0x000300C0,
  179. + 0x0C030000,
  180. 0x00000030,
  181. 0x00000000,
  182. - 0x03004010,
  183. + 0x0300C030,
  184. 0x00002000,
  185. - 0x06008020,
  186. - 0x02008000,
  187. - 0x02000018,
  188. - 0x00006008,
  189. - 0x01802008,
  190. + 0x00018060,
  191. + 0x06018000,
  192. + 0x06000000,
  193. + 0x00000018,
  194. + 0x00006018,
  195. 0x00001000,
  196. - 0x03004010,
  197. - 0x01004000,
  198. - 0x0100000C,
  199. - 0x00003004,
  200. - 0x00C01004,
  201. + 0x0000C030,
  202. + 0x00000000,
  203. + 0x03000000,
  204. + 0x0000000C,
  205. + 0x00C0300C,
  206. 0x00000800,
  207. };
  208. @@ -170,14 +170,14 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  209. 0xA0000034,
  210. 0x0D000001,
  211. 0x6068030C,
  212. - 0xC7034018,
  213. - 0x0E381A01,
  214. + 0xCF034059,
  215. + 0x1E781A03,
  216. 0x8030C0D0,
  217. - 0x34018606,
  218. - 0x01A01C70,
  219. + 0x34059606,
  220. + 0x01A03CF0,
  221. 0x0C0D0000,
  222. - 0x18606803,
  223. - 0x01C70340,
  224. + 0x59606803,
  225. + 0x03CF0340,
  226. 0xD000001A,
  227. 0x068030C0,
  228. 0x10040000,
  229. @@ -244,15 +244,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  230. 0xA0000034,
  231. 0x0D000001,
  232. 0x6068030C,
  233. - 0xC7034018,
  234. - 0x0E381A01,
  235. + 0xCF034059,
  236. + 0x1E781A03,
  237. 0x8030C0D0,
  238. - 0x34018606,
  239. + 0x34059606,
  240. 0x01A00000,
  241. 0x0C0D0000,
  242. - 0x18606803,
  243. - 0x01C70340,
  244. - 0xD00E381A,
  245. + 0x59606803,
  246. + 0x03CF0340,
  247. + 0xD01E781A,
  248. 0x068030C0,
  249. 0x10040000,
  250. 0x00200000,
  251. @@ -273,7 +273,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  252. 0xAA0D4000,
  253. 0x01C3A810,
  254. 0xAA0D4000,
  255. - 0x01C3A808,
  256. + 0x01C3A810,
  257. 0xAA0D4000,
  258. 0x01C3A810,
  259. 0x00040100,
  260. @@ -301,7 +301,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  261. 0x2A835000,
  262. 0x0070EA04,
  263. 0x2A835000,
  264. - 0x0070EA02,
  265. + 0x0070EA04,
  266. 0x2A835000,
  267. 0x0070EA04,
  268. 0x00010040,
  269. @@ -321,15 +321,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  270. 0x14864000,
  271. 0x69A47A05,
  272. 0xCBCF23D7,
  273. - 0xF41E791E,
  274. - 0x034ED348,
  275. + 0xF5DE791E,
  276. + 0x0356D348,
  277. 0x821A0000,
  278. 0x0000D000,
  279. 0x01860680,
  280. 0xD769A47A,
  281. 0x1ECBCF23,
  282. - 0x48F41E79,
  283. - 0x00034ED3,
  284. + 0x48F5DE79,
  285. + 0x000356D3,
  286. 0x00080200,
  287. 0x00001000,
  288. 0x00080200,
  289. @@ -347,7 +347,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  290. 0xAA0D4000,
  291. 0x01C3A810,
  292. 0xAA0D4000,
  293. - 0x01C3A808,
  294. + 0x01C3A810,
  295. 0xAA0D4000,
  296. 0x01C3A810,
  297. 0x00040100,
  298. @@ -375,7 +375,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  299. 0x2A835000,
  300. 0x0070EA04,
  301. 0x2A835000,
  302. - 0x0070EA02,
  303. + 0x0070EA04,
  304. 0x2A835000,
  305. 0x0070EA04,
  306. 0x00015000,
  307. @@ -395,15 +395,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  308. 0x14864000,
  309. 0x69A47A05,
  310. 0xCBCF23D7,
  311. - 0xF41E791E,
  312. - 0x034ED348,
  313. - 0x821A00C3,
  314. + 0xF5DE791E,
  315. + 0x0356D348,
  316. + 0x821A02CB,
  317. 0x0000D000,
  318. 0x00000680,
  319. 0xD769A47A,
  320. 0x1ECBCF23,
  321. - 0x48F41E79,
  322. - 0x00034ED3,
  323. + 0x48F5DE79,
  324. + 0x000356D3,
  325. 0x00080200,
  326. 0x00001000,
  327. 0x00080200,
  328. @@ -421,7 +421,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  329. 0xAA0D4000,
  330. 0x01C3A810,
  331. 0xAA0D4000,
  332. - 0x01C3A808,
  333. + 0x01C3A810,
  334. 0xAA0D4000,
  335. 0x01C3A810,
  336. 0x00040100,
  337. @@ -449,7 +449,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  338. 0x2A835000,
  339. 0x0070EA04,
  340. 0x2A835000,
  341. - 0x0070EA02,
  342. + 0x0070EA04,
  343. 0x2A835000,
  344. 0x0070EA04,
  345. 0x00010040,
  346. @@ -469,15 +469,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  347. 0x14864000,
  348. 0x69A47A05,
  349. 0xCBCF23D7,
  350. - 0xF41E791E,
  351. - 0x034ED348,
  352. + 0xF5DE791E,
  353. + 0x0356D348,
  354. 0x821A0000,
  355. 0x0000D000,
  356. 0x00000680,
  357. 0xD769A47A,
  358. 0x1ECBCF23,
  359. - 0x48F41E79,
  360. - 0x00034ED3,
  361. + 0x48F5DE79,
  362. + 0x000356D3,
  363. 0x00080200,
  364. 0x00001000,
  365. 0x00080200,
  366. @@ -495,7 +495,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  367. 0xAA0D4000,
  368. 0x01C3A810,
  369. 0xAA0D4000,
  370. - 0x01C3A808,
  371. + 0x01C3A810,
  372. 0xAA0D4000,
  373. 0x01C3A810,
  374. 0x00040100,
  375. @@ -523,7 +523,7 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  376. 0x2A835000,
  377. 0x0070EA04,
  378. 0x2A835000,
  379. - 0x0070EA02,
  380. + 0x0070EA04,
  381. 0x2A835000,
  382. 0x0070EA04,
  383. 0x00010040,
  384. @@ -543,15 +543,15 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  385. 0x14864000,
  386. 0x69A47A05,
  387. 0xCBCF23D7,
  388. - 0xF41E791E,
  389. - 0x034ED348,
  390. + 0xF5DE791E,
  391. + 0x0356D348,
  392. 0x821A0000,
  393. 0x0000D000,
  394. 0x00000680,
  395. 0xD769A47A,
  396. 0x1ECBCF23,
  397. - 0x48F41E79,
  398. - 0x00034ED3,
  399. + 0x48F5DE79,
  400. + 0x000356D3,
  401. 0x00080200,
  402. 0x00001000,
  403. 0x00080200,
  404. @@ -567,80 +567,80 @@ const unsigned long iocsr_scan_chain3_table[((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH
  405. 0x04000002,
  406. 0x00820000,
  407. 0x00489000,
  408. - 0x001A1A1A,
  409. - 0x085506A0,
  410. - 0x0000E1D4,
  411. - 0x045506A0,
  412. - 0x0000E1D4,
  413. - 0x085506A0,
  414. - 0x8000E1D4,
  415. + 0x801A1A1A,
  416. + 0x00000200,
  417. + 0x80000004,
  418. + 0x00000200,
  419. + 0x80000004,
  420. + 0x00000200,
  421. + 0x80000004,
  422. 0x00000200,
  423. 0x00000004,
  424. - 0x04000000,
  425. - 0x00000009,
  426. - 0x00002410,
  427. + 0x00040000,
  428. + 0x10000000,
  429. + 0x00000000,
  430. 0x00000040,
  431. - 0x41000000,
  432. - 0x00002082,
  433. - 0x00000350,
  434. - 0x000000DA,
  435. + 0x00010000,
  436. + 0x40002000,
  437. + 0x00000100,
  438. + 0x40000002,
  439. + 0x00000100,
  440. + 0x40000002,
  441. 0x00000100,
  442. 0x40000002,
  443. 0x00000100,
  444. 0x00000002,
  445. - 0x042A8350,
  446. - 0x000070EA,
  447. - 0x86000000,
  448. - 0x08000004,
  449. + 0x00020000,
  450. + 0x08000000,
  451. 0x00000000,
  452. - 0x00482000,
  453. - 0x21800000,
  454. - 0x00101061,
  455. - 0x021541A8,
  456. - 0x00003875,
  457. - 0x011541A8,
  458. - 0x00003875,
  459. - 0x021541A8,
  460. - 0x20003875,
  461. + 0x00000020,
  462. + 0x00008000,
  463. + 0x20001000,
  464. + 0x00000080,
  465. + 0x20000001,
  466. + 0x00000080,
  467. + 0x20000001,
  468. + 0x00000080,
  469. + 0x20000001,
  470. 0x00000080,
  471. 0x00000001,
  472. - 0x41000000,
  473. - 0x00000002,
  474. - 0x00FF0904,
  475. + 0x00010000,
  476. + 0x04000000,
  477. + 0x00FF0000,
  478. 0x00000000,
  479. - 0x90400000,
  480. - 0x00000820,
  481. + 0x00004000,
  482. + 0x00000800,
  483. 0x80000001,
  484. - 0x38D612AF,
  485. - 0x86F8E38E,
  486. - 0x0A0A78B4,
  487. - 0x000D020A,
  488. + 0x00041419,
  489. + 0x40000000,
  490. + 0x04000816,
  491. + 0x000D0000,
  492. 0x00006800,
  493. - 0x028A4320,
  494. - 0xEBB4D23D,
  495. - 0x8F65E791,
  496. - 0xA47A0F3C,
  497. - 0x0001A769,
  498. - 0x00410D00,
  499. + 0x00000340,
  500. + 0xD000001A,
  501. + 0x06800000,
  502. + 0x00340000,
  503. + 0x0001A000,
  504. + 0x00000D00,
  505. 0x40000068,
  506. - 0x3D000003,
  507. - 0x91EBB4D2,
  508. - 0x3C8F65E7,
  509. - 0x69A47A0F,
  510. - 0x000001A7,
  511. + 0x1A000003,
  512. + 0x00D00000,
  513. + 0x00068000,
  514. + 0x00003400,
  515. + 0x000001A0,
  516. + 0x00000401,
  517. + 0x00000008,
  518. 0x00000401,
  519. 0x00000008,
  520. 0x00000401,
  521. 0x00000008,
  522. - 0x00000540,
  523. - 0x000003A8,
  524. - 0x10AA0D40,
  525. - 0x8001C3A8,
  526. + 0x00000401,
  527. + 0x80000008,
  528. 0x0000007F,
  529. + 0x20000000,
  530. 0x00000000,
  531. - 0x00004060,
  532. - 0xE1208000,
  533. + 0xE0000080,
  534. 0x0000001F,
  535. - 0x00004100,
  536. + 0x00004000,
  537. };
  538. diff --git a/board/altera/socfpga_cyclone5/pinmux_config.c b/board/altera/socfpga_cyclone5/pinmux_config.c
  539. index 730067e..cfd74cd 100644
  540. --- a/board/altera/socfpga_cyclone5/pinmux_config.c
  541. +++ b/board/altera/socfpga_cyclone5/pinmux_config.c
  542. @@ -23,7 +23,7 @@ unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = {
  543. 0, /* EMACIO18 */
  544. 0, /* EMACIO19 */
  545. 3, /* FLASHIO0 */
  546. - 3, /* FLASHIO1 */
  547. + 0, /* FLASHIO1 */
  548. 3, /* FLASHIO2 */
  549. 3, /* FLASHIO3 */
  550. 0, /* FLASHIO4 */
  551. @@ -34,25 +34,25 @@ unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = {
  552. 3, /* FLASHIO9 */
  553. 3, /* FLASHIO10 */
  554. 3, /* FLASHIO11 */
  555. - 3, /* GENERALIO0 */
  556. - 3, /* GENERALIO1 */
  557. - 3, /* GENERALIO2 */
  558. - 3, /* GENERALIO3 */
  559. - 3, /* GENERALIO4 */
  560. - 3, /* GENERALIO5 */
  561. - 3, /* GENERALIO6 */
  562. - 3, /* GENERALIO7 */
  563. - 3, /* GENERALIO8 */
  564. + 0, /* GENERALIO0 */
  565. + 1, /* GENERALIO1 */
  566. + 1, /* GENERALIO2 */
  567. + 1, /* GENERALIO3 */
  568. + 1, /* GENERALIO4 */
  569. + 0, /* GENERALIO5 */
  570. + 0, /* GENERALIO6 */
  571. + 0, /* GENERALIO7 */
  572. + 0, /* GENERALIO8 */
  573. 3, /* GENERALIO9 */
  574. 3, /* GENERALIO10 */
  575. 3, /* GENERALIO11 */
  576. 3, /* GENERALIO12 */
  577. - 2, /* GENERALIO13 */
  578. - 2, /* GENERALIO14 */
  579. - 3, /* GENERALIO15 */
  580. - 3, /* GENERALIO16 */
  581. - 2, /* GENERALIO17 */
  582. - 2, /* GENERALIO18 */
  583. + 0, /* GENERALIO13 */
  584. + 0, /* GENERALIO14 */
  585. + 1, /* GENERALIO15 */
  586. + 1, /* GENERALIO16 */
  587. + 1, /* GENERALIO17 */
  588. + 1, /* GENERALIO18 */
  589. 0, /* GENERALIO19 */
  590. 0, /* GENERALIO20 */
  591. 0, /* GENERALIO21 */
  592. diff --git a/board/altera/socfpga_cyclone5/pinmux_config.h b/board/altera/socfpga_cyclone5/pinmux_config.h
  593. index fb483ab..64c750a 100644
  594. --- a/board/altera/socfpga_cyclone5/pinmux_config.h
  595. +++ b/board/altera/socfpga_cyclone5/pinmux_config.h
  596. @@ -11,15 +11,15 @@
  597. #define CONFIG_HPS_UART0 (1)
  598. #define CONFIG_HPS_UART1 (0)
  599. #define CONFIG_HPS_TRACE (0)
  600. -#define CONFIG_HPS_I2C0 (1)
  601. -#define CONFIG_HPS_I2C1 (0)
  602. +#define CONFIG_HPS_I2C0 (0)
  603. +#define CONFIG_HPS_I2C1 (1)
  604. #define CONFIG_HPS_I2C2 (0)
  605. #define CONFIG_HPS_I2C3 (0)
  606. #define CONFIG_HPS_SPIM0 (1)
  607. -#define CONFIG_HPS_SPIM1 (0)
  608. +#define CONFIG_HPS_SPIM1 (1)
  609. #define CONFIG_HPS_SPIS0 (0)
  610. #define CONFIG_HPS_SPIS1 (0)
  611. -#define CONFIG_HPS_CAN0 (1)
  612. +#define CONFIG_HPS_CAN0 (0)
  613. #define CONFIG_HPS_CAN1 (0)
  614. #define CONFIG_HPS_SDMMC_BUSWIDTH (4)
  615. diff --git a/board/altera/socfpga_cyclone5/sdram/sdram_config.h b/board/altera/socfpga_cyclone5/sdram/sdram_config.h
  616. index b90d6f3..dd027ef 100755
  617. --- a/board/altera/socfpga_cyclone5/sdram/sdram_config.h
  618. +++ b/board/altera/socfpga_cyclone5/sdram/sdram_config.h
  619. @@ -4,16 +4,16 @@
  620. #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMTYPE (2)
  621. #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_MEMBL (8)
  622. #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ADDRORDER (0)
  623. -#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCEN (1)
  624. -#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCCORREN (1)
  625. +#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCEN (0)
  626. +#define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCCORREN (0)
  627. #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_REORDEREN (1)
  628. #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_STARVELIMIT (10)
  629. #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_DQSTRKEN (0)
  630. #define CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_NODMPINS (0)
  631. -#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCWL (6)
  632. +#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCWL (8)
  633. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_AL (0)
  634. -#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCL (7)
  635. -#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRRD (4)
  636. +#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TCL (11)
  637. +#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRRD (3)
  638. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TFAW (12)
  639. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING1_TRFC (104)
  640. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TREFI (3120)
  641. @@ -21,7 +21,7 @@
  642. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TRP (6)
  643. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TWR (6)
  644. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING2_IF_TWTR (4)
  645. -#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRTP (4)
  646. +#define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRTP (3)
  647. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRAS (14)
  648. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TRC (20)
  649. #define CONFIG_HPS_SDR_CTRLCFG_DRAMTIMING3_TMRD (4)
  650. @@ -33,7 +33,7 @@
  651. #define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_ROWBITS (15)
  652. #define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_BANKBITS (3)
  653. #define CONFIG_HPS_SDR_CTRLCFG_DRAMADDRW_CSBITS (1)
  654. -#define CONFIG_HPS_SDR_CTRLCFG_DRAMIFWIDTH_IFWIDTH (40)
  655. +#define CONFIG_HPS_SDR_CTRLCFG_DRAMIFWIDTH_IFWIDTH (32)
  656. #define CONFIG_HPS_SDR_CTRLCFG_DRAMDEVWIDTH_DEVWIDTH (8)
  657. #define CONFIG_HPS_SDR_CTRLCFG_DRAMINTR_INTREN (0)
  658. #define CONFIG_HPS_SDR_CTRLCFG_STATICCFG_MEMBL (2)
  659. diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h b/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h
  660. index e8c5484..919676d 100644
  661. --- a/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h
  662. +++ b/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h
  663. @@ -34,7 +34,7 @@
  664. #define __RW_MGR_ac_read_en 0x21
  665. #define __RW_MGR_ac_mrs3_mirr 0x0C
  666. #define __RW_MGR_ac_mrs2 0x05
  667. -#define __RW_MGR_CONTENT_ac_mrs1 0x10090044
  668. +#define __RW_MGR_CONTENT_ac_mrs1 0x10090006
  669. #define __RW_MGR_CONTENT_ac_mrs3 0x100B0000
  670. #define __RW_MGR_CONTENT_ac_write_bank_0_col_0_nodata_wl_1 0x18980000
  671. #define __RW_MGR_CONTENT_ac_act_1 0x106B0000
  672. @@ -46,8 +46,8 @@
  673. #define __RW_MGR_CONTENT_ac_init_reset_0_cke_0 0x20700000
  674. #define __RW_MGR_CONTENT_ac_read_bank_0_1_norden 0x10580008
  675. #define __RW_MGR_CONTENT_ac_pre_all 0x10280400
  676. -#define __RW_MGR_CONTENT_ac_mrs0_user 0x10080431
  677. -#define __RW_MGR_CONTENT_ac_mrs0_dll_reset 0x10080530
  678. +#define __RW_MGR_CONTENT_ac_mrs0_user 0x10080471
  679. +#define __RW_MGR_CONTENT_ac_mrs0_dll_reset 0x10080570
  680. #define __RW_MGR_CONTENT_ac_read_bank_0_0 0x13580000
  681. #define __RW_MGR_CONTENT_ac_write_bank_0_col_1 0x1C980008
  682. #define __RW_MGR_CONTENT_ac_read_bank_0_1 0x13580008
  683. @@ -55,21 +55,21 @@
  684. #define __RW_MGR_CONTENT_ac_write_bank_1_col_1 0x1C9B0008
  685. #define __RW_MGR_CONTENT_ac_write_bank_0_col_0 0x1C980000
  686. #define __RW_MGR_CONTENT_ac_read_bank_1_0 0x135B0000
  687. -#define __RW_MGR_CONTENT_ac_mrs1_mirr 0x100A0024
  688. +#define __RW_MGR_CONTENT_ac_mrs1_mirr 0x100A0006
  689. #define __RW_MGR_CONTENT_ac_read_bank_1_1 0x135B0008
  690. #define __RW_MGR_CONTENT_ac_des_odt_1 0x38780000
  691. -#define __RW_MGR_CONTENT_ac_mrs0_dll_reset_mirr 0x100804C8
  692. +#define __RW_MGR_CONTENT_ac_mrs0_dll_reset_mirr 0x100804E8
  693. #define __RW_MGR_CONTENT_ac_zqcl 0x10380400
  694. #define __RW_MGR_CONTENT_ac_write_predata 0x38F80000
  695. -#define __RW_MGR_CONTENT_ac_mrs0_user_mirr 0x10080449
  696. +#define __RW_MGR_CONTENT_ac_mrs0_user_mirr 0x10080469
  697. #define __RW_MGR_CONTENT_ac_ref 0x10480000
  698. #define __RW_MGR_CONTENT_ac_nop 0x30780000
  699. #define __RW_MGR_CONTENT_ac_rdimm 0x10780000
  700. -#define __RW_MGR_CONTENT_ac_mrs2_mirr 0x10090010
  701. +#define __RW_MGR_CONTENT_ac_mrs2_mirr 0x10090218
  702. #define __RW_MGR_CONTENT_ac_write_bank_0_col_0_nodata 0x18180000
  703. #define __RW_MGR_CONTENT_ac_read_en 0x33780000
  704. #define __RW_MGR_CONTENT_ac_mrs3_mirr 0x100B0000
  705. -#define __RW_MGR_CONTENT_ac_mrs2 0x100A0008
  706. +#define __RW_MGR_CONTENT_ac_mrs2 0x100A0218
  707. #define __RW_MGR_READ_B2B_WAIT2 0x6A
  708. #define __RW_MGR_LFSR_WR_RD_BANK_0_WAIT 0x31
  709. diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c b/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c
  710. index e16efa1..20b4ca1 100644
  711. --- a/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c
  712. +++ b/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c
  713. @@ -6,16 +6,16 @@ const alt_u32 ac_rom_init[36] =
  714. {
  715. 0x20700000,
  716. 0x20780000,
  717. - 0x10080431,
  718. - 0x10080530,
  719. - 0x10090044,
  720. - 0x100a0008,
  721. + 0x10080471,
  722. + 0x10080570,
  723. + 0x10090006,
  724. + 0x100a0218,
  725. 0x100b0000,
  726. 0x10380400,
  727. - 0x10080449,
  728. - 0x100804c8,
  729. - 0x100a0024,
  730. - 0x10090010,
  731. + 0x10080469,
  732. + 0x100804e8,
  733. + 0x100a0006,
  734. + 0x10090218,
  735. 0x100b0000,
  736. 0x30780000,
  737. 0x38780000,
  738. diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h b/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h
  739. index 52faf3f..b85b85c 100644
  740. --- a/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h
  741. +++ b/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h
  742. @@ -1,28 +1,28 @@
  743. #ifndef _SEQUENCER_DEFINES_H_
  744. #define _SEQUENCER_DEFINES_H_
  745. -#define AC_ROM_MR1_MIRR 0000000100100
  746. +#define AC_ROM_MR1_MIRR 0000000000110
  747. #define AC_ROM_MR1_OCD_ENABLE
  748. -#define AC_ROM_MR2_MIRR 0000000010000
  749. +#define AC_ROM_MR2_MIRR 0001000011000
  750. #define AC_ROM_MR3_MIRR 0000000000000
  751. #define AC_ROM_MR0_CALIB
  752. -#define AC_ROM_MR0_DLL_RESET_MIRR 0010011001000
  753. -#define AC_ROM_MR0_DLL_RESET 0010100110000
  754. -#define AC_ROM_MR0_MIRR 0010001001001
  755. -#define AC_ROM_MR0 0010000110001
  756. -#define AC_ROM_MR1 0000001000100
  757. -#define AC_ROM_MR2 0000000001000
  758. +#define AC_ROM_MR0_DLL_RESET_MIRR 0010011101000
  759. +#define AC_ROM_MR0_DLL_RESET 0010101110000
  760. +#define AC_ROM_MR0_MIRR 0010001101001
  761. +#define AC_ROM_MR0 0010001110001
  762. +#define AC_ROM_MR1 0000000000110
  763. +#define AC_ROM_MR2 0001000011000
  764. #define AC_ROM_MR3 0000000000000
  765. #define AFI_CLK_FREQ 401
  766. #define AFI_RATE_RATIO 1
  767. #define ARRIAVGZ 0
  768. #define ARRIAV 0
  769. -#define AVL_CLK_FREQ 67
  770. +#define AVL_CLK_FREQ 81
  771. #define BFM_MODE 0
  772. #define BURST2 0
  773. #define CALIBRATE_BIT_SLIPS 0
  774. -#define CALIB_LFIFO_OFFSET 7
  775. -#define CALIB_VFIFO_OFFSET 5
  776. +#define CALIB_LFIFO_OFFSET 11
  777. +#define CALIB_VFIFO_OFFSET 9
  778. #define CYCLONEV 1
  779. #define DDR2 0
  780. #define DDR3 1
  781. @@ -89,20 +89,20 @@
  782. #define RW_MGR_MEM_CHIP_SELECT_WIDTH 1
  783. #define RW_MGR_MEM_CLK_EN_WIDTH 1
  784. #define RW_MGR_MEM_CONTROL_WIDTH 1
  785. -#define RW_MGR_MEM_DATA_MASK_WIDTH 5
  786. -#define RW_MGR_MEM_DATA_WIDTH 40
  787. +#define RW_MGR_MEM_DATA_MASK_WIDTH 4
  788. +#define RW_MGR_MEM_DATA_WIDTH 32
  789. #define RW_MGR_MEM_DQ_PER_READ_DQS 8
  790. #define RW_MGR_MEM_DQ_PER_WRITE_DQS 8
  791. -#define RW_MGR_MEM_IF_READ_DQS_WIDTH 5
  792. -#define RW_MGR_MEM_IF_WRITE_DQS_WIDTH 5
  793. +#define RW_MGR_MEM_IF_READ_DQS_WIDTH 4
  794. +#define RW_MGR_MEM_IF_WRITE_DQS_WIDTH 4
  795. #define RW_MGR_MEM_NUMBER_OF_CS_PER_DIMM 1
  796. #define RW_MGR_MEM_NUMBER_OF_RANKS 1
  797. #define RW_MGR_MEM_ODT_WIDTH 1
  798. #define RW_MGR_MEM_VIRTUAL_GROUPS_PER_READ_DQS 1
  799. #define RW_MGR_MEM_VIRTUAL_GROUPS_PER_WRITE_DQS 1
  800. #define RW_MGR_MR0_BL 1
  801. -#define RW_MGR_MR0_CAS_LATENCY 3
  802. -#define RW_MGR_TRUE_MEM_DATA_MASK_WIDTH 5
  803. +#define RW_MGR_MR0_CAS_LATENCY 7
  804. +#define RW_MGR_TRUE_MEM_DATA_MASK_WIDTH 4
  805. #define RW_MGR_WRITE_TO_DEBUG_READ 1.0
  806. #define SKEW_CALIBRATION 0
  807. #define STATIC_FULL_CALIBRATION 1
  808. --
  809. 1.9.0