From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.15 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796012987; b=MLnBSIq2l5JdY8PttxUTsDy73TbQ2JjC68Pewc8GV7UdTJOZxgwSUaC8rFo+PQSW1hgi dXBUSCspa79fRcxuW4XILY2my8jgT4L/bhGNJTm4iAGq4VnrElxLvm/GAUv1n3CzIptIO JUSdenKfbbsoQWavSIsG2HwnzR+wIlhvWH0Xf2H775dEFnwjN6+69ZdXoy0Lxl9kt8gml ZaQxc5OKOE9JGztfxBPvz9SyMszi59gFJdBqiq/cXJwsoUw0LLVUBSe76DBMkxxeA7AfM fpS2sULteVzYhCdZR1nL+sDwcQWv+YWtNm7ATD0F13gEOA1HmiI0As6ebDXTRFfoNRA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796012987; h=DMARC-Filter:DKIM-Signature:Received:Mime-Version: Content-Transfer-Encoding:Content-Type:Date:Message-Id:Cc:Subject: From:To:X-Mailer:References:In-Reply-To:X-ZohoMailClient; bh=0syj0a5RSpHdyl+ME146FkHV9e1byHmCTAKk6m8XIac=; b=WrY51hABn4f9uW6l8zMxVaeSw0M+inyJ2uubMiT+Tz5Xmn7xHsUh/Dhg3DiNkrNuPAyx bHbxxnVfvlrwc1rKxSdlfRZXy6shIHfi8sTxaoNB6ENL84Ou9WTtj6c9R4Se7TdrS9Rfg 6txc6Fik3bsRcKUUdkcAW/vI3C4uwa5jwWbB+MiC/s7orsoOnRin5nnf7vR261lDGFT5+ w15qZ8Vz33rQH+73mDpo/LMu+HpY4jjRkCkeJ9KCZ4qoY2jSiq0juMAVpXos4zJTFFRop OkQPZOVLbGfPRmza6ROW1druiUQiKsadYWGxvHZ+fPATAMx/ID19cjTbrF8xjsIhx+g== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=pigmoral.tech; spf=pass smtp.mailfrom=pigmoral.tech; dkim=pass header.d=pigmoral.tech header.i=@pigmoral.tech header.a=rsa-sha256 header.s=zmail header.b=DWeVl8s8; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.15 Received: from sender5-op-o15.zoho.com (sender5-op-o15.zoho.com [165.173.182.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24C24606A32A for ; Mon, 30 Nov 2026 04:29:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 24C24606A32A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pigmoral.tech Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pigmoral.tech Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pigmoral.tech header.i=@pigmoral.tech header.a=rsa-sha256 header.s=zmail header.b=DWeVl8s8 ARC-Seal: i=1; a=rsa-sha256; t=1796012927; cv=none; d=zohomail.com; s=zohoarc; b=PxFkKRx24FnNuljfj1hgS/2JqPQr7m4lvBWL/Gmd+vUHR6JNBpBaanKFH6Ez5kLjtUKEOj+Q5aUdx68RCLpd1QcvdNxk6l6EWwv+K+msQ7h0THH0Tqh+vUbmjrmkU4ZaRjRBLZbdowgrtZLxOG/3X4p/CF8A0PH3y6kWDlydPn8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796012927; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=0syj0a5RSpHdyl+ME146FkHV9e1byHmCTAKk6m8XIac=; b=GOGghPk9b7WLLeaFka1hU20eaCegwVclcmZs7qqeY0Z7MoFFDBk2nNvBy8Pcb3gqgW+Qswd0uEcg89m0R91L7QFMks9iFdgcyPiePS4tov0jeJwr9hgd56ofKZDlk7lepmK5mgCephnEGe9bbfuHJQETyGfYQWGil5d3TKLec/8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=pigmoral.tech; spf=pass smtp.mailfrom=junhui.liu@pigmoral.tech; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=DWeVl8s8kfwGpWR7zWQxZfcaPcA+DwTf5sIvq7YeEDQ698TwaduS+++IKA3Xq4JiQzFNkBdt9tH1WLR0LGjDbsiYHewjzXVYppwPn5/OMLjWj4ZOqYNKQYmO3GVCZmaLO+8cBjCBw8WbMx5PMEa/HT6T9oEP0HtGg9hNqGlWFkQ=; c=relaxed/relaxed; s=zmail; d=pigmoral.tech; v=1; bh=0syj0a5RSpHdyl+ME146FkHV9e1byHmCTAKk6m8XIac=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796012925006941.4854002628758; Sun, 29 Nov 2026 20:28:45 -0800 (PST) X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 30 Nov 2026 12:28:28 +0800 Message-Id: Cc: , , Subject: Re: [PATCH] riscv: dts: spacemit: k1: fix the EEPROM page size From: "Junhui Liu" To: "Zixian Zeng" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Yixun Lan" , "Troy Mitchell" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Alexandre Ghiti" , "Aurelien Jarno" , "Vivian Wang" , "Junhui Liu" , "Michael Opdenacker" X-Mailer: aerc 0.22.0 References: <20261123-fix-bpf3-eeprom-v1-1-df8cce6ef2b5@gmail.com> In-Reply-To: <20261123-fix-bpf3-eeprom-v1-1-df8cce6ef2b5@gmail.com> X-ZohoMailClient: External Hi Zixian, On Mon Nov 23, 2026 at 12:41 PM CST, 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 =3D <16>, which does not match the > eeprom chip datasheet which declares pagesize 8 bytes. > 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 TLV EEPROM on this board 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. > > Link: https://www.giantec-semi.com/uploads/20230414/GT24C02B.pdf [1] > Link: https://drive.google.com/file/d/19iLJ5xnCB_oK8VeQjkPGjzAn39WYyylv/v= iew?usp=3Dsharing [2] > Link: https://pan.baidu.com/s/13UTY_qM4gGuVxsZ9U7_Xpw?pwd=3D8888 [3] > Link: https://drive.google.com/drive/folders/1pcI_U0C3VJKTCg8A1zj08CwNboh= nONSR?usp=3Dsharing [4] > Fixes: bfce75e2345f ("riscv: dts: spacemit: add 24c02 eeprom on BPI-F3") > Fixes: 46a8c01700ac ("riscv: dts: spacemit: k1: Add Banana Pi BPI-CM6 IO = board") > Fixes: ac436e6879f5 ("riscv: dts: spacemit: enable onboard eeprom for Ora= ngePi") > Signed-off-by: Zixian Zeng > --- > A TLV write through u-boot's i2c_eeprom driver scrambled the EEPROM > contents and left both ports without a MAC address on bananapi-f3. > I checked boards schematic and eeprom chip datasheet of bananapi-f3, > whose links can be found in commit message. After changing pagesize > to 8, TLV write and read works as expected. > > Other k1 boards which includes k1-bananapi-cm6-io and k1-orangepi-rv2 > changed together. However, I don=E2=80=99t have these two board. Be grate= ful > if someone could test it. Schematic of k1-orangepi-r2s not found, > so keep it as it is, but true knowledge comes from practice. > --- > arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts | 2 +- > arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 2 +- > arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts b/arch/r= iscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts > index 2c2d78aee98a..23a1323df30d 100644 > --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts > +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6-io.dts > @@ -101,7 +101,7 @@ eeprom@54 { > compatible =3D "atmel,24c08"; > reg =3D <0x54>; > vcc-supply =3D <&buck3_1v8>; > - pagesize =3D <16>; > + pagesize =3D <8>; > size =3D <1024>; > }; > }; The Banana Pi CM6 has two EEPROMs: eeprom@50 on the core board and eeprom@54 on the IO board. I checked the schematic, the EEPROM on the core board should have pagesize =3D <8>, while the EEPROM on the IO board should have pagesize =3D <16>. My actual write/read tests also confirmed this. Therefore, the CM6 change should belong to k1-bananapi-cm6.dtsi, not k1-bananapi-cm6-io.dts. Best regards, Junhui Liu > 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 =3D "atmel,24c02"; > reg =3D <0x50>; > vcc-supply =3D <&buck3_1v8>; /* EEPROM_VCC1V8 */ > - pagesize =3D <16>; > + pagesize =3D <8>; > read-only; > size =3D <256>; > =20 > diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/risc= v/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 =3D "atmel,24c02"; > reg =3D <0x50>; > - pagesize =3D <16>; > + pagesize =3D <8>; > size =3D <256>; > read-only; > vcc-supply =3D <&buck3_1v8>; > > --- > base-commit: 4843f6873f7c4835e62f2c73ba0fd538e57a2f22 > change-id: 20261122-fix-bpf3-eeprom-51ba6e0f110a > > Best regards, > -- =20 > Zixian Zeng