blob: 57fed4ed69ca2b455288ccf34fdb3d361e37f05e [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_SYS_BOOTM_LEN 0x1000000
15
Peng Fan8e861112017-02-22 16:21:57 +080016
Peng Fanf7765d72017-02-22 16:21:56 +080017/* Using ULP WDOG for reset */
18#define WDOG_BASE_ADDR WDG1_RBASE
19
Peng Fanf7765d72017-02-22 16:21:56 +080020#define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
21
Peng Fanf7765d72017-02-22 16:21:56 +080022/* UART */
23#define LPUART_BASE LPUART4_RBASE
24
Peng Fanf7765d72017-02-22 16:21:56 +080025/* Miscellaneous configurable options */
Peng Fanf7765d72017-02-22 16:21:56 +080026
Peng Fanf7765d72017-02-22 16:21:56 +080027/* Physical Memory Map */
Peng Fanf7765d72017-02-22 16:21:56 +080028
Peng Fanf7765d72017-02-22 16:21:56 +080029#define PHYS_SDRAM 0x60000000
30#define PHYS_SDRAM_SIZE SZ_1G
Peng Fanf7765d72017-02-22 16:21:56 +080031#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
Peng Fanf7765d72017-02-22 16:21:56 +080032
Peng Fan8e861112017-02-22 16:21:57 +080033#define CONFIG_EXTRA_ENV_SETTINGS \
34 "script=boot.scr\0" \
35 "image=zImage\0" \
36 "console=ttyLP0\0" \
37 "fdt_high=0xffffffff\0" \
38 "initrd_high=0xffffffff\0" \
39 "fdt_file=imx7ulp-evk.dtb\0" \
40 "fdt_addr=0x63000000\0" \
41 "boot_fdt=try\0" \
42 "earlycon=lpuart32,0x402D0010\0" \
43 "ip_dyn=yes\0" \
44 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050045 "mmcpart=1\0" \
Peng Fanbb4bb582022-04-15 12:23:41 +080046 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Peng Fan8e861112017-02-22 16:21:57 +080047 "mmcautodetect=yes\0" \
48 "mmcargs=setenv bootargs console=${console},${baudrate} " \
49 "root=${mmcroot}\0" \
50 "loadbootscript=" \
51 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
52 "bootscript=echo Running bootscript from mmc ...; " \
53 "source\0" \
54 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
55 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
56 "mmcboot=echo Booting from mmc ...; " \
57 "run mmcargs; " \
58 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
59 "if run loadfdt; then " \
60 "bootz ${loadaddr} - ${fdt_addr}; " \
61 "else " \
62 "if test ${boot_fdt} = try; then " \
63 "bootz; " \
64 "else " \
65 "echo WARN: Cannot load the DT; " \
66 "fi; " \
67 "fi; " \
68 "else " \
69 "bootz; " \
70 "fi;\0" \
71 "netargs=setenv bootargs console=${console},${baudrate} " \
72 "root=/dev/nfs " \
73 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
74 "netboot=echo Booting from net ...; " \
75 "run netargs; " \
76 "if test ${ip_dyn} = yes; then " \
77 "setenv get_cmd dhcp; " \
78 "else " \
79 "setenv get_cmd tftp; " \
80 "fi; " \
81 "usb start; "\
82 "${get_cmd} ${image}; " \
83 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
84 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
85 "bootz ${loadaddr} - ${fdt_addr}; " \
86 "else " \
87 "if test ${boot_fdt} = try; then " \
88 "bootz; " \
89 "else " \
90 "echo WARN: Cannot load the DT; " \
91 "fi; " \
92 "fi; " \
93 "else " \
94 "bootz; " \
95 "fi;\0" \
96
Peng Fanf7765d72017-02-22 16:21:56 +080097#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
98#define CONFIG_SYS_INIT_RAM_SIZE SZ_256K
99
Peng Fanf7765d72017-02-22 16:21:56 +0800100#endif /* __CONFIG_H */