blob: 54e65f29f1eb359fd8c842dd035373292609acb6 [file] [log] [blame]
Mathew McBridea1d2fd32022-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
12#define CONFIG_SYS_CLK_FREQ 100000000
13#define COUNTER_FREQUENCY 25000000 /* 25MHz */
14
15#define CONFIG_DIMM_SLOTS_PER_CTLR 1
16
17#define CONFIG_SYS_LS_MC_BOOT_TIMEOUT_MS 5000
18
19#define QSPI_NOR_BOOTCOMMAND "run distro_bootcmd"
20#define SD_BOOTCOMMAND "run distro_bootcmd"
21
22#define QSPI_MC_INIT_CMD \
23 "sf probe 0:0 && sf read 0x80000000 0x300000 0x200000 &&" \
24 "sf read 0x80200000 0x5C0000 0x40000 &&" \
25 "fsl_mc start mc 0x80000000 0x80200000 && " \
26 "sf read 0x80300000 0x580000 0x40000 && fsl_mc lazyapply DPL 0x80300000\0"
27#define SD_MC_INIT_CMD \
28 "mmcinfo; fatload mmc 0 0x80000000 mcfirmware/mc_ls1088a.itb; "\
29 "fatload mmc 0 0x80200000 dpaa2config/dpc.0x1D-0x0D.dtb; "\
30 "fsl_mc start mc 0x80000000 0x80200000\0"
31
32#define BOOT_TARGET_DEVICES(func) \
33 func(NVME, nvme, 0) \
34 func(USB, usb, 0) \
35 func(MMC, mmc, 0) \
36 func(SCSI, scsi, 0) \
37 func(DHCP, dhcp, 0) \
38 func(PXE, pxe, 0)
39#include <config_distro_bootcmd.h>
40
41#undef CONFIG_EXTRA_ENV_SETTINGS
42
43#define CONFIG_EXTRA_ENV_SETTINGS \
44 "BOARD=ten64\0" \
45 "fdt_addr_r=0x90000000\0" \
46 "fdt_high=0xa0000000\0" \
47 "kernel_addr_r=0x81000000\0" \
48 "load_addr=0xa0000000\0" \
49 BOOTENV \
50 "load_efi_dtb=mtd read devicetree $fdt_addr_r && fdt addr $fdt_addr_r && " \
51 "fdt resize && fdt boardsetup\0" \
52 "bootcmd_recovery=mtd read recovery 0xa0000000; mtd read dpl 0x80100000 && " \
53 "fsl_mc apply DPL 0x80100000 && bootm 0xa0000000#ten64\0"
54
55#endif /* __TEN64_H */