1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2014 Stefan Roese <sr@denx.de>
4 * Copyright (C) 2016 Mario Six <mario.six@gdsys.cc>
7 #ifndef _CONFIG_CONTROLCENTERDC_H
8 #define _CONFIG_CONTROLCENTERDC_H
11 * High Level Configuration Options (easy to change)
13 #define CONFIG_CUSTOMER_BOARD_SUPPORT
16 * TEXT_BASE needs to be below 16MiB, since this area is scrubbed
17 * for DDR ECC byte filling in the SPL before loading the main
21 /* Environment in SPI NOR flash */
23 #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */
26 #ifndef CONFIG_SPL_BUILD
27 #define CONFIG_PCI_SCAN_SHOW
32 * Select the boot device here
34 * Currently supported are:
35 * SPL_BOOT_SPI_NOR_FLASH - Booting via SPI NOR flash
36 * SPL_BOOT_SDIO_MMC_CARD - Booting via SDIO/MMC card (partition 1)
38 #define SPL_BOOT_SPI_NOR_FLASH 1
39 #define SPL_BOOT_SDIO_MMC_CARD 2
40 #define CONFIG_SPL_BOOT_DEVICE SPL_BOOT_SPI_NOR_FLASH
43 #define CONFIG_SPL_SIZE (160 << 10)
45 #if defined(CONFIG_SECURED_MODE_IMAGE)
46 #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - 0x2614)
48 #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - 0x30)
51 #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE)
52 #define CONFIG_SPL_BSS_MAX_SIZE (16 << 10)
54 #ifdef CONFIG_SPL_BUILD
55 #define CONFIG_SYS_MALLOC_SIMPLE
58 #define CONFIG_SPL_STACK (0x40000000 + ((212 - 16) << 10))
59 #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4)
61 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
62 /* SPL related MMC defines */
63 #ifdef CONFIG_SPL_BUILD
64 #define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER 0x00180000 /* in SDRAM */
69 * Environment Configuration
72 #define CONFIG_HOSTNAME "ccdc"
73 #define CONFIG_ROOTPATH "/opt/nfsroot"
75 #define CONFIG_EXTRA_ENV_SETTINGS \
77 "consoledev=ttyS1\0" \
78 "u-boot=u-boot.bin\0" \
79 "bootfile_addr=1000000\0" \
80 "keyprogram_addr=3000000\0" \
81 "keyprogram_file=keyprogram.img\0" \
82 "fdtfile=controlcenterdc.dtb\0" \
83 "load=tftpboot ${loadaddr} ${u-boot}\0" \
85 "update=sf probe 1:0;" \
86 " sf erase 0 +${filesize};" \
87 " sf write ${fileaddr} 0 ${filesize}\0" \
88 "upd=run load update\0" \
89 "fdt_high=0x10000000\0" \
90 "initrd_high=0x10000000\0" \
91 "loadkeyprogram=tpm flush_keys;" \
93 " ext4load mmc ${mmcdev} ${keyprogram_addr} ${keyprogram_file};"\
94 " source ${keyprogram_addr}:script@1\0" \
95 "gpio1=gpio@22_25\0" \
97 "blinkseq='0 0 0 0 2 0 2 2 3 1 3 1 0 0 2 2 3 1 3 3 2 0 2 2 3 1 1 1 " \
98 "2 0 2 2 3 1 3 1 0 0 2 0 3 3 3 1 2 0 0 0 3 1 1 1 0 0 0 0'\0" \
99 "bootfail=for i in ${blinkseq}; do" \
100 " if test $i -eq 0; then" \
101 " gpio clear ${gpio1}; gpio set ${gpio2};" \
102 " elif test $i -eq 1; then" \
103 " gpio clear ${gpio1}; gpio clear ${gpio2};" \
104 " elif test $i -eq 2; then" \
105 " gpio set ${gpio1}; gpio set ${gpio2};" \
107 " gpio clear ${gpio1}; gpio set ${gpio2};" \
108 " fi; sleep 0.12; done\0"
111 * mv-common.h should be defined after CMD configs since it used them
112 * to enable certain macros
114 #include "mv-common.h"
116 #endif /* _CONFIG_CONTROLCENTERDC_H */