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