blob: 2f00198e40eaadca9803f776db6c83a9504203b6 [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#undef CONFIG_SYS_AUTOLOAD
16#undef CONFIG_EXTRA_ENV_SETTINGS
Ilko Ilieve2480f12021-04-16 15:48:13 +020017
18/*
19 * Use:
Wolfgang Denk62fb2b42021-09-27 17:42:39 +020020 * boot-mode=mix
21 * boot-mode=sd
22 * boot-mode=net
Ilko Ilieve2480f12021-04-16 15:48:13 +020023 */
24#define MY_CONFIG_BOOT_MODE "boot-mode=sd\0"
25
26#define CONFIG_EXTRA_ENV_SETTINGS \
27 MY_CONFIG_BOOT_MODE \
28 "image=zImage\0" \
29 "console=ttymxc0\0" \
30 "fdt_file=imx7-cm.dtb\0" \
31 "fdt_addr=0x83000000\0" \
32 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050033 "mmcpart=1\0" \
Peng Fanbb4bb582022-04-15 12:23:41 +080034 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Ilko Ilieve2480f12021-04-16 15:48:13 +020035 "mmcargs=setenv bootargs console=${console},${baudrate} " \
36 "root=${mmcroot}\0" \
37 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
38 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
39 \
40 "bootsd=" \
41 "echo Booting from SD card ...; " \
42 "run mmcargs; " \
43 "mmc dev ${mmcdev};" \
44 "run loadimage; " \
45 "run loadfdt; " \
46 "bootz ${loadaddr} - ${fdt_addr}; " \
47 "\0" \
48 \
49 "bootmix=" \
50 "echo Boot Kernel and FDT from TFTP, RootFs from SD card ...; " \
51 "run mmcargs; " \
52 "mmc dev ${mmcdev};" \
53 "tftp ${fdt_addr} ${fdt_file}; " \
54 "tftp ${image}; " \
55 "bootz ${loadaddr} - ${fdt_addr}; " \
56 "\0" \
57 \
58 "netargs=setenv bootargs console=${console},${baudrate} " \
59 "root=/dev/nfs " \
60 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \
61 "\0" \
62 "bootnet=" \
63 "echo Booting from net ...; " \
64 "run netargs; " \
65 "tftp ${image}; " \
66 "tftp ${fdt_addr} ${fdt_file}; " \
67 "bootz ${loadaddr} - ${fdt_addr}; " \
68 "\0"
69
Ilko Ilieve2480f12021-04-16 15:48:13 +020070/* Physical Memory Map */
71#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
72
73#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
74#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
75#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
76
Ilko Ilieve2480f12021-04-16 15:48:13 +020077/* MMC Config*/
78#define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
79#define CONFIG_SYS_FSL_USDHC_NUM 2
80
Ilko Ilieve2480f12021-04-16 15:48:13 +020081
82/* USB Configs */
83#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
84
85#define CONFIG_USBD_HS
86
87/* SPL */
88#include "imx7_spl.h"
89
90#endif /* __CONFIG_H */