* [PATCH 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
@ 2026-02-27 17:51 Chen-Yu Tsai
2026-02-27 17:51 ` [PATCH 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs Chen-Yu Tsai
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Chen-Yu Tsai @ 2026-02-27 17:51 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Mark Brown
Cc: linux-sunxi, devicetree, linux-spi, linux-arm-kernel,
linux-kernel
Hi,
This series enables the SPI NAND found on the Avaota A1 in Quad SPI
mode. The SPI driver already supports Dual SPI and Quad SPI, but the
bindings need to be updated to allow it.
Patch 1 updates the binding to allow Dual SPI and Quad SPI on the newer
SoCs. It also allows describing no TX or no RX available.
Patch 2 adds another set of pins for spi0 on the A523 SoC family. This
set is used for the SPI NAND on the Avaota A1 board.
Patch 3 enables the SPI NAND found on the board. No partition layout
is provided at the moment.
Please have a look.
Thanks
ChenYu
Chen-Yu Tsai (3):
spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins
arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
.../bindings/spi/allwinner,sun6i-a31-spi.yaml | 31 +++++++++++++---
.../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 35 +++++++++++++++++++
.../dts/allwinner/sun55i-t527-avaota-a1.dts | 15 ++++++++
3 files changed, 76 insertions(+), 5 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
2026-02-27 17:51 [PATCH 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
@ 2026-02-27 17:51 ` Chen-Yu Tsai
2026-02-28 11:08 ` Krzysztof Kozlowski
2026-02-27 17:51 ` [PATCH 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins Chen-Yu Tsai
2026-02-27 17:51 ` [PATCH 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
2 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2026-02-27 17:51 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Mark Brown
Cc: linux-sunxi, devicetree, linux-spi, linux-arm-kernel,
linux-kernel
Support for Dual SPI and Quad SPI was added to the Linux driver in
commit 0605d9fb411f ("spi: sun6i: add quirk for dual and quad SPI modes
support") and commit 25453d797d7a ("spi: sun6i: add dual and quad SPI
modes support for R329/D1/R528/T113s").
However the binding was never updated to allow these modes. Allow them
by adding 2 and 4 to the allowed bus widths for the newer variants.
While at it, also add 0 to the allowed bus widths. This signals that
RX or TX is not available, i.e. the MISO or MOSI pin is disconnected.
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
.../bindings/spi/allwinner,sun6i-a31-spi.yaml | 31 ++++++++++++++++---
1 file changed, 26 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml b/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml
index a6067030c5ed..2197f65d878b 100644
--- a/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml
+++ b/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml
@@ -6,9 +6,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner A31 SPI Controller
-allOf:
- - $ref: spi-controller.yaml
-
maintainers:
- Chen-Yu Tsai <wens@csie.org>
- Maxime Ripard <mripard@kernel.org>
@@ -82,11 +79,35 @@ patternProperties:
spi-rx-bus-width:
items:
- - const: 1
+ enum: [0, 1, 2, 4]
spi-tx-bus-width:
items:
- - const: 1
+ enum: [0, 1, 2, 4]
+
+allOf:
+ - $ref: spi-controller.yaml
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - allwinner,sun50i-r329-spi
+ - allwinner,sun55i-a523-spi
+ then:
+ patternProperties:
+ "^.*@[0-9a-f]+":
+ type: object
+
+ properties:
+ spi-rx-bus-width:
+ items:
+ enum: [0, 1]
+
+ spi-tx-bus-width:
+ items:
+ enum: [0, 1]
required:
- compatible
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins
2026-02-27 17:51 [PATCH 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
2026-02-27 17:51 ` [PATCH 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs Chen-Yu Tsai
@ 2026-02-27 17:51 ` Chen-Yu Tsai
2026-02-28 19:12 ` Jernej Škrabec
2026-02-27 17:51 ` [PATCH 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
2 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2026-02-27 17:51 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Mark Brown
Cc: linux-sunxi, devicetree, linux-spi, linux-arm-kernel,
linux-kernel
The Avaota A1 board uses spi0 on the PJ pins to connect a SPI NAND
chip.
Add the full set of pins. Even though this board doesn't use CS1, other
boards may do so in the future.
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
.../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index b8263e2872af..fbdf23e90cf7 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -245,6 +245,13 @@ spi0_pc_pins: spi0-pc-pins {
allwinner,pinmux = <4>;
};
+ /omit-if-no-ref/
+ spi0_pj_pins: spi0-pj-pins {
+ pins = "PJ21", "PJ22", "PJ23";
+ function = "spi0";
+ allwinner,pinmux = <5>;
+ };
+
/omit-if-no-ref/
spi0_cs0_pc_pin: spi0-cs0-pc-pin {
pins = "PC3";
@@ -252,6 +259,13 @@ spi0_cs0_pc_pin: spi0-cs0-pc-pin {
allwinner,pinmux = <4>;
};
+ /omit-if-no-ref/
+ spi0_cs0_pj_pin: spi0-cs0-pj-pin {
+ pins = "PJ20";
+ function = "spi0";
+ allwinner,pinmux = <5>;
+ };
+
/omit-if-no-ref/
spi0_cs1_pc_pin: spi0-cs1-pc-pin {
pins = "PC7";
@@ -259,6 +273,13 @@ spi0_cs1_pc_pin: spi0-cs1-pc-pin {
allwinner,pinmux = <4>;
};
+ /omit-if-no-ref/
+ spi0_cs1_pj_pin: spi0-cs1-pj-pin {
+ pins = "PJ24";
+ function = "spi0";
+ allwinner,pinmux = <5>;
+ };
+
/omit-if-no-ref/
spi0_hold_pc_pin: spi0-hold-pc-pin {
/* conflicts with eMMC D7 */
@@ -267,6 +288,13 @@ spi0_hold_pc_pin: spi0-hold-pc-pin {
allwinner,pinmux = <4>;
};
+ /omit-if-no-ref/
+ spi0_hold_pj_pin: spi0-hold-pj-pin {
+ pins = "PJ26";
+ function = "spi0";
+ allwinner,pinmux = <5>;
+ };
+
/omit-if-no-ref/
spi0_wp_pc_pin: spi0-wp-pc-pin {
/* conflicts with eMMC D2 */
@@ -275,6 +303,13 @@ spi0_wp_pc_pin: spi0-wp-pc-pin {
allwinner,pinmux = <4>;
};
+ /omit-if-no-ref/
+ spi0_wp_pj_pin: spi0-wp-pj-pin {
+ pins = "PJ25";
+ function = "spi0";
+ allwinner,pinmux = <5>;
+ };
+
uart0_pb_pins: uart0-pb-pins {
pins = "PB9", "PB10";
allwinner,pinmux = <2>;
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-02-27 17:51 [PATCH 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
2026-02-27 17:51 ` [PATCH 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs Chen-Yu Tsai
2026-02-27 17:51 ` [PATCH 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins Chen-Yu Tsai
@ 2026-02-27 17:51 ` Chen-Yu Tsai
2026-02-28 19:12 ` Jernej Škrabec
2 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2026-02-27 17:51 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Mark Brown
Cc: linux-sunxi, devicetree, linux-spi, linux-arm-kernel,
linux-kernel
The Avaota A1 board has a SPI NAND chip connected to spi0 on the PJ
pins with support for QSPI.
Enable spi0 and add a device node for the SPI NAND chip.
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
.../boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
index 7c24121de88f..474354fbfcec 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts
@@ -403,6 +403,21 @@ &rtc {
assigned-clock-rates = <32768>;
};
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pj_pins>, <&spi0_cs0_pj_pin>,
+ <&spi0_hold_pj_pin>, <&spi0_wp_pj_pin>;
+ status = "okay";
+
+ nand@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+ };
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
2026-02-27 17:51 ` [PATCH 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs Chen-Yu Tsai
@ 2026-02-28 11:08 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-28 11:08 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Mark Brown, linux-sunxi, devicetree, linux-spi,
linux-arm-kernel, linux-kernel
On Sat, Feb 28, 2026 at 01:51:53AM +0800, Chen-Yu Tsai wrote:
> maintainers:
> - Chen-Yu Tsai <wens@csie.org>
> - Maxime Ripard <mripard@kernel.org>
> @@ -82,11 +79,35 @@ patternProperties:
>
> spi-rx-bus-width:
> items:
> - - const: 1
> + enum: [0, 1, 2, 4]
>
> spi-tx-bus-width:
> items:
> - - const: 1
> + enum: [0, 1, 2, 4]
> +
> +allOf:
Please place the allOf after required: block.
> + - $ref: spi-controller.yaml
> + - if:
> + not:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - allwinner,sun50i-r329-spi
> + - allwinner,sun55i-a523-spi
> + then:
> + patternProperties:
> + "^.*@[0-9a-f]+":
> + type: object
type is not needed here, already defined in top-level.
With these two changes:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins
2026-02-27 17:51 ` [PATCH 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins Chen-Yu Tsai
@ 2026-02-28 19:12 ` Jernej Škrabec
0 siblings, 0 replies; 7+ messages in thread
From: Jernej Škrabec @ 2026-02-28 19:12 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Mark Brown, Chen-Yu Tsai
Cc: linux-sunxi, devicetree, linux-spi, linux-arm-kernel,
linux-kernel
Dne petek, 27. februar 2026 ob 18:51:54 Srednjeevropski standardni čas je Chen-Yu Tsai napisal(a):
> The Avaota A1 board uses spi0 on the PJ pins to connect a SPI NAND
> chip.
>
> Add the full set of pins. Even though this board doesn't use CS1, other
> boards may do so in the future.
>
> Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-02-27 17:51 ` [PATCH 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
@ 2026-02-28 19:12 ` Jernej Škrabec
0 siblings, 0 replies; 7+ messages in thread
From: Jernej Škrabec @ 2026-02-28 19:12 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Mark Brown, Chen-Yu Tsai
Cc: linux-sunxi, devicetree, linux-spi, linux-arm-kernel,
linux-kernel
Dne petek, 27. februar 2026 ob 18:51:55 Srednjeevropski standardni čas je Chen-Yu Tsai napisal(a):
> The Avaota A1 board has a SPI NAND chip connected to spi0 on the PJ
> pins with support for QSPI.
>
> Enable spi0 and add a device node for the SPI NAND chip.
>
> Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-02-28 19:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 17:51 [PATCH 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
2026-02-27 17:51 ` [PATCH 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs Chen-Yu Tsai
2026-02-28 11:08 ` Krzysztof Kozlowski
2026-02-27 17:51 ` [PATCH 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins Chen-Yu Tsai
2026-02-28 19:12 ` Jernej Škrabec
2026-02-27 17:51 ` [PATCH 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
2026-02-28 19:12 ` Jernej Škrabec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox