Skip to contentSkip to conversation

configs: starfive: enable mtdparts on visionfive2

PATCH Superseded E Shattow 1 participant 2 messages Oct 10 – Oct 20

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

E Shattow

author
#0 lore raw

PATCH 1/1 configs: starfive: enable mtdparts on visionfive2

add default mtdparts and mtdids consistent with jh7110-common.dtsi
---

This allows us to update the documentation to be slightly less likely that the user would type the wrong offset by using mtd part names:

- loady && sf update $loadaddr 0 $filesize
- StarFive # loady && sf update $loadaddr 0 $filesize
+ loady && sf update $loadaddr spl
+ StarFive # loady && sf update $loadaddr spl

However that documentation update is planned for after the mtdparts addition lands in release. It would be preferable to derive mtdparts layout at runtime from device tree; if there is some way to do that sensibly please offer some advice how to do so in the review. Thanks!

---
 configs/starfive_visionfive2_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/starfive_visionfive2_defconfig +4 -0
index 45de1c1cb671..2bc39593849f 100644
@@ -78,6 +78,9 @@ CONFIG_CMD_WDT=y
 CONFIG_CMD_WGET=y
 CONFIG_WGET_HTTPS=y
 CONFIG_CMD_BOOTSTAGE=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
+CONFIG_MTDPARTS_DEFAULT="spi0.0:960k(spl),64k(uboot-env),-(uboot)"
 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 starfive/jh7110-starfive-visionfive-2-lite-emmc"
@@ -107,6 +110,7 @@ CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_ISSI=y
 CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_MTD=y
 CONFIG_DM_MDIO=y
 CONFIG_DM_ETH_PHY=y
 CONFIG_DWC_ETH_QOS=y

base-commit: 837387a5aebc5cd53b9143926891cec024fcad3e

Signature · 1 line
2.53.0
author
#1 lore raw
Quoted 43 lines · E Shattow

add default mtdparts and mtdids consistent with jh7110-common.dtsi
---

This allows us to update the documentation to be slightly less likely that the user would type the wrong offset by using mtd part names:

(quoted diff) +2 -2
-    loady && sf update $loadaddr 0 $filesize
-        StarFive # loady && sf update $loadaddr 0 $filesize
+    loady && sf update $loadaddr spl
+        StarFive # loady && sf update $loadaddr spl

However that documentation update is planned for after the mtdparts addition lands in release. It would be preferable to derive mtdparts layout at runtime from device tree; if there is some way to do that sensibly please offer some advice how to do so in the review. Thanks!

---
 configs/starfive_visionfive2_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
configs/starfive_visionfive2_defconfig +4 -0
index 45de1c1cb671..2bc39593849f 100644
@@ -78,6 +78,9 @@ CONFIG_CMD_WDT=y
 CONFIG_CMD_WGET=y
 CONFIG_WGET_HTTPS=y
 CONFIG_CMD_BOOTSTAGE=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
+CONFIG_MTDPARTS_DEFAULT="spi0.0:960k(spl),64k(uboot-env),-(uboot)"
 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 starfive/jh7110-starfive-visionfive-2-lite-emmc"
@@ -107,6 +110,7 @@ CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_ISSI=y
 CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_MTD=y
 CONFIG_DM_MDIO=y
 CONFIG_DM_ETH_PHY=y
 CONFIG_DWC_ETH_QOS=y
Quoted 1 line

base-commit: 837387a5aebc5cd53b9143926891cec024fcad3e