[PATCH 1/3] riscv: dts: spacemit: enable the i2c2 adapter on BPI-F3

Troy Mitchell troy.mitchell at linux.spacemit.com
Mon Sep 22 18:32:07 PDT 2025


On Sun, Sep 21, 2025 at 11:01:41PM +0200, Aurelien Jarno wrote:
> 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 at aurel32.net>
> ---
> --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> @@ -92,6 +92,13 @@ gmac1-pins {
>  		};
>  	};
>  
> +	i2c2_0_cfg: i2c2-0-cfg {
Should this be i2c2_4_cfg here?
>From what I see, in the initial version the second cell was meant
to be the function number rather than the serial index.

It looks like the pwm part is also incorrect.

                - Troy
> +		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 */
> diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/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 at d401bc00 {
>  			status = "disabled";
>  		};
>  
> +		i2c2: i2c at 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 at d401d800 {
>  			compatible = "spacemit,k1-i2c";
>  			reg = <0x0 0xd401d800 0x0 0x38>;
> -- 
> 2.47.2
> 
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv



More information about the linux-riscv mailing list