]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: starfive: visionfive2: Support VisionFive 2 Lite eMMC
authorHal Feng <hal.feng@starfivetech.com>
Mon, 4 May 2026 13:41:35 +0000 (21:41 +0800)
committerLeo Yu-Chi Liang <leo.liang@sifive.com>
Mon, 27 Jul 2026 02:39:21 +0000 (19:39 -0700)
Add emmc detection to VisionFive 2 Lite DT selection and
fdtfile environment variable setting.

Reviewed-by: E Shattow <e@freeshell.de>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
board/starfive/visionfive2/spl.c
board/starfive/visionfive2/starfive_visionfive2.c

index e231467f2a16a6697b1fc4b478afeb6a5298ac44..1b4d623d002e9385d4e37a79c0bbea6e57d2571f 100644 (file)
@@ -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;
        }
 
index 1a76f745ec8d68296657626c2a107c6be8656684..97f40715f8fe2155c2115162ce9c3bd9b687d0a2 100644 (file)
@@ -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;