From: Lothar Waßmann Date: Mon, 15 Jul 2013 09:52:32 +0000 (+0200) Subject: mxs: tx28: add support for TX28-40x2 (with 256 MiB SDRAM) X-Git-Tag: KARO_TX6-2013-08-01~27 X-Git-Url: https://git.karo-electronics.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=0447228117f9aa7357bec18d65d803812c461fa2 mxs: tx28: add support for TX28-40x2 (with 256 MiB SDRAM) --- diff --git a/board/karo/tx28/spl_boot.c b/board/karo/tx28/spl_boot.c index 8cff461e5b..58335ff6f0 100644 --- a/board/karo/tx28/spl_boot.c +++ b/board/karo/tx28/spl_boot.c @@ -226,8 +226,8 @@ void board_init_ll(void) tx28_stk5_led_on(); } -#ifndef CONFIG_TX28_S static uint32_t tx28_dram_vals[] = { +#ifdef CONFIG_TX28_S /* TX28-41x0: NT5TU32M16DG-AC */ /* 000 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 010 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, @@ -235,8 +235,8 @@ static uint32_t tx28_dram_vals[] = { /* 030 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 040 */ 0x00000000, 0x00000100, 0x00000000, 0x00000000, /* 050 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, - /* 060 */ 0x00000000, 0x00000000, 0x00010101, 0x01010101, - /* 070 */ 0x000f0f01, 0x0102020a, 0x00000000, 0x00010101, + /* 060 */ 0x00000000, 0x00000000, 0x00010101, 0x00010101, + /* 070 */ 0x000f0f01, 0x0102010a, 0x00000000, 0x00000101, /* 080 */ 0x00000100, 0x00000100, 0x00000000, 0x00000002, /* 090 */ 0x01010000, 0x07080403, 0x06005003, 0x0a0000c8, /* 0a0 */ 0x02009c40, 0x0002030c, 0x0036a609, 0x031a0612, @@ -277,9 +277,7 @@ static uint32_t tx28_dram_vals[] = { /* 2d0 */ 0x06120612, 0x04420442, 0x04420442, 0x00040004, /* 2e0 */ 0x00040004, 0x00000000, 0x00000000, 0x00000000, /* 2f0 */ 0x00000000, 0x00000000, -}; -#else -static uint32_t tx28_dram_vals[] = { +#elif CONFIG_SDRAM_SIZE == SZ_128M /* TX28-40x0: MT47H64M16HR-3 */ /* 000 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 010 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, @@ -287,8 +285,8 @@ static uint32_t tx28_dram_vals[] = { /* 030 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* 040 */ 0x00000000, 0x00000100, 0x00000000, 0x00000000, /* 050 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, - /* 060 */ 0x00000000, 0x00000000, 0x00010101, 0x00010101, - /* 070 */ 0x000f0f01, 0x0102010a, 0x00000000, 0x00000101, + /* 060 */ 0x00000000, 0x00000000, 0x00010101, 0x01010101, + /* 070 */ 0x000f0f01, 0x0102020a, 0x00000000, 0x00010101, /* 080 */ 0x00000100, 0x00000100, 0x00000000, 0x00000002, /* 090 */ 0x01010000, 0x07080403, 0x06005003, 0x0a0000c8, /* 0a0 */ 0x02009c40, 0x0002030c, 0x0036a609, 0x031a0612, @@ -329,8 +327,60 @@ static uint32_t tx28_dram_vals[] = { /* 2d0 */ 0x06120612, 0x04420442, 0x04420442, 0x00040004, /* 2e0 */ 0x00040004, 0x00000000, 0x00000000, 0x00000000, /* 2f0 */ 0x00000000, 0x00000000, -}; +#elif CONFIG_SDRAM_SIZE == SZ_256M + /* TX28-40x2: MEM2G16D2DABG */ + /* 000 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 010 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 020 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 030 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 040 */ 0x00000000, 0x00000100, 0x00000000, 0x00000000, + /* 050 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 060 */ 0x00000000, 0x00000000, 0x00010101, 0x01010101, + /* 070 */ 0x000f0f01, 0x0102010a, 0x00000000, 0x00010101, + /* 080 */ 0x00000100, 0x00000100, 0x00000000, 0x00000002, + /* 090 */ 0x01010000, 0x07080603, 0x07005003, 0x0a0000c8, + /* 0a0 */ 0x02009c40, 0x0002030c, 0x00380e09, 0x0328063f, + /* 0b0 */ 0x02030202, 0x00c8001c, 0x00000000, 0x00000000, + /* 0c0 */ 0x00012100, 0xffff0303, 0x00012100, 0xffff0303, + /* 0d0 */ 0x00012100, 0xffff0303, 0x00012100, 0xffff0303, + /* 0e0 */ 0x00000003, 0x00000000, 0x00000000, 0x00000000, + /* 0f0 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 100 */ 0x00000000, 0x00000000, 0x00000612, 0x01000102, + /* 110 */ 0x06120612, 0x00000200, 0x00020007, 0xf4002714, + /* 120 */ 0xf4002714, 0xf4002714, 0xf4002714, 0x07400300, + /* 130 */ 0x07400300, 0x07400300, 0x07400300, 0x00000005, + /* 140 */ 0x00000000, 0x00000000, 0x01000000, 0x01020408, + /* 150 */ 0x08040201, 0x000f1133, 0x00000000, 0x00001f04, + /* 160 */ 0x00001f04, 0x00001f04, 0x00001f04, 0x00001f04, + /* 170 */ 0x00001f04, 0x00001f04, 0x00001f04, 0x00000000, + /* 180 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 190 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 1a0 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 1b0 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 1c0 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 1d0 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 1e0 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 1f0 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 200 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 210 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 220 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 230 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 240 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 250 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 260 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 270 */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, + /* 280 */ 0x00000000, 0x00000000, 0x00010000, 0x00030404, + /* 290 */ 0x00000003, 0x00000000, 0x00000000, 0x00000000, + /* 2a0 */ 0x00000000, 0x00000000, 0x00000000, 0x01010000, + /* 2b0 */ 0x01000000, 0x03030000, 0x00010303, 0x01020202, + /* 2c0 */ 0x00000000, 0x02040303, 0x21002103, 0x00061200, + /* 2d0 */ 0x06120612, 0x04420442, 0x04420442, 0x00040004, + /* 2e0 */ 0x00040004, 0x00000000, 0x00000000, 0x00000000, + /* 2f0 */ 0x00000000, 0x00000000, +#else +#error No SDRAM configuration available #endif +}; void mxs_adjust_memory_params(uint32_t *dram_vals) { diff --git a/boards.cfg b/boards.cfg index abc437c2d7..c5eb77cad8 100644 --- a/boards.cfg +++ b/boards.cfg @@ -188,8 +188,9 @@ devkit3250 arm arm926ejs devkit3250 timll jadecpu arm arm926ejs jadecpu syteco mb86r0x mx25pdk arm arm926ejs mx25pdk freescale mx25 mx25pdk:IMX_CONFIG=board/freescale/mx25pdk/imximage.cfg tx25 arm arm926ejs tx25 karo mx25 -tx28-40xx arm arm926ejs tx28 karo mxs tx28:TX28 -tx28-41xx arm arm926ejs tx28 karo mxs tx28:TX28_S +tx28-40x1 arm arm926ejs tx28 karo mxs tx28:TX28,SDRAM_SIZE=SZ_128M +tx28-40x2 arm arm926ejs tx28 karo mxs tx28:TX28,SDRAM_SIZE=SZ_256M +tx28-41x0 arm arm926ejs tx28 karo mxs tx28:TX28_S,SDRAM_SIZE=SZ_64M zmx25 arm arm926ejs zmx25 syteco mx25 imx27lite arm arm926ejs imx27lite logicpd mx27 magnesium arm arm926ejs imx27lite logicpd mx27 diff --git a/include/configs/tx28.h b/include/configs/tx28.h index 9cf9f68269..8ba3fee4e8 100644 --- a/include/configs/tx28.h +++ b/include/configs/tx28.h @@ -22,11 +22,10 @@ #define CONFIG_MX28 /* i.MX28 SoC */ #define CONFIG_MXS_GPIO /* GPIO control */ #define CONFIG_SYS_HZ 1000 /* Ticks per second */ +#define PHYS_SDRAM_1_SIZE CONFIG_SDRAM_SIZE #ifdef CONFIG_TX28_S -#define PHYS_SDRAM_1_SIZE SZ_64M #define TX28_MOD_SUFFIX "1" #else -#define PHYS_SDRAM_1_SIZE SZ_128M #define CONFIG_SYS_SPL_FIXED_BATT_SUPPLY #define TX28_MOD_SUFFIX "0" #endif