[PATCH] riscv: dts: spacemit: k1: fix the EEPROM page size

Andre Heider a.heider at gmail.com
Wed Nov 25 12:01:25 PST 2026


On 25.11.26 3:21 PM, Anand Moon wrote:
>>> Apologies, this is a different issue.
>>>
>>> I am currently working on enabling multi-DTB support in U-Boot SPL
>>> for SpacemiT K1 boards.
>>>
>>> While investigating the board detection issue, I noticed that the EEPROM
>>> on my Banana Pi BPI-F3 does not contain a Product Name TLV entry.
>>>
>>> alarm at k1:~$ sudo hexdump -C /sys/bus/i2c/devices/2-0050/eeprom
>>> 00000000  54 6c 76 49 6e 66 6f 00  01 00 20 24 06 fe fe fe  |TlvInfo... $....|
>>> 00000010  d5 52 bd 2a 02 00 02 23  0c 39 38 61 39 63 33 61  |.R.*...#.98a9c3a|
>>> 00000020  32 62 64 34 37 fe 04 3b  e3 ff bd ff ff ff ff ff  |2bd47..;........|
>>> 00000030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
>>> *
>>> 00000100
>>>
>>> Although the EEPROM is readable, the missing Product Name TLV entry
>>> explains why read_product_name() returns `-ENOENT` (-2), assuming the
>>> EEPROM read and validation succeed.
>>>
>>> Consequently, automatic board detection fails, and U-Boot falls back to
>>> CONFIG_DEFAULT_DEVICE_TREE, which may select an incorrect device
>>> tree for the target board.

I encountered the very same issue [0]. The BPI-CM6 doesn't have a product name in there either, so we just made one up and wrote it to make the detection work... [1].

I'd be surprised if the eeprom is write protected on any board, because the vendor uboot contains code to write a mac if there is none. And I've only seen fe:fe:fe... macs so far, which is the output of the code generating one (iirc, it's been a minute).

In case it helps, here's my collected notes about the topic:

musepipro: commit 6bc75cfa56e885c2eab80e215f0a610075505846
     TlvInfo Header:
        Id String:    TlvInfo
        Version:      1
        Total Length: 58
     TLV Name             Code Len Value
     -------------------- ---- --- -----
     Product Name         0x21  16 k1-x_MUSE-Pi-Pro
     Serial Number        0x23  17 BPMIMXXXXXXXXXXXX
     Unknown              0x41   1  0x02
     Base MAC Address     0x24   6 FE:FE:FE:XX:XX:XX
     MAC Addresses        0x2A   2 2
     CRC-32               0xFE   4 0x395ECD34
     Checksum is valid.

r2s: commit ac436e6879f5bf25e971d80f96f9392b61ff54c6
     TlvInfo Header:
        Id String:    TlvInfo
        Version:      1
        Total Length: 38
     TLV Name             Code Len Value
     -------------------- ---- --- -----
     Base MAC Address     0x24   6 .....
     MAC Addresses        0x2A   2 2
     Product Name         0x21  15 x1_orangepi-r2s
     Unknown              0x41   1  0x01
     CRC-32               0xFE   4 0xE5A74B18
     Checksum is valid.

cm6-io: https://github.com/openwrt/openwrt/pull/23231#issuecomment-5943699070
     TlvInfo Header:
        Id String:    TlvInfo
        Version:      1
        Total Length: 18
     TLV Name             Code Len Value
     -------------------- ---- --- -----
     Base MAC Address     0x24   6 FE:FE:FE:XX:XX:XX
     MAC Addresses        0x2A   2 2
     CRC-32               0xFE   4 0x9775FAA7
     Checksum is valid.

f3: https://github.com/openwrt/openwrt/pull/23231#issuecomment-6339373545
     TlvInfo Header:
        Id String:    TlvInfo
        Version:      1
        Total Length: 32
     TLV Name             Code Len Value
     -------------------- ---- --- -----
     Base MAC Address     0x24   6 FE:FE:FE:AD:18:9C
     MAC Addresses        0x2A   2 2
     Serial Number        0x23  12 0ca91c835b74
     CRC-32               0xFE   4 0x85C81AEE
     Checksum is valid.

     also: commit bfce75e2345fa1ecbf046e696994132f56d6db1c
         no product name

rv2: ?

milkv: commit 77156216f1d0f57e1cfce3452410db20468edca4
     only a product name

[0] https://lore.kernel.org/u-boot/d1a8bab8-4d88-48f2-9ddb-89e8c0e323b8@gmail.com/
[1] https://github.com/openwrt/openwrt/pull/23231#issuecomment-5972395785



More information about the linux-riscv mailing list