1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Copyright 2019-2021 Traverse Technologies
10 #include "ls1088a_common.h"
12 #define CFG_SYS_LS_MC_BOOT_TIMEOUT_MS 5000
14 #define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd"
15 #define SD_BOOTCOMMAND "run distro_bootcmd"
17 #define SD_FIRMWARE_PATH "firmware/traverse/ten64/"
19 #define QSPI_MC_INIT_CMD \
20 "sf probe 0:0 && sf read 0x80000000 0x300000 0x200000 &&" \
21 "sf read 0x80200000 0x5C0000 0x40000 &&" \
22 "fsl_mc start mc 0x80000000 0x80200000 && " \
23 "sf read 0x8E000000 0x580000 0x40000 && fsl_mc lazyapply DPL 0x8E000000 && "\
24 "echo 'default DPL loaded'\0"
25 #define SD_MC_INIT_CMD \
26 "mmcinfo; fatload mmc 0 0x80000000 " SD_FIRMWARE_PATH "mc_ls1088a.itb; "\
27 "fatload mmc 0 0x80200000 " SD_FIRMWARE_PATH "dpc.0x1D-0x0D.dtb; "\
28 "fsl_mc start mc 0x80000000 0x80200000 && " \
29 "fatload mmc 0 0x8E000000 " SD_FIRMWARE_PATH "eth-dpl-all.dtb && " \
30 "fsl_mc lazyapply DPL 0x8E000000 && echo 'default DPL loaded'\0"
32 #define BOOT_TARGET_DEVICES(func) \
39 #include <config_distro_bootcmd.h>
41 #define OPENWRT_NAND_BOOTCMD \
42 "bootcmd_openwrt_nand=ubi part ubi${openwrt_active_sys} && "\
43 "ubi read $load_addr kernel && " \
44 "setenv bootargs \"root=/dev/ubiblock0_1 earlycon ubi.mtd=ubi${openwrt_active_sys}\" &&"\
45 "bootm $load_addr#ten64\0"
46 #undef CFG_EXTRA_ENV_SETTINGS
48 #if CONFIG_IS_ENABLED(CMD_BOOTMENU)
49 #define DEFAULT_MENU_ENTRIES \
50 "bootmenu_0=Continue standard boot=run bootcmd\0" \
51 "bootmenu_1=Boot into recovery=run bootcmd_recovery\0" \
52 "bootmenu_2=Boot OpenWrt from NAND=run bootcmd_openwrt_nand\0"
54 #define DEFAULT_MENU_ENTRIES ""
55 #endif /* CONFIG_IS_ENABLED(CMD_BOOTMENU) */
57 #define CFG_EXTRA_ENV_SETTINGS \
59 "fdt_addr_r=0x90000000\0" \
60 "fdt_high=0xa0000000\0" \
61 "kernel_addr_r=0x81000000\0" \
62 "load_addr=0xa0000000\0" \
64 OPENWRT_NAND_BOOTCMD \
65 "openwrt_active_sys=a\0" \
66 "load_efi_dtb=mtd read devicetree $fdt_addr_r && fdt addr $fdt_addr_r && " \
67 "fdt resize && fdt boardsetup\0" \
68 "bootcmd_recovery=mtd read recovery 0xa0000000; " \
69 "setenv bootargs \"earlycon root=/dev/ram0 ramdisk_size=0x3000000\" && bootm 0xa0000000#ten64\0" \
72 #endif /* __TEN64_H */