* [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards
@ 2026-12-03 3:36 Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 1/4] riscv: dts: spacemit: k1-bananapi-f3: fix EEPROM page size Zixian Zeng
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Zixian Zeng @ 2026-12-03 3:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, Conor Dooley, Yixun Lan, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Aurelien Jarno, Vivian Wang, Michael Opdenacker, Junhui Liu,
Chukun Pan, Anand Moon, Andre Heider, Rob Herring
Cc: Zixian Zeng, devicetree, linux-riscv, spacemit
The EEPROM page sizes on several k1 boards do not match the populated
parts. The BPI-F3, the BPI-CM6 core board, the OrangePi RV2 and R2S
use the Giantec GT24C02B with an 8-byte write page, but their device
tree nodes declare pagesize = <16>.
The BPI-F3 TLV EEPROM holds the base MAC address and the MAC count, so a
corrupted write leaves both Ethernet ports without a MAC address, which
is how this was found. Problem logs in u-boot are as following:
```
=> tlv_eeprom
TLV: 0
TlvInfo Header:
Id String: TlvInfo
Version: 1
Total Length: 18
TLV Name Code Len Value
==================== ==== === =====
Base MAC Address 0x24 6 FE:FE:FE:90:1E:F0
MAC Addresses 0x2A 2 2
CRC-32 0xFE 4 0xDC3129B4
Checksum is valid.
=> tlv_eeprom set 0x21 "k1-x_deb1"
=> tlv_eeprom
TLV: 0
TlvInfo Header:
Id String: TlvInfo
Version: 1
Total Length: 29
TLV Name Code Len Value
==================== ==== === =====
Base MAC Address 0x24 6 FE:FE:FE:90:1E:F0
MAC Addresses 0x2A 2 2
Product Name 0x21 9 k1-x_deb1
CRC-32 0xFE 4 0x14813093
Checksum is valid.
=> tlv_eeprom write
Programming passed.
=> tlv_eeprom read
EEPROM data loaded from device to memory.
=> tlv_eeprom
TLV: 0
TlvInfo Header:
Id String: TlvInfo
Version: 1
Total Length: 6
TLV Name Code Len Value
==================== ==== === =====
CRC-32 0xFE 4 0xD4431C18
Checksum is valid.
```
After executing the `tlv_eeprom write` command to write data to
the EEPROM, a subsequent `tlv_eeprom read` operation which should
have retrieved "Product Name k1-x_deb1" along with other data.
But it failed to load anything because previous write was broken.
With pagesize = <8>, "tlv_eeprom write" through u-boot's i2c_eeprom
driver and the following readback succeed.
Tested on a Banana Pi BPI-F3. The BPI-CM6 page sizes were confirmed and
corrected by Junhui Liu. Correct the page size per board, one patch
per board dts, and the stable tree can pick the fixes independently.
So that's rather a quite big change, I didn't pick rb tags from
Aurelien Jarno Troy Mitchell and Anand Moon. If you don't any problems
with this version, maintainers, can you please add tags when committing.
---
Changes in v2:
- Split the fixes per board dts.
- Drop the BPI-CM6 IO change; only the CM6 core board's eeprom@50 is
changed. The IO board's eeprom@54 stays 24c08 with pagesize = <16>.
- Add change to R2S board, since the EEPROM model was mentioned
in a previous commit message.
- Link to v1: https://patch.msgid.link/20261123-fix-bpf3-eeprom-v1-1-df8cce6ef2b5@gmail.com
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Yixun Lan <dlan@kernel.org>
To: Troy Mitchell <troy.mitchell@linux.spacemit.com>
To: Paul Walmsley <pjw@kernel.org>
To: Palmer Dabbelt <palmer@dabbelt.com>
To: Albert Ou <aou@eecs.berkeley.edu>
To: Alexandre Ghiti <alex@ghiti.fr>
To: Aurelien Jarno <aurelien@aurel32.net>
To: Vivian Wang <wangruikang@iscas.ac.cn>
To: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To: Junhui Liu <junhui.liu@pigmoral.tech>
To: Chukun Pan <amadeus@jmu.edu.cn>
To: Anand Moon <linux.amoon@gmail.com>
To: Andre Heider <a.heider@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-riscv@lists.infradead.org
Cc: spacemit@lists.linux.dev
---
Zixian Zeng (4):
riscv: dts: spacemit: k1-bananapi-f3: fix EEPROM page size
riscv: dts: spacemit: k1-bananapi-cm6: fix core board EEPROM page size
riscv: dts: spacemit: k1-orangepi-r2s: fix EEPROM page size
riscv: dts: spacemit: k1-orangepi-rv2: fix EEPROM page size
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 2 +-
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 2 +-
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 2 +-
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
base-commit: 4843f6873f7c4835e62f2c73ba0fd538e57a2f22
change-id: 20261122-fix-bpf3-eeprom-51ba6e0f110a
Best regards,
--
Zixian Zeng <sycamoremoon376@gmail.com>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/4] riscv: dts: spacemit: k1-bananapi-f3: fix EEPROM page size
2026-12-03 3:36 [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Zixian Zeng
@ 2026-12-03 3:36 ` Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 2/4] riscv: dts: spacemit: k1-bananapi-cm6: fix core board " Zixian Zeng
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Zixian Zeng @ 2026-12-03 3:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, Conor Dooley, Yixun Lan, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Aurelien Jarno, Vivian Wang, Michael Opdenacker, Junhui Liu,
Chukun Pan, Anand Moon, Andre Heider, Rob Herring
Cc: Zixian Zeng, devicetree, linux-riscv, spacemit
The Banana Pi BPI-F3 carries a Giantec GT24C02B EEPROM: 256 bytes
with an 8-byte write page. The device tree declares pagesize = <16>,
which does not match the datasheet.
Fixes: bfce75e2345f ("riscv: dts: spacemit: add 24c02 eeprom on BPI-F3")
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 58035d886bf6..1db896536256 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -195,7 +195,7 @@ eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */
- pagesize = <16>;
+ pagesize = <8>;
read-only;
size = <256>;
--
2.56.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/4] riscv: dts: spacemit: k1-bananapi-cm6: fix core board EEPROM page size
2026-12-03 3:36 [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 1/4] riscv: dts: spacemit: k1-bananapi-f3: fix EEPROM page size Zixian Zeng
@ 2026-12-03 3:36 ` Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 3/4] riscv: dts: spacemit: k1-orangepi-r2s: fix " Zixian Zeng
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Zixian Zeng @ 2026-12-03 3:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, Conor Dooley, Yixun Lan, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Aurelien Jarno, Vivian Wang, Michael Opdenacker, Junhui Liu,
Chukun Pan, Anand Moon, Andre Heider, Rob Herring
Cc: Zixian Zeng, devicetree, linux-riscv, spacemit
The BPI-CM6 module carries a Giantec GT24C02B EEPROM on the core
board (eeprom@50), with an 8-byte write page. The shared dtsi declares
pagesize = <16>, which does not match the datasheet.
The IO carrier board's eeprom@54 is a different part with pagesize = <16>,
it is left unchanged.
Fixes: 46a8c01700ac ("riscv: dts: spacemit: k1: Add Banana Pi BPI-CM6 IO board")
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
index 81c40df2a366..ee8dd0e6fd5f 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
@@ -72,7 +72,7 @@ eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
vcc-supply = <&buck3_1v8>;
- pagesize = <16>;
+ pagesize = <8>;
read-only;
size = <256>;
--
2.56.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/4] riscv: dts: spacemit: k1-orangepi-r2s: fix EEPROM page size
2026-12-03 3:36 [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 1/4] riscv: dts: spacemit: k1-bananapi-f3: fix EEPROM page size Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 2/4] riscv: dts: spacemit: k1-bananapi-cm6: fix core board " Zixian Zeng
@ 2026-12-03 3:36 ` Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 4/4] riscv: dts: spacemit: k1-orangepi-rv2: " Zixian Zeng
2026-12-03 5:48 ` [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Yixun Lan
4 siblings, 0 replies; 6+ messages in thread
From: Zixian Zeng @ 2026-12-03 3:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, Conor Dooley, Yixun Lan, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Aurelien Jarno, Vivian Wang, Michael Opdenacker, Junhui Liu,
Chukun Pan, Anand Moon, Andre Heider, Rob Herring
Cc: Zixian Zeng, devicetree, linux-riscv, spacemit
The OrangePi R2S carries a Giantec GT24C02B EEPROM with an 8-byte
write page. The device tree declares pagesize = <16>, which does not
match the datasheet.
Fixes: ac436e6879f5 ("riscv: dts: spacemit: enable onboard eeprom for OrangePi")
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
index eb77aae9d600..a89970b363ce 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
@@ -158,7 +158,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
- pagesize = <16>;
+ pagesize = <8>;
size = <256>;
read-only;
vcc-supply = <&buck3_1v8>;
--
2.56.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/4] riscv: dts: spacemit: k1-orangepi-rv2: fix EEPROM page size
2026-12-03 3:36 [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Zixian Zeng
` (2 preceding siblings ...)
2026-12-03 3:36 ` [PATCH v2 3/4] riscv: dts: spacemit: k1-orangepi-r2s: fix " Zixian Zeng
@ 2026-12-03 3:36 ` Zixian Zeng
2026-12-03 5:48 ` [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Yixun Lan
4 siblings, 0 replies; 6+ messages in thread
From: Zixian Zeng @ 2026-12-03 3:36 UTC (permalink / raw)
To: Krzysztof Kozlowski, Conor Dooley, Yixun Lan, Troy Mitchell,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Aurelien Jarno, Vivian Wang, Michael Opdenacker, Junhui Liu,
Chukun Pan, Anand Moon, Andre Heider, Rob Herring
Cc: Zixian Zeng, devicetree, linux-riscv, spacemit
The OrangePi RV2 carries a Giantec GT24C02B EEPROM with an 8-byte
write page. The device tree declares pagesize = <16>, which does not
match the datasheet.
Fixes: ac436e6879f5 ("riscv: dts: spacemit: enable onboard eeprom for OrangePi")
Signed-off-by: Zixian Zeng <sycamoremoon376@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index 790234f3550a..8fd95c8f9db2 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -185,7 +185,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
- pagesize = <16>;
+ pagesize = <8>;
size = <256>;
read-only;
vcc-supply = <&buck3_1v8>;
--
2.56.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards
2026-12-03 3:36 [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Zixian Zeng
` (3 preceding siblings ...)
2026-12-03 3:36 ` [PATCH v2 4/4] riscv: dts: spacemit: k1-orangepi-rv2: " Zixian Zeng
@ 2026-12-03 5:48 ` Yixun Lan
4 siblings, 0 replies; 6+ messages in thread
From: Yixun Lan @ 2026-12-03 5:48 UTC (permalink / raw)
To: Zixian Zeng
Cc: Rob Herring, Conor Dooley, Albert Ou, Michael Opdenacker,
Alexandre Ghiti, devicetree, Vivian Wang, Andre Heider,
linux-riscv, Chukun Pan, Palmer Dabbelt, Troy Mitchell,
Junhui Liu, Paul Walmsley, spacemit, Krzysztof Kozlowski,
Aurelien Jarno
On 11:36 Thu 03 Dec , Zixian Zeng wrote:
> The EEPROM page sizes on several k1 boards do not match the populated
> parts. The BPI-F3, the BPI-CM6 core board, the OrangePi RV2 and R2S
> use the Giantec GT24C02B with an 8-byte write page, but their device
> tree nodes declare pagesize = <16>.
>
> The BPI-F3 TLV EEPROM holds the base MAC address and the MAC count, so a
> corrupted write leaves both Ethernet ports without a MAC address, which
> is how this was found. Problem logs in u-boot are as following:
>
[..]
>
> ---
> Zixian Zeng (4):
> riscv: dts: spacemit: k1-bananapi-f3: fix EEPROM page size
> riscv: dts: spacemit: k1-bananapi-cm6: fix core board EEPROM page size
> riscv: dts: spacemit: k1-orangepi-r2s: fix EEPROM page size
> riscv: dts: spacemit: k1-orangepi-rv2: fix EEPROM page size
>
> arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 2 +-
> arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 2 +-
> arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 2 +-
> arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Yixun Lan <dlan@kernel.org>
--
Yixun Lan (dlan)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-12-03 5:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 3:36 [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 1/4] riscv: dts: spacemit: k1-bananapi-f3: fix EEPROM page size Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 2/4] riscv: dts: spacemit: k1-bananapi-cm6: fix core board " Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 3/4] riscv: dts: spacemit: k1-orangepi-r2s: fix " Zixian Zeng
2026-12-03 3:36 ` [PATCH v2 4/4] riscv: dts: spacemit: k1-orangepi-rv2: " Zixian Zeng
2026-12-03 5:48 ` [PATCH v2 0/4] riscv: dts: spacemit: k1: fix EEPROM page size on boards Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox