blob: 106fbdb9053c4694a2bdc11fa1a6fac7c4f5a3ca [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
Tom Rinia17aa192022-12-04 10:04:55 -050013#define CFG_MXC_UART_BASE UART1_IPS_BASE_ADDR
Ilko Ilieve2480f12021-04-16 15:48:13 +020014
Tom Rinic9edebe2022-12-04 10:03:50 -050015#undef CFG_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
Tom Rinic9edebe2022-12-04 10:03:50 -050025#define CFG_EXTRA_ENV_SETTINGS \
Ilko Ilieve2480f12021-04-16 15:48:13 +020026 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
Tom Rinibb4dd962022-11-16 13:10:37 -050072#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Tom Rini6a5dccc2022-11-16 13:10:41 -050073#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
74#define CFG_SYS_INIT_RAM_SIZE IRAM_SIZE
Ilko Ilieve2480f12021-04-16 15:48:13 +020075
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 */
Tom Rinib9796e82022-12-04 10:04:56 -050082#define CFG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
Ilko Ilieve2480f12021-04-16 15:48:13 +020083
Ilko Ilieve2480f12021-04-16 15:48:13 +020084#endif /* __CONFIG_H */