]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 26 Sep 2025 17:54:37 +0000 (19:54 +0200)
committerYixun Lan <dlan@gentoo.org>
Mon, 13 Oct 2025 13:52:07 +0000 (21:52 +0800)
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 <aurelien@aurel32.net>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Reviewed-by: Vivian Wang <wangruikang@iscas.ac.cn>
Reviewed-by: Yixun Lan <dlan@gentoo.org>
Link: https://lore.kernel.org/r/20250926175833.3048516-2-aurelien@aurel32.net
Signed-off-by: Yixun Lan <dlan@gentoo.org>
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
arch/riscv/boot/dts/spacemit/k1.dtsi

index b3322dcac31a51a12126a9928a56836dd75f9dc4..4113e68b84909b9fe1ac63a46dd8506ca5a46b6c 100644 (file)
        status = "okay";
 };
 
+&i2c2 {
+       pinctrl-0 = <&i2c2_0_cfg>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
 &i2c8 {
        pinctrl-0 = <&i2c8_cfg>;
        pinctrl-names = "default";
index b71a65ca66fc773986f005754dde311756b4b58b..4eef81d583f3dd37f61b5f365ee32e0477c6c944 100644 (file)
                };
        };
 
+       i2c2_0_cfg: i2c2-0-cfg {
+               i2c2-0-pins {
+                       pinmux = <K1_PADCONF(84, 4)>,   /* I2C2_SCL */
+                                <K1_PADCONF(85, 4)>;   /* I2C2_SDA */
+               };
+       };
+
        i2c8_cfg: i2c8-cfg {
                i2c8-0-pins {
                        pinmux = <K1_PADCONF(93, 0)>,   /* PWR_SCL */
index 3de35077731c7b9d2755aeac6dc3e2c06aadeefb..af35f9cd643513a1c68a00ccfb3ead688a8b1929 100644 (file)
                        status = "disabled";
                };
 
+               i2c2: i2c@d4012000 {
+                       compatible = "spacemit,k1-i2c";
+                       reg = <0x0 0xd4012000 0x0 0x38>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       clocks = <&syscon_apbc CLK_TWSI2>,
+                                <&syscon_apbc CLK_TWSI2_BUS>;
+                       clock-names = "func", "bus";
+                       clock-frequency = <400000>;
+                       interrupts = <38>;
+                       status = "disabled";
+               };
+
                i2c8: i2c@d401d800 {
                        compatible = "spacemit,k1-i2c";
                        reg = <0x0 0xd401d800 0x0 0x38>;