]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: dts: spacemit: enable the i2c8 adapter
authorAlex Elder <elder@riscstar.com>
Mon, 25 Aug 2025 17:20:54 +0000 (12:20 -0500)
committerYixun Lan <dlan@gentoo.org>
Mon, 13 Oct 2025 13:20:32 +0000 (21:20 +0800)
Define properties for the I2C adapter that provides access to the
SpacemiT P1 PMIC.  Enable this adapter on the Banana Pi BPI-F3.

Signed-off-by: Alex Elder <elder@riscstar.com>
Link: https://lore.kernel.org/r/20250825172057.163883-6-elder@riscstar.com
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 2aaaff77831e161d730d943245e3ed4037ffd4bf..b33ac47fc6bd8f94c8704073628641e3fbf9e5f1 100644 (file)
        status = "okay";
 };
 
+&i2c8 {
+       pinctrl-0 = <&i2c8_cfg>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       pmic@41 {
+               compatible = "spacemit,p1";
+               reg = <0x41>;
+               interrupts = <64>;
+       };
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_2_cfg>;
index ce7b899d4dd9b4932e186413b76d61682bbc7fb5..b71a65ca66fc773986f005754dde311756b4b58b 100644 (file)
                };
        };
 
+       i2c8_cfg: i2c8-cfg {
+               i2c8-0-pins {
+                       pinmux = <K1_PADCONF(93, 0)>,   /* PWR_SCL */
+                                <K1_PADCONF(94, 0)>;   /* PWR_SDA */
+               };
+       };
+
        /omit-if-no-ref/
        uart0_0_cfg: uart0-0-cfg {
                uart0-0-pins {
index 6cdcd80a7c83b3f62500f226e8ed16787ded5016..3de35077731c7b9d2755aeac6dc3e2c06aadeefb 100644 (file)
                        status = "disabled";
                };
 
+               i2c8: i2c@d401d800 {
+                       compatible = "spacemit,k1-i2c";
+                       reg = <0x0 0xd401d800 0x0 0x38>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       clocks = <&syscon_apbc CLK_TWSI8>,
+                                <&syscon_apbc CLK_TWSI8_BUS>;
+                       clock-names = "func", "bus";
+                       clock-frequency = <400000>;
+                       interrupts = <19>;
+                       status = "disabled";
+               };
+
                pinctrl: pinctrl@d401e000 {
                        compatible = "spacemit,k1-pinctrl";
                        reg = <0x0 0xd401e000 0x0 0x400>;