Commit 097fd51b7ab2b179719f13cc9cca77043c45bb4c
Committed by
Tom Rini
1 parent
8a8f59a0ce
Exists in
smarc_8mq_lf_v2020.04
and in
9 other branches
configs: ti_omap5_common: Add NAND environment settings
Now that NAND is supported on DRA71x include various NAND environment settings Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Showing 5 changed files with 35 additions and 4 deletions Side-by-side Diff
configs/dra7xx_evm_defconfig
... | ... | @@ -23,13 +23,15 @@ |
23 | 23 | CONFIG_SPL_SYS_MALLOC_SIMPLE=y |
24 | 24 | CONFIG_SPL_SEPARATE_BSS=y |
25 | 25 | CONFIG_SPL_DMA_SUPPORT=y |
26 | -# CONFIG_SPL_NAND_SUPPORT is not set | |
27 | 26 | CONFIG_SPL_OS_BOOT=y |
28 | 27 | CONFIG_SPL_SPI_LOAD=y |
29 | 28 | CONFIG_CMD_SPL=y |
30 | 29 | # CONFIG_CMD_FLASH is not set |
31 | 30 | CONFIG_CMD_NAND=y |
32 | 31 | # CONFIG_CMD_SETEXPR is not set |
32 | +CONFIG_CMD_MTDPARTS=y | |
33 | +CONFIG_MTDIDS_DEFAULT="nand0=nand.0" | |
34 | +CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" | |
33 | 35 | CONFIG_OF_CONTROL=y |
34 | 36 | CONFIG_SPL_OF_CONTROL=y |
35 | 37 | CONFIG_DEFAULT_DEVICE_TREE="dra7-evm" |
configs/dra7xx_hs_evm_defconfig
... | ... | @@ -33,7 +33,9 @@ |
33 | 33 | CONFIG_SPL_SPI_LOAD=y |
34 | 34 | # CONFIG_CMD_FLASH is not set |
35 | 35 | CONFIG_CMD_NAND=y |
36 | -# CONFIG_CMD_SETEXPR is not set | |
36 | +CONFIG_CMD_MTDPARTS=y | |
37 | +CONFIG_MTDIDS_DEFAULT="nand0=nand.0" | |
38 | +CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" | |
37 | 39 | CONFIG_OF_CONTROL=y |
38 | 40 | CONFIG_SPL_OF_CONTROL=y |
39 | 41 | CONFIG_DEFAULT_DEVICE_TREE="dra7-evm" |
include/configs/dra7xx_evm.h
... | ... | @@ -133,7 +133,7 @@ |
133 | 133 | 50, 51, 52, 53, 54, 55, 56, 57, } |
134 | 134 | #define CONFIG_SYS_NAND_ECCSIZE 512 |
135 | 135 | #define CONFIG_SYS_NAND_ECCBYTES 14 |
136 | -#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x000c0000 | |
136 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00140000 | |
137 | 137 | /* NAND: SPL related configs */ |
138 | 138 | /* NAND: SPL falcon mode configs */ |
139 | 139 | #ifdef CONFIG_SPL_OS_BOOT |
include/configs/ti_omap5_common.h
... | ... | @@ -56,6 +56,7 @@ |
56 | 56 | |
57 | 57 | #include <environment/ti/boot.h> |
58 | 58 | #include <environment/ti/mmc.h> |
59 | +#include <environment/ti/nand.h> | |
59 | 60 | |
60 | 61 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
61 | 62 | DEFAULT_LINUX_BOOT_ENV \ |
... | ... | @@ -65,6 +66,7 @@ |
65 | 66 | DEFAULT_FDT_TI_ARGS \ |
66 | 67 | DFUARGS \ |
67 | 68 | NETARGS \ |
69 | + NANDARGS \ | |
68 | 70 | |
69 | 71 | /* |
70 | 72 | * SPL related defines. The Public RAM memory map the ROM defines the |
... | ... | @@ -100,7 +102,6 @@ |
100 | 102 | |
101 | 103 | #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ |
102 | 104 | (128 << 20)) |
103 | - | |
104 | 105 | #ifdef CONFIG_SPL_BUILD |
105 | 106 | #undef CONFIG_TIMER |
106 | 107 | #endif |
include/environment/ti/nand.h
1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
2 | +/* | |
3 | + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com | |
4 | + * | |
5 | + * Environment variable definitions for NAND on TI boards. | |
6 | + */ | |
7 | + | |
8 | +#ifdef CONFIG_NAND | |
9 | +#define NANDARGS \ | |
10 | + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \ | |
11 | + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ | |
12 | + "nandargs=setenv bootargs console=${console} " \ | |
13 | + "${optargs} " \ | |
14 | + "root=${nandroot} " \ | |
15 | + "rootfstype=${nandrootfstype}\0" \ | |
16 | + "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \ | |
17 | + "nandrootfstype=ubifs rootwait=1\0" \ | |
18 | + "nandboot=echo Booting from nand ...; " \ | |
19 | + "run nandargs; " \ | |
20 | + "nand read ${fdtaddr} NAND.u-boot-spl-os; " \ | |
21 | + "nand read ${loadaddr} NAND.kernel; " \ | |
22 | + "bootz ${loadaddr} - ${fdtaddr}\0" | |
23 | +#else | |
24 | +#define NANDARGS "" | |
25 | +#endif |