1 /* SPDX-License-Identifier: GPL-2.0+ */
9 #include <linux/sizes.h>
10 #include <linux/stringify.h>
11 #include <asm/arch/imx-regs.h>
13 #define CONFIG_SYS_MONITOR_LEN SZ_512K
14 #define CONFIG_SYS_UBOOT_BASE \
15 (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
17 #ifdef CONFIG_SPL_BUILD
18 #define CONFIG_MALLOC_F_ADDR 0x204D0000
21 #ifdef CONFIG_DISTRO_DEFAULTS
22 #define BOOT_TARGET_DEVICES(func) \
26 #include <config_distro_bootcmd.h>
31 /* Initial environment variables */
32 #define CONFIG_EXTRA_ENV_SETTINGS \
34 "scriptaddr=0x83500000\0" \
35 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
37 "splashimage=0x90000000\0" \
38 "console=ttyLP0,115200 earlycon\0" \
39 "fdt_addr_r=0x83000000\0" \
40 "fdt_addr=0x83000000\0" \
41 "cntr_addr=0x98000000\0" \
42 "cntr_file=os_cntr_signed.bin\0" \
44 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
45 "bootm_size=0x10000000\0" \
46 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
48 "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
49 "mmcautodetect=yes\0" \
50 "mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}\0 " \
51 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
52 "bootscript=echo Running bootscript from mmc ...; " \
54 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
55 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}\0" \
56 "loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}\0" \
57 "auth_os=auth_cntr ${cntr_addr}\0" \
58 "boot_os=booti ${loadaddr} - ${fdt_addr_r};\0" \
59 "mmcboot=echo Booting from mmc ...; " \
61 "if test ${sec_boot} = yes; then " \
62 "if run auth_os; then " \
65 "echo ERR: failed to authenticate; " \
68 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
69 "bootm ${loadaddr}; " \
71 "if run loadfdt; then " \
74 "echo WARN: Cannot load the DT; " \
78 "netargs=setenv bootargs ${jh_clk} console=${console} " \
80 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
81 "netboot=echo Booting from net ...; " \
83 "if test ${ip_dyn} = yes; then " \
84 "setenv get_cmd dhcp; " \
86 "setenv get_cmd tftp; " \
88 "if test ${sec_boot} = yes; then " \
89 "${get_cmd} ${cntr_addr} ${cntr_file}; " \
90 "if run auth_os; then " \
93 "echo ERR: failed to authenticate; " \
96 "${get_cmd} ${loadaddr} ${image}; " \
97 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
98 "bootm ${loadaddr}; " \
100 "if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then " \
103 "echo WARN: Cannot load the DT; " \
107 "bsp_bootcmd=echo Running BSP bootcmd ...; " \
108 "mmc dev ${mmcdev}; if mmc rescan; then " \
109 "if run loadbootscript; then " \
112 "if test ${sec_boot} = yes; then " \
113 "if run loadcntr; then " \
115 "else run netboot; " \
118 "if run loadimage; then " \
120 "else run netboot; " \
126 /* Link Definitions */
128 #define CONFIG_SYS_INIT_RAM_ADDR 0x80000000
129 #define CONFIG_SYS_INIT_RAM_SIZE 0x200000
131 #define CONFIG_SYS_SDRAM_BASE 0x80000000
132 #define PHYS_SDRAM 0x80000000
133 #define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
135 #define CONFIG_SYS_FSL_USDHC_NUM 2
137 /* Using ULP WDOG for reset */
138 #define WDOG_BASE_ADDR WDG3_BASE_ADDR
140 #if defined(CONFIG_CMD_NET)
141 #define PHY_ANEG_TIMEOUT 20000