From: Aurelien Jarno <aurelien@aurel32.net>
To: Anand Moon <linux.amoon@gmail.com>
Cc: Zixian Zeng <sycamoremoon376@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@kernel.org>,
Troy Mitchell <troy.mitchell@linux.spacemit.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Vivian Wang <wangruikang@iscas.ac.cn>,
Junhui Liu <junhui.liu@pigmoral.tech>,
Michael Opdenacker <michael.opdenacker@rootcommit.com>,
devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
spacemit@lists.linux.dev
Subject: Re: [PATCH] riscv: dts: spacemit: k1: fix the EEPROM page size
Date: Wed, 25 Nov 2026 18:28:53 +0100 [thread overview]
Message-ID: <awca1TDIKObMIeHE@aurel32.net> (raw)
In-Reply-To: <CANAwSgRf0XpWnyDaoiGySFv3NPKCBYn6BODf1M+P4w58BF-duw@mail.gmail.com>
On 2026-11-25 13:22, Anand Moon wrote:
> Hi Aurelien,
>
> On Wed, 25 Nov 2026 at 00:14, Aurelien Jarno <aurelien@aurel32.net> wrote:
> >
> > Hi Zixian,
> >
> > On 2026-11-24 11:31, Zixian Zeng wrote:
> > > Hi Aurelien,
> > >
> > > On 2026/11/24 5:58, Aurelien Jarno wrote:
> > > > Hi,
> > > >
> > > > On 2026-11-23 12:41, Zixian Zeng wrote:
> > > > > The bananapi-f3 carries an AT24C02 compatible EEPROM GT24C02B [1]:
> > > > > 256 bytes with an 8-byte write page, which can be found in schematic[2].
> > > > > The device tree declares pagesize = <16>, which does not match the
> > > > > eeprom chip datasheet which declares pagesize 8 bytes.
> > > >
> > > > Oops, I am not sure how I got that wrong. Sorry about that.
> >
> > The question of the page size has been raised in the initial review [1],
> > and it seems that the GT24C02 has a 16-byte page size, while the
> > GT24C02B [2] has a 8-byte page size. The BPI-F3 schematics confirms that
> > the B version is used. Sorry about the mistake.
> >
> > > > > EEPROM pagesize of k1-bananapi-cm6-io[3] and k1-orangepi-rv2[4] changed
> > > > > together, based on the chip model shown in the schematic diagram.
> > > >
> > > > The k1-milkv-jupiter board is also affected with the same issue, despite
> > > > using a slightly different EEPROM (24C04).
> > > >
> > >
> > > The GT24C04A EEPROM used on k1-milkv-jupiter board doesn't seem to have
> > > the same issue, which you can find "Page Size: 16 bytes" in datasheet:
> > > https://www.giantec-semi.com/uploads/20220929/GT24C04A.pdf
> >
> > Indeed you are correct, and I confirm that this is the exact version
> > used on the schematics. Therefore there is no need to extend your patch,
> > it can be merged that way.
> >
> > > But I don't have the board, simple test would be appreciated. Perhaps I
> > > should include test steps in the commit message for the next revision.
> >
> > Unfortunately the board has the EEPROM write protection pin connected to
> > VCC, which means the write protection is enabled. Therefore testing is
> > not so easy.
> >
> > Regards
> > Aurelien
> >
> > [1] https://lore.kernel.org/linux-riscv/aNLzRJcKCYOngc7z@aurel32.net/
> > [2] https://www.giantec-semi.com/juchen1123/uploads/pdf/GT24C02_DS_Au.pdf
> >
> 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@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
Yes, I observed the same on my board. It seems the Banana-Pi F3 (or
probably more the designed it is based on) is the first board that got
produced and misses that.
> 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.
Yes, I think the MusePi Pro is not the good default board. The vendor
code uses sets DEFAULT_PRODUCT_NAME to "k1-x_deb1" in
include/configs/k1-x.h, I think the upstream U-Boot should do the same.
I already pointed that out [1].
Regards
Aurelien
[1] https://lore.kernel.org/ahNs0lme0ya2zolV@aurel32.net/
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
next prev parent reply other threads:[~2026-11-25 17:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 4:41 [PATCH] riscv: dts: spacemit: k1: fix the EEPROM page size Zixian Zeng
2026-11-23 4:48 ` sashiko-bot
2026-11-23 21:58 ` Aurelien Jarno
2026-11-24 3:31 ` Zixian Zeng
2026-11-24 18:15 ` Aurelien Jarno
2026-11-25 7:52 ` Anand Moon
2026-11-25 9:38 ` Zixian Zeng
2026-11-25 14:21 ` Anand Moon
2026-11-25 20:01 ` Andre Heider
2026-11-25 17:28 ` Aurelien Jarno [this message]
2026-11-24 1:00 ` Troy Mitchell
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=awca1TDIKObMIeHE@aurel32.net \
--to=aurelien@aurel32.net \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=junhui.liu@pigmoral.tech \
--cc=krzk+dt@kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux.amoon@gmail.com \
--cc=michael.opdenacker@rootcommit.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=sycamoremoon376@gmail.com \
--cc=troy.mitchell@linux.spacemit.com \
--cc=wangruikang@iscas.ac.cn \
/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