Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 1 | /* 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 |
Bin Meng | 51e3855 | 2023-06-21 23:11:44 +0800 | [diff] [blame] | 12 | #define RISCV_MMODE_TIMEROFF 0xbff8 |
Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 13 | #define RISCV_MMODE_TIMER_FREQ 4000000 |
| 14 | #define RISCV_SMODE_TIMER_FREQ 4000000 |
| 15 | |
| 16 | #define __io |
| 17 | |
| 18 | /* Environment options */ |
| 19 | |
| 20 | #define BOOT_TARGET_DEVICES(func) \ |
Heinrich Schuchardt | 2d8d71e | 2023-09-07 15:53:36 +0200 | [diff] [blame] | 21 | func(NVME, nvme, 0) \ |
| 22 | func(USB, usb, 0) \ |
Milan P. Stanić | 8cdb571 | 2023-09-18 10:32:29 +0200 | [diff] [blame] | 23 | func(MMC, mmc, 0) \ |
Yanhong Wang | 6a5a45d | 2023-03-29 11:42:17 +0800 | [diff] [blame] | 24 | func(MMC, mmc, 1) \ |
| 25 | func(DHCP, dhcp, na) |
| 26 | |
| 27 | #include <config_distro_bootcmd.h> |
| 28 | |
| 29 | #define TYPE_GUID_SPL "2E54B353-1271-4842-806F-E436D6AF6985" |
| 30 | #define TYPE_GUID_UBOOT "BC13C2FF-59E6-4262-A352-B275FD6F7172" |
| 31 | #define TYPE_GUID_SYSTEM "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7" |
| 32 | |
| 33 | #define PARTS_DEFAULT \ |
| 34 | "name=spl,start=2M,size=2M,type=${type_guid_gpt_loader1};" \ |
| 35 | "name=uboot,size=4MB,type=${type_guid_gpt_loader2};" \ |
| 36 | "name=system,size=-,bootable,type=${type_guid_gpt_system};" |
| 37 | |
| 38 | #define CFG_EXTRA_ENV_SETTINGS \ |
| 39 | "kernel_addr_r=0x40200000\0" \ |
| 40 | "kernel_comp_addr_r=0x88000000\0" \ |
| 41 | "kernel_comp_size=0x4000000\0" \ |
| 42 | "fdt_addr_r=0x46000000\0" \ |
| 43 | "scriptaddr=0x43900000\0" \ |
| 44 | "pxefile_addr_r=0x45900000\0" \ |
| 45 | "ramdisk_addr_r=0x46100000\0" \ |
| 46 | "type_guid_gpt_loader1=" TYPE_GUID_SPL "\0" \ |
| 47 | "type_guid_gpt_loader2=" TYPE_GUID_UBOOT "\0" \ |
| 48 | "type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \ |
| 49 | "partitions=" PARTS_DEFAULT "\0" \ |
| 50 | "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
| 51 | BOOTENV |
| 52 | |
| 53 | #endif /* _STARFIVE_VISIONFIVE2_H */ |