blob: d1c1202d06135bf1f1d3b49666fb819ab978326c [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/* Using ULP WDOG for reset */
15#define WDOG_BASE_ADDR WDG1_RBASE
16
Tom Rini6a5dccc2022-11-16 13:10:41 -050017#define CFG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
Peng Fanf7765d72017-02-22 16:21:56 +080018
Peng Fanf7765d72017-02-22 16:21:56 +080019/* UART */
20#define LPUART_BASE LPUART4_RBASE
21
Peng Fanf7765d72017-02-22 16:21:56 +080022/* Miscellaneous configurable options */
Peng Fanf7765d72017-02-22 16:21:56 +080023
Peng Fanf7765d72017-02-22 16:21:56 +080024/* Physical Memory Map */
Peng Fanf7765d72017-02-22 16:21:56 +080025
Peng Fanf7765d72017-02-22 16:21:56 +080026#define PHYS_SDRAM 0x60000000
27#define PHYS_SDRAM_SIZE SZ_1G
Tom Rinibb4dd962022-11-16 13:10:37 -050028#define CFG_SYS_SDRAM_BASE PHYS_SDRAM
Peng Fanf7765d72017-02-22 16:21:56 +080029
Tom Rinic9edebe2022-12-04 10:03:50 -050030#define CFG_EXTRA_ENV_SETTINGS \
Peng Fan8e861112017-02-22 16:21:57 +080031 "script=boot.scr\0" \
32 "image=zImage\0" \
33 "console=ttyLP0\0" \
34 "fdt_high=0xffffffff\0" \
35 "initrd_high=0xffffffff\0" \
36 "fdt_file=imx7ulp-evk.dtb\0" \
37 "fdt_addr=0x63000000\0" \
38 "boot_fdt=try\0" \
39 "earlycon=lpuart32,0x402D0010\0" \
40 "ip_dyn=yes\0" \
41 "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
Tom Rinib113bca2021-12-11 14:55:52 -050042 "mmcpart=1\0" \
Peng Fanbb4bb582022-04-15 12:23:41 +080043 "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
Peng Fan8e861112017-02-22 16:21:57 +080044 "mmcautodetect=yes\0" \
45 "mmcargs=setenv bootargs console=${console},${baudrate} " \
46 "root=${mmcroot}\0" \
47 "loadbootscript=" \
48 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
49 "bootscript=echo Running bootscript from mmc ...; " \
50 "source\0" \
51 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
52 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
53 "mmcboot=echo Booting from mmc ...; " \
54 "run mmcargs; " \
55 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
56 "if run loadfdt; then " \
57 "bootz ${loadaddr} - ${fdt_addr}; " \
58 "else " \
59 "if test ${boot_fdt} = try; then " \
60 "bootz; " \
61 "else " \
62 "echo WARN: Cannot load the DT; " \
63 "fi; " \
64 "fi; " \
65 "else " \
66 "bootz; " \
67 "fi;\0" \
68 "netargs=setenv bootargs console=${console},${baudrate} " \
69 "root=/dev/nfs " \
70 "ip=:::::eth0:dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
71 "netboot=echo Booting from net ...; " \
72 "run netargs; " \
73 "if test ${ip_dyn} = yes; then " \
74 "setenv get_cmd dhcp; " \
75 "else " \
76 "setenv get_cmd tftp; " \
77 "fi; " \
78 "usb start; "\
79 "${get_cmd} ${image}; " \
80 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
81 "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
82 "bootz ${loadaddr} - ${fdt_addr}; " \
83 "else " \
84 "if test ${boot_fdt} = try; then " \
85 "bootz; " \
86 "else " \
87 "echo WARN: Cannot load the DT; " \
88 "fi; " \
89 "fi; " \
90 "else " \
91 "bootz; " \
92 "fi;\0" \
93
Tom Rini6a5dccc2022-11-16 13:10:41 -050094#define CFG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
95#define CFG_SYS_INIT_RAM_SIZE SZ_256K
Peng Fanf7765d72017-02-22 16:21:56 +080096
Peng Fanf7765d72017-02-22 16:21:56 +080097#endif /* __CONFIG_H */