From: E Shattow Date: Tue, 21 Oct 2025 23:09:58 +0000 (-0700) Subject: board: starfive: visionfive2: Add Milk-V Mars CM and Mars CM Lite selection by product_id X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6674ffb51bbbe1b6b9c78241c977b83e457f30de;p=thirdparty%2Fu-boot.git board: starfive: visionfive2: Add Milk-V Mars CM and Mars CM Lite selection by product_id Add identifier for Milk-V Mars CM 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 --- diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c index 48b034af305..2d9431d2976 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -123,6 +123,14 @@ int board_fit_config_name_match(const char *name) } else if (!strcmp(name, "starfive/jh7110-milkv-mars") && !strncmp(get_product_id_from_eeprom(), "MARS", 4)) { return 0; + } else if (!strcmp(name, "starfive/jh7110-milkv-marscm-emmc") && + !strncmp(get_product_id_from_eeprom(), "MARC", 4) && + get_mmc_size_from_eeprom()) { + return 0; + } else if (!strcmp(name, "starfive/jh7110-milkv-marscm-lite") && + !strncmp(get_product_id_from_eeprom(), "MARC", 4) && + !get_mmc_size_from_eeprom()) { + 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 6271974b9c7..6c39fd4af35 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -57,6 +57,12 @@ static void set_fdtfile(void) fdtfile = "starfive/jh7110-deepcomputing-fml13v01.dtb"; } else if (!strncmp(get_product_id_from_eeprom(), "MARS", 4)) { fdtfile = "starfive/jh7110-milkv-mars.dtb"; + } else if (!strncmp(get_product_id_from_eeprom(), "MARC", 4)) { + if (get_mmc_size_from_eeprom()) { + fdtfile = "starfive/jh7110-milkv-marscm-emmc.dtb"; + } else { + fdtfile = "starfive/jh7110-milkv-marscm-lite.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)) {