All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] board: spacemit: k1: accept the "m1-x_" TLV product name prefix
@ 2026-11-11 21:36 Yixun Lan
  2026-11-13 10:49 ` Eric Chung
  2026-11-16  7:13 ` Hung-Chun Tseng
  0 siblings, 2 replies; 4+ messages in thread
From: Yixun Lan @ 2026-11-11 21:36 UTC (permalink / raw)
  To: u-boot, u-boot-spacemit
  Cc: Bruno Banelli, Eric Chung, Tom Rini, Guodong Xu, Raymond Mao,
	Dave Klotz, Yixun Lan

From: Bruno Banelli <bbanelli@gmail.com>

board_fit_config_name_match() derives the device tree name from the TLV
product name held in the board EEPROM, and only recognises boards whose
product name starts with "k1-x_".

Boards fitted with the higher-binned M1 part report an "m1-x_" prefix
instead.  On those, fdt_name is left empty and the function silently
falls back to "k1-musepi-pro", so an M1 board selects the wrong device
tree with no error or warning.

A Milk-V Jupiter fitted with an M1 reads, from the 24c04 at i2c2 0x50:

  00: 54 6c 76 49 6e 66 6f 00 01 00 1a 21 12 6d 31 2d  TlvInfo....!.m1-
  10: 78 5f 6d 69 6c 6b 76 2d 6a 75 70 69 74 65 72 fe  x_milkv-jupiter.

i.e. TLV code 0x21 (product name), length 0x12, "m1-x_milkv-jupiter".

The device trees are named for the K1 in both cases, so accept either
prefix and keep deriving a "k1-" name.

Signed-off-by: Bruno Banelli <bbanelli@gmail.com>
Signed-off-by: Yixun Lan <dlan@kernel.org>
---
I've dropped all Reviewed-by tags due to the change.
---
Changes in v2:
- rework according to recent main code
- Link to v1: https://patch.msgid.link/20260825065257.69536-1-bbanelli@gmail.com
---
 board/spacemit/k1/spl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/spacemit/k1/spl.c b/board/spacemit/k1/spl.c
index 0ce0a811830..8931c5f5362 100644
--- a/board/spacemit/k1/spl.c
+++ b/board/spacemit/k1/spl.c
@@ -149,6 +149,7 @@ static const struct {
 	{ "k1-x_MUSE-Pi-Pro",   "spacemit/k1-musepi-pro"    },
 	{ "k1-x_deb1",          "spacemit/k1-bananapi-f3"   },
 	{ "k1-x_milkv-jupiter", "spacemit/k1-milkv-jupiter" },
+	{ "m1-x_milkv-jupiter", "spacemit/k1-milkv-jupiter" },
 };
 
 int read_product_name(char *name, int size)

---
base-commit: 8ea02c99391d2d922810065206721ead2863f075
change-id: 20261111-04-k1-milkv-m1-prefix-762704637cba

Best regards,
--  
Yixun Lan <dlan@kernel.org>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-16 10:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 21:36 [PATCH v2] board: spacemit: k1: accept the "m1-x_" TLV product name prefix Yixun Lan
2026-11-13 10:49 ` Eric Chung
2026-11-16  7:13 ` Hung-Chun Tseng
2026-11-16 10:52   ` Yixun Lan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.