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