[PATCH 4/4] riscv: dts: spacemit: enable SPI0 on K3 CoM260-IFX

From: Zhengyu He

Date: Fri Jul 17 2026 - 10:53:05 EST


SPI0 is the first enabled PDMA consumer on CoM260-IFX, so enable the
PDMA controller together with SPI0.

The board exposes SPI0 on its 40-pin header:

pin 19: MOSI
pin 21: MISO
pin 23: SCLK
pin 24: CS0

Define the pinctrl state used by this header wiring, and describe the SPI
NOR on chip select 0 for the current validation setup.

(This was tested using a Winbond W25Q64JV SPI NOR chip.)

Signed-off-by: Cody Kang <cody.kang.hk@xxxxxxxxxxx>
Signed-off-by: Zhengyu He <hezhy472013@xxxxxxxxx>
---
arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 13 ++++++++++++-
arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi | 21 +++++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
index 238bb03d0e9e..01a7135df864 100644
--- a/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
+++ b/arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts
@@ -11,11 +11,22 @@ / {
compatible = "spacemit,k3-com260-ifx", "spacemit,k3-com260", "spacemit,k3";

aliases {
- serial0 = &uart0;
ethernet0 = &eth1;
+ serial0 = &uart0;
+ spi0 = &spi0;
};

chosen {
stdout-path = "serial0:115200n8";
};
};
+
+&pdma {
+ status = "okay";
+};
+
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ssp0_2_cfg>;
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
index 3ee1471f3798..9b7617f3846c 100644
--- a/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi
@@ -679,6 +679,27 @@ pwm19-2-pins {
};
};

+ /omit-if-no-ref/
+ ssp0_2_cfg: ssp0-2-cfg {
+ ssp0-0-pins {
+ pinmux = <K3_PADCONF(104, 1)>, /* ssp0 tx */
+ <K3_PADCONF(105, 1)>, /* ssp0 rx */
+ <K3_PADCONF(106, 1)>; /* ssp0 clk */
+
+ bias-disable;
+ drive-strength = <25>;
+ power-source = <1800>;
+ };
+
+ ssp0-1-pins {
+ pinmux = <K3_PADCONF(107, 1)>; /* ssp0 frm */
+
+ bias-pull-up = <0>;
+ drive-strength = <25>;
+ power-source = <1800>;
+ };
+ };
+
/omit-if-no-ref/
uart0_0_cfg: uart0-0-cfg {
uart0-0-pins {

--
2.53.0