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 CFG_SYS_UBOOT_BASE \
14 (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
16 #ifdef CONFIG_SPL_BUILD
17 #define CFG_MALLOC_F_ADDR 0x204D0000
20 #ifdef CONFIG_DISTRO_DEFAULTS
21 #define BOOT_TARGET_DEVICES(func) \
25 #include <config_distro_bootcmd.h>
30 /* Initial environment variables */
31 #define CFG_EXTRA_ENV_SETTINGS \
33 "scriptaddr=0x83500000\0" \
34 "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
36 "splashimage=0x90000000\0" \
37 "console=ttyLP0,115200 earlycon\0" \
38 "fdt_addr_r=0x83000000\0" \
39 "fdt_addr=0x83000000\0" \
40 "cntr_addr=0x98000000\0" \
41 "cntr_file=os_cntr_signed.bin\0" \
43 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
44 "bootm_size=0x10000000\0" \
45 "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
47 "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
48 "mmcautodetect=yes\0" \
49 "mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}\0 " \
50 "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
51 "bootscript=echo Running bootscript from mmc ...; " \
53 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
54 "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}\0" \
55 "loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}\0" \
56 "auth_os=auth_cntr ${cntr_addr}\0" \
57 "boot_os=booti ${loadaddr} - ${fdt_addr_r};\0" \
58 "mmcboot=echo Booting from mmc ...; " \
60 "if test ${sec_boot} = yes; then " \
61 "if run auth_os; then " \
64 "echo ERR: failed to authenticate; " \
67 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
68 "bootm ${loadaddr}; " \
70 "if run loadfdt; then " \
73 "echo WARN: Cannot load the DT; " \
77 "netargs=setenv bootargs ${jh_clk} console=${console} " \
79 "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
80 "netboot=echo Booting from net ...; " \
82 "if test ${ip_dyn} = yes; then " \
83 "setenv get_cmd dhcp; " \
85 "setenv get_cmd tftp; " \
87 "if test ${sec_boot} = yes; then " \
88 "${get_cmd} ${cntr_addr} ${cntr_file}; " \
89 "if run auth_os; then " \
92 "echo ERR: failed to authenticate; " \
95 "${get_cmd} ${loadaddr} ${image}; " \
96 "if test ${boot_fit} = yes || test ${boot_fit} = try; then " \
97 "bootm ${loadaddr}; " \
99 "if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then " \
102 "echo WARN: Cannot load the DT; " \
106 "bsp_bootcmd=echo Running BSP bootcmd ...; " \
107 "mmc dev ${mmcdev}; if mmc rescan; then " \
108 "if run loadbootscript; then " \
111 "if test ${sec_boot} = yes; then " \
112 "if run loadcntr; then " \
114 "else run netboot; " \
117 "if run loadimage; then " \
119 "else run netboot; " \
125 /* Link Definitions */
127 #define CFG_SYS_INIT_RAM_ADDR 0x80000000
128 #define CFG_SYS_INIT_RAM_SIZE 0x200000
130 #define CFG_SYS_SDRAM_BASE 0x80000000
131 #define PHYS_SDRAM 0x80000000
132 #define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
134 #define CFG_SYS_FSL_USDHC_NUM 2
136 /* Using ULP WDOG for reset */
137 #define WDOG_BASE_ADDR WDG3_BASE_ADDR
139 #if defined(CONFIG_CMD_NET)
140 #define PHY_ANEG_TIMEOUT 20000