blob: 81c1692055d9e2e07b6088eabfe3ad3490c511bd [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#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of */
20 /* NAND devices */
Adam Ford5326c292016-01-29 20:12:34 -060021#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 Ford04c848a2015-09-02 09:18:20 -050027
Adam Ford5326c292016-01-29 20:12:34 -060028#define CONFIG_SYS_NAND_ECCSIZE 512
29#define CONFIG_SYS_NAND_ECCBYTES 13
Adam Ford5326c292016-01-29 20:12:34 -060030#define CONFIG_SYS_NAND_MAX_OOBFREE 2
31#define CONFIG_SYS_NAND_MAX_ECCPOS 56
Adam Ford5326c292016-01-29 20:12:34 -060032#endif
Peter Baradae5b77e62011-12-19 19:54:51 +000033
34/* Environment information */
Peter Baradae5b77e62011-12-19 19:54:51 +000035
Peter Baradae5b77e62011-12-19 19:54:51 +000036#define CONFIG_EXTRA_ENV_SETTINGS \
Adam Ford34f28ee2017-01-04 09:26:43 -060037 DEFAULT_LINUX_BOOT_ENV \
Peter Baradae5b77e62011-12-19 19:54:51 +000038 "mmcdev=0\0" \
Adam Ford3ccdb962019-04-11 15:24:33 -050039 "finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
Adam Ford5326c292016-01-29 20:12:34 -060040 "mmcrootfstype=ext4 rootwait\0" \
Adam Ford193e9a12016-02-10 01:41:10 -060041 "nandroot=ubi0:rootfs rw ubi.mtd=fs noinitrd\0" \
42 "nandrootfstype=ubifs rootwait\0" \
Andrew Bradforde1c7c8a2012-10-01 05:06:52 +000043 "autoboot=mmc dev ${mmcdev}; if mmc rescan; then " \
Peter Baradae5b77e62011-12-19 19:54:51 +000044 "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 Fordb36bb902018-06-15 08:12:02 -050051 "consoledevice=ttyS0\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +000052 "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 Ford5326c292016-01-29 20:12:34 -060059 "optargs=ignore_loglevel early_printk no_console_suspend\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060060 "common_bootargs=run setconsole; setenv bootargs " \
61 "${bootargs} "\
62 "console=${console} " \
63 "${mtdparts} "\
64 "${optargs}; " \
Peter Baradae5b77e62011-12-19 19:54:51 +000065 "run vrfb_arg\0" \
Adam Ford34f28ee2017-01-04 09:26:43 -060066 "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +000067 "bootscript=echo 'Running bootscript from mmc ...'; " \
68 "source ${loadaddr}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060069 "loadimage=mmc rescan; " \
70 "load mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +000071 "ramdisksize=64000\0" \
Peter Baradae5b77e62011-12-19 19:54:51 +000072 "ramdiskimage=rootfs.ext2.gz.uboot\0" \
Adam Ford5326c292016-01-29 20:12:34 -060073 "loadramdisk=mmc rescan; " \
Adam Ford34f28ee2017-01-04 09:26:43 -060074 "load mmc ${mmcdev} ${rdaddr} ${ramdiskimage}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060075 "ramargs=setenv bootargs "\
Peter Baradae5b77e62011-12-19 19:54:51 +000076 "root=/dev/ram rw ramdisk_size=${ramdisksize}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060077 "mmcargs=setenv bootargs "\
Adam Ford3ccdb962019-04-11 15:24:33 -050078 "root=PARTUUID=${uuid} " \
79 "rootfstype=${mmcrootfstype} rw\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060080 "nandargs=setenv bootargs "\
Adam Ford193e9a12016-02-10 01:41:10 -060081 "root=${nandroot} " \
82 "rootfstype=${nandrootfstype}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060083 "nfsargs=setenv serverip ${tftpserver}; " \
84 "setenv bootargs root=/dev/nfs " \
Adam Ford97073d02016-10-15 08:16:27 -050085 "nfsroot=${nfsrootpath} " \
86 "ip=${ipaddr}:${tftpserver}:${gatewayip}:${netmask}::eth0:off\0" \
87 "nfsrootpath=/opt/nfs-exports/omap\0" \
Adam Ford81b19d72018-09-29 14:10:19 -050088 "fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
Adam Ford34f28ee2017-01-04 09:26:43 -060089 "loadfdt=mmc rescan; " \
90 "load mmc ${mmcdev} ${fdtaddr} ${fdtimage}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -060091 "mmcbootcommon=echo Booting with DT from mmc${mmcdev} ...; " \
Adam Ford3ccdb962019-04-11 15:24:33 -050092 "run finduuid; "\
Adam Ford5326c292016-01-29 20:12:34 -060093 "run mmcargs; " \
94 "run common_bootargs; " \
95 "run dump_bootargs; " \
Adam Ford4760c8f2017-01-04 11:51:24 -060096 "run loadimage; " \
97 "run loadfdt;\0 " \
98 "mmcbootz=setenv bootfile zImage; " \
99 "run mmcbootcommon; "\
Adam Ford5326c292016-01-29 20:12:34 -0600100 "bootz ${loadaddr} - ${fdtaddr}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -0600101 "mmcboot=setenv bootfile uImage; "\
102 "run mmcbootcommon; "\
103 "bootm ${loadaddr} - ${fdtaddr}\0" \
104 "mmcrambootcommon=echo 'Booting kernel from MMC w/ramdisk...'; " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000105 "run ramargs; " \
106 "run common_bootargs; " \
107 "run dump_bootargs; " \
Adam Ford4760c8f2017-01-04 11:51:24 -0600108 "run loadimage; " \
Adam Ford34f28ee2017-01-04 09:26:43 -0600109 "run loadfdt; " \
Adam Ford4760c8f2017-01-04 11:51:24 -0600110 "run loadramdisk\0" \
111 "mmcramboot=setenv bootfile uImage; " \
112 "run mmcrambootcommon; " \
Adam Ford8717e922018-03-26 10:24:12 -0500113 "bootm ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
Adam Ford4760c8f2017-01-04 11:51:24 -0600114 "mmcrambootz=setenv bootfile zImage; " \
115 "run mmcrambootcommon; " \
Adam Ford8717e922018-03-26 10:24:12 -0500116 "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
Adam Ford5326c292016-01-29 20:12:34 -0600117 "tftpboot=echo 'Booting kernel/ramdisk rootfs from tftp...'; " \
Peter Baradae5b77e62011-12-19 19:54:51 +0000118 "run ramargs; " \
119 "run common_bootargs; " \
120 "run dump_bootargs; " \
Adam Ford97073d02016-10-15 08:16:27 -0500121 "tftpboot ${loadaddr} ${zimage}; " \
Adam Ford34f28ee2017-01-04 09:26:43 -0600122 "tftpboot ${rdaddr} ${ramdiskimage}; " \
123 "bootm ${loadaddr} ${rdaddr}\0" \
Adam Ford97073d02016-10-15 08:16:27 -0500124 "tftpbootz=echo 'Booting kernel NFS rootfs...'; " \
125 "dhcp;" \
126 "run nfsargs;" \
127 "run common_bootargs;" \
128 "run dump_bootargs;" \
129 "tftpboot $loadaddr zImage;" \
Adam Ford4760c8f2017-01-04 11:51:24 -0600130 "bootz $loadaddr\0" \
131 "nandbootcommon=echo 'Booting kernel from NAND...';" \
Adam Ford4760c8f2017-01-04 11:51:24 -0600132 "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 Baradae5b77e62011-12-19 19:54:51 +0000141
Adam Ford5326c292016-01-29 20:12:34 -0600142/* Miscellaneous configurable options */
Adam Ford04c848a2015-09-02 09:18:20 -0500143
Peter Baradae5b77e62011-12-19 19:54:51 +0000144/* memtest works on */
Peter Baradae5b77e62011-12-19 19:54:51 +0000145
Adam Ford5326c292016-01-29 20:12:34 -0600146/* FLASH and environment organization */
Peter Baradae5b77e62011-12-19 19:54:51 +0000147
148/* **** PISMO SUPPORT *** */
Peter Baradae5b77e62011-12-19 19:54:51 +0000149#if defined(CONFIG_CMD_NAND)
Adam Ford726ab5d2018-10-14 15:53:17 -0500150#define CONFIG_SYS_FLASH_BASE 0x10000000
Peter Baradae5b77e62011-12-19 19:54:51 +0000151#endif
152
Adam Ford726ab5d2018-10-14 15:53:17 -0500153#define CONFIG_SYS_FLASH_SIZE 0x4000000
154
Peter Baradae5b77e62011-12-19 19:54:51 +0000155#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
Peter Baradae5b77e62011-12-19 19:54:51 +0000156
Peter Baradae5b77e62011-12-19 19:54:51 +0000157#endif /* __CONFIG_H */