blob: 93dcc22d3662e0e4273c771bad22102c351e10d1 [file] [log] [blame]
Yanhong Wang6a5a45d2023-03-29 11:42:17 +08001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2022 StarFive Technology Co., Ltd.
4 * Author: Yanhong Wang<yanhong.wang@starfivetech.com>
5 *
6 */
7
8#ifndef _STARFIVE_VISIONFIVE2_H
9#define _STARFIVE_VISIONFIVE2_H
10
11#define RISCV_MMODE_TIMERBASE 0x2000000
12#define RISCV_MMODE_TIMER_FREQ 4000000
13#define RISCV_SMODE_TIMER_FREQ 4000000
14
15#define __io
16
17/* Environment options */
18
19#define BOOT_TARGET_DEVICES(func) \
20 func(MMC, mmc, 1) \
21 func(DHCP, dhcp, na)
22
23#include <config_distro_bootcmd.h>
24
25#define TYPE_GUID_SPL "2E54B353-1271-4842-806F-E436D6AF6985"
26#define TYPE_GUID_UBOOT "BC13C2FF-59E6-4262-A352-B275FD6F7172"
27#define TYPE_GUID_SYSTEM "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"
28
29#define PARTS_DEFAULT \
30 "name=spl,start=2M,size=2M,type=${type_guid_gpt_loader1};" \
31 "name=uboot,size=4MB,type=${type_guid_gpt_loader2};" \
32 "name=system,size=-,bootable,type=${type_guid_gpt_system};"
33
34#define CFG_EXTRA_ENV_SETTINGS \
35 "kernel_addr_r=0x40200000\0" \
36 "kernel_comp_addr_r=0x88000000\0" \
37 "kernel_comp_size=0x4000000\0" \
38 "fdt_addr_r=0x46000000\0" \
39 "scriptaddr=0x43900000\0" \
40 "pxefile_addr_r=0x45900000\0" \
41 "ramdisk_addr_r=0x46100000\0" \
42 "type_guid_gpt_loader1=" TYPE_GUID_SPL "\0" \
43 "type_guid_gpt_loader2=" TYPE_GUID_UBOOT "\0" \
44 "type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
45 "partitions=" PARTS_DEFAULT "\0" \
46 "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
47 BOOTENV
48
49#endif /* _STARFIVE_VISIONFIVE2_H */