Skip to contentSkip to conversation

Add support for StarFive VisionFive 2 Lite eMMC board

PATCH Superseded Hal Feng 2 participants 5 messages Apr 2

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Hal Feng

author
#0 lore raw

cover Add support for StarFive VisionFive 2 Lite eMMC board

VisionFive 2 Lite eMMC board uses the eMMC as storage component instead of the MicroSD card in VisionFive 2 Lite board. The device tree of VisionFive 2 Lite eMMC board is already upstream in Linux, so add support in u-boot also.

Hal Feng (2):
configs: visionfive2: Add VisionFive 2 Lite eMMC DT to OF_LIST
board: starfive: visionfive2: Support VisionFive 2 Lite eMMC

 board/starfive/visionfive2/spl.c                  | 7 ++++++-
 board/starfive/visionfive2/starfive_visionfive2.c | 6 +++++-
 configs/starfive_visionfive2_defconfig            | 2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)

base-commit: 98cf83d81617f489d7ff7bf78d33e693e2799254

Signature · 1 line
2.43.2
author
#1 lore raw

PATCH 1/2 configs: visionfive2: Add VisionFive 2 Lite eMMC DT to OF_LIST

So the VisionFive 2 Lite eMMC DT will be built and merged into FIT.

---
 configs/starfive_visionfive2_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/starfive_visionfive2_defconfig +1 -1
index 74a24dfd074..b6b3108ac5c 100644
@@ -80,7 +80,7 @@ CONFIG_WGET_HTTPS=y
 CONFIG_CMD_BOOTSTAGE=y
 CONFIG_OF_BOARD=y
 CONFIG_DEVICE_TREE_INCLUDES="starfive-visionfive2-u-boot.dtsi"
-CONFIG_OF_LIST="starfive/jh7110-deepcomputing-fml13v01 starfive/jh7110-milkv-mars starfive/jh7110-milkv-marscm-emmc starfive/jh7110-milkv-marscm-lite starfive/jh7110-orangepi-rv starfive/jh7110-pine64-star64 starfive/jh7110-starfive-visionfive-2-v1.2a starfive/jh7110-starfive-visionfive-2-v1.3b starfive/jh7110-starfive-visionfive-2-lite"
+CONFIG_OF_LIST="starfive/jh7110-deepcomputing-fml13v01 starfive/jh7110-milkv-mars starfive/jh7110-milkv-marscm-emmc starfive/jh7110-milkv-marscm-lite starfive/jh7110-orangepi-rv starfive/jh7110-pine64-star64 starfive/jh7110-starfive-visionfive-2-v1.2a starfive/jh7110-starfive-visionfive-2-v1.3b starfive/jh7110-starfive-visionfive-2-lite starfive/jh7110-starfive-visionfive-2-lite-emmc"
 CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
Signature · 1 line
2.43.2
author
#2 lore raw

PATCH 2/2 board: starfive: visionfive2: Support VisionFive 2 Lite eMMC

In reply to Hal Feng

Add emmc detection to VisionFive 2 Lite DT selection and fdtfile environment variable setting.

---
 board/starfive/visionfive2/spl.c                  | 7 ++++++-
 board/starfive/visionfive2/starfive_visionfive2.c | 6 +++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
board/starfive/visionfive2/spl.c +6 -1
index e231467f2a1..1b4d623d002 100644
@@ -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;
 	}
 
board/starfive/visionfive2/starfive_visionfive2.c +5 -1
index 1a76f745ec8..97f40715f8f 100644
@@ -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;
Signature · 1 line
2.43.2
author
#3 lore raw
In reply to Hal Feng
Quoted 9 lines · Hal Feng

VisionFive 2 Lite eMMC board uses the eMMC as storage component instead of the MicroSD card in VisionFive 2 Lite board. The device tree of VisionFive 2 Lite eMMC board is already upstream in Linux, so add support in u-boot also.

Hal Feng (2):
configs: visionfive2: Add VisionFive 2 Lite eMMC DT to OF_LIST
board: starfive: visionfive2: Support VisionFive 2 Lite eMMC

Quoted 7 lines
 board/starfive/visionfive2/spl.c                  | 7 ++++++-
 board/starfive/visionfive2/starfive_visionfive2.c | 6 +++++-
 configs/starfive_visionfive2_defconfig            | 2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)

base-commit: 98cf83d81617f489d7ff7bf78d33e693e2799254

The patches are based on the latest next branch.

Best regards,
Hal

Reviewed-by on the v1 series
#4 lore raw
In reply to Hal Feng

Hi Hal,

Quoted 9 lines · Hal Feng

VisionFive 2 Lite eMMC board uses the eMMC as storage component instead of the MicroSD card in VisionFive 2 Lite board. The device tree of VisionFive 2 Lite eMMC board is already upstream in Linux, so add support in u-boot also.

Hal Feng (2):
configs: visionfive2: Add VisionFive 2 Lite eMMC DT to OF_LIST
board: starfive: visionfive2: Support VisionFive 2 Lite eMMC

Quoted 7 lines
 board/starfive/visionfive2/spl.c                  | 7 ++++++-
 board/starfive/visionfive2/starfive_visionfive2.c | 6 +++++-
 configs/starfive_visionfive2_defconfig            | 2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)

base-commit: 98cf83d81617f489d7ff7bf78d33e693e2799254

Looks good to me (for -next). For the series: