Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peter Barada | 86887f8 | 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 | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __CONFIG_H |
| 11 | #define __CONFIG_H |
| 12 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 13 | /* High Level Configuration Options */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 14 | |
Adam Ford | 7b77b1f | 2015-09-02 09:18:20 -0500 | [diff] [blame] | 15 | #include <configs/ti_omap3_common.h> |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 16 | |
Tom Rini | fa2f81b | 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 | f92dfc8 | 2016-02-08 19:06:08 -0600 | [diff] [blame] | 22 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 23 | #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 24 | #define CONFIG_SETUP_MEMORY_TAGS |
| 25 | #define CONFIG_INITRD_TAG |
| 26 | #define CONFIG_REVISION_TAG |
| 27 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 28 | /* Hardware drivers */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 29 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 30 | /* I2C */ |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 31 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM AT24C64 */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 32 | |
Adam Ford | 97605d3 | 2019-08-22 15:32:42 -0500 | [diff] [blame] | 33 | #ifdef CONFIG_SPL_BUILD |
| 34 | #undef CONFIG_USB_EHCI_OMAP |
| 35 | #endif |
Adam Ford | 25e4ff4 | 2019-06-30 17:30:49 -0500 | [diff] [blame] | 36 | #ifdef CONFIG_USB_EHCI_OMAP |
| 37 | #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 4 |
| 38 | #endif |
| 39 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 40 | /* Board NAND Info. */ |
Miquel Raynal | 88718be | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 41 | #ifdef CONFIG_MTD_RAW_NAND |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 42 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */ |
| 43 | /* NAND devices */ |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 44 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
| 45 | #define CONFIG_SYS_NAND_PAGE_COUNT 64 |
| 46 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 |
| 47 | #define CONFIG_SYS_NAND_OOBSIZE 64 |
| 48 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) |
| 49 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS |
| 50 | #define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \ |
| 51 | 13, 14, 16, 17, 18, 19, 20, 21, 22, \ |
| 52 | 23, 24, 25, 26, 27, 28, 30, 31, 32, \ |
| 53 | 33, 34, 35, 36, 37, 38, 39, 40, 41, \ |
| 54 | 42, 44, 45, 46, 47, 48, 49, 50, 51, \ |
| 55 | 52, 53, 54, 55, 56} |
Adam Ford | 7b77b1f | 2015-09-02 09:18:20 -0500 | [diff] [blame] | 56 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 57 | #define CONFIG_SYS_NAND_ECCSIZE 512 |
| 58 | #define CONFIG_SYS_NAND_ECCBYTES 13 |
| 59 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 60 | #define CONFIG_SYS_NAND_MAX_OOBFREE 2 |
| 61 | #define CONFIG_SYS_NAND_MAX_ECCPOS 56 |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 62 | #endif |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 63 | |
| 64 | /* Environment information */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 65 | |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 66 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Adam Ford | bb5854c | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 67 | DEFAULT_LINUX_BOOT_ENV \ |
Tom Rini | 43ede0b | 2017-10-22 17:55:07 -0400 | [diff] [blame] | 68 | "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ |
| 69 | "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 70 | "mmcdev=0\0" \ |
Adam Ford | c7d00f6 | 2019-04-11 15:24:33 -0500 | [diff] [blame] | 71 | "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 72 | "mmcrootfstype=ext4 rootwait\0" \ |
Adam Ford | a094c92 | 2016-02-10 01:41:10 -0600 | [diff] [blame] | 73 | "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \ |
| 74 | "nandrootfstype=ubifs rootwait\0" \ |
Andrew Bradford | 6696811 | 2012-10-01 05:06:52 +0000 | [diff] [blame] | 75 | "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 76 | "if run loadbootscript; then " \ |
| 77 | "run bootscript; " \ |
| 78 | "else " \ |
| 79 | "run defaultboot;" \ |
| 80 | "fi; " \ |
| 81 | "else run defaultboot; fi\0" \ |
| 82 | "defaultboot=run mmcramboot\0" \ |
Adam Ford | e745782 | 2018-06-15 08:12:02 -0500 | [diff] [blame] | 83 | "consoledevice=ttyS0\0" \ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 84 | "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \ |
| 85 | "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \ |
| 86 | "rotation=0\0" \ |
| 87 | "vrfb_arg=if itest ${rotation} -ne 0; then " \ |
| 88 | "setenv bootargs ${bootargs} omapfb.vrfb=y " \ |
| 89 | "omapfb.rotate=${rotation}; " \ |
| 90 | "fi\0" \ |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 91 | "optargs=ignore_loglevel early_printk no_console_suspend\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 92 | "common_bootargs=run setconsole; setenv bootargs " \ |
| 93 | "${bootargs} "\ |
| 94 | "console=${console} " \ |
| 95 | "${mtdparts} "\ |
| 96 | "${optargs}; " \ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 97 | "run vrfb_arg\0" \ |
Adam Ford | bb5854c | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 98 | "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 99 | "bootscript=echo 'Running bootscript from mmc ...'; " \ |
| 100 | "source ${loadaddr}\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 101 | "loadimage=mmc rescan; " \ |
| 102 | "load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 103 | "ramdisksize=64000\0" \ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 104 | "ramdiskimage=rootfs.ext2.gz.uboot\0" \ |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 105 | "loadramdisk=mmc rescan; " \ |
Adam Ford | bb5854c | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 106 | "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 107 | "ramargs=setenv bootargs "\ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 108 | "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 109 | "mmcargs=setenv bootargs "\ |
Adam Ford | c7d00f6 | 2019-04-11 15:24:33 -0500 | [diff] [blame] | 110 | "root=PARTUUID=${uuid} " \ |
| 111 | "rootfstype=${mmcrootfstype} rw\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 112 | "nandargs=setenv bootargs "\ |
Adam Ford | a094c92 | 2016-02-10 01:41:10 -0600 | [diff] [blame] | 113 | "root=${nandroot} " \ |
| 114 | "rootfstype=${nandrootfstype}\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 115 | "nfsargs=setenv serverip ${tftpserver}; " \ |
| 116 | "setenv bootargs root=/dev/nfs " \ |
Adam Ford | 760d1af | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 117 | "nfsroot=${nfsrootpath} " \ |
| 118 | "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \ |
| 119 | "nfsrootpath=/opt/nfs-exports/omap\0" \ |
| 120 | "autoload=no\0" \ |
Adam Ford | 46580f2 | 2018-09-29 14:10:19 -0500 | [diff] [blame] | 121 | "fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ |
Adam Ford | bb5854c | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 122 | "loadfdt=mmc rescan; " \ |
| 123 | "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 124 | "mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \ |
Adam Ford | c7d00f6 | 2019-04-11 15:24:33 -0500 | [diff] [blame] | 125 | "run finduuid; "\ |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 126 | "run mmcargs; " \ |
| 127 | "run common_bootargs; " \ |
| 128 | "run dump_bootargs; " \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 129 | "run loadimage; " \ |
| 130 | "run loadfdt;\0 " \ |
| 131 | "mmcbootz=setenv bootfile zImage; " \ |
| 132 | "run mmcbootcommon; "\ |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 133 | "bootz ${loadaddr} - ${fdtaddr}\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 134 | "mmcboot=setenv bootfile uImage; "\ |
| 135 | "run mmcbootcommon; "\ |
| 136 | "bootm ${loadaddr} - ${fdtaddr}\0" \ |
| 137 | "mmcrambootcommon=echo 'Booting kernel from MMC w/ramdisk...'; " \ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 138 | "run ramargs; " \ |
| 139 | "run common_bootargs; " \ |
| 140 | "run dump_bootargs; " \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 141 | "run loadimage; " \ |
Adam Ford | bb5854c | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 142 | "run loadfdt; " \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 143 | "run loadramdisk\0" \ |
| 144 | "mmcramboot=setenv bootfile uImage; " \ |
| 145 | "run mmcrambootcommon; " \ |
Adam Ford | 62896dc | 2018-03-26 10:24:12 -0500 | [diff] [blame] | 146 | "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 147 | "mmcrambootz=setenv bootfile zImage; " \ |
| 148 | "run mmcrambootcommon; " \ |
Adam Ford | 62896dc | 2018-03-26 10:24:12 -0500 | [diff] [blame] | 149 | "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 150 | "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \ |
| 151 | "run ramargs; " \ |
| 152 | "run common_bootargs; " \ |
| 153 | "run dump_bootargs; " \ |
Adam Ford | 760d1af | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 154 | "tftpboot ${loadaddr} ${zimage}; " \ |
Adam Ford | bb5854c | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 155 | "tftpboot ${rdaddr} ${ramdiskimage}; " \ |
| 156 | "bootm ${loadaddr} ${rdaddr}\0" \ |
Adam Ford | 760d1af | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 157 | "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \ |
| 158 | "dhcp;" \ |
| 159 | "run nfsargs;" \ |
| 160 | "run common_bootargs;" \ |
| 161 | "run dump_bootargs;" \ |
| 162 | "tftpboot $loadaddr zImage;" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 163 | "bootz $loadaddr\0" \ |
| 164 | "nandbootcommon=echo 'Booting kernel from NAND...';" \ |
Adam Ford | 476e16e | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 165 | "run nandargs;" \ |
| 166 | "run common_bootargs;" \ |
| 167 | "run dump_bootargs;" \ |
| 168 | "nand read ${loadaddr} kernel;" \ |
| 169 | "nand read ${fdtaddr} spl-os;\0" \ |
| 170 | "nandbootz=run nandbootcommon; "\ |
| 171 | "bootz ${loadaddr} - ${fdtaddr}\0"\ |
| 172 | "nandboot=run nandbootcommon; "\ |
| 173 | "bootm ${loadaddr} - ${fdtaddr}\0"\ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 174 | |
| 175 | #define CONFIG_BOOTCOMMAND \ |
| 176 | "run autoboot" |
| 177 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 178 | /* Miscellaneous configurable options */ |
Adam Ford | 7b77b1f | 2015-09-02 09:18:20 -0500 | [diff] [blame] | 179 | |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 180 | /* memtest works on */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 181 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 182 | /* FLASH and environment organization */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 183 | |
| 184 | /* **** PISMO SUPPORT *** */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 185 | #if defined(CONFIG_CMD_NAND) |
Adam Ford | 290097f | 2018-10-14 15:53:17 -0500 | [diff] [blame] | 186 | #define CONFIG_SYS_FLASH_BASE 0x10000000 |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 187 | #endif |
| 188 | |
Adam Ford | 290097f | 2018-10-14 15:53:17 -0500 | [diff] [blame] | 189 | #define CONFIG_SYS_MAX_FLASH_SECT 256 |
| 190 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 |
| 191 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT |
| 192 | #define CONFIG_SYS_FLASH_SIZE 0x4000000 |
| 193 | |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 194 | /* Monitor at start of flash */ |
| 195 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
| 196 | |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 197 | #define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 198 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 199 | /* Defines for SPL */ |
| 200 | |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 201 | /* NAND: SPL falcon mode configs */ |
| 202 | #ifdef CONFIG_SPL_OS_BOOT |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 203 | #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000 |
Adam Ford | 49c7303 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 204 | #endif |
| 205 | |
Peter Barada | 86887f8 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 206 | #endif /* __CONFIG_H */ |