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 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 17 | /* Board NAND Info. */ |
Miquel Raynal | d093536 | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 18 | #ifdef CONFIG_MTD_RAW_NAND |
Adam Ford | 5326c29 | 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 | 5326c29 | 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 | 04c848a | 2015-09-02 09:18:20 -0500 | [diff] [blame] | 27 | |
Adam Ford | 5326c29 | 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 | 5326c29 | 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 | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 32 | #endif |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 33 | |
| 34 | /* Environment information */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 35 | |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 36 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 37 | DEFAULT_LINUX_BOOT_ENV \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 38 | "mmcdev=0\0" \ |
Adam Ford | 3ccdb96 | 2019-04-11 15:24:33 -0500 | [diff] [blame] | 39 | "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 40 | "mmcrootfstype=ext4 rootwait\0" \ |
Adam Ford | 193e9a1 | 2016-02-10 01:41:10 -0600 | [diff] [blame] | 41 | "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \ |
| 42 | "nandrootfstype=ubifs rootwait\0" \ |
Andrew Bradford | e1c7c8a | 2012-10-01 05:06:52 +0000 | [diff] [blame] | 43 | "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 44 | "if run loadbootscript; then " \ |
| 45 | "run bootscript; " \ |
| 46 | "else " \ |
| 47 | "run defaultboot;" \ |
| 48 | "fi; " \ |
| 49 | "else run defaultboot; fi\0" \ |
| 50 | "defaultboot=run mmcramboot\0" \ |
Adam Ford | b36bb90 | 2018-06-15 08:12:02 -0500 | [diff] [blame] | 51 | "consoledevice=ttyS0\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 52 | "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \ |
| 53 | "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \ |
| 54 | "rotation=0\0" \ |
| 55 | "vrfb_arg=if itest ${rotation} -ne 0; then " \ |
| 56 | "setenv bootargs ${bootargs} omapfb.vrfb=y " \ |
| 57 | "omapfb.rotate=${rotation}; " \ |
| 58 | "fi\0" \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 59 | "optargs=ignore_loglevel early_printk no_console_suspend\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 60 | "common_bootargs=run setconsole; setenv bootargs " \ |
| 61 | "${bootargs} "\ |
| 62 | "console=${console} " \ |
| 63 | "${mtdparts} "\ |
| 64 | "${optargs}; " \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 65 | "run vrfb_arg\0" \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 66 | "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 67 | "bootscript=echo 'Running bootscript from mmc ...'; " \ |
| 68 | "source ${loadaddr}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 69 | "loadimage=mmc rescan; " \ |
| 70 | "load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 71 | "ramdisksize=64000\0" \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 72 | "ramdiskimage=rootfs.ext2.gz.uboot\0" \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 73 | "loadramdisk=mmc rescan; " \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 74 | "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 75 | "ramargs=setenv bootargs "\ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 76 | "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 77 | "mmcargs=setenv bootargs "\ |
Adam Ford | 3ccdb96 | 2019-04-11 15:24:33 -0500 | [diff] [blame] | 78 | "root=PARTUUID=${uuid} " \ |
| 79 | "rootfstype=${mmcrootfstype} rw\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 80 | "nandargs=setenv bootargs "\ |
Adam Ford | 193e9a1 | 2016-02-10 01:41:10 -0600 | [diff] [blame] | 81 | "root=${nandroot} " \ |
| 82 | "rootfstype=${nandrootfstype}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 83 | "nfsargs=setenv serverip ${tftpserver}; " \ |
| 84 | "setenv bootargs root=/dev/nfs " \ |
Adam Ford | 97073d0 | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 85 | "nfsroot=${nfsrootpath} " \ |
| 86 | "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \ |
| 87 | "nfsrootpath=/opt/nfs-exports/omap\0" \ |
Adam Ford | 81b19d7 | 2018-09-29 14:10:19 -0500 | [diff] [blame] | 88 | "fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 89 | "loadfdt=mmc rescan; " \ |
| 90 | "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 91 | "mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \ |
Adam Ford | 3ccdb96 | 2019-04-11 15:24:33 -0500 | [diff] [blame] | 92 | "run finduuid; "\ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 93 | "run mmcargs; " \ |
| 94 | "run common_bootargs; " \ |
| 95 | "run dump_bootargs; " \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 96 | "run loadimage; " \ |
| 97 | "run loadfdt;\0 " \ |
| 98 | "mmcbootz=setenv bootfile zImage; " \ |
| 99 | "run mmcbootcommon; "\ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 100 | "bootz ${loadaddr} - ${fdtaddr}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 101 | "mmcboot=setenv bootfile uImage; "\ |
| 102 | "run mmcbootcommon; "\ |
| 103 | "bootm ${loadaddr} - ${fdtaddr}\0" \ |
| 104 | "mmcrambootcommon=echo 'Booting kernel from MMC w/ramdisk...'; " \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 105 | "run ramargs; " \ |
| 106 | "run common_bootargs; " \ |
| 107 | "run dump_bootargs; " \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 108 | "run loadimage; " \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 109 | "run loadfdt; " \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 110 | "run loadramdisk\0" \ |
| 111 | "mmcramboot=setenv bootfile uImage; " \ |
| 112 | "run mmcrambootcommon; " \ |
Adam Ford | 8717e92 | 2018-03-26 10:24:12 -0500 | [diff] [blame] | 113 | "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 114 | "mmcrambootz=setenv bootfile zImage; " \ |
| 115 | "run mmcrambootcommon; " \ |
Adam Ford | 8717e92 | 2018-03-26 10:24:12 -0500 | [diff] [blame] | 116 | "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 117 | "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 118 | "run ramargs; " \ |
| 119 | "run common_bootargs; " \ |
| 120 | "run dump_bootargs; " \ |
Adam Ford | 97073d0 | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 121 | "tftpboot ${loadaddr} ${zimage}; " \ |
Adam Ford | 34f28ee | 2017-01-04 09:26:43 -0600 | [diff] [blame] | 122 | "tftpboot ${rdaddr} ${ramdiskimage}; " \ |
| 123 | "bootm ${loadaddr} ${rdaddr}\0" \ |
Adam Ford | 97073d0 | 2016-10-15 08:16:27 -0500 | [diff] [blame] | 124 | "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \ |
| 125 | "dhcp;" \ |
| 126 | "run nfsargs;" \ |
| 127 | "run common_bootargs;" \ |
| 128 | "run dump_bootargs;" \ |
| 129 | "tftpboot $loadaddr zImage;" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 130 | "bootz $loadaddr\0" \ |
| 131 | "nandbootcommon=echo 'Booting kernel from NAND...';" \ |
Adam Ford | 4760c8f | 2017-01-04 11:51:24 -0600 | [diff] [blame] | 132 | "run nandargs;" \ |
| 133 | "run common_bootargs;" \ |
| 134 | "run dump_bootargs;" \ |
| 135 | "nand read ${loadaddr} kernel;" \ |
| 136 | "nand read ${fdtaddr} spl-os;\0" \ |
| 137 | "nandbootz=run nandbootcommon; "\ |
| 138 | "bootz ${loadaddr} - ${fdtaddr}\0"\ |
| 139 | "nandboot=run nandbootcommon; "\ |
| 140 | "bootm ${loadaddr} - ${fdtaddr}\0"\ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 141 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 142 | /* Miscellaneous configurable options */ |
Adam Ford | 04c848a | 2015-09-02 09:18:20 -0500 | [diff] [blame] | 143 | |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 144 | /* memtest works on */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 145 | |
Adam Ford | 5326c29 | 2016-01-29 20:12:34 -0600 | [diff] [blame] | 146 | /* FLASH and environment organization */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 147 | |
| 148 | /* **** PISMO SUPPORT *** */ |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 149 | #if defined(CONFIG_CMD_NAND) |
Adam Ford | 726ab5d | 2018-10-14 15:53:17 -0500 | [diff] [blame] | 150 | #define CONFIG_SYS_FLASH_BASE 0x10000000 |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 151 | #endif |
| 152 | |
Adam Ford | 726ab5d | 2018-10-14 15:53:17 -0500 | [diff] [blame] | 153 | #define CONFIG_SYS_FLASH_SIZE 0x4000000 |
| 154 | |
Peter Barada | e5b77e6 | 2011-12-19 19:54:51 +0000 | [diff] [blame] | 155 | #endif /* __CONFIG_H */ |