blob: 8f2cbc643eeca5dfe1f1ce448cd21abcdda052db [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Peng Fanf7765d72017-02-22 16:21:56 +08002/*
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
4 *
5 * Configuration settings for the Freescale i.MX7ULP EVK board.
Peng Fanf7765d72017-02-22 16:21:56 +08006 */
7
8#ifndef __MX7ULP_EVK_CONFIG_H
9#define __MX7ULP_EVK_CONFIG_H
10
11#include <linux/sizes.h>
12#include <asm/arch/imx-regs.h>
13
Peng Fanf7765d72017-02-22 16:21:56 +080014#define CONFIG_BOARD_POSTCLK_INIT
15#define CONFIG_SYS_BOOTM_LEN 0x1000000
16
Peng Fan8e861112017-02-22 16:21:57 +080017#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
Peng Fan8e861112017-02-22 16:21:57 +080018
Peng Fanf7765d72017-02-22 16:21:56 +080019/* Using ULP WDOG for reset */
20#define WDOG_BASE_ADDR WDG1_RBASE
21
Peng Fanf7765d72017-02-22 16:21:56 +080022#define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
23
Peng Fanf7765d72017-02-22 16:21:56 +080024/* UART */
25#define LPUART_BASE LPUART4_RBASE
26
Peng Fanf7765d72017-02-22 16:21:56 +080027/* Miscellaneous configurable options */
Peng Fanf7765d72017-02-22 16:21:56 +080028#define CONFIG_SYS_CBSIZE 512
29
Peng Fanf7765d72017-02-22 16:21:56 +080030#define CONFIG_SYS_MAXARGS 256
Peng Fanf7765d72017-02-22 16:21:56 +080031
Peng Fanf7765d72017-02-22 16:21:56 +080032/* Physical Memory Map */
Peng Fanf7765d72017-02-22 16:21:56 +080033
Peng Fanf7765d72017-02-22 16:21:56 +080034#define PHYS_SDRAM 0x60000000
35#define PHYS_SDRAM_SIZE SZ_1G
Peng Fanf7765d72017-02-22 16:21:56 +080036#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
Peng Fanf7765d72017-02-22 16:21:56 +080037
Peng Fan8e861112017-02-22 16:21:57 +080038#define CONFIG_EXTRA_ENV_SETTINGS \
39 "script=boot.scr\0" \
40 "image=zImage\0" \
41 "console=ttyLP0\0" \
42 "fdt_high=0xffffffff\0" \
43 "initrd_high=0xffffffff\0" \
44 "fdt_file=imx7ulp-evk.dtb\0" \
45 "fdt_addr=0x63000000\0" \
46 "boot_fdt=try\0" \
47 "earlycon=lpuart32,0x402D0010\0" \
48 "ip_dyn=yes\0" \
49 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050050 "mmcpart=1\0" \
Peng Fan8e861112017-02-22 16:21:57 +080051 "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
52 "mmcautodetect=yes\0" \
53 "mmcargs=setenv bootargs console=${console},${baudrate} " \
54 "root=${mmcroot}\0" \
55 "loadbootscript=" \
56 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
57 "bootscript=echo Running bootscript from mmc ...; " \
58 "source\0" \
59 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
60 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
61 "mmcboot=echo Booting from mmc ...; " \
62 "run mmcargs; " \
63 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
64 "if run loadfdt; then " \
65 "bootz ${loadaddr} - ${fdt_addr}; " \
66 "else " \
67 "if test ${boot_fdt} = try; then " \
68 "bootz; " \
69 "else " \
70 "echo WARN: Cannot load the DT; " \
71 "fi; " \
72 "fi; " \
73 "else " \
74 "bootz; " \
75 "fi;\0" \
76 "netargs=setenv bootargs console=${console},${baudrate} " \
77 "root=/dev/nfs " \
78 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
79 "netboot=echo Booting from net ...; " \
80 "run netargs; " \
81 "if test ${ip_dyn} = yes; then " \
82 "setenv get_cmd dhcp; " \
83 "else " \
84 "setenv get_cmd tftp; " \
85 "fi; " \
86 "usb start; "\
87 "${get_cmd} ${image}; " \
88 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
89 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
90 "bootz ${loadaddr} - ${fdt_addr}; " \
91 "else " \
92 "if test ${boot_fdt} = try; then " \
93 "bootz; " \
94 "else " \
95 "echo WARN: Cannot load the DT; " \
96 "fi; " \
97 "fi; " \
98 "else " \
99 "bootz; " \
100 "fi;\0" \
101
Peng Fanf7765d72017-02-22 16:21:56 +0800102#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
103#define CONFIG_SYS_INIT_RAM_SIZE SZ_256K
104
105#define CONFIG_SYS_INIT_SP_OFFSET \
106 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
107#define CONFIG_SYS_INIT_SP_ADDR \
108 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
109
Peng Fanf7765d72017-02-22 16:21:56 +0800110#endif /* __CONFIG_H */