blob: 7c0bdcbb11514790cf033c0b13fa00f2d2e26997 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peter Baradae5b77e62011-12-19 19:54:51 +00002/*
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 Baradae5b77e62011-12-19 19:54:51 +00008 */
9
10#ifndef __CONFIG_H
11#define __CONFIG_H
12
Adam Ford5326c292016-01-29 20:12:34 -060013/* High Level Configuration Options */
Peter Baradae5b77e62011-12-19 19:54:51 +000014
Adam Ford5326c292016-01-29 20:12:34 -060015#include <configs/ti_omap3_common.h>
16
Adam Ford5326c292016-01-29 20:12:34 -060017/* Board NAND Info. */
Miquel Raynald0935362019-10-03 19:50:03 +020018#ifdef CONFIG_MTD_RAW_NAND
Adam Ford5326c292016-01-29 20:12:34 -060019 /* NAND devices */
Adam Ford5326c292016-01-29 20:12:34 -060020#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
21 13, 14, 16, 17, 18, 19, 20, 21, 22, \
22 23, 24, 25, 26, 27, 28, 30, 31, 32, \
23 33, 34, 35, 36, 37, 38, 39, 40, 41, \
24 42, 44, 45, 46, 47, 48, 49, 50, 51, \
25 52, 53, 54, 55, 56}
Adam Ford04c848a2015-09-02 09:18:20 -050026
Adam Ford5326c292016-01-29 20:12:34 -060027#define CONFIG_SYS_NAND_ECCSIZE 512
28#define CONFIG_SYS_NAND_ECCBYTES 13
Adam Ford5326c292016-01-29 20:12:34 -060029#endif
Peter Baradae5b77e62011-12-19 19:54:51 +000030
31/* Environment information */
Peter Baradae5b77e62011-12-19 19:54:51 +000032
Peter Baradae5b77e62011-12-19 19:54:51 +000033#define CONFIG_EXTRA_ENV_SETTINGS \
Adam Ford34f28ee2017-01-04 09:26:43 -060034 DEFAULT_LINUX_BOOT_ENV \
Peter Baradae5b77e62011-12-19 19:54:51 +000035 "mmcdev=0\0" \
Adam Ford3ccdb962019-04-11 15:24:33 -050036 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
Adam Ford5326c292016-01-29 20:12:34 -060037 "mmcrootfstype=ext4 rootwait\0" \
Adam Ford193e9a12016-02-10 01:41:10 -060038 "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \
39 "nandrootfstype=ubifs rootwait\0" \
Andrew Bradforde1c7c8a2012-10-01 05:06:52 +000040 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
Peter Baradae5b77e62011-12-19 19:54:51 +000041 "if run loadbootscript; then " \
42 "run bootscript; " \
43 "else " \
44 "run defaultboot;" \
45 "fi; " \
46 "else run defaultboot; fi\0" \
47 "defaultboot=run mmcramboot\0" \
Adam Fordb36bb902018-06-15 08:12:02 -050048 "consoledevice=ttyS0\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +000049 "setconsole=setenv console ${consoledevice},${baudrate}n8\0" \
50 "dump_bootargs=echo 'Bootargs: '; echo $bootargs\0" \
51 "rotation=0\0" \
52 "vrfb_arg=if itest ${rotation} -ne 0; then " \
53 "setenv bootargs ${bootargs} omapfb.vrfb=y " \
54 "omapfb.rotate=${rotation}; " \
55 "fi\0" \
Adam Ford5326c292016-01-29 20:12:34 -060056 "optargs=ignore_loglevel early_printk no_console_suspend\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060057 "common_bootargs=run setconsole; setenv bootargs " \
58 "${bootargs} "\
59 "console=${console} " \
60 "${mtdparts} "\
61 "${optargs}; " \
Peter Baradae5b77e62011-12-19 19:54:51 +000062 "run vrfb_arg\0" \
Adam Ford34f28ee2017-01-04 09:26:43 -060063 "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +000064 "bootscript=echo 'Running bootscript from mmc ...'; " \
65 "source ${loadaddr}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060066 "loadimage=mmc rescan; " \
67 "load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +000068 "ramdisksize=64000\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +000069 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
Adam Ford5326c292016-01-29 20:12:34 -060070 "loadramdisk=mmc rescan; " \
Adam Ford34f28ee2017-01-04 09:26:43 -060071 "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060072 "ramargs=setenv bootargs "\
Peter Baradae5b77e62011-12-19 19:54:51 +000073 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060074 "mmcargs=setenv bootargs "\
Adam Ford3ccdb962019-04-11 15:24:33 -050075 "root=PARTUUID=${uuid} " \
76 "rootfstype=${mmcrootfstype} rw\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060077 "nandargs=setenv bootargs "\
Adam Ford193e9a12016-02-10 01:41:10 -060078 "root=${nandroot} " \
79 "rootfstype=${nandrootfstype}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060080 "nfsargs=setenv serverip ${tftpserver}; " \
81 "setenv bootargs root=/dev/nfs " \
Adam Ford97073d02016-10-15 08:16:27 -050082 "nfsroot=${nfsrootpath} " \
83 "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \
84 "nfsrootpath=/opt/nfs-exports/omap\0" \
Adam Ford81b19d72018-09-29 14:10:19 -050085 "fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
Adam Ford34f28ee2017-01-04 09:26:43 -060086 "loadfdt=mmc rescan; " \
87 "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060088 "mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \
Adam Ford3ccdb962019-04-11 15:24:33 -050089 "run finduuid; "\
Adam Ford5326c292016-01-29 20:12:34 -060090 "run mmcargs; " \
91 "run common_bootargs; " \
92 "run dump_bootargs; " \
Adam Ford4760c8f2017-01-04 11:51:24 -060093 "run loadimage; " \
94 "run loadfdt;\0 " \
95 "mmcbootz=setenv bootfile zImage; " \
96 "run mmcbootcommon; "\
Adam Ford5326c292016-01-29 20:12:34 -060097 "bootz ${loadaddr} - ${fdtaddr}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060098 "mmcboot=setenv bootfile uImage; "\
99 "run mmcbootcommon; "\
100 "bootm ${loadaddr} - ${fdtaddr}\0" \
101 "mmcrambootcommon=echo 'Booting kernel from MMC w/ramdisk...'; " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000102 "run ramargs; " \
103 "run common_bootargs; " \
104 "run dump_bootargs; " \
Adam Ford4760c8f2017-01-04 11:51:24 -0600105 "run loadimage; " \
Adam Ford34f28ee2017-01-04 09:26:43 -0600106 "run loadfdt; " \
Adam Ford4760c8f2017-01-04 11:51:24 -0600107 "run loadramdisk\0" \
108 "mmcramboot=setenv bootfile uImage; " \
109 "run mmcrambootcommon; " \
Adam Ford8717e922018-03-26 10:24:12 -0500110 "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -0600111 "mmcrambootz=setenv bootfile zImage; " \
112 "run mmcrambootcommon; " \
Adam Ford8717e922018-03-26 10:24:12 -0500113 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600114 "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000115 "run ramargs; " \
116 "run common_bootargs; " \
117 "run dump_bootargs; " \
Adam Ford97073d02016-10-15 08:16:27 -0500118 "tftpboot ${loadaddr} ${zimage}; " \
Adam Ford34f28ee2017-01-04 09:26:43 -0600119 "tftpboot ${rdaddr} ${ramdiskimage}; " \
120 "bootm ${loadaddr} ${rdaddr}\0" \
Adam Ford97073d02016-10-15 08:16:27 -0500121 "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \
122 "dhcp;" \
123 "run nfsargs;" \
124 "run common_bootargs;" \
125 "run dump_bootargs;" \
126 "tftpboot $loadaddr zImage;" \
Adam Ford4760c8f2017-01-04 11:51:24 -0600127 "bootz $loadaddr\0" \
128 "nandbootcommon=echo 'Booting kernel from NAND...';" \
Adam Ford4760c8f2017-01-04 11:51:24 -0600129 "run nandargs;" \
130 "run common_bootargs;" \
131 "run dump_bootargs;" \
132 "nand read ${loadaddr} kernel;" \
133 "nand read ${fdtaddr} spl-os;\0" \
134 "nandbootz=run nandbootcommon; "\
135 "bootz ${loadaddr} - ${fdtaddr}\0"\
136 "nandboot=run nandbootcommon; "\
137 "bootm ${loadaddr} - ${fdtaddr}\0"\
Peter Baradae5b77e62011-12-19 19:54:51 +0000138
Adam Ford5326c292016-01-29 20:12:34 -0600139/* Miscellaneous configurable options */
Adam Ford04c848a2015-09-02 09:18:20 -0500140
Peter Baradae5b77e62011-12-19 19:54:51 +0000141/* memtest works on */
Peter Baradae5b77e62011-12-19 19:54:51 +0000142
Adam Ford5326c292016-01-29 20:12:34 -0600143/* FLASH and environment organization */
Peter Baradae5b77e62011-12-19 19:54:51 +0000144
145/* **** PISMO SUPPORT *** */
Peter Baradae5b77e62011-12-19 19:54:51 +0000146#if defined(CONFIG_CMD_NAND)
Adam Ford726ab5d2018-10-14 15:53:17 -0500147#define CONFIG_SYS_FLASH_BASE 0x10000000
Peter Baradae5b77e62011-12-19 19:54:51 +0000148#endif
149
Adam Ford726ab5d2018-10-14 15:53:17 -0500150#define CONFIG_SYS_FLASH_SIZE 0x4000000
151
Peter Baradae5b77e62011-12-19 19:54:51 +0000152#endif /* __CONFIG_H */