public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: E Shattow <e@freeshell.de>
To: Minda Chen <minda.chen@starfivetech.com>,
	Hal Feng <hal.feng@starfivetech.com>,
	Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, E Shattow <e@freeshell.de>
Subject: [PATCH v2 1/3] board: starfive: visionfive2: Add Milk-V Mars CM and Mars CM Lite selection by product_id
Date: Tue, 21 Oct 2025 16:09:58 -0700	[thread overview]
Message-ID: <20251021231021.196336-2-e@freeshell.de> (raw)
In-Reply-To: <20251021231021.196336-1-e@freeshell.de>

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>
---
 board/starfive/visionfive2/spl.c                  | 8 ++++++++
 board/starfive/visionfive2/starfive_visionfive2.c | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c
index 420a8cf8d91..5047292a0fa 100644
--- a/board/starfive/visionfive2/spl.c
+++ b/board/starfive/visionfive2/spl.c
@@ -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;
diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c
index 6271974b9c7..6c39fd4af35 100644
--- a/board/starfive/visionfive2/starfive_visionfive2.c
+++ b/board/starfive/visionfive2/starfive_visionfive2.c
@@ -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)) {
-- 
2.50.0


  reply	other threads:[~2025-10-21 23:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 23:09 [PATCH v2 0/3] Add upstream boards Milk-V Mars CM and Mars CM Lite E Shattow
2025-10-21 23:09 ` E Shattow [this message]
2025-10-22  2:11   ` [PATCH v2 1/3] board: starfive: visionfive2: Add Milk-V Mars CM and Mars CM Lite selection by product_id Hal Feng
2025-10-21 23:09 ` [PATCH v2 2/3] configs: starfive: Add Milk-V Mars CM and Mars CM Lite to visionfive2 E Shattow
2025-10-22  2:14   ` Hal Feng
2025-10-21 23:10 ` [PATCH v2 3/3] board: starfive: Add initial Milk-V Mars CM and Mars CM Lite user documentation E Shattow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251021231021.196336-2-e@freeshell.de \
    --to=e@freeshell.de \
    --cc=hal.feng@starfivetech.com \
    --cc=minda.chen@starfivetech.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox