1 /* 2 * (C) Copyright 2011 Logic Product Development <www.logicpd.com> 3 * Peter Barada <peter.barada@logicpd.com> 4 * 5 * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo 6 * reference boards. 7 * 8 * SPDX-License-Identifier: GPL-2.0+ 9 */ 10 11 #ifndef __CONFIG_H 12 #define __CONFIG_H 13 14 /* 15 * High Level Configuration Options 16 */ 17 18 #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ 19 #define CONFIG_SYS_TEXT_BASE 0x80400000 20 21 #include <configs/ti_omap3_common.h> 22 #define CONFIG_OMAP3_LOGIC /* working with Logic OMAP boards */ 23 /* 24 * Display CPU and Board information 25 */ 26 27 #define CONFIG_DISPLAY_CPUINFO 28 #define CONFIG_DISPLAY_BOARDINFO 29 30 /* Clock Defines */ 31 #define V_OSCK 26000000 /* Clock output from T2 */ 32 #define V_SCLK (V_OSCK >> 1) 33 34 #define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */ 35 36 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 37 #define CONFIG_SETUP_MEMORY_TAGS 38 #define CONFIG_INITRD_TAG 39 #define CONFIG_REVISION_TAG 40 41 #define CONFIG_CMDLINE_EDITING /* cmd line edit/history */ 42 #define CONFIG_ZERO_BOOTDELAY_CHECK /* check keypress w/no delay */ 43 44 /* 45 * Size of malloc() pool 46 */ 47 #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ 48 /* Sector */ 49 /* 50 * Hardware drivers 51 */ 52 53 /* 54 * select serial console configuration 55 */ 56 #undef CONFIG_CONS_INDEX 57 #define CONFIG_CONS_INDEX 1 58 #define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1 59 #define CONFIG_SERIAL1 1 /* UART1 on OMAP Logic boards */ 60 61 /* allow to overwrite serial and ethaddr */ 62 #define CONFIG_ENV_OVERWRITE 63 #define CONFIG_BAUDRATE 115200 64 #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ 65 115200} 66 #define CONFIG_GENERIC_MMC 67 #define CONFIG_MMC 68 #define CONFIG_OMAP_HSMMC 69 #define CONFIG_DOS_PARTITION 70 71 /* commands to include */ 72 #define CONFIG_CMD_CACHE 73 #define CONFIG_CMD_EXT2 /* EXT2 Support */ 74 #define CONFIG_CMD_FAT /* FAT support */ 75 #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ 76 #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ 77 #define MTDIDS_DEFAULT "nand0=omap2-nand.0" 78 #define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:512k(x-loader),"\ 79 "1920k(u-boot),128k(u-boot-env),"\ 80 "4m(kernel),-(fs)" 81 82 #define CONFIG_CMD_I2C /* I2C serial bus support */ 83 #define CONFIG_CMD_MMC /* MMC support */ 84 #define CONFIG_CMD_NAND /* NAND support */ 85 #define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */ 86 #define CONFIG_CMD_PING 87 #define CONFIG_CMD_DHCP 88 89 #define CONFIG_SYS_NO_FLASH 90 91 /* 92 * I2C 93 */ 94 #define CONFIG_SYS_I2C 95 #define CONFIG_SYS_OMAP24_I2C_SPEED 100000 96 #define CONFIG_SYS_OMAP24_I2C_SLAVE 1 97 #define CONFIG_SYS_I2C_OMAP34XX 98 99 /* 100 * TWL4030 101 */ 102 103 104 /* 105 * Board NAND Info. 106 */ 107 #define CONFIG_SYS_NAND_BASE NAND_BASE 108 #define CONFIG_SYS_NAND_QUIET_TEST 109 #define CONFIG_NAND_OMAP_GPMC 110 #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */ 111 /* to access nand */ 112 113 114 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ 115 /* NAND devices */ 116 #define CONFIG_SYS_NAND_BUSWIDTH_16BIT 117 118 119 /* Environment information */ 120 121 /* 122 * PREBOOT assumes the 4.3" display is attached. User can interrupt 123 * and modify display variable to suit their needs. 124 */ 125 #define CONFIG_PREBOOT \ 126 "echo ======================NOTICE============================;"\ 127 "echo \"The u-boot environment is not set.\";" \ 128 "echo \"If using a display a valid display varible for your panel\";" \ 129 "echo \"needs to be set.\";" \ 130 "echo \"Valid display options are:\";" \ 131 "echo \" 2 == LQ121S1DG31 TFT SVGA (12.1) Sharp\";" \ 132 "echo \" 3 == LQ036Q1DA01 TFT QVGA (3.6) Sharp w/ASIC\";" \ 133 "echo \" 5 == LQ064D343 TFT VGA (6.4) Sharp\";" \ 134 "echo \" 7 == LQ10D368 TFT VGA (10.4) Sharp\";" \ 135 "echo \" 15 == LQ043T1DG01 TFT WQVGA (4.3) Sharp (DEFAULT)\";" \ 136 "echo \" vga[-dvi or -hdmi] LCD VGA 640x480\";" \ 137 "echo \" svga[-dvi or -hdmi] LCD SVGA 800x600\";" \ 138 "echo \" xga[-dvi or -hdmi] LCD XGA 1024x768\";" \ 139 "echo \" 720p[-dvi or -hdmi] LCD 720P 1280x720\";" \ 140 "echo \"Defaulting to 4.3 LCD panel (display=15).\";" \ 141 "setenv display 15;" \ 142 "setenv preboot;" \ 143 "saveenv;" 144 145 146 #define CONFIG_EXTRA_ENV_SETTINGS \ 147 "loadaddr=0x81000000\0" \ 148 "bootfile=uImage\0" \ 149 "mtdids=" MTDIDS_DEFAULT "\0" \ 150 "mtdparts=" MTDPARTS_DEFAULT "\0" \ 151 "mmcdev=0\0" \ 152 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \ 153 "if run loadbootscript; then " \ 154 "run bootscript; " \ 155 "else " \ 156 "run defaultboot;" \ 157 "fi; " \ 158 "else run defaultboot; fi\0" \ 159 "defaultboot=run mmcramboot\0" \ 160 "consoledevice=ttyO0\0" \ 161 "display=15\0" \ 162 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \ 163 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \ 164 "rotation=0\0" \ 165 "vrfb_arg=if itest ${rotation} -ne 0; then " \ 166 "setenv bootargs ${bootargs} omapfb.vrfb=y " \ 167 "omapfb.rotate=${rotation}; " \ 168 "fi\0" \ 169 "otherbootargs=ignore_loglevel early_printk no_console_suspend\0" \ 170 "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \ 171 "common_bootargs=setenv bootargs ${bootargs} display=${display} " \ 172 "${otherbootargs};" \ 173 "run addmtdparts; " \ 174 "run vrfb_arg\0" \ 175 "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ 176 "bootscript=echo 'Running bootscript from mmc ...'; " \ 177 "source ${loadaddr}\0" \ 178 "loaduimage=mmc rescan ${mmcdev}; " \ 179 "fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ 180 "ramdisksize=64000\0" \ 181 "ramdiskaddr=0x82000000\0" \ 182 "ramdiskimage=rootfs.ext2.gz.uboot\0" \ 183 "ramargs=run setconsole; setenv bootargs console=${console} " \ 184 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \ 185 "mmcramboot=echo 'Booting kernel from mmc w/ramdisk...'; " \ 186 "run ramargs; " \ 187 "run common_bootargs; " \ 188 "run dump_bootargs; " \ 189 "run loaduimage; " \ 190 "fatload mmc ${mmcdev} ${ramdiskaddr} ${ramdiskimage}; "\ 191 "bootm ${loadaddr} ${ramdiskaddr}\0" \ 192 "ramboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \ 193 "run ramargs; " \ 194 "run common_bootargs; " \ 195 "run dump_bootargs; " \ 196 "tftpboot ${loadaddr} ${bootfile}; "\ 197 "tftpboot ${ramdiskaddr} ${ramdiskimage}; "\ 198 "bootm ${loadaddr} ${ramdiskaddr}\0" 199 200 #define CONFIG_BOOTCOMMAND \ 201 "run autoboot" 202 203 #define CONFIG_AUTO_COMPLETE 204 /* 205 * Miscellaneous configurable options 206 */ 207 #define CONFIG_SYS_LONGHELP /* undef to save memory */ 208 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ 209 #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ 210 /* Print Buffer Size */ 211 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 212 sizeof(CONFIG_SYS_PROMPT) + 16) 213 214 215 /* memtest works on */ 216 #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) 217 #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ 218 0x01F00000) /* 31MB */ 219 220 /* 221 * OMAP3 has 12 GP timers, they can be driven by the system clock 222 * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK). 223 * This rate is divided by a local divisor. 224 */ 225 #define CONFIG_SYS_TIMERBASE (OMAP34XX_GPT2) 226 #define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */ 227 228 /* 229 * Physical Memory Map 230 */ 231 #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ 232 #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 233 #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 234 235 /* 236 * FLASH and environment organization 237 */ 238 239 /* **** PISMO SUPPORT *** */ 240 #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */ 241 242 #if defined(CONFIG_CMD_NAND) 243 #define CONFIG_SYS_FLASH_BASE NAND_BASE 244 #elif defined(CONFIG_CMD_ONENAND) 245 #define CONFIG_SYS_FLASH_BASE ONENAND_MAP 246 #endif 247 248 /* Monitor at start of flash */ 249 #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE 250 251 #define SMNAND_ENV_OFFSET 0x260000 /* environment starts here */ 252 253 #if defined(CONFIG_CMD_NAND) 254 #define CONFIG_NAND_OMAP_GPMC 255 #define CONFIG_ENV_IS_IN_NAND 256 #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET 257 #endif 258 259 #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ 260 #define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET 261 262 #define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 263 #define CONFIG_SYS_INIT_RAM_SIZE 0x800 264 265 /* 266 * SMSC922x Ethernet 267 */ 268 #if defined(CONFIG_CMD_NET) 269 270 #define CONFIG_SMC911X 271 #define CONFIG_SMC911X_16_BIT 272 #define CONFIG_SMC911X_BASE 0x08000000 273 274 #endif /* (CONFIG_CMD_NET) */ 275 276 /* 277 * BOOTP fields 278 */ 279 280 #define CONFIG_BOOTP_SUBNETMASK 0x00000001 281 #define CONFIG_BOOTP_GATEWAY 0x00000002 282 #define CONFIG_BOOTP_HOSTNAME 0x00000004 283 #define CONFIG_BOOTP_BOOTPATH 0x00000010 284 285 #endif /* __CONFIG_H */ 286