blob: 261ed900fee9ba3992a456abd064a2a739d5ba0b [file] [log] [blame]
Ilko Ilieve2480f12021-04-16 15:48:13 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2021 Ronetix GmbH
4 *
5 * Configuration settings for the Ronetix's iMX7-CM System-on-Module.
6 */
7
8#ifndef __IMX7_CM_CONFIG_H
9#define __IMX7_CM_CONFIG_H
10
11#include "mx7_common.h"
12
13#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
14
Ilko Ilieve2480f12021-04-16 15:48:13 +020015#define CONFIG_ETHPRIME "FEC"
16
17#undef CONFIG_SYS_AUTOLOAD
18#undef CONFIG_EXTRA_ENV_SETTINGS
Ilko Ilieve2480f12021-04-16 15:48:13 +020019
20/*
21 * Use:
Wolfgang Denk62fb2b42021-09-27 17:42:39 +020022 * boot-mode=mix
23 * boot-mode=sd
24 * boot-mode=net
Ilko Ilieve2480f12021-04-16 15:48:13 +020025 */
26#define MY_CONFIG_BOOT_MODE "boot-mode=sd\0"
27
28#define CONFIG_EXTRA_ENV_SETTINGS \
29 MY_CONFIG_BOOT_MODE \
30 "image=zImage\0" \
31 "console=ttymxc0\0" \
32 "fdt_file=imx7-cm.dtb\0" \
33 "fdt_addr=0x83000000\0" \
34 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050035 "mmcpart=1\0" \
Ilko Ilieve2480f12021-04-16 15:48:13 +020036 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
37 "mmcargs=setenv bootargs console=${console},${baudrate} " \
38 "root=${mmcroot}\0" \
39 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
40 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
41 \
42 "bootsd=" \
43 "echo Booting from SD card ...; " \
44 "run mmcargs; " \
45 "mmc dev ${mmcdev};" \
46 "run loadimage; " \
47 "run loadfdt; " \
48 "bootz ${loadaddr} - ${fdt_addr}; " \
49 "\0" \
50 \
51 "bootmix=" \
52 "echo Boot Kernel and FDT from TFTP, RootFs from SD card ...; " \
53 "run mmcargs; " \
54 "mmc dev ${mmcdev};" \
55 "tftp ${fdt_addr} ${fdt_file}; " \
56 "tftp ${image}; " \
57 "bootz ${loadaddr} - ${fdt_addr}; " \
58 "\0" \
59 \
60 "netargs=setenv bootargs console=${console},${baudrate} " \
61 "root=/dev/nfs " \
62 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \
63 "\0" \
64 "bootnet=" \
65 "echo Booting from net ...; " \
66 "run netargs; " \
67 "tftp ${image}; " \
68 "tftp ${fdt_addr} ${fdt_file}; " \
69 "bootz ${loadaddr} - ${fdt_addr}; " \
70 "\0"
71
Ilko Ilieve2480f12021-04-16 15:48:13 +020072/* Physical Memory Map */
73#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
74
75#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
76#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
77#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
78
79#define CONFIG_SYS_INIT_SP_OFFSET \
80 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
81#define CONFIG_SYS_INIT_SP_ADDR \
82 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
83
84/* MMC Config*/
85#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
86#define CONFIG_SYS_FSL_USDHC_NUM 2
87
Ilko Ilieve2480f12021-04-16 15:48:13 +020088#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
89
90/* USB Configs */
91#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
92
93#define CONFIG_USBD_HS
94
95/* SPL */
96#include "imx7_spl.h"
97
98#endif /* __CONFIG_H */