From: Hal Feng Date: Mon, 4 May 2026 13:41:35 +0000 (+0800) Subject: board: starfive: visionfive2: Support VisionFive 2 Lite eMMC X-Git-Tag: v2026.10-rc1~4^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be256bd560dc3bd19ee42b821d2590fd25f92179;p=thirdparty%2Fu-boot.git board: starfive: visionfive2: Support VisionFive 2 Lite eMMC Add emmc detection to VisionFive 2 Lite DT selection and fdtfile environment variable setting. Reviewed-by: E Shattow Signed-off-by: Hal Feng --- diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c index e231467f2a1..1b4d623d002 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -144,7 +144,12 @@ int board_fit_config_name_match(const char *name) !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)) { + !strncmp(get_product_id_from_eeprom(), "VF7110SL", 8) && + !get_mmc_size_from_eeprom()) { + return 0; + } else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-lite-emmc") && + !strncmp(get_product_id_from_eeprom(), "VF7110SL", 8) && + get_mmc_size_from_eeprom()) { return 0; } diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c index 1a76f745ec8..97f40715f8f 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -72,7 +72,11 @@ static void set_fdtfile(void) } 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"; + if (get_mmc_size_from_eeprom()) { + fdtfile = "starfive/jh7110-starfive-visionfive-2-lite-emmc.dtb"; + } else { + fdtfile = "starfive/jh7110-starfive-visionfive-2-lite.dtb"; + } } else { log_err("Unknown product\n"); return;