Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 1 | /* |
Sandeep Paulraj | d2e963d | 2009-10-13 19:35:11 -0400 | [diff] [blame] | 2 | * Copyright (C) 2009 Texas Instruments Incorporated |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 3 | * |
Wolfgang Denk | bd8ec7e | 2013-10-07 13:07:26 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_H |
| 8 | #define __CONFIG_H |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 9 | |
| 10 | /* Spectrum Digital TMS320DM365 EVM board */ |
| 11 | #define DAVINCI_DM365EVM |
| 12 | |
| 13 | #define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is a 3rd stage loader */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 14 | #define CONFIG_SYS_NO_FLASH /* that is, no *NOR* flash */ |
| 15 | #define CONFIG_SYS_CONSOLE_INFO_QUIET |
| 16 | |
| 17 | /* SoC Configuration */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 18 | #define CONFIG_SYS_TIMERBASE 0x01c21400 /* use timer 0 */ |
| 19 | #define CONFIG_SYS_HZ_CLOCK 24000000 /* timer0 freq */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 20 | #define CONFIG_SOC_DM365 |
| 21 | |
| 22 | /* Memory Info */ |
| 23 | #define CONFIG_NR_DRAM_BANKS 1 |
| 24 | #define PHYS_SDRAM_1 0x80000000 |
Sandeep Paulraj | 391d1a6 | 2009-09-08 17:09:52 -0400 | [diff] [blame] | 25 | #define PHYS_SDRAM_1_SIZE (128 << 20) /* 128 MiB */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 26 | |
| 27 | /* Serial Driver info: UART0 for console */ |
| 28 | #define CONFIG_SYS_NS16550 |
| 29 | #define CONFIG_SYS_NS16550_SERIAL |
| 30 | #define CONFIG_SYS_NS16550_REG_SIZE -4 |
| 31 | #define CONFIG_SYS_NS16550_COM1 0x01c20000 |
| 32 | #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_HZ_CLOCK |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 33 | #define CONFIG_CONS_INDEX 1 |
| 34 | #define CONFIG_BAUDRATE 115200 |
| 35 | |
| 36 | /* EEPROM definitions for EEPROM on DM365 EVM */ |
| 37 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
| 38 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
| 39 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 |
| 40 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20 |
| 41 | |
| 42 | /* Network Configuration */ |
| 43 | #define CONFIG_DRIVER_TI_EMAC |
| 44 | #define CONFIG_MII |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 45 | #define CONFIG_BOOTP_DNS |
| 46 | #define CONFIG_BOOTP_DNS2 |
| 47 | #define CONFIG_BOOTP_SEND_HOSTNAME |
| 48 | #define CONFIG_NET_RETRY_COUNT 10 |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 49 | |
| 50 | /* I2C */ |
Vitaly Andrianov | bc9cd95 | 2014-04-04 13:16:52 -0400 | [diff] [blame] | 51 | #define CONFIG_SYS_I2C |
| 52 | #define CONFIG_SYS_I2C_DAVINCI |
| 53 | #define CONFIG_SYS_DAVINCI_I2C_SPEED 400000 |
| 54 | #define CONFIG_SYS_DAVINCI_I2C_SLAVE 0x10 /* SMBus host address */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 55 | |
| 56 | /* NAND: socketed, two chipselects, normally 2 GBytes */ |
| 57 | #define CONFIG_NAND_DAVINCI |
Nick Thompson | 789c887 | 2009-12-12 12:12:26 -0500 | [diff] [blame] | 58 | #define CONFIG_SYS_NAND_CS 2 |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 59 | #define CONFIG_SYS_NAND_USE_FLASH_BBT |
| 60 | #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST |
| 61 | #define CONFIG_SYS_NAND_PAGE_2K |
| 62 | |
| 63 | #define CONFIG_SYS_NAND_LARGEPAGE |
| 64 | #define CONFIG_SYS_NAND_BASE_LIST { 0x02000000, } |
| 65 | /* socket has two chipselects, nCE0 gated by address BIT(14) */ |
| 66 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
| 67 | #define CONFIG_SYS_NAND_MAX_CHIPS 2 |
| 68 | |
Sandeep Paulraj | 0bef578 | 2010-12-18 18:15:25 -0500 | [diff] [blame] | 69 | /* SD/MMC */ |
| 70 | #define CONFIG_MMC |
| 71 | #define CONFIG_GENERIC_MMC |
| 72 | #define CONFIG_DAVINCI_MMC |
| 73 | #define CONFIG_DAVINCI_MMC_SD1 |
| 74 | #define CONFIG_MMC_MBLOCK |
| 75 | |
Prathap Srinivas | e53a0f6 | 2010-01-11 15:36:46 +0530 | [diff] [blame] | 76 | #define PINMUX4_USBDRVBUS_BITCLEAR 0x3000 |
| 77 | #define PINMUX4_USBDRVBUS_BITSET 0x2000 |
| 78 | |
| 79 | /* USB Configuration */ |
| 80 | #define CONFIG_USB_DAVINCI |
| 81 | #define CONFIG_MUSB_HCD |
| 82 | |
| 83 | #ifdef CONFIG_USB_DAVINCI |
| 84 | #define CONFIG_CMD_USB /* include support for usb */ |
| 85 | #define CONFIG_CMD_STORAGE /* include support for usb */ |
| 86 | #define CONFIG_CMD_FAT /* include support for FAT/storage*/ |
| 87 | #define CONFIG_DOS_PARTITION /* include support for FAT/storage*/ |
| 88 | #endif |
| 89 | |
| 90 | #ifdef CONFIG_MUSB_HCD /* include support for usb host */ |
| 91 | #define CONFIG_CMD_USB /* include support for usb cmd */ |
| 92 | #define CONFIG_USB_STORAGE /* MSC class support */ |
| 93 | #define CONFIG_CMD_STORAGE /* inclue support for usb-storage cmd */ |
| 94 | #define CONFIG_CMD_FAT /* inclue support for FAT/storage */ |
| 95 | #define CONFIG_DOS_PARTITION /* inclue support for FAT/storage */ |
| 96 | |
| 97 | #ifdef CONFIG_USB_KEYBOARD /* HID class support */ |
| 98 | #define CONFIG_SYS_USB_EVENT_POLL |
| 99 | |
| 100 | #define CONFIG_PREBOOT "usb start" |
| 101 | #endif /* CONFIG_USB_KEYBOARD */ |
| 102 | #endif /* CONFIG_MUSB_HCD */ |
| 103 | |
| 104 | #ifdef CONFIG_MUSB_UDC |
| 105 | #define CONFIG_USB_DEVICE 1 |
| 106 | #define CONFIG_USB_TTY 1 |
| 107 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 |
| 108 | #define CONFIG_USBD_VENDORID 0x0451 |
| 109 | #define CONFIG_USBD_PRODUCTID 0x5678 |
| 110 | #define CONFIG_USBD_MANUFACTURER "Texas Instruments" |
| 111 | #define CONFIG_USBD_PRODUCT_NAME "DM365VM" |
| 112 | #endif /* CONFIG_MUSB_UDC */ |
| 113 | |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 114 | /* U-Boot command configuration */ |
| 115 | #include <config_cmd_default.h> |
| 116 | |
| 117 | #undef CONFIG_CMD_BDI |
| 118 | #undef CONFIG_CMD_FLASH |
| 119 | #undef CONFIG_CMD_FPGA |
| 120 | #undef CONFIG_CMD_SETGETDCR |
| 121 | |
| 122 | #define CONFIG_CMD_ASKENV |
| 123 | #define CONFIG_CMD_DHCP |
| 124 | #define CONFIG_CMD_I2C |
| 125 | #define CONFIG_CMD_PING |
| 126 | #define CONFIG_CMD_SAVES |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 127 | |
Hadli, Manjunath | 0dfccbe | 2012-02-06 00:30:44 +0000 | [diff] [blame] | 128 | #ifdef CONFIG_CMD_BDI |
| 129 | #define CONFIG_CLOCKS |
| 130 | #endif |
| 131 | |
Sandeep Paulraj | 0bef578 | 2010-12-18 18:15:25 -0500 | [diff] [blame] | 132 | #ifdef CONFIG_MMC |
| 133 | #define CONFIG_DOS_PARTITION |
| 134 | #define CONFIG_CMD_EXT2 |
| 135 | #define CONFIG_CMD_FAT |
| 136 | #define CONFIG_CMD_MMC |
| 137 | #endif |
| 138 | |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 139 | #ifdef CONFIG_NAND_DAVINCI |
| 140 | #define CONFIG_CMD_MTDPARTS |
| 141 | #define CONFIG_MTD_PARTITIONS |
| 142 | #define CONFIG_MTD_DEVICE |
| 143 | #define CONFIG_CMD_NAND |
| 144 | #define CONFIG_CMD_UBI |
| 145 | #define CONFIG_RBTREE |
| 146 | #endif |
| 147 | |
| 148 | #define CONFIG_CRC32_VERIFY |
| 149 | #define CONFIG_MX_CYCLIC |
| 150 | |
| 151 | /* U-Boot general configuration */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 152 | #define CONFIG_BOOTFILE "uImage" /* Boot file name */ |
Rajashekhara, Sudhakar | f8da8cd | 2011-09-03 22:13:04 -0400 | [diff] [blame] | 153 | #define CONFIG_SYS_PROMPT "DM36x EVM # " /* Monitor Command Prompt */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 154 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
| 155 | #define CONFIG_SYS_PBSIZE /* Print buffer size */ \ |
| 156 | (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
| 157 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 158 | #define CONFIG_SYS_HUSH_PARSER |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 159 | #define CONFIG_SYS_LONGHELP |
| 160 | |
| 161 | #ifdef CONFIG_NAND_DAVINCI |
Sandeep Paulraj | 391d1a6 | 2009-09-08 17:09:52 -0400 | [diff] [blame] | 162 | #define CONFIG_ENV_SIZE (256 << 10) /* 256 KiB */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 163 | #define CONFIG_ENV_IS_IN_NAND |
| 164 | #define CONFIG_ENV_OFFSET 0x3C0000 |
| 165 | #undef CONFIG_ENV_IS_IN_FLASH |
| 166 | #endif |
| 167 | |
Sandeep Paulraj | 0bef578 | 2010-12-18 18:15:25 -0500 | [diff] [blame] | 168 | #if defined(CONFIG_MMC) && !defined(CONFIG_ENV_IS_IN_NAND) |
| 169 | #define CONFIG_CMD_ENV |
| 170 | #define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB */ |
| 171 | #define CONFIG_ENV_OFFSET (51 << 9) /* Sector 51 */ |
| 172 | #define CONFIG_ENV_IS_IN_MMC |
| 173 | #undef CONFIG_ENV_IS_IN_FLASH |
| 174 | #endif |
| 175 | |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 176 | #define CONFIG_BOOTDELAY 3 |
| 177 | #define CONFIG_BOOTCOMMAND \ |
| 178 | "dhcp;bootm" |
| 179 | #define CONFIG_BOOTARGS \ |
| 180 | "console=ttyS0,115200n8 " \ |
| 181 | "root=/dev/mmcblk0p1 rootwait rootfstype=ext3 ro" |
| 182 | |
| 183 | #define CONFIG_CMDLINE_EDITING |
| 184 | #define CONFIG_VERSION_VARIABLE |
| 185 | #define CONFIG_TIMESTAMP |
| 186 | |
| 187 | /* U-Boot memory configuration */ |
Sandeep Paulraj | 391d1a6 | 2009-09-08 17:09:52 -0400 | [diff] [blame] | 188 | #define CONFIG_SYS_MALLOC_LEN (1 << 20) /* 1 MiB */ |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 189 | #define CONFIG_SYS_MEMTEST_START 0x87000000 /* physical address */ |
| 190 | #define CONFIG_SYS_MEMTEST_END 0x88000000 /* test 16MB RAM */ |
| 191 | |
| 192 | /* Linux interfacing */ |
| 193 | #define CONFIG_CMDLINE_TAG |
| 194 | #define CONFIG_SETUP_MEMORY_TAGS |
| 195 | #define CONFIG_SYS_BARGSIZE 1024 /* bootarg Size */ |
| 196 | #define CONFIG_SYS_LOAD_ADDR 0x80700000 /* kernel address */ |
| 197 | |
| 198 | |
| 199 | /* NAND configuration issocketed with two chipselects just like the DM355 EVM. |
| 200 | * It normally comes with a 2GByte SLC part with 2KB pages |
| 201 | * (and 128KB erase blocks); other |
| 202 | * 2GByte parts may have 4KB pages, 256KB erase blocks, and use MLC. (MLC |
| 203 | * pretty much demands the 4-bit ECC support.) You can of course swap in |
| 204 | * other parts, including small page ones. |
| 205 | */ |
| 206 | #define MTDIDS_DEFAULT "nand0=davinci_nand.0" |
| 207 | |
| 208 | #ifdef CONFIG_SYS_NAND_LARGEPAGE |
| 209 | /* Use same layout for 128K/256K blocks; allow some bad blocks */ |
| 210 | #define PART_BOOT "2m(bootloader)ro," |
| 211 | #else |
| 212 | /* Assume 16K erase blocks; allow a few bad ones. */ |
| 213 | #define PART_BOOT "512k(bootloader)ro," |
| 214 | #endif |
| 215 | |
| 216 | #define PART_KERNEL "4m(kernel)," /* kernel + initramfs */ |
| 217 | #define PART_REST "-(filesystem)" |
| 218 | |
| 219 | #define MTDPARTS_DEFAULT \ |
| 220 | "mtdparts=davinci_nand.0:" PART_BOOT PART_KERNEL PART_REST |
| 221 | |
Sandeep Paulraj | 12f75ad | 2010-11-27 18:50:22 -0500 | [diff] [blame] | 222 | #define CONFIG_MAX_RAM_BANK_SIZE (256 << 20) /* 256 MB */ |
| 223 | |
| 224 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 |
| 225 | #define CONFIG_SYS_INIT_SP_ADDR \ |
| 226 | (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE) |
| 227 | |
Sandeep Paulraj | 46042ef | 2009-08-15 11:20:58 -0400 | [diff] [blame] | 228 | #endif /* __CONFIG_H */ |