0001-parabola-arm-modifications.patch 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. diff --git a/board/udoo/1066mhz_4x256mx16_dl.cfg b/board/udoo/1066mhz_4x256mx16_dl.cfg
  2. new file mode 100644
  3. index 0000000..e37c9f9
  4. --- /dev/null
  5. +++ b/board/udoo/1066mhz_4x256mx16_dl.cfg
  6. @@ -0,0 +1,58 @@
  7. +/*
  8. + * Copyright (C) 2013 Seco USA Inc
  9. + *
  10. + * SPDX-License-Identifier: GPL-2.0+
  11. + */
  12. +
  13. +
  14. +DATA 4, MX6_MMDC_P0_MDPDC, 0x0002002D
  15. +DATA 4, MX6_MMDC_P0_MDOTC, 0x00333040
  16. +
  17. +DATA 4, MX6_MMDC_P0_MDCFG0, 0x3F4352F3
  18. +DATA 4, MX6_MMDC_P0_MDCFG1, 0xB66D8B63
  19. +DATA 4, MX6_MMDC_P0_MDCFG2, 0x01FF00DB
  20. +
  21. +DATA 4, MX6_MMDC_P0_MDMISC, 0x00001740
  22. +DATA 4, MX6_MMDC_P0_MDSCR, 0x00008000
  23. +DATA 4, MX6_MMDC_P0_MDRWD, 0x000026D2
  24. +
  25. +
  26. +DATA 4, MX6_MMDC_P0_MDOR, 0x00431023
  27. +DATA 4, MX6_MMDC_P0_MDASP, 0x00000027
  28. +DATA 4, MX6_MMDC_P0_MDCTL, 0x831A0000
  29. +
  30. +DATA 4, MX6_MMDC_P0_MDSCR, 0x02008032
  31. +DATA 4, MX6_MMDC_P0_MDSCR, 0x00008033
  32. +DATA 4, MX6_MMDC_P0_MDSCR, 0x00048031
  33. +DATA 4, MX6_MMDC_P0_MDSCR, 0x05208030
  34. +DATA 4, MX6_MMDC_P0_MDSCR, 0x04008040
  35. +
  36. +DATA 4, MX6_MMDC_P0_MPZQHWCTRL, 0xa1390003
  37. +DATA 4, MX6_MMDC_P1_MPZQHWCTRL, 0xa1390003
  38. +
  39. +DATA 4, MX6_MMDC_P0_MDREF, 0x00007800
  40. +
  41. +DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x00022227
  42. +DATA 4, MX6_MMDC_P1_MPODTCTRL, 0x00022227
  43. +
  44. +DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x425C0251
  45. +DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x021B021E
  46. +DATA 4, MX6_MMDC_P1_MPDGCTRL0, 0x021B021E
  47. +DATA 4, MX6_MMDC_P1_MPDGCTRL1, 0x01730200
  48. +
  49. +DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x45474C45
  50. +DATA 4, MX6_MMDC_P1_MPRDDLCTL, 0x44464744
  51. +DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x3F3F3336
  52. +DATA 4, MX6_MMDC_P1_MPWRDLCTL, 0x32383630
  53. +
  54. +DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x002F0038
  55. +DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x001F001F
  56. +DATA 4, MX6_MMDC_P1_MPWLDECTRL0, 0x001F001F
  57. +DATA 4, MX6_MMDC_P1_MPWLDECTRL1, 0x001F001F
  58. +
  59. +DATA 4, MX6_MMDC_P0_MPMUR0, 0x00000000
  60. +DATA 4, MX6_MMDC_P1_MPMUR0, 0x00000000
  61. +
  62. +DATA 4, MX6_MMDC_P0_MDPDC, 0x0002556D
  63. +DATA 4, MX6_MMDC_P0_MAPSR, 0x00011006
  64. +DATA 4, MX6_MMDC_P0_MDSCR, 0x00000000
  65. diff --git a/board/udoo/ddr-setup_dl.cfg b/board/udoo/ddr-setup_dl.cfg
  66. new file mode 100644
  67. index 0000000..487570e
  68. --- /dev/null
  69. +++ b/board/udoo/ddr-setup_dl.cfg
  70. @@ -0,0 +1,84 @@
  71. +/*
  72. + * Copyright (C) 2013 Seco USA Inc
  73. + *
  74. + * SPDX-License-Identifier: GPL-2.0+
  75. + *
  76. + * Device Configuration Data (DCD)
  77. + *
  78. + * Each entry must have the format:
  79. + * Addr-type Address Value
  80. + *
  81. + * where:
  82. + * Addr-type register length (1,2 or 4 bytes)
  83. + * Address absolute address of the register
  84. + * value value to be stored in the register
  85. + */
  86. +
  87. +/*
  88. + * DDR3 settings
  89. + * MX6Q ddr is limited to 1066 Mhz currently 1056 MHz(528 MHz clock),
  90. + * memory bus width: 64 bits x16/x32/x64
  91. + * MX6DL ddr is limited to 800 MHz(400 MHz clock)
  92. + * memory bus width: 64 bits x16/x32/x64
  93. + * MX6SOLO ddr is limited to 800 MHz(400 MHz clock)
  94. + * memory bus width: 32 bits x16/x32
  95. + */
  96. +DATA 4, MX6_IOM_DRAM_SDQS0, 0x00000028
  97. +DATA 4, MX6_IOM_DRAM_SDQS1, 0x00000028
  98. +DATA 4, MX6_IOM_DRAM_SDQS2, 0x00000028
  99. +DATA 4, MX6_IOM_DRAM_SDQS3, 0x00000028
  100. +DATA 4, MX6_IOM_DRAM_SDQS4, 0x00000028
  101. +DATA 4, MX6_IOM_DRAM_SDQS5, 0x00000028
  102. +DATA 4, MX6_IOM_DRAM_SDQS6, 0x00000028
  103. +DATA 4, MX6_IOM_DRAM_SDQS7, 0x00000028
  104. +
  105. +DATA 4, MX6_IOM_GRP_B0DS, 0x00000028
  106. +DATA 4, MX6_IOM_GRP_B1DS, 0x00000028
  107. +DATA 4, MX6_IOM_GRP_B2DS, 0x00000028
  108. +DATA 4, MX6_IOM_GRP_B3DS, 0x00000028
  109. +DATA 4, MX6_IOM_GRP_B4DS, 0x00000028
  110. +DATA 4, MX6_IOM_GRP_B5DS, 0x00000028
  111. +DATA 4, MX6_IOM_GRP_B6DS, 0x00000028
  112. +DATA 4, MX6_IOM_GRP_B7DS, 0x00000028
  113. +DATA 4, MX6_IOM_GRP_ADDDS, 0x00000028
  114. +
  115. +DATA 4, MX6_IOM_GRP_CTLDS, 0x00000028
  116. +
  117. +DATA 4, MX6_IOM_DRAM_DQM0, 0x00000028
  118. +DATA 4, MX6_IOM_DRAM_DQM1, 0x00000028
  119. +DATA 4, MX6_IOM_DRAM_DQM2, 0x00000028
  120. +DATA 4, MX6_IOM_DRAM_DQM3, 0x00000028
  121. +DATA 4, MX6_IOM_DRAM_DQM4, 0x00000028
  122. +DATA 4, MX6_IOM_DRAM_DQM5, 0x00000028
  123. +DATA 4, MX6_IOM_DRAM_DQM6, 0x00000028
  124. +DATA 4, MX6_IOM_DRAM_DQM7, 0x00000028
  125. +
  126. +DATA 4, MX6_IOM_DRAM_CAS, 0x00000028
  127. +DATA 4, MX6_IOM_DRAM_RAS, 0x00000028
  128. +DATA 4, MX6_IOM_DRAM_SDCLK_0, 0x00000028
  129. +DATA 4, MX6_IOM_DRAM_SDCLK_1, 0x00000028
  130. +
  131. +DATA 4, MX6_IOM_DRAM_RESET, 0x00000028
  132. +
  133. +DATA 4, MX6_IOM_DRAM_SDODT0, 0x00000028
  134. +DATA 4, MX6_IOM_DRAM_SDODT1, 0x00000028
  135. +
  136. +/* (differential input) */
  137. +DATA 4, MX6_IOM_DDRMODE_CTL, 0x00020000
  138. +/* (differential input) */
  139. +DATA 4, MX6_IOM_GRP_DDRMODE, 0x00020000
  140. +/* disable ddr pullups */
  141. +DATA 4, MX6_IOM_GRP_DDRPKE, 0x00000000
  142. +DATA 4, MX6_IOM_DRAM_SDBA2, 0x00000000
  143. +/* 40 Ohm drive strength for cs0/1,sdba2,cke0/1,sdwe */
  144. +DATA 4, MX6_IOM_GRP_DDR_TYPE, 0x000C0000
  145. +
  146. +/* Read data DQ Byte0-3 delay */
  147. +DATA 4, MX6_MMDC_P0_MPRDDQBY0DL, 0x33333333
  148. +DATA 4, MX6_MMDC_P0_MPRDDQBY1DL, 0x33333333
  149. +DATA 4, MX6_MMDC_P0_MPRDDQBY2DL, 0x33333333
  150. +DATA 4, MX6_MMDC_P0_MPRDDQBY3DL, 0x33333333
  151. +DATA 4, MX6_MMDC_P1_MPRDDQBY0DL, 0x33333333
  152. +DATA 4, MX6_MMDC_P1_MPRDDQBY1DL, 0x33333333
  153. +DATA 4, MX6_MMDC_P1_MPRDDQBY2DL, 0x33333333
  154. +DATA 4, MX6_MMDC_P1_MPRDDQBY3DL, 0x33333333
  155. diff --git a/board/udoo/udoo-dl.cfg b/board/udoo/udoo-dl.cfg
  156. new file mode 100644
  157. index 0000000..46953c1
  158. --- /dev/null
  159. +++ b/board/udoo/udoo-dl.cfg
  160. @@ -0,0 +1,29 @@
  161. +/*
  162. + * Copyright (C) 2013 Boundary Devices
  163. + *
  164. + * SPDX-License-Identifier: GPL-2.0+
  165. + *
  166. + * Refer doc/README.imximage for more details about how-to configure
  167. + * and create imximage boot image
  168. + *
  169. + * The syntax is taken as close as possible with the kwbimage
  170. + */
  171. +
  172. +/* image version */
  173. +IMAGE_VERSION 2
  174. +
  175. +/*
  176. + * Boot Device : one of
  177. + * spi, sd (the board has no nand neither onenand)
  178. + */
  179. +BOOT_FROM sd
  180. +
  181. +#define __ASSEMBLY__
  182. +#include <config.h>
  183. +#include "asm/arch/mx6-ddr.h"
  184. +#include "asm/arch/iomux.h"
  185. +#include "asm/arch/crm_regs.h"
  186. +
  187. +#include "ddr-setup_dl.cfg"
  188. +#include "1066mhz_4x256mx16_dl.cfg"
  189. +#include "clocks.cfg"
  190. diff --git a/configs/udoo_dl_defconfig b/configs/udoo_dl_defconfig
  191. new file mode 100644
  192. index 0000000..5dc9016
  193. --- /dev/null
  194. +++ b/configs/udoo_dl_defconfig
  195. @@ -0,0 +1,3 @@
  196. +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/udoo/udoo-dl.cfg,MX6DL,DDR_MB=1024"
  197. +CONFIG_ARM=y
  198. +CONFIG_TARGET_UDOO=y
  199. diff --git a/include/configs/udoo.h b/include/configs/udoo.h
  200. index 700e9c1..7fdce0f 100644
  201. --- a/include/configs/udoo.h
  202. +++ b/include/configs/udoo.h
  203. @@ -78,7 +78,7 @@
  204. #define CONFIG_CMD_BMODE
  205. #define CONFIG_CMD_SETEXPR
  206. -#define CONFIG_BOOTDELAY 3
  207. +#define CONFIG_BOOTDELAY 1
  208. #define CONFIG_SYS_MEMTEST_START 0x10000000
  209. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
  210. @@ -96,60 +96,97 @@
  211. #define CONFIG_BOUNCE_BUFFER
  212. #define CONFIG_CMD_EXT2
  213. #define CONFIG_CMD_FAT
  214. +#define CONFIG_CMD_EXT4
  215. +#define CONFIG_CMD_FS_GENERIC
  216. #define CONFIG_DOS_PARTITION
  217. +#define CONFIG_IDENT_STRING " Parabola GNU/Linux-libre"
  218. +
  219. +#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
  220. +#define CONFIG_DEFAULT_FDT_FILE "imx6dl-udoo.dtb"
  221. +#elif defined(CONFIG_MX6Q)
  222. #define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
  223. +#endif
  224. #define CONFIG_EXTRA_ENV_SETTINGS \
  225. - "script=boot.scr\0" \
  226. - "image=zImage\0" \
  227. - "console=ttymxc1\0" \
  228. + "bootfile=vmlinuz-linux-libre\0" \
  229. + "bootdir=/boot\0" \
  230. + "console=ttymxc1,115200\0" \
  231. "splashpos=m,m\0" \
  232. "fdt_high=0xffffffff\0" \
  233. + "rdaddr=0x12A00000\0" \
  234. + "rdfile=initramfs-linux-libre.img\0" \
  235. "initrd_high=0xffffffff\0" \
  236. - "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
  237. - "fdt_addr=0x18000000\0" \
  238. - "boot_fdt=try\0" \
  239. + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
  240. + "fdtdir=/boot/dtbs/linux-libre\0" \
  241. + "fdtaddr=0x18000000\0" \
  242. "ip_dyn=yes\0" \
  243. + "optargs=\0" \
  244. + "video=\0" \
  245. "mmcdev=0\0" \
  246. - "mmcpart=1\0" \
  247. - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
  248. - "update_sd_firmware_filename=u-boot.imx\0" \
  249. - "update_sd_firmware=" \
  250. - "if test ${ip_dyn} = yes; then " \
  251. - "setenv get_cmd dhcp; " \
  252. + "mmcroot=/dev/mmcblk0p1 rw rootwait\0" \
  253. + "mmcargs=setenv bootargs console=${console} " \
  254. + "${optargs} " \
  255. + "root=${mmcroot} " \
  256. + "video=${video}\0" \
  257. + "videoargs=" \
  258. + "setenv nextcon 0; " \
  259. + "if hdmidet; then " \
  260. + "setenv bootargs ${bootargs} " \
  261. + "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \
  262. + "if=RGB24; " \
  263. + "setenv fbmem fbmem=28M; " \
  264. + "setexpr nextcon ${nextcon} + 1; " \
  265. "else " \
  266. - "setenv get_cmd tftp; " \
  267. + "echo - no HDMI monitor;" \
  268. "fi; " \
  269. - "if mmc dev ${mmcdev}; then " \
  270. - "if ${get_cmd} ${update_sd_firmware_filename}; then " \
  271. - "setexpr fw_sz ${filesize} / 0x200; " \
  272. - "setexpr fw_sz ${fw_sz} + 1; " \
  273. - "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
  274. - "fi; " \
  275. - "fi\0" \
  276. - "mmcargs=setenv bootargs console=${console},${baudrate} " \
  277. - "root=${mmcroot}\0" \
  278. - "loadbootscript=" \
  279. - "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
  280. - "bootscript=echo Running bootscript from mmc ...; " \
  281. - "source\0" \
  282. - "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
  283. - "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
  284. - "mmcboot=echo Booting from mmc ...; " \
  285. - "run mmcargs; " \
  286. - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  287. - "if run loadfdt; then " \
  288. - "bootz ${loadaddr} - ${fdt_addr}; " \
  289. + "i2c dev 1; " \
  290. + "if i2c probe 0x10; then " \
  291. + "setenv bootargs ${bootargs} " \
  292. + "video=mxcfb${nextcon}:dev=lcd,800x480@60," \
  293. + "if=RGB666; " \
  294. + "if test 0 -eq ${nextcon}; then " \
  295. + "setenv fbmem fbmem=10M; " \
  296. "else " \
  297. - "if test ${boot_fdt} = try; then " \
  298. - "bootz; " \
  299. - "else " \
  300. - "echo WARN: Cannot load the DT; " \
  301. - "fi; " \
  302. + "setenv fbmem ${fbmem},10M; " \
  303. "fi; " \
  304. + "setexpr nextcon ${nextcon} + 1; " \
  305. "else " \
  306. - "bootz; " \
  307. + "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \
  308. + "fi; " \
  309. + "setenv bootargs ${bootargs} ${fbmem}\0" \
  310. + "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
  311. + "loadrd=load mmc ${bootpart} ${rdaddr} ${bootdir}/${rdfile}\0" \
  312. + "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \
  313. + "mmcboot=mmc dev ${mmcdev}; " \
  314. + "if mmc rescan; then " \
  315. + "echo SD/MMC found on device ${mmcdev};" \
  316. + "setenv bootpart ${mmcdev}:1; " \
  317. + "echo Checking for: ${bootdir}/uEnv.txt ...;" \
  318. + "if test -e mmc ${bootpart} ${bootdir}/uEnv.txt; then " \
  319. + "load mmc ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt;" \
  320. + "env import -t ${loadaddr} ${filesize};" \
  321. + "echo Loaded environment from ${bootdir}/uEnv.txt;" \
  322. + "echo Checking if uenvcmd is set ...;" \
  323. + "if test -n ${uenvcmd}; then " \
  324. + "echo Running uenvcmd ...;" \
  325. + "run uenvcmd;" \
  326. + "fi;" \
  327. + "fi; " \
  328. + "if run loadimage; then " \
  329. + "if run loadfdt; then " \
  330. + "run mmcargs;" \
  331. + "if run loadrd; then " \
  332. + "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr};" \
  333. + "else " \
  334. + "bootz ${loadaddr} - ${fdtaddr};" \
  335. + "fi;" \
  336. + "else " \
  337. + "echo Kernel found, but no device tree found;" \
  338. + "fi;" \
  339. + "else " \
  340. + "echo No kernel found;" \
  341. + "fi;" \
  342. "fi;\0" \
  343. "netargs=setenv bootargs console=${console},${baudrate} " \
  344. "root=/dev/nfs " \
  345. @@ -161,10 +198,10 @@
  346. "else " \
  347. "setenv get_cmd tftp; " \
  348. "fi; " \
  349. - "${get_cmd} ${image}; " \
  350. + "${get_cmd} ${bootfile}; " \
  351. "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
  352. - "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
  353. - "bootz ${loadaddr} - ${fdt_addr}; " \
  354. + "if ${get_cmd} ${fdtaddr} ${fdtfile}; then " \
  355. + "bootz ${loadaddr} - ${fdtaddr}; " \
  356. "else " \
  357. "if test ${boot_fdt} = try; then " \
  358. "bootz; " \
  359. @@ -177,16 +214,7 @@
  360. "fi;\0"
  361. #define CONFIG_BOOTCOMMAND \
  362. - "mmc dev ${mmcdev}; if mmc rescan; then " \
  363. - "if run loadbootscript; then " \
  364. - "run bootscript; " \
  365. - "else " \
  366. - "if run loadimage; then " \
  367. - "run mmcboot; " \
  368. - "else run netboot; " \
  369. - "fi; " \
  370. - "fi; " \
  371. - "else run netboot; fi"
  372. + "run mmcboot;"
  373. /* Miscellaneous configurable options */
  374. #define CONFIG_SYS_LONGHELP
  375. @@ -228,6 +256,7 @@
  376. #define CONFIG_OF_LIBFDT
  377. #define CONFIG_CMD_BOOTZ
  378. +#define CONFIG_SUPPORT_RAW_INITRD
  379. #ifndef CONFIG_SYS_DCACHE_OFF
  380. #define CONFIG_CMD_CACHE
  381. --
  382. 2.2.1