1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2017 Marek Behun <marek.behun@nic.cz>
4 * Copyright (C) 2016 Tomas Hlavacek <tomas.hlavacek@nic.cz>
7 #ifndef _CONFIG_TURRIS_OMNIA_H
8 #define _CONFIG_TURRIS_OMNIA_H
11 * High Level Configuration Options (easy to change)
15 * TEXT_BASE needs to be below 16MiB, since this area is scrubbed
16 * for DDR ECC byte filling in the SPL before loading the main
19 #define CONFIG_SYS_TCLK 250000000 /* 250MHz */
21 /* USB/EHCI configuration */
22 #define CONFIG_EHCI_IS_TDI
24 /* Environment in SPI NOR flash */
26 #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */
28 /* Keep device tree and initrd in lower memory so the kernel can access them */
29 #define RELOCATION_LIMITS_ENV_SETTINGS \
30 "fdt_high=0x10000000\0" \
31 "initrd_high=0x10000000\0"
34 #define CONFIG_SPL_SIZE (140 << 10)
35 #define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_SIZE - 0x0030)
37 #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE)
38 #define CONFIG_SPL_BSS_MAX_SIZE (16 << 10)
40 #ifdef CONFIG_SPL_BUILD
41 #define CONFIG_SYS_MALLOC_SIMPLE
44 #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10))
45 #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4)
46 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
48 #ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI
49 /* SPL related SPI defines */
50 # define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS
53 #ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC
54 /* SPL related MMC defines */
55 # define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10)
56 # define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS
57 # ifdef CONFIG_SPL_BUILD
58 # define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER 0x00180000 /* in SDRAM */
63 * mv-common.h should be defined after CMD configs since it used them
64 * to enable certain macros
66 #include "mv-common.h"
68 /* Include the common distro boot environment */
69 #ifndef CONFIG_SPL_BUILD
72 #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
74 #define BOOT_TARGET_DEVICES_MMC(func)
77 #ifdef CONFIG_USB_STORAGE
78 #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
80 #define BOOT_TARGET_DEVICES_USB(func)
84 #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
86 #define BOOT_TARGET_DEVICES_SCSI(func)
89 #define BOOT_TARGET_DEVICES(func) \
90 BOOT_TARGET_DEVICES_MMC(func) \
91 BOOT_TARGET_DEVICES_SCSI(func) \
92 BOOT_TARGET_DEVICES_USB(func) \
96 #define KERNEL_ADDR_R __stringify(0x1000000)
97 #define FDT_ADDR_R __stringify(0x2000000)
98 #define RAMDISK_ADDR_R __stringify(0x2200000)
99 #define SCRIPT_ADDR_R __stringify(0x1800000)
100 #define PXEFILE_ADDR_R __stringify(0x1900000)
102 #define LOAD_ADDRESS_ENV_SETTINGS \
103 "kernel_addr_r=" KERNEL_ADDR_R "\0" \
104 "fdt_addr_r=" FDT_ADDR_R "\0" \
105 "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \
106 "scriptaddr=" SCRIPT_ADDR_R "\0" \
107 "pxefile_addr_r=" PXEFILE_ADDR_R "\0"
109 #include <config_distro_bootcmd.h>
111 #define CONFIG_EXTRA_ENV_SETTINGS \
112 RELOCATION_LIMITS_ENV_SETTINGS \
113 LOAD_ADDRESS_ENV_SETTINGS \
114 "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
115 "console=ttyS0,115200\0" \
116 "ethact=ethernet@34000\0" \
119 #endif /* CONFIG_SPL_BUILD */
121 #endif /* _CONFIG_TURRIS_OMNIA_H */