1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2021 Ronetix GmbH
5 * Configuration settings for the Ronetix's iMX7-CM System-on-Module.
8 #ifndef __IMX7_CM_CONFIG_H
9 #define __IMX7_CM_CONFIG_H
11 #include "mx7_common.h"
13 #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
15 #define CONFIG_ETHPRIME "FEC"
17 #undef CONFIG_SYS_AUTOLOAD
18 #undef CONFIG_EXTRA_ENV_SETTINGS
26 #define MY_CONFIG_BOOT_MODE "boot-mode=sd\0"
28 #define CONFIG_EXTRA_ENV_SETTINGS \
32 "fdt_file=imx7-cm.dtb\0" \
33 "fdt_addr=0x83000000\0" \
34 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
36 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
37 "mmcargs=setenv bootargs console=${console},${baudrate} " \
39 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
40 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
43 "echo Booting from SD card ...; " \
45 "mmc dev ${mmcdev};" \
48 "bootz ${loadaddr} - ${fdt_addr}; " \
52 "echo Boot Kernel and FDT from TFTP, RootFs from SD card ...; " \
54 "mmc dev ${mmcdev};" \
55 "tftp ${fdt_addr} ${fdt_file}; " \
57 "bootz ${loadaddr} - ${fdt_addr}; " \
60 "netargs=setenv bootargs console=${console},${baudrate} " \
62 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \
65 "echo Booting from net ...; " \
68 "tftp ${fdt_addr} ${fdt_file}; " \
69 "bootz ${loadaddr} - ${fdt_addr}; " \
72 /* Physical Memory Map */
73 #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
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
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)
85 #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC1_BASE_ADDR
86 #define CONFIG_SYS_FSL_USDHC_NUM 2
88 #define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
91 #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
93 #define CONFIG_USBD_HS
98 #endif /* __CONFIG_H */