blob: f82b1e0d212a50b9e73471064e328ead894632b2 [file] [log] [blame]
Mathew McBridee605fb12022-01-31 18:34:43 +05301/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2017 NXP
4 * Copyright 2019-2021 Traverse Technologies
5 */
6
7#ifndef __TEN64_H
8#define __TEN64_H
9
10#include "ls1088a_common.h"
11
Mathew McBridee605fb12022-01-31 18:34:43 +053012#define COUNTER_FREQUENCY 25000000 /* 25MHz */
13
Mathew McBridee605fb12022-01-31 18:34:43 +053014#define CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS 5000
15
16#define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd"
17#define SD_BOOTCOMMAND "run distro_bootcmd"
18
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 0x80300000 0x580000 0x40000 && fsl_mc lazyapply DPL 0x80300000\0"
24#define SD_MC_INIT_CMD \
25 "mmcinfo; fatload mmc 0 0x80000000 mcfirmware/mc_ls1088a.itb; "\
26 "fatload mmc 0 0x80200000 dpaa2config/dpc.0x1D-0x0D.dtb; "\
27 "fsl_mc start mc 0x80000000 0x80200000\0"
28
29#define BOOT_TARGET_DEVICES(func) \
30 func(NVME, nvme, 0) \
31 func(USB, usb, 0) \
32 func(MMC, mmc, 0) \
33 func(SCSI, scsi, 0) \
34 func(DHCP, dhcp, 0) \
35 func(PXE, pxe, 0)
36#include <config_distro_bootcmd.h>
37
38#undef CONFIG_EXTRA_ENV_SETTINGS
39
40#define CONFIG_EXTRA_ENV_SETTINGS \
41 "BOARD=ten64\0" \
42 "fdt_addr_r=0x90000000\0" \
43 "fdt_high=0xa0000000\0" \
44 "kernel_addr_r=0x81000000\0" \
45 "load_addr=0xa0000000\0" \
46 BOOTENV \
47 "load_efi_dtb=mtd read devicetree $fdt_addr_r && fdt addr $fdt_addr_r && " \
48 "fdt resize && fdt boardsetup\0" \
49 "bootcmd_recovery=mtd read recovery 0xa0000000; mtd read dpl 0x80100000 && " \
50 "fsl_mc apply DPL 0x80100000 && bootm 0xa0000000#ten64\0"
51
52#endif /* __TEN64_H */