From nobody Thu Oct 2 02:15:16 2025 Received: from hall.aurel32.net (hall.aurel32.net [195.154.113.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C59BD302175; Tue, 23 Sep 2025 20:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.154.113.88 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758660656; cv=none; b=abqUdYDSXncFBg4dX6nniNHA+dyeGdGEzv+PA+uTLW8LnmCOAEi67Y5YpY475+t6Pu1noGu0ltWx7UTZ2LIVWN1Ynjq5/sVFQZmmYGeHAiWUDidorpKosiAItKsw8eSnKDQyGruTQCxGlPa2Suftoct3cnX2MgQFpAXVlC61lR8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758660656; c=relaxed/simple; bh=dEvl8dUHWdjXqzb+F5yMEhZlvn1Q4YFHqLFlnj+rFo8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XX2G66pmv3GVTXUpJIH3twgDDsc15UeSC8Mo1h5Y7d5Vo9hyq1Z5rt2BWMROQe7UX127Kj+FQqhAYUdEgfFqVIPWguQHckrPyvtOoxESVjieswo1H1aEDOx6vwyzNcdEUICK5DQIc0JxrEK7fSWUmhA2tv+FBbojtbdSEs6Zq9o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aurel32.net; spf=pass smtp.mailfrom=aurel32.net; dkim=pass (2048-bit key) header.d=aurel32.net header.i=@aurel32.net header.b=DDVVq1fb; arc=none smtp.client-ip=195.154.113.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aurel32.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aurel32.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=aurel32.net header.i=@aurel32.net header.b="DDVVq1fb" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=mSU6j7WeHblJ1jPeNVJeuj23on20kSxgchyldp7Dd80=; b=DDVVq1fbVGMHZJWdJ/NCwT2pHs d9TS+kFRrKuWK6DzF7+QLeAEl8wM7xr95bKk9H1hEZqA0l+nTnleQZsjXa7nAj6jiYqeUuA0DDU1k Voa4eytW99e35lHl8zwZTacGXhYeSSTF0c2FOk34T9soWMKWNNWnSiFif4T6fTyfXlukmTHvz4qYk wE71WVREryNx8oowAcBVFiHplvWJv4q5yWCHoJi97OUt3lYrZmgCmgNP/blaUl7W4A7hGt55xjJMW o6F3+OoboHbSFDTxTD5DXKtEf/vTI62//IheZUt3xRx3UmJHHggO7ohzN/aTenJZbfBGO6jLxcNvf OJrhJ5+g==; Received: from [2a01:e34:ec5d:a741:1ee1:92ff:feb4:5ec0] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v19yI-00CFUv-2t; Tue, 23 Sep 2025 22:50:46 +0200 From: Aurelien Jarno To: linux-kernel@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan , Vivian Wang Cc: Aurelien Jarno , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:RISC-V ARCHITECTURE" , "open list:RISC-V SPACEMIT SoC Support" Subject: [PATCH v2 1/3] riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3 Date: Tue, 23 Sep 2025 21:45:41 +0200 Message-ID: <20250923205028.2355244-2-aurelien@aurel32.net> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250923205028.2355244-1-aurelien@aurel32.net> References: <20250923205028.2355244-1-aurelien@aurel32.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Define properties for the I2C adapter, and enable it on the BPI-F3. It will be used by the 24c02 eeprom. Signed-off-by: Aurelien Jarno --- v2: - Rename i2c2-0-cfg and i2c2-0-pins into i2c2-4-cfg and i2c2-4-pins to match the naming convention encoding the function number in the second cell. arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 6 ++++++ arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 7 +++++++ arch/riscv/boot/dts/spacemit/k1.dtsi | 13 +++++++++++++ 3 files changed, 26 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/b= oot/dts/spacemit/k1-bananapi-f3.dts index 66375fd1e9974..7df7f2c547750 100644 --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts @@ -111,6 +111,12 @@ rgmii1: phy@1 { }; }; =20 +&i2c2 { + pinctrl-0 =3D <&i2c2_4_cfg>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; + &i2c8 { pinctrl-0 =3D <&i2c8_cfg>; pinctrl-names =3D "default"; diff --git a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi b/arch/riscv/boot= /dts/spacemit/k1-pinctrl.dtsi index c9e9a844d2b1c..2a5e819160df2 100644 --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi @@ -92,6 +92,13 @@ gmac1-pins { }; }; =20 + i2c2_4_cfg: i2c2-4-cfg { + i2c2-4-pins { + pinmux =3D , /* I2C2_SCL */ + ; /* I2C2_SDA */ + }; + }; + i2c8_cfg: i2c8-cfg { i2c8-0-pins { pinmux =3D , /* PWR_SCL */ diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spa= cemit/k1.dtsi index bc61a380baca8..d4f38ded52c93 100644 --- a/arch/riscv/boot/dts/spacemit/k1.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -497,6 +497,19 @@ pwm7: pwm@d401bc00 { status =3D "disabled"; }; =20 + i2c2: i2c@d4012000 { + compatible =3D "spacemit,k1-i2c"; + reg =3D <0x0 0xd4012000 0x0 0x38>; + #address-cells =3D <1>; + #size-cells =3D <0>; + clocks =3D <&syscon_apbc CLK_TWSI2>, + <&syscon_apbc CLK_TWSI2_BUS>; + clock-names =3D "func", "bus"; + clock-frequency =3D <400000>; + interrupts =3D <38>; + status =3D "disabled"; + }; + i2c8: i2c@d401d800 { compatible =3D "spacemit,k1-i2c"; reg =3D <0x0 0xd401d800 0x0 0x38>; --=20 2.47.2 From nobody Thu Oct 2 02:15:16 2025 Received: from hall.aurel32.net (hall.aurel32.net [195.154.113.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DE572FD1B1; Tue, 23 Sep 2025 20:50:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.154.113.88 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758660655; cv=none; b=LyTR07HxWPEItgwvOQ/dkPdc1zta3pwCeEKuRsx7D3LYqX+hQQWpJ52IBn3UX+d2RFJS+scpreLNSUPhYszxbFuTHpyDNeNE3zLMW+PtCCss0KiyGZrL1TXeJmOgLNjzB4gEggG1wQ+2Fkml8G+Y64ve+2+aQNRAp6fzi1UaDVY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758660655; c=relaxed/simple; bh=ELWqddDgWzTH1hccxxJBSxJBULKOtPbGk3X13hi6Ze0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VzyjKoZQKbPCmQTPsIpde/Nk3JZ3DN2UAiPf6/vBPSQx8MqkKTXhLdZHbkAKWTXk9VW7PHKF/6qF0Z2gmnJrbOuBbvtKBw8y6L11PRd0DWR5uVFS9tn1NrWUR4cMtRpywXkHaiCyP4Sgp+4PM92cTCY9WaDZf/Wbl5qXuuhmOWM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aurel32.net; spf=pass smtp.mailfrom=aurel32.net; dkim=pass (2048-bit key) header.d=aurel32.net header.i=@aurel32.net header.b=AUDEH+rE; arc=none smtp.client-ip=195.154.113.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aurel32.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aurel32.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=aurel32.net header.i=@aurel32.net header.b="AUDEH+rE" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=+6iIiad176OW4AQzEBo582ZIz3g89l1k5od4FKYfGpg=; b=AUDEH+rERQLyo78W2oJhgBgCHD g1waUWNm1jUEb2uw8J7K70U43NhDguWhD9TkCQyYjLFztlDzkR3oKbYyBAq4UaLazWEztNpz0sj1B nHlj4wfVLRSmMrPhDoumqk66C+ahK3Db2j0DtJDUnHwDjQ8KyhNJjW1nblu7jFH1fj8l1CW5bk5t/ UKjtk2QQSedxjRCIQss0gTQkBhg/p2dhVKE4gqQYAyTxPZdihXKnIFYbA8MbLM+HzMGnsOEaK2GTh sezmvwfnuthdtqhElh9e7o2BaewsaI4087Oh+lKZTRYno3Xo0xQU6/15Pm87vQTVR+QTM/TTawy4d p5z4amVw==; Received: from [2a01:e34:ec5d:a741:1ee1:92ff:feb4:5ec0] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v19yJ-00CFUy-2u; Tue, 23 Sep 2025 22:50:47 +0200 From: Aurelien Jarno To: linux-kernel@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan , Vivian Wang Cc: Aurelien Jarno , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:RISC-V ARCHITECTURE" , "open list:RISC-V SPACEMIT SoC Support" Subject: [PATCH v2 2/3] riscv: dts: spacemit: add 24c02 eeprom on BPI-F3 Date: Tue, 23 Sep 2025 21:45:42 +0200 Message-ID: <20250923205028.2355244-3-aurelien@aurel32.net> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250923205028.2355244-1-aurelien@aurel32.net> References: <20250923205028.2355244-1-aurelien@aurel32.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The BPI-F3 board includes a 24c02 eeprom, that stores the MAC addresses of the two network interfaces and the board's serial number. These values are also exposed via an onie,tlv-layout nvmem layout. The eeprom is marked as read-only since its contents are not supposed to be modified. Signed-off-by: Aurelien Jarno --- v2: - Rename the 24c02 supply name label to buck3_1v8 - Add a onie,tlv-layout nvmem layout describing the content of the 24c02 e= eprom .../boot/dts/spacemit/k1-bananapi-f3.dts | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/b= oot/dts/spacemit/k1-bananapi-f3.dts index 7df7f2c547750..994bc23cc1023 100644 --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts @@ -115,6 +115,29 @@ &i2c2 { pinctrl-0 =3D <&i2c2_4_cfg>; pinctrl-names =3D "default"; status =3D "okay"; + + eeprom@50 { + compatible =3D "atmel,24c02"; + reg =3D <0x50>; + vcc-supply =3D <&buck3_1v8>; /* EEPROM_VCC1V8 */ + pagesize =3D <16>; + read-only; + size =3D <256>; + + nvmem-layout { + compatible =3D "onie,tlv-layout"; + + mac-address { + #nvmem-cell-cells =3D <1>; + }; + + num-macs { + }; + + serial-number { + }; + }; + }; }; =20 &i2c8 { @@ -143,7 +166,7 @@ buck2 { regulator-always-on; }; =20 - buck3 { + buck3_1v8: buck3 { regulator-min-microvolt =3D <500000>; regulator-max-microvolt =3D <1800000>; regulator-ramp-delay =3D <5000>; --=20 2.47.2 From nobody Thu Oct 2 02:15:16 2025 Received: from hall.aurel32.net (hall.aurel32.net [195.154.113.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DED5303A1A; Tue, 23 Sep 2025 20:50:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.154.113.88 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758660655; cv=none; b=CAshwVg2p8Cj37Ds3K1FAEe8vlGDn5rm5aSh6ogDaiWKImF9h2srJmIlkZdOZJ01nNaqtX0jr0PGxuo94Dd8hDsu4rC/Z2qKYeiheFWP3uQa1a79NHXe+nunt9tYie7ygNzM3Y03cCHxNb+Kib4qjgw7fC5Ijf4KsDIcoZ/qN0E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758660655; c=relaxed/simple; bh=g8TShsqhtnCVLFK3XmVOutswlEcioPko7HqYlJkMYrs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iXOHtiatWXsCs91HV4iFEd40AYT5261D+BY6M7FPmN8RVGOPZZi84zztAdQ1CXvbPvpZZX7KLSYwJnHC4vp0Tv9vihCqn6uVNh3uGBFHgFhAnVOzZH52rzCpbGTTAf/ySafpO4TumP+jp2/76qea8lT7lMUVTj5RHlSHQZ/cgGI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aurel32.net; spf=pass smtp.mailfrom=aurel32.net; dkim=pass (2048-bit key) header.d=aurel32.net header.i=@aurel32.net header.b=rXJ+GSaS; arc=none smtp.client-ip=195.154.113.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aurel32.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aurel32.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=aurel32.net header.i=@aurel32.net header.b="rXJ+GSaS" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=gXFtWOZltPQ79FAzcMiIAfmUK9cn45ibixuAZ79/ZLY=; b=rXJ+GSaSBu8gpPaq78ceWgykof yxTcnDd4v/r29b6MA3y5T+c09mv4cIpGVFBvHEBq9eVjfXUurqZ9UHJylIsDct5+dSTn/cX8qXxP8 T4467Fehao0rcerO7pDuiqkP6uRt2HrQxolLxRfmggg0/HSWo6/29tmmnlhfCrrWPLXj0jEseqHCT K/Q5Je1B4+4nslMGpgjdIoTEaDcrOWNEJPRTyXfp4IUnH6/1MUSj3tXOQki5yV0dBix9ShHERjjc4 l/8DJMC/Xut2wk+O7SEV4aB9/qhkfbDBD1/xx2CDuZkBhCtaXs1/JajciwBKUcpGHCmd4mVLSnM2m WLh97BHw==; Received: from [2a01:e34:ec5d:a741:1ee1:92ff:feb4:5ec0] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v19yK-00CFVO-2P; Tue, 23 Sep 2025 22:50:48 +0200 From: Aurelien Jarno To: linux-kernel@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan , Vivian Wang Cc: Aurelien Jarno , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:RISC-V ARCHITECTURE" , "open list:RISC-V SPACEMIT SoC Support" Subject: [PATCH v2 3/3] riscv: dts: spacemit: add i2c aliases on BPI-F3 Date: Tue, 23 Sep 2025 21:45:43 +0200 Message-ID: <20250923205028.2355244-4-aurelien@aurel32.net> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250923205028.2355244-1-aurelien@aurel32.net> References: <20250923205028.2355244-1-aurelien@aurel32.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add i2c aliases for i2c2 and i2c8 on BPI-F3. This is useful to keep a stable number for the /dev entries after loading the i2c-dev module. Signed-off-by: Aurelien Jarno --- v2: no change arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/b= oot/dts/spacemit/k1-bananapi-f3.dts index 994bc23cc1023..b2ef0596168cf 100644 --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts @@ -14,6 +14,8 @@ aliases { ethernet0 =3D ð0; ethernet1 =3D ð1; serial0 =3D &uart0; + i2c2 =3D &i2c2; + i2c8 =3D &i2c8; }; =20 chosen { --=20 2.47.2