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 <e@freeshell.de>
Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
This commit is contained in:
E Shattow 2025-10-21 16:09:58 -07:00 committed by Leo Yu-Chi Liang
parent e599023f31
commit 6674ffb51b
2 changed files with 14 additions and 0 deletions

View File

@ -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;

View File

@ -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)) {