* [PATCH v2 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
2026-03-02 15:35 [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
@ 2026-03-02 15:35 ` Chen-Yu Tsai
2026-03-02 15:35 ` [PATCH v2 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins Chen-Yu Tsai
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Chen-Yu Tsai @ 2026-03-02 15:35 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Mark Brown
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-sunxi,
devicetree, linux-spi, linux-arm-kernel, linux-kernel,
Krzysztof Kozlowski
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.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
---
Changes since v1:
- Moved "allOf:" block after "required:" block
- Dropped "type:" from child node in conditional block
---
.../bindings/spi/allwinner,sun6i-a31-spi.yaml | 29 +++++++++++++++----
1 file changed, 24 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..6af4ff233158 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,11 @@ 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]
required:
- compatible
@@ -95,6 +92,28 @@ required:
- clocks
- clock-names
+allOf:
+ - $ref: spi-controller.yaml
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - allwinner,sun50i-r329-spi
+ - allwinner,sun55i-a523-spi
+ then:
+ patternProperties:
+ "^.*@[0-9a-f]+":
+ properties:
+ spi-rx-bus-width:
+ items:
+ enum: [0, 1]
+
+ spi-tx-bus-width:
+ items:
+ enum: [0, 1]
+
unevaluatedProperties: false
examples:
--
2.47.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins
2026-03-02 15:35 [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
2026-03-02 15:35 ` [PATCH v2 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs Chen-Yu Tsai
@ 2026-03-02 15:35 ` Chen-Yu Tsai
2026-03-02 15:35 ` [PATCH v2 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Chen-Yu Tsai @ 2026-03-02 15:35 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Mark Brown
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-sunxi,
devicetree, linux-spi, linux-arm-kernel, linux-kernel,
Jernej Skrabec
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.
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
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 92aecb90d4e1..da85cecb66c0 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -228,6 +228,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";
@@ -235,6 +242,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";
@@ -242,6 +256,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 */
@@ -250,6 +271,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 */
@@ -258,6 +286,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] 11+ messages in thread* [PATCH v2 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-03-02 15:35 [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
2026-03-02 15:35 ` [PATCH v2 1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs Chen-Yu Tsai
2026-03-02 15:35 ` [PATCH v2 2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins Chen-Yu Tsai
@ 2026-03-02 15:35 ` Chen-Yu Tsai
2026-03-10 19:41 ` [PATCH v2 0/3] arm64: " Chen-Yu Tsai
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Chen-Yu Tsai @ 2026-03-02 15:35 UTC (permalink / raw)
To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Mark Brown
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-sunxi,
devicetree, linux-spi, linux-arm-kernel, linux-kernel,
Jernej Skrabec
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.
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
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] 11+ messages in thread* Re: [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-03-02 15:35 [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
` (2 preceding siblings ...)
2026-03-02 15:35 ` [PATCH v2 3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
@ 2026-03-10 19:41 ` Chen-Yu Tsai
2026-03-10 19:42 ` Mark Brown
2026-03-11 18:57 ` (subset) " Mark Brown
2026-03-14 21:59 ` Mark Brown
5 siblings, 1 reply; 11+ messages in thread
From: Chen-Yu Tsai @ 2026-03-10 19:41 UTC (permalink / raw)
To: Jernej Skrabec, Samuel Holland, Mark Brown, Chen-Yu Tsai
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-sunxi,
devicetree, linux-spi, linux-arm-kernel, linux-kernel
On Mon, 02 Mar 2026 23:35:55 +0800, Chen-Yu Tsai wrote:
> This is v2 of my Avaota A1 SPI NAND enablement series.
>
> Changes since v1:
> - DT bindings (Krzysztof)
> - Moved "allOf:" block after "required:" block
> - Dropped "type:" from child node in conditional block
> - Collected tags
> - Link to v1:
> https://lore.kernel.org/linux-sunxi/20260227175157.2339758-1-wens@kernel.org/
>
> [...]
Applied to sunxi/dt-for-7.1 in local tree, thanks!
[1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
commit: e2f93f45d38f7b6dacb44203cfc7bb5d7e287b8e
[2/3] arm64: dts: allwinner: sun55i-a523: Add pinmux for spi0 on PJ pins
commit: 1a5ff6a0a8c2a0dc9f2d55039997c1cd928eb53c
[3/3] arm64: dts: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
commit: 1b07332bf2ee816130e139a8966d312bf1aa32f9
Best regards,
--
Chen-Yu Tsai <wens@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-03-10 19:41 ` [PATCH v2 0/3] arm64: " Chen-Yu Tsai
@ 2026-03-10 19:42 ` Mark Brown
2026-03-10 19:44 ` Chen-Yu Tsai
0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2026-03-10 19:42 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-sunxi, devicetree, linux-spi,
linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 233 bytes --]
On Wed, Mar 11, 2026 at 03:41:07AM +0800, Chen-Yu Tsai wrote:
> [1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
> commit: e2f93f45d38f7b6dacb44203cfc7bb5d7e287b8e
I'd have expected to take this one?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-03-10 19:42 ` Mark Brown
@ 2026-03-10 19:44 ` Chen-Yu Tsai
2026-03-10 19:47 ` Mark Brown
0 siblings, 1 reply; 11+ messages in thread
From: Chen-Yu Tsai @ 2026-03-10 19:44 UTC (permalink / raw)
To: Mark Brown
Cc: Jernej Skrabec, Samuel Holland, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-sunxi, devicetree, linux-spi,
linux-arm-kernel, linux-kernel
On Wed, Mar 11, 2026 at 3:42 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Wed, Mar 11, 2026 at 03:41:07AM +0800, Chen-Yu Tsai wrote:
>
> > [1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
> > commit: e2f93f45d38f7b6dacb44203cfc7bb5d7e287b8e
>
> I'd have expected to take this one?
Normally you merge patches pretty quickly, so I thought maybe you weren't
going to take this one.
I can back it out if you want to take it through the SPI tree.
Thanks
ChenYu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-03-10 19:44 ` Chen-Yu Tsai
@ 2026-03-10 19:47 ` Mark Brown
2026-03-10 19:49 ` Chen-Yu Tsai
0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2026-03-10 19:47 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Jernej Skrabec, Samuel Holland, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-sunxi, devicetree, linux-spi,
linux-arm-kernel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]
On Wed, Mar 11, 2026 at 03:44:01AM +0800, Chen-Yu Tsai wrote:
> On Wed, Mar 11, 2026 at 3:42 AM Mark Brown <broonie@kernel.org> wrote:
> > On Wed, Mar 11, 2026 at 03:41:07AM +0800, Chen-Yu Tsai wrote:
> > > [1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
> > > commit: e2f93f45d38f7b6dacb44203cfc7bb5d7e287b8e
> > I'd have expected to take this one?
> Normally you merge patches pretty quickly, so I thought maybe you weren't
> going to take this one.
I tend to leave a week or two if I think it's likely someone's going to
review.
> I can back it out if you want to take it through the SPI tree.
Probably safer for conflicts.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-03-10 19:47 ` Mark Brown
@ 2026-03-10 19:49 ` Chen-Yu Tsai
0 siblings, 0 replies; 11+ messages in thread
From: Chen-Yu Tsai @ 2026-03-10 19:49 UTC (permalink / raw)
To: Mark Brown
Cc: Jernej Skrabec, Samuel Holland, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-sunxi, devicetree, linux-spi,
linux-arm-kernel, linux-kernel
On Wed, Mar 11, 2026 at 3:48 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Wed, Mar 11, 2026 at 03:44:01AM +0800, Chen-Yu Tsai wrote:
> > On Wed, Mar 11, 2026 at 3:42 AM Mark Brown <broonie@kernel.org> wrote:
> > > On Wed, Mar 11, 2026 at 03:41:07AM +0800, Chen-Yu Tsai wrote:
>
> > > > [1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
> > > > commit: e2f93f45d38f7b6dacb44203cfc7bb5d7e287b8e
>
> > > I'd have expected to take this one?
>
> > Normally you merge patches pretty quickly, so I thought maybe you weren't
> > going to take this one.
>
> I tend to leave a week or two if I think it's likely someone's going to
> review.
>
> > I can back it out if you want to take it through the SPI tree.
>
> Probably safer for conflicts.
Now backed out.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: (subset) [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-03-02 15:35 [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
` (3 preceding siblings ...)
2026-03-10 19:41 ` [PATCH v2 0/3] arm64: " Chen-Yu Tsai
@ 2026-03-11 18:57 ` Mark Brown
2026-03-14 21:59 ` Mark Brown
5 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2026-03-11 18:57 UTC (permalink / raw)
To: Jernej Skrabec, Samuel Holland, Chen-Yu Tsai
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-sunxi,
devicetree, linux-spi, linux-arm-kernel, linux-kernel
On Mon, 02 Mar 2026 23:35:55 +0800, Chen-Yu Tsai wrote:
> This is v2 of my Avaota A1 SPI NAND enablement series.
>
> Changes since v1:
> - DT bindings (Krzysztof)
> - Moved "allOf:" block after "required:" block
> - Dropped "type:" from child node in conditional block
> - Collected tags
> - Link to v1:
> https://lore.kernel.org/linux-sunxi/20260227175157.2339758-1-wens@kernel.org/
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
commit: 743956bb9990214ff1dac66ef59e27221dc3c2d8
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: (subset) [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
2026-03-02 15:35 [PATCH v2 0/3] arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND Chen-Yu Tsai
` (4 preceding siblings ...)
2026-03-11 18:57 ` (subset) " Mark Brown
@ 2026-03-14 21:59 ` Mark Brown
5 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2026-03-14 21:59 UTC (permalink / raw)
To: Jernej Skrabec, Samuel Holland, Chen-Yu Tsai
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-sunxi,
devicetree, linux-spi, linux-arm-kernel, linux-kernel
On Mon, 02 Mar 2026 23:35:55 +0800, Chen-Yu Tsai wrote:
> arm64: allwinner: sun55i-t527: avaota-a1: Add SPI NAND
>
> Hi,
>
> This is v2 of my Avaota A1 SPI NAND enablement series.
>
> Changes since v1:
> - DT bindings (Krzysztof)
> - Moved "allOf:" block after "required:" block
> - Dropped "type:" from child node in conditional block
> - Collected tags
> - Link to v1:
> https://lore.kernel.org/linux-sunxi/20260227175157.2339758-1-wens@kernel.org/
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.0
Thanks!
[1/3] spi: dt-bindings: sun6i: Allow Dual SPI and Quad SPI for newer SoCs
https://git.kernel.org/broonie/misc/c/743956bb9990
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 11+ messages in thread