From: Tom Rini Date: Fri, 25 Apr 2025 19:13:17 +0000 (-0600) Subject: Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv X-Git-Tag: v2025.07-rc1~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a0a93a768487e55ebe50a34cc90d751bf99cc56;p=pandora-u-boot.git Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/25940 - riscv: lib: Simplify FDT retrieving process - board: k1: pinctrl: Add pinctrl support for bananapi-f3 - binman: riscv: Fix binman_sym functionality - board: starfive: visionfive2: Reorder board detection logic - board: starfive: Add DeepComputing FML13V01 support --- 5a0a93a768487e55ebe50a34cc90d751bf99cc56 diff --cc board/starfive/visionfive2/spl.c index 9a3081ef06f,0d4d5cccabd..353313b9e88 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@@ -116,33 -116,29 +116,50 @@@ void board_init_f(ulong dummy #if CONFIG_IS_ENABLED(LOAD_FIT) int board_fit_config_name_match(const char *name) { - if (!strcmp(name, "starfive/jh7110-deepcomputing-fml13v01") && - !strncmp(get_product_id_from_eeprom(), "FML13V01", 8)) { + const char *product_id; + u8 version; + + product_id = get_product_id_from_eeprom(); + + /* Strip off prefix */ + if (strncmp(name, "starfive/", 9)) + return -EINVAL; + name += 9; + if (!strncmp(product_id, "FML13V01", 8) && + !strcmp(name, "jh7110-deepcomputing-fml13v01")) { + return 0; + } else if (!strncmp(product_id, "VF7110", 6)) { + version = get_pcb_revision_from_eeprom(); + if ((version == 'b' || version == 'B') && + !strcmp(name, "jh7110-starfive-visionfive-2-v1.3b")) + return 0; + + if ((version == 'a' || version == 'A') && + !strcmp(name, "jh7110-starfive-visionfive-2-v1.2a")) + return 0; + } else if (!strncmp(product_id, "MARS", 4) && + !strcmp(name, "jh7110-milkv-mars")) { return 0; - } else if (!strncmp(product_id, "STAR64", 6) && - !strcmp(name, "jh7110-pine64-star64")) { + } else if (!strcmp(name, "starfive/jh7110-milkv-mars") && + !strncmp(get_product_id_from_eeprom(), "MARS", 4)) { return 0; + } else if ((!strcmp(name, "starfive/jh7110-pine64-star64")) && + !strncmp(get_product_id_from_eeprom(), "STAR64", 6)) { + return 0; + } else if ((!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2a")) && + !strncmp(get_product_id_from_eeprom(), "VF7110", 6)) { + switch (get_pcb_revision_from_eeprom()) { + case 'a': + case 'A': + return 0; + } + } else if ((!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2b")) && + !strncmp(get_product_id_from_eeprom(), "VF7110", 6)) { + switch (get_pcb_revision_from_eeprom()) { + case 'b': + case 'B': + return 0; + } } return -EINVAL;