Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2011 Logic Product Development <www.logicpd.com> |
| 4 | * Peter Barada <peter.barada@logicpd.com> |
| 5 | * |
| 6 | * Configuration settings for the Logic OMAP35x/DM37x SOM LV/Torpedo |
| 7 | * reference boards. |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __CONFIG_H |
| 11 | #define __CONFIG_H |
| 12 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 13 | /* High Level Configuration Options */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 14 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 15 | #include <configs/ti_omap3_common.h> |
| 16 | |
Tom Rini | cfff4aa | 2016-08-26 13:30:43 -0400 | [diff] [blame] | 17 | /* |
| 18 | * We are only ever GP parts and will utilize all of the "downloaded image" |
| 19 | * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in |
| 20 | * order to allow for BCH8 to fit in. |
| 21 | */ |
Adam Ford | d92313a | 2016-02-08 19:06:08 -0600 | [diff] [blame] | 22 | #undef CONFIG_SPL_TEXT_BASE |
Tom Rini | cfff4aa | 2016-08-26 13:30:43 -0400 | [diff] [blame] | 23 | #define CONFIG_SPL_TEXT_BASE 0x40200000 |
Adam Ford | d92313a | 2016-02-08 19:06:08 -0600 | [diff] [blame] | 24 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 25 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 26 | #define CONFIG_SETUP_MEMORY_TAGS |
| 27 | #define CONFIG_INITRD_TAG |
| 28 | #define CONFIG_REVISION_TAG |
| 29 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 30 | /* Hardware drivers */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 31 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 32 | /* I2C */ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 33 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C64 */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 34 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 35 | /* Board NAND Info. */ |
| 36 | #ifdef CONFIG_NAND |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 37 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ |
| 38 | /* NAND devices */ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 39 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
| 40 | #define CONFIG_SYS_NAND_PAGE_COUNT 64 |
| 41 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 |
| 42 | #define CONFIG_SYS_NAND_OOBSIZE 64 |
| 43 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) |
| 44 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS |
| 45 | #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \ |
| 46 | 13, 14, 16, 17, 18, 19, 20, 21, 22, \ |
| 47 | 23, 24, 25, 26, 27, 28, 30, 31, 32, \ |
| 48 | 33, 34, 35, 36, 37, 38, 39, 40, 41, \ |
| 49 | 42, 44, 45, 46, 47, 48, 49, 50, 51, \ |
| 50 | 52, 53, 54, 55, 56} |
Adam Ford | 04c848a | 2015-09-02 09:18:20 -0500 | [diff] [blame] | 51 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 52 | #define CONFIG_SYS_NAND_ECCSIZE 512 |
| 53 | #define CONFIG_SYS_NAND_ECCBYTES 13 |
| 54 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 55 | #define CONFIG_SYS_NAND_MAX_OOBFREE 2 |
| 56 | #define CONFIG_SYS_NAND_MAX_ECCPOS 56 |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 57 | #endif |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 58 | |
| 59 | /* Environment information */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 60 | |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 61 | #define CONFIG_PREBOOT \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 62 | "setenv preboot;" \ |
| 63 | "saveenv;" |
| 64 | |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 65 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 66 | DEFAULT_LINUX_BOOT_ENV \ |
Tom Rini | 5ad8e11 | 2017-10-22 17:55:07 -0400 | [diff] [blame] | 67 | "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ |
| 68 | "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 69 | "mmcdev=0\0" \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 70 | "mmcroot=/dev/mmcblk0p2 rw\0" \ |
| 71 | "mmcrootfstype=ext4 rootwait\0" \ |
Adam Ford | 193e9a1 | 2016-02-10 01:41:10 -0600 | [diff] [blame] | 72 | "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \ |
| 73 | "nandrootfstype=ubifs rootwait\0" \ |
Andrew Bradford | e1c7c8a | 2012-10-01 05:06:52 +0000 | [diff] [blame] | 74 | "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 75 | "if run loadbootscript; then " \ |
| 76 | "run bootscript; " \ |
| 77 | "else " \ |
| 78 | "run defaultboot;" \ |
| 79 | "fi; " \ |
| 80 | "else run defaultboot; fi\0" \ |
| 81 | "defaultboot=run mmcramboot\0" \ |
Adam Ford | b36bb90 | 2018-06-15 08:12:02 -0500 | [diff] [blame] | 82 | "consoledevice=ttyS0\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 83 | "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \ |
| 84 | "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \ |
| 85 | "rotation=0\0" \ |
| 86 | "vrfb_arg=if itest ${rotation} -ne 0; then " \ |
| 87 | "setenv bootargs ${bootargs} omapfb.vrfb=y " \ |
| 88 | "omapfb.rotate=${rotation}; " \ |
| 89 | "fi\0" \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 90 | "optargs=ignore_loglevel early_printk no_console_suspend\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 91 | "common_bootargs=run setconsole; setenv bootargs " \ |
| 92 | "${bootargs} "\ |
| 93 | "console=${console} " \ |
| 94 | "${mtdparts} "\ |
| 95 | "${optargs}; " \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 96 | "run vrfb_arg\0" \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 97 | "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 98 | "bootscript=echo 'Running bootscript from mmc ...'; " \ |
| 99 | "source ${loadaddr}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 100 | "loadimage=mmc rescan; " \ |
| 101 | "load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 102 | "ramdisksize=64000\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 103 | "ramdiskimage=rootfs.ext2.gz.uboot\0" \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 104 | "loadramdisk=mmc rescan; " \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 105 | "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 106 | "ramargs=setenv bootargs "\ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 107 | "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 108 | "mmcargs=setenv bootargs "\ |
| 109 | "root=${mmcroot} rootfstype=${mmcrootfstype}\0" \ |
| 110 | "nandargs=setenv bootargs "\ |
Adam Ford | 193e9a1 | 2016-02-10 01:41:10 -0600 | [diff] [blame] | 111 | "root=${nandroot} " \ |
| 112 | "rootfstype=${nandrootfstype}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 113 | "nfsargs=setenv serverip ${tftpserver}; " \ |
| 114 | "setenv bootargs root=/dev/nfs " \ |
Adam Ford | 97073d0 | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 115 | "nfsroot=${nfsrootpath} " \ |
| 116 | "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \ |
| 117 | "nfsrootpath=/opt/nfs-exports/omap\0" \ |
| 118 | "autoload=no\0" \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 119 | "loadfdt=mmc rescan; " \ |
| 120 | "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 121 | "mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 122 | "run mmcargs; " \ |
| 123 | "run common_bootargs; " \ |
| 124 | "run dump_bootargs; " \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 125 | "run loadimage; " \ |
| 126 | "run loadfdt;\0 " \ |
| 127 | "mmcbootz=setenv bootfile zImage; " \ |
| 128 | "run mmcbootcommon; "\ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 129 | "bootz ${loadaddr} - ${fdtaddr}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 130 | "mmcboot=setenv bootfile uImage; "\ |
| 131 | "run mmcbootcommon; "\ |
| 132 | "bootm ${loadaddr} - ${fdtaddr}\0" \ |
| 133 | "mmcrambootcommon=echo 'Booting kernel from MMC w/ramdisk...'; " \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 134 | "run ramargs; " \ |
| 135 | "run common_bootargs; " \ |
| 136 | "run dump_bootargs; " \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 137 | "run loadimage; " \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 138 | "run loadfdt; " \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 139 | "run loadramdisk\0" \ |
| 140 | "mmcramboot=setenv bootfile uImage; " \ |
| 141 | "run mmcrambootcommon; " \ |
Adam Ford | 8717e92 | 2018-03-26 10:24:12 -0500 | [diff] [blame] | 142 | "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 143 | "mmcrambootz=setenv bootfile zImage; " \ |
| 144 | "run mmcrambootcommon; " \ |
Adam Ford | 8717e92 | 2018-03-26 10:24:12 -0500 | [diff] [blame] | 145 | "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 146 | "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 147 | "run ramargs; " \ |
| 148 | "run common_bootargs; " \ |
| 149 | "run dump_bootargs; " \ |
Adam Ford | 97073d0 | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 150 | "tftpboot ${loadaddr} ${zimage}; " \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 151 | "tftpboot ${rdaddr} ${ramdiskimage}; " \ |
| 152 | "bootm ${loadaddr} ${rdaddr}\0" \ |
Adam Ford | 97073d0 | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 153 | "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \ |
| 154 | "dhcp;" \ |
| 155 | "run nfsargs;" \ |
| 156 | "run common_bootargs;" \ |
| 157 | "run dump_bootargs;" \ |
| 158 | "tftpboot $loadaddr zImage;" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 159 | "bootz $loadaddr\0" \ |
| 160 | "nandbootcommon=echo 'Booting kernel from NAND...';" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 161 | "run nandargs;" \ |
| 162 | "run common_bootargs;" \ |
| 163 | "run dump_bootargs;" \ |
| 164 | "nand read ${loadaddr} kernel;" \ |
| 165 | "nand read ${fdtaddr} spl-os;\0" \ |
| 166 | "nandbootz=run nandbootcommon; "\ |
| 167 | "bootz ${loadaddr} - ${fdtaddr}\0"\ |
| 168 | "nandboot=run nandbootcommon; "\ |
| 169 | "bootm ${loadaddr} - ${fdtaddr}\0"\ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 170 | |
| 171 | #define CONFIG_BOOTCOMMAND \ |
| 172 | "run autoboot" |
| 173 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 174 | /* Miscellaneous configurable options */ |
Adam Ford | 04c848a | 2015-09-02 09:18:20 -0500 | [diff] [blame] | 175 | |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 176 | /* memtest works on */ |
| 177 | #define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) |
| 178 | #define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ |
| 179 | 0x01F00000) /* 31MB */ |
| 180 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 181 | /* FLASH and environment organization */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 182 | |
| 183 | /* **** PISMO SUPPORT *** */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 184 | #if defined(CONFIG_CMD_NAND) |
pekon gupta | 0a9ec45 | 2014-07-18 17:59:41 +0530 | [diff] [blame] | 185 | #define CONFIG_SYS_FLASH_BASE NAND_BASE |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 186 | #endif |
| 187 | |
| 188 | /* Monitor at start of flash */ |
| 189 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
| 190 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 191 | #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 192 | |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 193 | #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ |
Adam Ford | 6b1c165 | 2017-09-04 21:08:02 -0500 | [diff] [blame] | 194 | #define CONFIG_ENV_OFFSET 0x260000 |
| 195 | #define CONFIG_ENV_ADDR 0x260000 |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 196 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 197 | /* Defines for SPL */ |
| 198 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 199 | /* NAND: SPL falcon mode configs */ |
| 200 | #ifdef CONFIG_SPL_OS_BOOT |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 201 | #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 202 | #endif |
| 203 | |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 204 | #endif /* __CONFIG_H */ |