From nobody Thu Oct 2 03:34:10 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