blob: c4be62c3721cfff5a91ba5992a8e83243cdb652a [file] [log] [blame]
Frieder Schrempf199dfd92021-09-29 16:42:42 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2019 Kontron Electronics GmbH
4 *
5 * Configuration settings for the Kontron SL/BL i.MX8M-Mini boards and modules (N81xx).
6 */
7#ifndef __KONTRON_MX8MM_CONFIG_H
8#define __KONTRON_MX8MM_CONFIG_H
9
10#include <asm/arch/imx-regs.h>
11#include <linux/sizes.h>
12
13#ifdef CONFIG_SPL_BUILD
14#include <config.h>
15#endif
16
17/* RAM */
18#define PHYS_SDRAM DDR_CSD1_BASE_ADDR
19#define PHYS_SDRAM_SIZE (SZ_4G)
20#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
21
22#define CONFIG_SYS_INIT_RAM_ADDR 0x40000000
23#define CONFIG_SYS_INIT_RAM_SIZE 0x200000
24
Frieder Schrempf199dfd92021-09-29 16:42:42 +020025/* Board and environment settings */
Frieder Schrempf199dfd92021-09-29 16:42:42 +020026#define CONFIG_HOSTNAME "kontron-mx8mm"
27
28#ifdef CONFIG_USB_EHCI_HCD
29#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
30#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
31#define CONFIG_MXC_USB_FLAGS 0
32#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
33#endif
34
Sughosh Ganuccb36462022-04-15 11:29:34 +053035/* GUID for capsule updatable firmware image */
36#define KONTRON_SL_MX8MM_FIT_IMAGE_GUID \
37 EFI_GUID(0xd488e45a, 0x4929, 0x4b55, 0x8c, 0x14, \
38 0x86, 0xce, 0xa2, 0xcd, 0x66, 0x29)
39
Frieder Schrempf199dfd92021-09-29 16:42:42 +020040#ifndef CONFIG_SPL_BUILD
41#define BOOT_TARGET_DEVICES(func) \
42 func(MMC, mmc, 1) \
43 func(MMC, mmc, 0) \
44 func(USB, usb, 0) \
45 func(PXE, pxe, na)
46#include <config_distro_bootcmd.h>
47/* Do not try to probe USB net adapters for net boot */
48#undef BOOTENV_RUN_NET_USB_START
49#define BOOTENV_RUN_NET_USB_START
50#else
51#define BOOTENV
52#endif
53
Frieder Schrempf199dfd92021-09-29 16:42:42 +020054#define CONFIG_SYS_BOOTM_LEN SZ_64M
Frieder Schrempf199dfd92021-09-29 16:42:42 +020055
56#ifdef CONFIG_SPL_BUILD
Frieder Schrempf199dfd92021-09-29 16:42:42 +020057/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
58#define CONFIG_MALLOC_F_ADDR 0x930000
59#endif
60
Heiko Thierycbe85632022-02-16 13:25:14 +010061#define ENV_MEM_LAYOUT_SETTINGS \
62 "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Frieder Schrempf199dfd92021-09-29 16:42:42 +020063 "kernel_addr_r=0x42000000\0" \
Heiko Thierycbe85632022-02-16 13:25:14 +010064 "fdt_addr_r=0x48000000\0" \
65 "fdtoverlay_addr_r=0x49000000\0" \
66 "ramdisk_addr_r=0x48080000\0" \
67 "scriptaddr=0x40000000\0"\
68 "pxefile_addr_r=0x40100000\0"
69
70#define CONFIG_EXTRA_ENV_SETTINGS \
Frieder Schrempf199dfd92021-09-29 16:42:42 +020071 "dfu_alt_info=sf 0:0=flash-bin raw 0x400 0x1f0000\0" \
72 "bootdelay=3\0" \
73 "hostname=" CONFIG_HOSTNAME "\0" \
Heiko Thierycbe85632022-02-16 13:25:14 +010074 ENV_MEM_LAYOUT_SETTINGS \
Frieder Schrempf199dfd92021-09-29 16:42:42 +020075 BOOTENV
76
77#endif /* __KONTRON_MX8MM_CONFIG_H */