[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251221110513.1850535-4-wens@kernel.org>
Date: Sun, 21 Dec 2025 19:05:10 +0800
From: Chen-Yu Tsai <wens@...nel.org>
To: Chen-Yu Tsai <wens@...nel.org>,
Jernej Skrabec <jernej@...nel.org>,
Samuel Holland <samuel@...lland.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Mark Brown <broonie@...nel.org>
Cc: Andre Przywara <andre.przywara@....com>,
linux-spi@...r.kernel.org,
devicetree@...r.kernel.org,
linux-sunxi@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] arm64: dts: allwinner: sun55i: Add SPI controllers
The A523 family SoCs have four SPI controllers. One of them also
supports DBI mode.
Add device nodes for all of them. Also add pinmux nodes for spi0 on the
PC pins, which is commonly used for SPI-NOR boot flash.
Signed-off-by: Chen-Yu Tsai <wens@...nel.org>
---
.../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 94 +++++++++++++++++++
1 file changed, 94 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index 42dab01e3f56..9335977751e2 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -214,6 +214,43 @@ spdif_out_pi_pin: spdif-pi-pin {
allwinner,pinmux = <2>;
};
+ /omit-if-no-ref/
+ spi0_pc_pins: spi0-pc-pins {
+ pins = "PC2", "PC4", "PC12";
+ function = "spi0";
+ allwinner,pinmux = <4>;
+ };
+
+ /omit-if-no-ref/
+ spi0_cs0_pc_pin: spi0-cs0-pc-pin {
+ pins = "PC3";
+ function = "spi0";
+ allwinner,pinmux = <4>;
+ };
+
+ /omit-if-no-ref/
+ spi0_cs1_pc_pin: spi0-cs1-pc-pin {
+ pins = "PC7";
+ function = "spi0";
+ allwinner,pinmux = <4>;
+ };
+
+ /omit-if-no-ref/
+ spi0_hold_pc_pin: spi0-hold-pc-pin {
+ /* conflicts with eMMC D7 */
+ pins = "PC16";
+ function = "spi0";
+ allwinner,pinmux = <4>;
+ };
+
+ /omit-if-no-ref/
+ spi0_wp_pc_pin: spi0-wp-pc-pin {
+ /* conflicts with eMMC D2 */
+ pins = "PC15";
+ function = "spi0";
+ allwinner,pinmux = <4>;
+ };
+
uart0_pb_pins: uart0-pb-pins {
pins = "PB9", "PB10";
allwinner,pinmux = <2>;
@@ -563,6 +600,49 @@ mmc2: mmc@...2000 {
#size-cells = <0>;
};
+ spi0: spi@...5000 {
+ compatible = "allwinner,sun55i-a523-spi";
+ reg = <0x04025000 0x1000>;
+ interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>;
+ clock-names = "ahb", "mod";
+ dmas = <&dma 22>, <&dma 22>;
+ dma-names = "rx", "tx";
+ resets = <&ccu RST_BUS_SPI0>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ spi1: spi@...6000 {
+ compatible = "allwinner,sun55i-a523-spi-dbi",
+ "allwinner,sun55i-a523-spi";
+ reg = <0x04026000 0x1000>;
+ interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>;
+ clock-names = "ahb", "mod";
+ dmas = <&dma 23>, <&dma 23>;
+ dma-names = "rx", "tx";
+ resets = <&ccu RST_BUS_SPI1>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ spi2: spi@...7000 {
+ compatible = "allwinner,sun55i-a523-spi";
+ reg = <0x04027000 0x1000>;
+ interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_SPI2>, <&ccu CLK_SPI2>;
+ clock-names = "ahb", "mod";
+ dmas = <&dma 24>, <&dma 24>;
+ dma-names = "rx", "tx";
+ resets = <&ccu RST_BUS_SPI2>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
usb_otg: usb@...0000 {
compatible = "allwinner,sun55i-a523-musb",
"allwinner,sun8i-a33-musb";
@@ -815,6 +895,20 @@ rtc: rtc@...0000 {
#clock-cells = <1>;
};
+ r_spi0: spi@...2000 {
+ compatible = "allwinner,sun55i-a523-spi";
+ reg = <0x07092000 0x1000>;
+ interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&r_ccu CLK_BUS_R_SPI>, <&r_ccu CLK_R_SPI>;
+ clock-names = "ahb", "mod";
+ dmas = <&dma 53>, <&dma 53>;
+ dma-names = "rx", "tx";
+ resets = <&r_ccu RST_BUS_R_SPI>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
mcu_ccu: clock-controller@...2000 {
compatible = "allwinner,sun55i-a523-mcu-ccu";
reg = <0x7102000 0x200>;
--
2.47.3
Powered by blists - more mailing lists