Convert CONFIG_SPL_NAND_LOAD et al to Kconfig
[platform/kernel/u-boot.git] / include / configs / cm_t43.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * cm_t43.h
4  *
5  * Copyright (C) 2015 Compulab, Ltd.
6  */
7
8 #ifndef __CONFIG_CM_T43_H
9 #define __CONFIG_CM_T43_H
10
11 #define CONFIG_MAX_RAM_BANK_SIZE        (2048 << 20)    /* 2GB */
12 #define CONFIG_SYS_TIMERBASE            0x48040000      /* Use Timer2 */
13
14 #include <asm/arch/omap.h>
15
16 /* Serial support */
17 #define CONFIG_SYS_NS16550_SERIAL
18 #define CONFIG_SYS_NS16550_CLK          48000000
19 #define CONFIG_SYS_NS16550_COM1         0x44e09000
20 #if !defined(CONFIG_SPL_DM) || !defined(CONFIG_DM_SERIAL)
21 #define CONFIG_SYS_NS16550_REG_SIZE     (-4)
22 #endif
23
24 /* NAND support */
25 #define CONFIG_SYS_NAND_ONFI_DETECTION
26 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
27 #define CONFIG_SYS_NAND_BAD_BLOCK_POS   NAND_LARGE_BADBLOCK_POS
28 #define CONFIG_SYS_NAND_ECCSIZE         512
29 #define CONFIG_SYS_NAND_ECCBYTES        14
30 #define CONFIG_NAND_OMAP_ECCSCHEME      OMAP_ECC_BCH8_CODE_HW
31 #define CONFIG_SYS_NAND_PAGE_COUNT      (CONFIG_SYS_NAND_BLOCK_SIZE / \
32                                          CONFIG_SYS_NAND_PAGE_SIZE)
33 #define CONFIG_SYS_NAND_ECCPOS          { 2, 3, 4, 5, 6, 7, 8, 9, \
34                                          10, 11, 12, 13, 14, 15, 16, 17, \
35                                          18, 19, 20, 21, 22, 23, 24, 25, \
36                                          26, 27, 28, 29, 30, 31, 32, 33, \
37                                          34, 35, 36, 37, 38, 39, 40, 41, \
38                                          42, 43, 44, 45, 46, 47, 48, 49, \
39                                          50, 51, 52, 53, 54, 55, 56, 57, }
40
41 /* CPSW Ethernet support */
42 #define CONFIG_SYS_RX_ETH_BUFFER        64
43
44 /* Power */
45 #define CONFIG_POWER_TPS65218
46
47 /* Enabling L2 Cache */
48 #define CONFIG_SYS_L2_PL310
49 #define CONFIG_SYS_PL310_BASE           0x48242000
50
51 /*
52  * Since SPL did pll and ddr initialization for us,
53  * we don't need to do it twice.
54  */
55
56 #define CONFIG_HSMMC2_8BIT
57
58 #include <configs/ti_armv7_omap.h>
59 #undef CONFIG_SYS_MONITOR_LEN
60
61 #define V_OSCK                          24000000  /* Clock output from T2 */
62 #define V_SCLK                          (V_OSCK)
63
64 #define CONFIG_EXTRA_ENV_SETTINGS \
65         "loadaddr=0x80200000\0" \
66         "fdtaddr=0x81200000\0" \
67         "bootm_size=0x8000000\0" \
68         "autoload=no\0" \
69         "console=ttyO0,115200n8\0" \
70         "fdtfile=am437x-sb-som-t43.dtb\0" \
71         "kernel=zImage-cm-t43\0" \
72         "bootscr=bootscr.img\0" \
73         "emmcroot=/dev/mmcblk0p2 rw\0" \
74         "emmcrootfstype=ext4 rootwait\0" \
75         "emmcargs=setenv bootargs console=${console} " \
76                 "root=${emmcroot} " \
77                 "rootfstype=${emmcrootfstype}\0" \
78         "loadbootscript=load mmc 0 ${loadaddr} ${bootscr}\0" \
79         "bootscript=echo Running bootscript from mmc ...; " \
80                 "source ${loadaddr}\0" \
81         "emmcboot=echo Booting from emmc ... && " \
82                 "run emmcargs && " \
83                 "load mmc 1 ${loadaddr} ${kernel} && " \
84                 "load mmc 1 ${fdtaddr} ${fdtfile} && " \
85                 "bootz ${loadaddr} - ${fdtaddr}\0"
86
87 #define CONFIG_BOOTCOMMAND \
88         "mmc dev 0; " \
89         "if mmc rescan; then " \
90                 "if run loadbootscript; then " \
91                         "run bootscript; " \
92                 "fi; " \
93         "fi; " \
94         "mmc dev 1; " \
95         "if mmc rescan; then " \
96                 "run emmcboot; " \
97         "fi;"
98
99 /* SPL defines. */
100 #define CONFIG_SYS_SPL_ARGS_ADDR        (CONFIG_SYS_SDRAM_BASE + (128 << 20))
101 #define CONFIG_SYS_MONITOR_LEN          (512 * 1024)
102
103 /* EEPROM */
104
105 #endif  /* __CONFIG_CM_T43_H */