1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2013 Siemens Schweiz AG
4 * (C) Heiko Schocher, DENX Software Engineering, hs@denx.de.
7 * U-Boot file:/include/configs/am335x_evm.h
9 * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
12 #ifndef __CONFIG_ETAMIN_H
13 #define __CONFIG_ETAMIN_H
15 #include "siemens-am33x-common.h"
16 /* NAND specific changes for etamin due to different page size */
17 #undef CONFIG_SYS_NAND_ECCPOS
18 #undef CONFIG_SYS_ENV_SECT_SIZE
20 #define CONFIG_SYS_ENV_SECT_SIZE (512 << 10) /* 512 KiB */
21 #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
22 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \
23 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \
24 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \
25 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \
26 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \
27 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \
28 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \
29 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \
30 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \
31 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \
32 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, \
33 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, \
34 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, \
35 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, \
36 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, \
37 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, \
38 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, \
39 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, \
40 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, \
41 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, \
44 #undef CONFIG_SYS_NAND_ECCSIZE
45 #undef CONFIG_SYS_NAND_ECCBYTES
46 #define CONFIG_SYS_NAND_ECCSIZE 512
47 #define CONFIG_SYS_NAND_ECCBYTES 26
49 #undef CONFIG_SYS_MAX_NAND_DEVICE
50 #define CONFIG_SYS_MAX_NAND_DEVICE 3
51 #define CONFIG_SYS_NAND_BASE2 (0x18000000) /* physical address */
52 #define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND_BASE, \
53 CONFIG_SYS_NAND_BASE2}
55 #define DDR_PLL_FREQ 303
59 #define BOARD_DFU_BUTTON_GPIO 27
60 #define GPIO_LAN9303_NRST 88 /* GPIO2_24 = gpio88 */
61 /* In dfu mode keep led1 on */
62 #define CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
72 /* Physical Memory Map */
73 #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */
75 #define EEPROM_ADDR_DDR3 0x90
76 #define EEPROM_ADDR_CHIP 0x120
78 #define CONFIG_FACTORYSET
80 /* use both define to compile a SPL compliance test */
82 #define CONFIG_SPL_CMT
83 #define CONFIG_SPL_CMT_DEBUG
86 /* nedded by compliance test in read mode */
88 /* Define own nand partitions */
89 #define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
92 #undef COMMON_ENV_DFU_ARGS
93 #define COMMON_ENV_DFU_ARGS "dfu_args=run bootargs_defaults;" \
94 "setenv bootargs ${bootargs};" \
100 #undef DFU_ALT_INFO_NAND_V2
101 #define DFU_ALT_INFO_NAND_V2 \
103 "spl.backup1 mtddev;" \
104 "spl.backup2 mtddev;" \
105 "spl.backup3 mtddev;" \
107 "u-boot.env0 mtddev;" \
108 "u-boot.env1 mtddev;" \
111 #undef CONFIG_ENV_SETTINGS_NAND_V2
112 #define CONFIG_ENV_SETTINGS_NAND_V2 \
113 "nand_active_ubi_vol=rootfs_a\0" \
114 "rootfs_name=rootfs\0" \
115 "kernel_name=uImage\0"\
116 "nand_root_fs_type=ubifs rootwait=1\0" \
117 "nand_args=run bootargs_defaults;" \
118 "mtdparts default;" \
119 "setenv ${partitionset_active} true;" \
120 "if test -n ${A}; then " \
121 "setenv nand_active_ubi_vol ${rootfs_name}_a;" \
123 "if test -n ${B}; then " \
124 "setenv nand_active_ubi_vol ${rootfs_name}_b;" \
126 "setenv nand_root ubi0:${nand_active_ubi_vol} rw " \
127 "ubi.mtd=rootfs,${ubi_off};" \
128 "setenv bootargs ${bootargs} " \
129 "root=${nand_root} noinitrd ${mtdparts} " \
130 "rootfstype=${nand_root_fs_type} ip=${ip_method} " \
131 "console=ttyMTD,mtdoops console=ttyO0,115200n8 mtdoops.mtddev" \
133 COMMON_ENV_DFU_ARGS \
134 "dfu_alt_info=" DFU_ALT_INFO_NAND_V2 "\0" \
135 COMMON_ENV_NAND_BOOT \
136 "ubi part rootfs ${ubi_off};" \
137 "ubifsmount ubi0:${nand_active_ubi_vol};" \
138 "ubifsload ${kloadaddr} boot/${kernel_name};" \
139 "ubifsload ${loadaddr} boot/${dtb_name}.dtb;" \
140 "bootm ${kloadaddr} - ${loadaddr}\0" \
141 "nand_boot_backup=ubifsload ${loadaddr} boot/am335x-draco.dtb;" \
142 "bootm ${kloadaddr} - ${loadaddr}\0" \
145 #ifndef CONFIG_SPL_BUILD
147 #define CONFIG_NAND_CS_INIT
148 #define ETAMIN_NAND_GPMC_CONFIG1 0x00000800
149 #define ETAMIN_NAND_GPMC_CONFIG2 0x001e1e00
150 #define ETAMIN_NAND_GPMC_CONFIG3 0x001e1e00
151 #define ETAMIN_NAND_GPMC_CONFIG4 0x16051807
152 #define ETAMIN_NAND_GPMC_CONFIG5 0x00151e1e
153 #define ETAMIN_NAND_GPMC_CONFIG6 0x16000f80
154 #define CONFIG_MTD_CONCAT
156 /* Default env settings */
157 #define CONFIG_EXTRA_ENV_SETTINGS \
158 "hostname=etamin\0" \
160 "nand_img_size=0x400000\0" \
162 "preboot=draco_led 0\0" \
163 CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS \
164 CONFIG_ENV_SETTINGS_V2 \
165 CONFIG_ENV_SETTINGS_NAND_V2
166 #endif /* CONFIG_SPL_BUILD */
167 #endif /* ! __CONFIG_ETAMIN_H */