diff mbox series

[v2,3/8] board: starfive: DeepComputing FML13V01 fdt selection

Message ID 20250331072410.8662-4-heinrich.schuchardt@canonical.com
State Superseded, archived
Delegated to: Andes
Headers show
Series board: starfive: DeepComputing FML13V01 | expand

Commit Message

Heinrich Schuchardt March 31, 2025, 7:24 a.m. UTC
We support all JH7110 boards with starfive_visionfive2_defconfig.
The relevant device-tree is selected at runtime based on EEPROM data.

Support setting $fdtfile to the file name of the DeepComputing Framework
motherboard (FML13V01) device-tree.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
---
v2:
	no change
---
 board/starfive/visionfive2/starfive_visionfive2.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Hal Feng April 9, 2025, 2:50 a.m. UTC | #1
> On 31.03.25 15:24, Heinrich Schuchardt wrote:
> 
> We support all JH7110 boards with starfive_visionfive2_defconfig.
> The relevant device-tree is selected at runtime based on EEPROM data.
> 
> Support setting $fdtfile to the file name of the DeepComputing Framework
> motherboard (FML13V01) device-tree.
> 
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
> ---
> v2:
> 	no change
> ---
>  board/starfive/visionfive2/starfive_visionfive2.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/board/starfive/visionfive2/starfive_visionfive2.c
> b/board/starfive/visionfive2/starfive_visionfive2.c
> index 3940d45b13f..55daf730c81 100644
> --- a/board/starfive/visionfive2/starfive_visionfive2.c
> +++ b/board/starfive/visionfive2/starfive_visionfive2.c
> @@ -17,6 +17,8 @@
>  DECLARE_GLOBAL_DATA_PTR;
>  #define JH7110_L2_PREFETCHER_BASE_ADDR		0x2030000
>  #define JH7110_L2_PREFETCHER_HART_OFFSET	0x2000
> +#define FDTFILE_FML13V01 \
> +	"starfive/jh7110-deepcomputing-fml13v01.dtb"
>  #define FDTFILE_MILK_V_MARS \
>  	"starfive/jh7110-milkv-mars.dtb"
>  #define FDTFILE_MILK_V_MARS_CM \
> @@ -67,7 +69,9 @@ static void set_fdtfile(void)
>  		log_err("Can't read EEPROM\n");
>  		return;
>  	}
> -	if (!strncmp(product_id, "MARC", 4)) {
> +	if (!strncmp(product_id, "FML13V01", 8)) {
> +		fdtfile = FDTFILE_FML13V01;
> +	} else if (!strncmp(product_id, "MARC", 4)) {
>  		if (get_mmc_size_from_eeprom())
>  			fdtfile = FDTFILE_MILK_V_MARS_CM;
>  		else

As Mars CM (Lite) is no longer supported since patch [1], this patch should be updated.

[1] https://lore.kernel.org/all/20250327175550.529248-1-e@freeshell.de/

Best regards,
Hal
diff mbox series

Patch

diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c
index 3940d45b13f..55daf730c81 100644
--- a/board/starfive/visionfive2/starfive_visionfive2.c
+++ b/board/starfive/visionfive2/starfive_visionfive2.c
@@ -17,6 +17,8 @@ 
 DECLARE_GLOBAL_DATA_PTR;
 #define JH7110_L2_PREFETCHER_BASE_ADDR		0x2030000
 #define JH7110_L2_PREFETCHER_HART_OFFSET	0x2000
+#define FDTFILE_FML13V01 \
+	"starfive/jh7110-deepcomputing-fml13v01.dtb"
 #define FDTFILE_MILK_V_MARS \
 	"starfive/jh7110-milkv-mars.dtb"
 #define FDTFILE_MILK_V_MARS_CM \
@@ -67,7 +69,9 @@  static void set_fdtfile(void)
 		log_err("Can't read EEPROM\n");
 		return;
 	}
-	if (!strncmp(product_id, "MARC", 4)) {
+	if (!strncmp(product_id, "FML13V01", 8)) {
+		fdtfile = FDTFILE_FML13V01;
+	} else if (!strncmp(product_id, "MARC", 4)) {
 		if (get_mmc_size_from_eeprom())
 			fdtfile = FDTFILE_MILK_V_MARS_CM;
 		else