blob: 4909b3679d85eb5483c43855b86fad21b8a31264 [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
25#define CONFIG_SYS_MALLOC_LEN SZ_64M
26#define CONFIG_SYS_HZ 1000
27
28#define CONFIG_SYS_INIT_SP_OFFSET \
29 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
30#define CONFIG_SYS_INIT_SP_ADDR \
31 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
32
33/* Board and environment settings */
34#define CONFIG_MXC_UART_BASE UART3_BASE_ADDR
35#define CONFIG_HOSTNAME "kontron-mx8mm"
36
37#ifdef CONFIG_USB_EHCI_HCD
38#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
39#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
40#define CONFIG_MXC_USB_FLAGS 0
41#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
42#endif
43
44#ifndef CONFIG_SPL_BUILD
45#define BOOT_TARGET_DEVICES(func) \
46 func(MMC, mmc, 1) \
47 func(MMC, mmc, 0) \
48 func(USB, usb, 0) \
49 func(PXE, pxe, na)
50#include <config_distro_bootcmd.h>
51/* Do not try to probe USB net adapters for net boot */
52#undef BOOTENV_RUN_NET_USB_START
53#define BOOTENV_RUN_NET_USB_START
54#else
55#define BOOTENV
56#endif
57
58#define CONFIG_LOADADDR 0x40480000
59#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
60#define CONFIG_SYS_BOOTM_LEN SZ_64M
61#define CONFIG_SPL_MAX_SIZE (148 * SZ_1K)
62#define CONFIG_FSL_USDHC
63
64#ifdef CONFIG_SPL_BUILD
65#define CONFIG_SPL_STACK 0x91fff0
66#define CONFIG_SPL_BSS_START_ADDR 0x910000
67#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K
68#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
69#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K
70/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
71#define CONFIG_MALLOC_F_ADDR 0x930000
72#endif
73
74#define FEC_QUIRK_ENET_MAC
75
76#define CONFIG_EXTRA_ENV_SETTINGS \
77 "kernel_addr_r=0x42000000\0" \
78 "fdt_addr_r=0x44000000\0" \
79 "ramdisk_addr_r=0x46400000\0" \
80 "pxefile_addr_r=0x46000000\0" \
81 "scriptaddr=0x46000000\0" \
82 "dfu_alt_info=sf 0:0=flash-bin raw 0x400 0x1f0000\0" \
83 "bootdelay=3\0" \
84 "hostname=" CONFIG_HOSTNAME "\0" \
85 BOOTENV
86
87#endif /* __KONTRON_MX8MM_CONFIG_H */