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