From 6015c98be50f2fc571c294d2f2b0768212fb7e99 Mon Sep 17 00:00:00 2001 From: Hal Feng Date: Fri, 24 Oct 2025 16:59:26 +0800 Subject: eeprom: starfive: Simplify get_ddr_size_from_eeprom() Directly return the DDR size instead of the field of 'DxxxExxx'. Move the function description to the header file. Return 0 instead of 0xFF if read_eeprom() fails. Reviewed-by: Heinrich Schuchardt Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration") Signed-off-by: Hal Feng --- board/starfive/visionfive2/visionfive2-i2c-eeprom.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'board') diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c index 17a44020bcf..ca5039ee433 100644 --- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c +++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c @@ -550,23 +550,12 @@ u8 get_pcb_revision_from_eeprom(void) return pbuf.eeprom.atom1.data.pstr[6]; } -/** - * get_ddr_size_from_eeprom - get the DDR size - * pstr: VF7110A1-2228-D008E000-00000001 - * VF7110A1/VF7110B1 : VisionFive JH7110A /VisionFive JH7110B - * D008: 8GB LPDDR4 - * E000: No emmc device, ECxx: include emmc device, xx: Capacity size[GB] - * return: the field of 'D008E000' - */ - -u32 get_ddr_size_from_eeprom(void) +u8 get_ddr_size_from_eeprom(void) { - u32 pv = 0xFFFFFFFF; - if (read_eeprom()) - return pv; + return 0; - return hextoul(&pbuf.eeprom.atom1.data.pstr[14], NULL); + return (hextoul(&pbuf.eeprom.atom1.data.pstr[14], NULL) >> 16) & 0xFF; } u32 get_mmc_size_from_eeprom(void) -- cgit v1.3.1 From 78253aeeecdfea4c71779905ff2b400fa7400b1c Mon Sep 17 00:00:00 2001 From: Hal Feng Date: Fri, 24 Oct 2025 16:59:27 +0800 Subject: eeprom: starfive: Correct get_pcb_revision_from_eeprom() pcb_revision is stored in the pcb_revision field of ATOM4. Correct it. Move the function description to the header file. Return 0 instead of 0xFF if read_eeprom() fails. Reviewed-by: Heinrich Schuchardt Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration") Signed-off-by: Hal Feng --- arch/riscv/include/asm/arch-jh7110/eeprom.h | 5 +++++ board/starfive/visionfive2/visionfive2-i2c-eeprom.c | 11 ++--------- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'board') diff --git a/arch/riscv/include/asm/arch-jh7110/eeprom.h b/arch/riscv/include/asm/arch-jh7110/eeprom.h index 1ae9f2b840a..8b689a75013 100644 --- a/arch/riscv/include/asm/arch-jh7110/eeprom.h +++ b/arch/riscv/include/asm/arch-jh7110/eeprom.h @@ -9,6 +9,11 @@ #include +/** + * get_pcb_revision_from_eeprom() - get the PCB revision + * + * @return: the PCB revision or 0 on error. + */ u8 get_pcb_revision_from_eeprom(void); /** diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c index ca5039ee433..986dcc94992 100644 --- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c +++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c @@ -535,19 +535,12 @@ int mac_read_from_eeprom(void) return 0; } -/** - * get_pcb_revision_from_eeprom - get the PCB revision - * - * 1.2A return 'A'/'a', 1.3B return 'B'/'b',other values are illegal - */ u8 get_pcb_revision_from_eeprom(void) { - u8 pv = 0xFF; - if (read_eeprom()) - return pv; + return 0; - return pbuf.eeprom.atom1.data.pstr[6]; + return pbuf.eeprom.atom4.data.pcb_revision; } u8 get_ddr_size_from_eeprom(void) -- cgit v1.3.1 From ab4f610debf2cb179174b043c14710c6f407a411 Mon Sep 17 00:00:00 2001 From: Hal Feng Date: Fri, 24 Oct 2025 16:59:28 +0800 Subject: eeprom: starfive: Support eeprom data format v3 Add eeprom data format v3 support. Add onboard_module field in ATOM4 and add "mac onboard_module " command to modify it. The onboard module field marks the additional modules compared with VisionFive 2 board. Now we define bit7-1: reserved, bit0: WIFI/BT Signed-off-by: Hal Feng --- .../starfive/visionfive2/visionfive2-i2c-eeprom.c | 36 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'board') diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c index 986dcc94992..b9197cdd34f 100644 --- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c +++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c @@ -105,7 +105,8 @@ struct eeprom_atom4_data { u8 bom_revision; /* BOM version */ u8 mac0_addr[MAC_ADDR_BYTES]; /* Ethernet0 MAC */ u8 mac1_addr[MAC_ADDR_BYTES]; /* Ethernet1 MAC */ - u8 reserved[2]; + u8 onboard_module; /* Onboard module flag: bit7-1: reserved, bit0: WIFI/BT */ + u8 reserved; }; struct starfive_eeprom_atom4 { @@ -176,7 +177,7 @@ static void show_eeprom(void) printf("Vendor : %s\n", pbuf.eeprom.atom1.data.vstr); printf("Product full SN: %s\n", pbuf.eeprom.atom1.data.pstr); printf("data version: 0x%x\n", pbuf.eeprom.atom4.data.version); - if (pbuf.eeprom.atom4.data.version == 2) { + if (pbuf.eeprom.atom4.data.version == 2 || pbuf.eeprom.atom4.data.version == 3) { printf("PCB revision: 0x%x\n", pbuf.eeprom.atom4.data.pcb_revision); printf("BOM revision: %c\n", pbuf.eeprom.atom4.data.bom_revision); printf("Ethernet MAC0 address: %02x:%02x:%02x:%02x:%02x:%02x\n", @@ -187,6 +188,14 @@ static void show_eeprom(void) pbuf.eeprom.atom4.data.mac1_addr[0], pbuf.eeprom.atom4.data.mac1_addr[1], pbuf.eeprom.atom4.data.mac1_addr[2], pbuf.eeprom.atom4.data.mac1_addr[3], pbuf.eeprom.atom4.data.mac1_addr[4], pbuf.eeprom.atom4.data.mac1_addr[5]); + if (pbuf.eeprom.atom4.data.version == 3) { + char str[25] = "Onboard module: "; + + if (pbuf.eeprom.atom4.data.onboard_module & BIT(0)) + strcat(str, "WIFI/BT"); + + printf("%s\n", str); + } } else { printf("Custom data v%d is not Supported\n", pbuf.eeprom.atom4.data.version); dump_raw_eeprom(); @@ -260,6 +269,7 @@ static void init_local_copy(void) pbuf.eeprom.atom4.data.bom_revision = BOM_VERSION; set_mac_address(STARFIVE_DEFAULT_MAC0, 0); set_mac_address(STARFIVE_DEFAULT_MAC1, 1); + pbuf.eeprom.atom4.data.onboard_module = 0; } /** @@ -385,6 +395,23 @@ static void set_bom_revision(char *string) update_crc(); } +/** + * set_onboard_module() - stores a StarFive onboard module flag into the local EEPROM copy + * + * Takes a pointer to a string representing the numeric onboard module flag in + * Hexadecimal ("0" - "FF"), stores it in the onboard_module field of the + * EEPROM local copy, and updates the CRC of the local copy. + */ +static void set_onboard_module(char *string) +{ + u8 onboard_module; + + onboard_module = simple_strtoul(string, &string, 16); + pbuf.eeprom.atom4.data.onboard_module = onboard_module; + + update_crc(); +} + /** * set_product_id() - stores a StarFive product ID into the local EEPROM copy * @@ -478,6 +505,9 @@ int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } else if (!strcmp(cmd, "bom_revision")) { set_bom_revision(argv[2]); return 0; + } else if (!strcmp(cmd, "onboard_module")) { + set_onboard_module(argv[2]); + return 0; } else if (!strcmp(cmd, "product_id")) { set_product_id(argv[2]); return 0; @@ -585,6 +615,8 @@ U_BOOT_LONGHELP(mac, " - stores a StarFive PCB revision into the local EEPROM copy\n" "mac bom_revision \n" " - stores a StarFive BOM revision into the local EEPROM copy\n" + "mac onboard_module \n" + " - stores a StarFive onboard module flag into the local EEPROM copy\n" "mac product_id \n" " - stores a StarFive product ID into the local EEPROM copy\n" "mac vendor \n" -- cgit v1.3.1 From f566788ca12ae5070513fbd5bcea2e18433b4da6 Mon Sep 17 00:00:00 2001 From: Hal Feng Date: Fri, 24 Oct 2025 16:59:31 +0800 Subject: board: starfive: spl: Support VisionFive 2 Lite Choose the matching FIT config on the VisionFive 2 Lite board. Reviewed-by: E Shattow Signed-off-by: Hal Feng --- board/starfive/visionfive2/spl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'board') diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c index 2d9431d2976..c607627e10f 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -140,6 +140,9 @@ int board_fit_config_name_match(const char *name) } else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.3b") && !strncmp(get_product_id_from_eeprom(), "VF7110B", 7)) { return 0; + } else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-lite") && + !strncmp(get_product_id_from_eeprom(), "VF7110SL", 8)) { + return 0; } return -EINVAL; -- cgit v1.3.1 From 52c382798c552143f04c8a9d6d491f2063491472 Mon Sep 17 00:00:00 2001 From: Hal Feng Date: Fri, 24 Oct 2025 16:59:32 +0800 Subject: board: starfive: visionfive2: Add VisionFive 2 Lite fdt selection Set $fdtfile to the VisionFive 2 Lite DTB if the board is matched. Reviewed-by: E Shattow Signed-off-by: Hal Feng --- board/starfive/visionfive2/starfive_visionfive2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'board') diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c index 6c39fd4af35..ff510a57df5 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -69,6 +69,8 @@ static void set_fdtfile(void) fdtfile = "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb"; } else if (!strncmp(get_product_id_from_eeprom(), "VF7110B", 7)) { fdtfile = "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"; + } else if (!strncmp(get_product_id_from_eeprom(), "VF7110SL", 8)) { + fdtfile = "starfive/jh7110-starfive-visionfive-2-lite.dtb"; } else { log_err("Unknown product\n"); return; -- cgit v1.3.1 From b2c92a7b1fdfdf918abcbf63891b502e4200560a Mon Sep 17 00:00:00 2001 From: E Shattow Date: Thu, 5 Mar 2026 09:00:20 -0800 Subject: board: starfive: visionfive2: Add Orange Pi RV selection by product_id Add XOPIRV identifier for Orange Pi RV to dts selection callback in SPL, and to fdtfile environment variable default value selection in payload. Signed-off-by: E Shattow Reviewed-by: Hal Feng Reviewed-by: Leo Yu-Chi Liang --- board/starfive/visionfive2/spl.c | 3 +++ board/starfive/visionfive2/starfive_visionfive2.c | 2 ++ 2 files changed, 5 insertions(+) (limited to 'board') diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c index c607627e10f..e231467f2a1 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -131,6 +131,9 @@ int board_fit_config_name_match(const char *name) !strncmp(get_product_id_from_eeprom(), "MARC", 4) && !get_mmc_size_from_eeprom()) { return 0; + } else if (!strcmp(name, "starfive/jh7110-orangepi-rv") && + !strncmp(get_product_id_from_eeprom(), "XOPIRV", 6)) { + return 0; } else if (!strcmp(name, "starfive/jh7110-pine64-star64") && !strncmp(get_product_id_from_eeprom(), "STAR64", 6)) { return 0; diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c index ff510a57df5..1a76f745ec8 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -63,6 +63,8 @@ static void set_fdtfile(void) } else { fdtfile = "starfive/jh7110-milkv-marscm-lite.dtb"; } + } else if (!strncmp(get_product_id_from_eeprom(), "XOPIRV", 6)) { + fdtfile = "starfive/jh7110-orangepi-rv.dtb"; } else if (!strncmp(get_product_id_from_eeprom(), "STAR64", 6)) { fdtfile = "starfive/jh7110-pine64-star64.dtb"; } else if (!strncmp(get_product_id_from_eeprom(), "VF7110A", 7)) { -- cgit v1.3.1 From b51e59c8b34c780e28728bc0cb58783855c7ffbf Mon Sep 17 00:00:00 2001 From: Jamie Gibbons Date: Fri, 16 Jan 2026 14:08:30 +0000 Subject: riscv: Add support for BeagleV-Fire Bring U-Boot support for the BeagleV-Fire by adding a device tree and supporting board files etc. Signed-off-by: Jamie Gibbons Reviewed-by: Leo Yu-Chi Liang --- arch/riscv/Kconfig | 4 ++ board/beagle/beaglev_fire/Kconfig | 43 ++++++++++++ board/beagle/beaglev_fire/MAINTAINERS | 7 ++ board/beagle/beaglev_fire/Makefile | 6 ++ board/beagle/beaglev_fire/beaglev_fire.c | 117 +++++++++++++++++++++++++++++++ configs/beaglev_fire_defconfig | 29 ++++++++ include/configs/beaglev_fire.h | 57 +++++++++++++++ 7 files changed, 263 insertions(+) create mode 100644 board/beagle/beaglev_fire/Kconfig create mode 100644 board/beagle/beaglev_fire/MAINTAINERS create mode 100644 board/beagle/beaglev_fire/Makefile create mode 100644 board/beagle/beaglev_fire/beaglev_fire.c create mode 100644 configs/beaglev_fire_defconfig create mode 100644 include/configs/beaglev_fire.h (limited to 'board') diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 79867656b15..ad7589123c6 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -17,6 +17,9 @@ config TARGET_ANDES_VOYAGER config TARGET_BANANAPI_F3 bool "Support BananaPi F3 Board" +config TARGET_BEAGLEBOARD_BEAGLEVFIRE + bool "Support BeagleBoard BeagleV-Fire Board (based on Microchip MPFS)" + config TARGET_K230_CANMV bool "Support K230 CanMV Board" @@ -106,6 +109,7 @@ config SPL_ZERO_MEM_BEFORE_USE source "board/andestech/ae350/Kconfig" source "board/andestech/voyager/Kconfig" source "board/aspeed/ibex_ast2700/Kconfig" +source "board/beagle/beaglev_fire/Kconfig" source "board/canaan/k230_canmv/Kconfig" source "board/emulation/qemu-riscv/Kconfig" source "board/microchip/mpfs_generic/Kconfig" diff --git a/board/beagle/beaglev_fire/Kconfig b/board/beagle/beaglev_fire/Kconfig new file mode 100644 index 00000000000..7a8ecac8703 --- /dev/null +++ b/board/beagle/beaglev_fire/Kconfig @@ -0,0 +1,43 @@ +if TARGET_BEAGLEBOARD_BEAGLEVFIRE + +config SYS_BOARD + default "beaglev_fire" + +config SYS_VENDOR + default "beagle" + +config SYS_CPU + default "mpfs" + +config SYS_CONFIG_NAME + default "beaglev_fire" + +config TEXT_BASE + default 0x80000000 if !RISCV_SMODE + default 0x80200000 if RISCV_SMODE + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select MICROCHIP_MPFS + select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT + imply SMP + imply CMD_DHCP + imply CMD_EXT2 + imply CMD_EXT4 + imply CMD_FAT + imply CMD_FS_GENERIC + imply CMD_NET + imply CMD_PING + imply CMD_MMC + imply DOS_PARTITION + imply EFI_PARTITION + imply IP_DYN + imply ISO_PARTITION + imply PHY_LIB + imply PHY_VITESSE + imply DM_MAILBOX + imply MPFS_MBOX + imply MISC + imply MPFS_SYSCONTROLLER +endif diff --git a/board/beagle/beaglev_fire/MAINTAINERS b/board/beagle/beaglev_fire/MAINTAINERS new file mode 100644 index 00000000000..a5dad93ee99 --- /dev/null +++ b/board/beagle/beaglev_fire/MAINTAINERS @@ -0,0 +1,7 @@ +BeagleBoard MPFS BeagleV-Fire +M: Cyril Jean +M: Jamie Gibbons +S: Maintained +F: board/beagle/beaglev_fire/ +F: include/configs/beaglev_fire.h +F: configs/beaglev_fire_defconfig \ No newline at end of file diff --git a/board/beagle/beaglev_fire/Makefile b/board/beagle/beaglev_fire/Makefile new file mode 100644 index 00000000000..a4109a8aad4 --- /dev/null +++ b/board/beagle/beaglev_fire/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2023 Microchip Technology Inc. +# + +obj-y += beaglev_fire.o \ No newline at end of file diff --git a/board/beagle/beaglev_fire/beaglev_fire.c b/board/beagle/beaglev_fire/beaglev_fire.c new file mode 100644 index 00000000000..b2f18c455b7 --- /dev/null +++ b/board/beagle/beaglev_fire/beaglev_fire.c @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019-2023 Microchip Technology Inc. + */ + +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +#define MPFS_SYSREG_SOFT_RESET ((unsigned int *)0x20002088) +#define PERIPH_RESET_VALUE 0x800001e8u + +#if IS_ENABLED(CONFIG_MPFS_SYSCONTROLLER) +static unsigned char mac_addr[6]; +#endif + +int board_init(void) +{ + /* For now nothing to do here. */ + + return 0; +} + +int board_early_init_f(void) +{ + unsigned int val; + + /* Reset uart, mmc peripheral */ + val = readl(MPFS_SYSREG_SOFT_RESET); + val = (val & ~(PERIPH_RESET_VALUE)); + writel(val, MPFS_SYSREG_SOFT_RESET); + + return 0; +} + +int board_late_init(void) +{ +#if IS_ENABLED(CONFIG_MPFS_SYSCONTROLLER) + u32 ret; + int node; + u8 device_serial_number[16] = {0}; + void *blob = (void *)gd->fdt_blob; + struct udevice *dev; + struct mpfs_sys_serv *sys_serv_priv; + + ret = uclass_get_device_by_name(UCLASS_MISC, "syscontroller", &dev); + if (ret) { + debug("%s: system controller setup failed\n", __func__); + return ret; + } + + sys_serv_priv = devm_kzalloc(dev, sizeof(*sys_serv_priv), GFP_KERNEL); + if (!sys_serv_priv) + return -ENOMEM; + + sys_serv_priv->dev = dev; + + sys_serv_priv->sys_controller = mpfs_syscontroller_get(dev); + ret = IS_ERR(sys_serv_priv->sys_controller); + if (ret) { + debug("%s: Failed to register system controller sub device ret=%d\n", __func__, ret); + return -ENODEV; + } + + ret = mpfs_syscontroller_read_sernum(sys_serv_priv, device_serial_number); + if (ret) { + printf("Cannot read device serial number\n"); + return -EINVAL; + } + + /* Update MAC address with device serial number */ + mac_addr[0] = 0x00; + mac_addr[1] = 0x04; + mac_addr[2] = 0xA3; + mac_addr[3] = device_serial_number[2]; + mac_addr[4] = device_serial_number[1]; + mac_addr[5] = device_serial_number[0]; + + node = fdt_path_offset(blob, "/soc/ethernet@20110000"); + if (node >= 0) { + ret = fdt_setprop(blob, node, "local-mac-address", mac_addr, 6); + if (ret) { + printf("Error setting local-mac-address property for ethernet@20110000\n"); + return -ENODEV; + } + } + + mpfs_syscontroller_process_dtbo(sys_serv_priv); +#endif + + return 0; +} + +int ft_board_setup(void *blob, struct bd_info *bd) +{ +#if IS_ENABLED(CONFIG_MPFS_SYSCONTROLLER) + u32 ret; + int node; + + node = fdt_path_offset(blob, "/soc/ethernet@20110000"); + if (node >= 0) { + ret = fdt_setprop(blob, node, "local-mac-address", mac_addr, 6); + if (ret) { + printf("Error setting local-mac-address property for ethernet@20110000\n"); + return -ENODEV; + } + } +#endif + + return 0; +} \ No newline at end of file diff --git a/configs/beaglev_fire_defconfig b/configs/beaglev_fire_defconfig new file mode 100644 index 00000000000..9ebb08abbfe --- /dev/null +++ b/configs/beaglev_fire_defconfig @@ -0,0 +1,29 @@ +CONFIG_RISCV=y +CONFIG_SYS_MALLOC_LEN=0x800000 +CONFIG_SYS_MALLOC_F_LEN=0x2800 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 +CONFIG_ENV_SIZE=0x2000 +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="microchip/mpfs-beaglev-fire" +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_SYS_BOOTM_LEN=0x4000000 +CONFIG_SYS_LOAD_ADDR=0x80200000 +CONFIG_TARGET_BEAGLEBOARD_BEAGLEVFIRE=y +CONFIG_ARCH_RV64I=y +CONFIG_RISCV_SMODE=y +CONFIG_FIT=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_DEFAULT_FDT_FILE="microchip/mpfs-beaglev-fire.dtb" +CONFIG_SYS_CBSIZE=256 +CONFIG_SYS_PBSIZE=282 +CONFIG_DISPLAY_CPUINFO=y +CONFIG_DISPLAY_BOARDINFO=y +CONFIG_SYS_PROMPT="RISC-V # " +CONFIG_CMD_GPIO=y +CONFIG_OF_UPSTREAM=y +CONFIG_BOOTP_SEND_HOSTNAME=y +CONFIG_MPFS_GPIO=y +CONFIG_MMC_SPI=y +CONFIG_SYSRESET=y diff --git a/include/configs/beaglev_fire.h b/include/configs/beaglev_fire.h new file mode 100644 index 00000000000..e3ee0f02f2d --- /dev/null +++ b/include/configs/beaglev_fire.h @@ -0,0 +1,57 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2023 Microchip Technology Inc. + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#define CFG_SYS_SDRAM_BASE 0x80000000 + +/* Environment options */ + +#if defined(CONFIG_CMD_DHCP) +#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DEVICES_DHCP(func) +#endif + +#if defined(CONFIG_CMD_MMC) +#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC(func) +#endif + +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_DEVICES_MMC(func)\ + BOOT_TARGET_DEVICES_DHCP(func) + +#define BOOTENV_DESIGN_OVERLAYS \ + "design_overlays=" \ + "if test -n ${no_of_overlays}; then " \ + "setenv inc 1; " \ + "setenv idx 0; " \ + "fdt resize ${dtbo_size}; " \ + "while test $idx -ne ${no_of_overlays}; do " \ + "setenv dtbo_name dtbo_image${idx}; " \ + "setenv fdt_cmd \"fdt apply $\"$dtbo_name; " \ + "run fdt_cmd; " \ + "setexpr idx $inc + $idx; " \ + "done; " \ + "fi;\0 " \ + +#include + +#define CFG_EXTRA_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + "kernel_addr_r=0x80200000\0" \ + "fdt_addr_r=0x8a000000\0" \ + "fdtoverlay_addr_r=0x8a080000\0" \ + "ramdisk_addr_r=0x8aa00000\0" \ + "scriptaddr=0x8e000000\0" \ + BOOTENV_DESIGN_OVERLAYS \ + BOOTENV \ + +#endif /* __CONFIG_H */ -- cgit v1.3.1