blob: 8b2a10dda1f6367db04768492a350c85880ce86f [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#define CONFIG_SYS_INIT_SP_OFFSET \
26 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
27#define CONFIG_SYS_INIT_SP_ADDR \
28 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
29
30/* Board and environment settings */
Marek Vasut86a27482022-04-24 23:44:03 +020031#define CONFIG_MXC_UART_BASE UART_BASE_ADDR(3)
Frieder Schrempf199dfd92021-09-29 16:42:42 +020032#define CONFIG_HOSTNAME "kontron-mx8mm"
33
34#ifdef CONFIG_USB_EHCI_HCD
35#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
36#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
37#define CONFIG_MXC_USB_FLAGS 0
38#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
39#endif
40
Sughosh Ganuccb36462022-04-15 11:29:34 +053041/* GUID for capsule updatable firmware image */
42#define KONTRON_SL_MX8MM_FIT_IMAGE_GUID \
43 EFI_GUID(0xd488e45a, 0x4929, 0x4b55, 0x8c, 0x14, \
44 0x86, 0xce, 0xa2, 0xcd, 0x66, 0x29)
45
Frieder Schrempf199dfd92021-09-29 16:42:42 +020046#ifndef CONFIG_SPL_BUILD
47#define BOOT_TARGET_DEVICES(func) \
48 func(MMC, mmc, 1) \
49 func(MMC, mmc, 0) \
50 func(USB, usb, 0) \
51 func(PXE, pxe, na)
52#include <config_distro_bootcmd.h>
53/* Do not try to probe USB net adapters for net boot */
54#undef BOOTENV_RUN_NET_USB_START
55#define BOOTENV_RUN_NET_USB_START
56#else
57#define BOOTENV
58#endif
59
Frieder Schrempf199dfd92021-09-29 16:42:42 +020060#define CONFIG_SYS_BOOTM_LEN SZ_64M
61#define CONFIG_SPL_MAX_SIZE (148 * SZ_1K)
Frieder Schrempf199dfd92021-09-29 16:42:42 +020062
63#ifdef CONFIG_SPL_BUILD
64#define CONFIG_SPL_STACK 0x91fff0
65#define CONFIG_SPL_BSS_START_ADDR 0x910000
66#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K
67#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
68#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K
69/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
70#define CONFIG_MALLOC_F_ADDR 0x930000
71#endif
72
73#define FEC_QUIRK_ENET_MAC
74
Heiko Thierycbe85632022-02-16 13:25:14 +010075#define ENV_MEM_LAYOUT_SETTINGS \
76 "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Frieder Schrempf199dfd92021-09-29 16:42:42 +020077 "kernel_addr_r=0x42000000\0" \
Heiko Thierycbe85632022-02-16 13:25:14 +010078 "fdt_addr_r=0x48000000\0" \
79 "fdtoverlay_addr_r=0x49000000\0" \
80 "ramdisk_addr_r=0x48080000\0" \
81 "scriptaddr=0x40000000\0"\
82 "pxefile_addr_r=0x40100000\0"
83
84#define CONFIG_EXTRA_ENV_SETTINGS \
Frieder Schrempf199dfd92021-09-29 16:42:42 +020085 "dfu_alt_info=sf 0:0=flash-bin raw 0x400 0x1f0000\0" \
86 "bootdelay=3\0" \
87 "hostname=" CONFIG_HOSTNAME "\0" \
Heiko Thierycbe85632022-02-16 13:25:14 +010088 ENV_MEM_LAYOUT_SETTINGS \
Frieder Schrempf199dfd92021-09-29 16:42:42 +020089 BOOTENV
90
91#endif /* __KONTRON_MX8MM_CONFIG_H */