mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines
@ 2026-11-19  5:29 Arun Iyengar via B4 Relay
  2026-11-19  5:29 ` [PATCH v2 1/2] arm64: dts: allwinner: orangepi-zero2: Reference the SPI NOR by label Arun Iyengar via B4 Relay
  2026-11-19  5:29 ` [PATCH v2 2/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines Arun Iyengar via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-19  5:29 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Andre Przywara, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Arun Iyengar

Andre Przywara reviewed v1 and suggested labelling the flash node (patch
1) and setting spi-rx-bus-width in the dtsi shared with the Zero3 (patch 2).

spi-rx-bus-width = <2> needs the binding patch of [1] (acked, not applied
yet) to pass dtbs_check.
Without the driver patch of [1] the driver ignores the setting.

Tested on an Orange Pi Zero2 only, with [1]: 1-1-2 reads (opcode 0x3b),
two 2 MiB reads identical to an earlier dump.

[1] https://lore.kernel.org/r/20261116-spi-sun6i-h616-dual-read-v2-0-e0c66eb71e20@gmail.com

Developed with Claude (Anthropic), which wrote the patches and commit
messages. I reviewed them.

---
Changes in v2:
- Label the flash node, no nested &spi0 override (Andre)
- spi-rx-bus-width moved to the shared dtsi, Zero3 included (Andre;
  he read 16 MB on a Zero3 in 1.8 s instead of 3.5 s)
- Dropped the driver dependency (Andre); the binding is still needed for dtbs_check
- Link to v1: https://patch.msgid.link/20261118-zero2-spi-nor-dual-read-v1-1-bcdcbf785be0@gmail.com

---
Arun Iyengar (2):
      arm64: dts: allwinner: orangepi-zero2: Reference the SPI NOR by label
      arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines

 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi |  3 ++-
 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 10 ++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
---
base-commit: 90e0d3fd460ec365617982b56bd7ea5179b36197
change-id: 20261115-zero2-spi-nor-dual-read-645a6de25e81
prerequisite-patch-id: 28b145097d0f859e5bd27bcc5028d0915f3ba4bd

Best regards,
--  
Arun Iyengar <aiyengar1990@gmail.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] arm64: dts: allwinner: orangepi-zero2: Reference the SPI NOR by label
  2026-11-19  5:29 [PATCH v2 0/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines Arun Iyengar via B4 Relay
@ 2026-11-19  5:29 ` Arun Iyengar via B4 Relay
  2026-11-19 11:19   ` Andre Przywara
  2026-11-19  5:29 ` [PATCH v2 2/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines Arun Iyengar via B4 Relay
  1 sibling, 1 reply; 5+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-19  5:29 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Andre Przywara, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Arun Iyengar

From: Arun Iyengar <aiyengar1990@gmail.com>

Andre Przywara suggested labelling the flash node, so the Zero2 sets its
supply through the label instead of nesting flash@0 in &spi0.

Suggested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi |  2 +-
 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
index 0d3e761f6466..646d92e0f724 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
@@ -104,7 +104,7 @@ &spi0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
 
-	flash@0 {
+	flash: flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
index 90c25e12e189..59bbb09bcdbf 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
@@ -24,6 +24,10 @@ &emac0 {
 	phy-supply = <&reg_dcdce>;
 };
 
+&flash {
+	vcc-supply = <&reg_aldo1>;
+};
+
 &gpu {
 	mali-supply = <&reg_dcdcc>;
 };
@@ -147,9 +151,3 @@ &pio {
 	vcc-ph-supply = <&reg_aldo1>;
 	vcc-pi-supply = <&reg_aldo1>;
 };
-
-&spi0 {
-	flash@0 {
-		vcc-supply = <&reg_aldo1>;
-	};
-};

-- 
2.55.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines
  2026-11-19  5:29 [PATCH v2 0/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines Arun Iyengar via B4 Relay
  2026-11-19  5:29 ` [PATCH v2 1/2] arm64: dts: allwinner: orangepi-zero2: Reference the SPI NOR by label Arun Iyengar via B4 Relay
@ 2026-11-19  5:29 ` Arun Iyengar via B4 Relay
  2026-11-19 11:21   ` Andre Przywara
  1 sibling, 1 reply; 5+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-19  5:29 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: Andre Przywara, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Arun Iyengar

From: Arun Iyengar <aiyengar1990@gmail.com>

WP# and HOLD# are tied to VCC on the Zero2 (schematic v1.3), so read over
two lines. Andre Przywara pointed out that the Zero3 is the same.

Suggested-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
index 646d92e0f724..4a588c44d029 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
@@ -110,6 +110,7 @@ flash: flash@0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
+		spi-rx-bus-width = <2>;
 	};
 };
 

-- 
2.55.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] arm64: dts: allwinner: orangepi-zero2: Reference the SPI NOR by label
  2026-11-19  5:29 ` [PATCH v2 1/2] arm64: dts: allwinner: orangepi-zero2: Reference the SPI NOR by label Arun Iyengar via B4 Relay
@ 2026-11-19 11:19   ` Andre Przywara
  0 siblings, 0 replies; 5+ messages in thread
From: Andre Przywara @ 2026-11-19 11:19 UTC (permalink / raw)
  To: aiyengar1990, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel

Hi Arun,

thanks for the changes and the respin!

On 11/19/26 06:29, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
> 
> Andre Przywara suggested labelling the flash node, so the Zero2 sets its
> supply through the label instead of nesting flash@0 in &spi0.
> 
> Suggested-by: Andre Przywara <andre.przywara@arm.com>
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
>   arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi |  2 +-
>   arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 10 ++++------
>   2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
> index 0d3e761f6466..646d92e0f724 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
> @@ -104,7 +104,7 @@ &spi0 {
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
>   
> -	flash@0 {
> +	flash: flash@0 {

I feel like "spi_flash" would be a better, more specific label to use, 
"flash" is a bit generic.

>   		#address-cells = <1>;
>   		#size-cells = <1>;
>   		compatible = "jedec,spi-nor";
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
> index 90c25e12e189..59bbb09bcdbf 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
> @@ -24,6 +24,10 @@ &emac0 {
>   	phy-supply = <&reg_dcdce>;
>   };
>   
> +&flash {
> +	vcc-supply = <&reg_aldo1>;
> +};
> +

Could you do me a favour and add the OrangePi Zero3 regulator as well, 
to sun50i-h618-orangepi-zero3.dts? It's also reg_aldo1, although that's 
a different PMIC, so actually a different regulator, and so should stay 
in the board specific .dts (even though the lines look the same).
That saves me from sending a follow-up patch with a dependency.

Otherwise the patch looks alright!

Thanks,
Andre.

>   &gpu {
>   	mali-supply = <&reg_dcdcc>;
>   };
> @@ -147,9 +151,3 @@ &pio {
>   	vcc-ph-supply = <&reg_aldo1>;
>   	vcc-pi-supply = <&reg_aldo1>;
>   };
> -
> -&spi0 {
> -	flash@0 {
> -		vcc-supply = <&reg_aldo1>;
> -	};
> -};
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines
  2026-11-19  5:29 ` [PATCH v2 2/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines Arun Iyengar via B4 Relay
@ 2026-11-19 11:21   ` Andre Przywara
  0 siblings, 0 replies; 5+ messages in thread
From: Andre Przywara @ 2026-11-19 11:21 UTC (permalink / raw)
  To: aiyengar1990, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel

Hi,

On 11/19/26 06:29, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
> 
> WP# and HOLD# are tied to VCC on the Zero2 (schematic v1.3), so read over
> two lines. Andre Przywara pointed out that the Zero3 is the same.
> 
> Suggested-by: Andre Przywara <andre.przywara@arm.com>
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>

You can drop the Suggested-by:, as the whole thing was your idea, and I 
just suggested the move.

Feel free to add:
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>   arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
> index 646d92e0f724..4a588c44d029 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
> @@ -110,6 +110,7 @@ flash: flash@0 {
>   		compatible = "jedec,spi-nor";
>   		reg = <0>;
>   		spi-max-frequency = <40000000>;
> +		spi-rx-bus-width = <2>;
>   	};
>   };
>   
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-19 11:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19  5:29 [PATCH v2 0/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines Arun Iyengar via B4 Relay
2026-11-19  5:29 ` [PATCH v2 1/2] arm64: dts: allwinner: orangepi-zero2: Reference the SPI NOR by label Arun Iyengar via B4 Relay
2026-11-19 11:19   ` Andre Przywara
2026-11-19  5:29 ` [PATCH v2 2/2] arm64: dts: allwinner: orangepi-zero2/zero3: Read the SPI NOR over two lines Arun Iyengar via B4 Relay
2026-11-19 11:21   ` Andre Przywara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®