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