| Message ID | 20260511221741.25888-1-andre.przywara@arm.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-23272-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 42B941C0536 for <noreply@patchwork.local>; Tue, 12 May 2026 00:21:10 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=arm.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-23272-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-23272-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 96933301C8A6 for <noreply@patchwork.local>; Mon, 11 May 2026 22:18:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DF3F3C2791; Mon, 11 May 2026 22:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ZHuzlzpa" X-Original-To: linux-sunxi@lists.linux.dev Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A973034751E for <linux-sunxi@lists.linux.dev>; Mon, 11 May 2026 22:18:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778537922; cv=none; b=hph6ZkjNtXv6xhSqujXB63+c4uerceUGE4j09uzEKjwpSl2Nv3xnlrEBQ3eTMnunW+HlEkc0nmy5x6LcOM07UPMFTsHjZ3vq1zeS3kd48U77PlwlPUrqmueBOH1o8/WwwEd3+3jlYaVMgj6P/cyPJLTf64iM0IbFDNpWRcO73Pg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778537922; c=relaxed/simple; bh=gw78jt7vc7Qe2unAjmzAV6lSueBAGQ5VKMrWZ7C8lG8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qnZ2ETQs9Uswet3fxR9HJj4P17M+KPAgFmdlMLJrV4/sYa+Ye934j3gL0PnfTUP/gLe2rJIzQUZ/cLntgVOMvslOOFvSrpafNu4210MPNy/GW37p0PFvJX+fO4G4RuT1XujsYsvs+Jq16JVM+R223Fcv1onqfjRJBELRc0s5d8M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=ZHuzlzpa; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 69CA115A1; Mon, 11 May 2026 15:18:33 -0700 (PDT) Received: from ryzen.fritz.box (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2B853F836; Mon, 11 May 2026 15:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1778537918; bh=gw78jt7vc7Qe2unAjmzAV6lSueBAGQ5VKMrWZ7C8lG8=; h=From:To:Cc:Subject:Date:From; b=ZHuzlzpa/q2kYfPKIy3ZK9p/GeP+9iBl0ufa0na+6i8CPLsnnCsb+sFY9252b8yPk rPs0EgKdA3Uzdv7xvn/jNqbEMyIfFZpUAFMxj4jK87SFhYj9w5Dh5K8GZ7wfu9lc4F ERwrvw4vxpKpZU6DKQUHGhKM+bidYmJZtMPvxlQQ= From: Andre Przywara <andre.przywara@arm.com> To: Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org> Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH] arm64: dts: allwinner: Cubie A5E: enable SPI flash Date: Tue, 12 May 2026 00:17:41 +0200 Message-ID: <20260511221741.25888-1-andre.przywara@arm.com> X-Mailer: git-send-email 2.46.4 Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; MAILLIST(-0.15)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; PRECEDENCE_BULK(0.00)[]; TAGGED_RCPT(0.00)[dt]; DBL_BLOCKED_OPENRESOLVER(0.00)[arm.com:email,arm.com:dkim,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo,0.0.0.0:email]; R_DKIM_ALLOW(0.00)[arm.com:s=foss]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[andre.przywara@arm.com,linux-sunxi@lists.linux.dev]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; DMARC_POLICY_ALLOW(0.00)[arm.com,none]; RCPT_COUNT_SEVEN(0.00)[9]; DKIM_TRACE(0.00)[arm.com:+]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; FORGED_SENDER_MAILLIST(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,gmail.com,sholland.org]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[bounces-23272-noreply=patchwork.local]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCVD_TLS_LAST(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 42B941C0536 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= |
| Series |
arm64: dts: allwinner: Cubie A5E: enable SPI flash
|
|
Commit Message
Andre Przywara
May 11, 2026, 10:17 p.m. UTC
The Cubie A5E board comes with 16MiB of SPI NOR flash.
Enable the SPI0 DT node and describe the configuration.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
.../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Comments
Dne torek, 12. maj 2026 ob 00:17:41 Srednjeevropski poletni čas je Andre Przywara napisal(a): > The Cubie A5E board comes with 16MiB of SPI NOR flash. > > Enable the SPI0 DT node and describe the configuration. > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Best regards, Jernej
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] Missing `spi-rx-bus-width` and `spi-tx-bus-width` properties restrict the SPI flash to 1-bit mode despite hardware Quad SPI configuration. - [Low] Unnecessary `#address-cells` and `#size-cells` defined in the `flash@0` node without child nodes. -- commit 90d57abd1dc9fc1a77a15be6ce437a4b3378df17 Author: Andre Przywara <andre.przywara@arm.com> arm64: dts: allwinner: Cubie A5E: enable SPI flash This commit enables the SPI0 device tree node for the Cubie A5E board. It describes the configuration for the 16MiB SPI NOR flash connected to the SPI0 bus. > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > @@ -344,6 +344,21 @@ &r_pio { > vcc-pm-supply = <®_aldo3>; > }; > > +&spi0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>, > + <&spi0_hold_pc_pin>, <&spi0_wp_pc_pin>; > + status = "okay"; > + > + flash@0 { > + compatible = "winbond,w25q128", "jedec,spi-nor"; > + reg = <0>; > + spi-max-frequency = <40000000>; Since the pinctrl-0 configuration explicitly maps the hardware WP and HOLD pins to the SPI controller, should this node also include spi-rx-bus-width = <4> and spi-tx-bus-width = <4>? Without these properties, the SPI driver defaults to standard 1-bit mode, failing to utilize the board's wired Quad SPI capabilities. Additionally, if the board lacks external pull-ups, could muxing the active-low WP and HOLD pins to the SPI controller in 1-bit mode leave the pins floating and risk unintended write-protect or hold states? > + #address-cells = <1>; > + #size-cells = <1>; This isn't a bug, but since this flash node does not contain any child partition nodes, these #address-cells and #size-cells properties are unnecessary and trigger standard dtc warnings. > + }; > +};
Hi, On Tue, May 12, 2026 at 6:18 AM Andre Przywara <andre.przywara@arm.com> wrote: > > The Cubie A5E board comes with 16MiB of SPI NOR flash. > > Enable the SPI0 DT node and describe the configuration. > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > .../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > index bfdf1728cd14b..7ad22fc85d1fd 100644 > --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > @@ -344,6 +344,21 @@ &r_pio { > vcc-pm-supply = <®_aldo3>; > }; > > +&spi0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>, > + <&spi0_hold_pc_pin>, <&spi0_wp_pc_pin>; This whole thing needs to be an overlay. The HOLD and WP pins conflict with eMMC usage, so it seems that Radxa only populates one or the other. If you look at the pictures on their official website, you'll see the SPI NOR chip populated, but not the eMMC chip. On the linux-sunxi wiki page, you'll see the opposite. And you probably want to enable QSPI, like Sashiko mentioned. ChenYu > + status = "okay"; > + > + flash@0 { > + compatible = "winbond,w25q128", "jedec,spi-nor"; > + reg = <0>; > + spi-max-frequency = <40000000>; > + #address-cells = <1>; > + #size-cells = <1>; > + }; > +}; > + > &uart0 { > pinctrl-names = "default"; > pinctrl-0 = <&uart0_pb_pins>; > -- > 2.46.4 >
Hi Chen-Yu, thanks for chipping in! On 5/13/26 07:21, Chen-Yu Tsai wrote: > Hi, > > On Tue, May 12, 2026 at 6:18 AM Andre Przywara <andre.przywara@arm.com> wrote: >> >> The Cubie A5E board comes with 16MiB of SPI NOR flash. >> >> Enable the SPI0 DT node and describe the configuration. >> >> Signed-off-by: Andre Przywara <andre.przywara@arm.com> >> --- >> .../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts >> index bfdf1728cd14b..7ad22fc85d1fd 100644 >> --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts >> +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts >> @@ -344,6 +344,21 @@ &r_pio { >> vcc-pm-supply = <®_aldo3>; >> }; >> >> +&spi0 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>, >> + <&spi0_hold_pc_pin>, <&spi0_wp_pc_pin>; > > This whole thing needs to be an overlay. The HOLD and WP pins > conflict with eMMC usage, so it seems that Radxa only populates > one or the other. > > If you look at the pictures on their official website, you'll see the > SPI NOR chip populated, but not the eMMC chip. On the linux-sunxi wiki > page, you'll see the opposite. Well, I have a hard time spotting any actual eMMC SKUs in the shops anyway. But you are right, the hold and WP pins conflict with eMMC, whereas the other pins are not. > And you probably want to enable QSPI, like Sashiko mentioned. Well, in the interest of keeping this simple and enabling the usage of SPI flash for all the users out there, I'd rather drop the extra pins. This is mostly really useful for booting the firmware, maybe loading a tiny kernel or other data once, so performance is not a big concern in this use case. The BootROM surely does not use QSPI. And as you say, if people are really interested in the last bit of performance, they can use an overlay. Cheers, Andre > > > ChenYu > > >> + status = "okay"; >> + >> + flash@0 { >> + compatible = "winbond,w25q128", "jedec,spi-nor"; >> + reg = <0>; >> + spi-max-frequency = <40000000>; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + }; >> +}; >> + >> &uart0 { >> pinctrl-names = "default"; >> pinctrl-0 = <&uart0_pb_pins>; >> -- >> 2.46.4 >> >
Looks good. -- Samet > 2026. 5. 12. 오전 2:46, Andre Przywara <andre.przywara@arm.com> 작성: > > The Cubie A5E board comes with 16MiB of SPI NOR flash. > > Enable the SPI0 DT node and describe the configuration. > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > .../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > index bfdf1728cd14b..7ad22fc85d1fd 100644 > --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > @@ -344,6 +344,21 @@ &r_pio { > vcc-pm-supply = <®_aldo3>; > }; > > +&spi0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>, > + <&spi0_hold_pc_pin>, <&spi0_wp_pc_pin>; > + status = "okay"; > + > + flash@0 { > + compatible = "winbond,w25q128", "jedec,spi-nor"; > + reg = <0>; > + spi-max-frequency = <40000000>; > + #address-cells = <1>; > + #size-cells = <1>; > + }; > +}; > + > &uart0 { > pinctrl-names = "default"; > pinctrl-0 = <&uart0_pb_pins>; > -- > 2.46.4 > >
On Wed, May 13, 2026 at 5:19 PM Andre Przywara <andre.przywara@arm.com> wrote: > > Hi Chen-Yu, > > thanks for chipping in! > > On 5/13/26 07:21, Chen-Yu Tsai wrote: > > Hi, > > > > On Tue, May 12, 2026 at 6:18 AM Andre Przywara <andre.przywara@arm.com> wrote: > >> > >> The Cubie A5E board comes with 16MiB of SPI NOR flash. > >> > >> Enable the SPI0 DT node and describe the configuration. > >> > >> Signed-off-by: Andre Przywara <andre.przywara@arm.com> > >> --- > >> .../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 15 +++++++++++++++ > >> 1 file changed, 15 insertions(+) > >> > >> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > >> index bfdf1728cd14b..7ad22fc85d1fd 100644 > >> --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > >> +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > >> @@ -344,6 +344,21 @@ &r_pio { > >> vcc-pm-supply = <®_aldo3>; > >> }; > >> > >> +&spi0 { > >> + pinctrl-names = "default"; > >> + pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>, > >> + <&spi0_hold_pc_pin>, <&spi0_wp_pc_pin>; > > > > This whole thing needs to be an overlay. The HOLD and WP pins > > conflict with eMMC usage, so it seems that Radxa only populates > > one or the other. > > > > If you look at the pictures on their official website, you'll see the > > SPI NOR chip populated, but not the eMMC chip. On the linux-sunxi wiki > > page, you'll see the opposite. > > Well, I have a hard time spotting any actual eMMC SKUs in the shops anyway. > But you are right, the hold and WP pins conflict with eMMC, whereas the > other pins are not. > > > And you probably want to enable QSPI, like Sashiko mentioned. > > Well, in the interest of keeping this simple and enabling the usage of > SPI flash for all the users out there, I'd rather drop the extra pins. > This is mostly really useful for booting the firmware, maybe loading a > tiny kernel or other data once, so performance is not a big concern in > this use case. The BootROM surely does not use QSPI. Given that the pins are tied on physically, if someone then enables mmc2 for a potentially present eMMC, the two pins could be toggled by the MMC controller, causing the flash to misbehave. I'm slightly concerned about this possibility. ChenYu > And as you say, if people are really interested in the last bit of > performance, they can use an overlay. > > Cheers, > Andre > > > > > > > ChenYu > > > > > >> + status = "okay"; > >> + > >> + flash@0 { > >> + compatible = "winbond,w25q128", "jedec,spi-nor"; > >> + reg = <0>; > >> + spi-max-frequency = <40000000>; > >> + #address-cells = <1>; > >> + #size-cells = <1>; > >> + }; > >> +}; > >> + > >> &uart0 { > >> pinctrl-names = "default"; > >> pinctrl-0 = <&uart0_pb_pins>; > >> -- > >> 2.46.4 > >> > > >
On Sat, 16 May 2026 00:12:17 +0800 Chen-Yu Tsai <wens@kernel.org> wrote: > On Wed, May 13, 2026 at 5:19 PM Andre Przywara <andre.przywara@arm.com> wrote: > > > > Hi Chen-Yu, > > > > thanks for chipping in! > > > > On 5/13/26 07:21, Chen-Yu Tsai wrote: > > > Hi, > > > > > > On Tue, May 12, 2026 at 6:18 AM Andre Przywara <andre.przywara@arm.com> wrote: > > >> > > >> The Cubie A5E board comes with 16MiB of SPI NOR flash. > > >> > > >> Enable the SPI0 DT node and describe the configuration. > > >> > > >> Signed-off-by: Andre Przywara <andre.przywara@arm.com> > > >> --- > > >> .../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 15 +++++++++++++++ > > >> 1 file changed, 15 insertions(+) > > >> > > >> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > > >> index bfdf1728cd14b..7ad22fc85d1fd 100644 > > >> --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > > >> +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > > >> @@ -344,6 +344,21 @@ &r_pio { > > >> vcc-pm-supply = <®_aldo3>; > > >> }; > > >> > > >> +&spi0 { > > >> + pinctrl-names = "default"; > > >> + pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>, > > >> + <&spi0_hold_pc_pin>, <&spi0_wp_pc_pin>; > > > > > > This whole thing needs to be an overlay. The HOLD and WP pins > > > conflict with eMMC usage, so it seems that Radxa only populates > > > one or the other. > > > > > > If you look at the pictures on their official website, you'll see the > > > SPI NOR chip populated, but not the eMMC chip. On the linux-sunxi wiki > > > page, you'll see the opposite. > > > > Well, I have a hard time spotting any actual eMMC SKUs in the shops anyway. > > But you are right, the hold and WP pins conflict with eMMC, whereas the > > other pins are not. > > > > > And you probably want to enable QSPI, like Sashiko mentioned. > > > > Well, in the interest of keeping this simple and enabling the usage of > > SPI flash for all the users out there, I'd rather drop the extra pins. > > This is mostly really useful for booting the firmware, maybe loading a > > tiny kernel or other data once, so performance is not a big concern in > > this use case. The BootROM surely does not use QSPI. > > Given that the pins are tied on physically, if someone then enables mmc2 > for a potentially present eMMC, the two pins could be toggled by the > MMC controller, causing the flash to misbehave. I'm slightly concerned > about this possibility. That's a good point, but that means it's really a hardware design issue: you cannot have SPI together with eMMC on this board. I don't know if Radxa ships the eMMC SKUs without SPI flash, I will try to query Tom Cubie about this. I would prefer to go with SPI flash, at least for now: I think that's what most users have, and the eMMC versions are rare so far? Since we don't have an eMMC node in the DT anyway, that should be fine for now. If someone adds eMMC support later, we would need to figure this out. We could mark one as disabled, and leave it up to users (or U-Boot) to decide which to enable. On the H6 there is a similar problem: PC5 is both SPI0_CS and MMC2_CMD, so on the PineH64 we disable the SPI flash, in favour of eMMC, which is more useful for users (but sunxi-fel SPI access and U-Boot SPI loading work nevertheless). But given the apparent prevalence of SPI boards vs. those with eMMC for the Cubie A5E, I would go with SPI on this one. Does that make sense? Any thoughts? Cheers, Andre > > And as you say, if people are really interested in the last bit of > > performance, they can use an overlay. > > > > Cheers, > > Andre > > > > > > > > > > > ChenYu > > > > > > > > >> + status = "okay"; > > >> + > > >> + flash@0 { > > >> + compatible = "winbond,w25q128", "jedec,spi-nor"; > > >> + reg = <0>; > > >> + spi-max-frequency = <40000000>; > > >> + #address-cells = <1>; > > >> + #size-cells = <1>; > > >> + }; > > >> +}; > > >> + > > >> &uart0 { > > >> pinctrl-names = "default"; > > >> pinctrl-0 = <&uart0_pb_pins>; > > >> -- > > >> 2.46.4 > > >> > > > > > >
On Sat, May 16, 2026 at 5:52 AM Andre Przywara <andre.przywara@arm.com> wrote: > > On Sat, 16 May 2026 00:12:17 +0800 > Chen-Yu Tsai <wens@kernel.org> wrote: > > > On Wed, May 13, 2026 at 5:19 PM Andre Przywara <andre.przywara@arm.com> wrote: > > > > > > Hi Chen-Yu, > > > > > > thanks for chipping in! > > > > > > On 5/13/26 07:21, Chen-Yu Tsai wrote: > > > > Hi, > > > > > > > > On Tue, May 12, 2026 at 6:18 AM Andre Przywara <andre.przywara@arm.com> wrote: > > > >> > > > >> The Cubie A5E board comes with 16MiB of SPI NOR flash. > > > >> > > > >> Enable the SPI0 DT node and describe the configuration. > > > >> > > > >> Signed-off-by: Andre Przywara <andre.przywara@arm.com> > > > >> --- > > > >> .../boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 15 +++++++++++++++ > > > >> 1 file changed, 15 insertions(+) > > > >> > > > >> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > > > >> index bfdf1728cd14b..7ad22fc85d1fd 100644 > > > >> --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > > > >> +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts > > > >> @@ -344,6 +344,21 @@ &r_pio { > > > >> vcc-pm-supply = <®_aldo3>; > > > >> }; > > > >> > > > >> +&spi0 { > > > >> + pinctrl-names = "default"; > > > >> + pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>, > > > >> + <&spi0_hold_pc_pin>, <&spi0_wp_pc_pin>; > > > > > > > > This whole thing needs to be an overlay. The HOLD and WP pins > > > > conflict with eMMC usage, so it seems that Radxa only populates > > > > one or the other. > > > > > > > > If you look at the pictures on their official website, you'll see the > > > > SPI NOR chip populated, but not the eMMC chip. On the linux-sunxi wiki > > > > page, you'll see the opposite. > > > > > > Well, I have a hard time spotting any actual eMMC SKUs in the shops anyway. > > > But you are right, the hold and WP pins conflict with eMMC, whereas the > > > other pins are not. > > > > > > > And you probably want to enable QSPI, like Sashiko mentioned. > > > > > > Well, in the interest of keeping this simple and enabling the usage of > > > SPI flash for all the users out there, I'd rather drop the extra pins. > > > This is mostly really useful for booting the firmware, maybe loading a > > > tiny kernel or other data once, so performance is not a big concern in > > > this use case. The BootROM surely does not use QSPI. > > > > Given that the pins are tied on physically, if someone then enables mmc2 > > for a potentially present eMMC, the two pins could be toggled by the > > MMC controller, causing the flash to misbehave. I'm slightly concerned > > about this possibility. > > That's a good point, but that means it's really a hardware design > issue: you cannot have SPI together with eMMC on this board. > > I don't know if Radxa ships the eMMC SKUs without SPI flash, I > will try to query Tom Cubie about this. > > I would prefer to go with SPI flash, at least for now: I think that's > what most users have, and the eMMC versions are rare so far? Since we > don't have an eMMC node in the DT anyway, that should be fine for now. > If someone adds eMMC support later, we would need to figure this out. > We could mark one as disabled, and leave it up to users (or U-Boot) > to decide which to enable. > On the H6 there is a similar problem: PC5 is both SPI0_CS and MMC2_CMD, > so on the PineH64 we disable the SPI flash, in favour of eMMC, which is > more useful for users (but sunxi-fel SPI access and U-Boot SPI loading > work nevertheless). But given the apparent prevalence of SPI boards vs. > those with eMMC for the Cubie A5E, I would go with SPI on this one. > > Does that make sense? Any thoughts? In that case it might be better to enable it with full QSPI. The pin conflicts can also serve as a lockout against enabling both. Just need to document it properly. ChenYu > Cheers, > Andre > > > > And as you say, if people are really interested in the last bit of > > > performance, they can use an overlay. > > > > > > Cheers, > > > Andre > > > > > > > > > > > > > > > ChenYu > > > > > > > > > > > >> + status = "okay"; > > > >> + > > > >> + flash@0 { > > > >> + compatible = "winbond,w25q128", "jedec,spi-nor"; > > > >> + reg = <0>; > > > >> + spi-max-frequency = <40000000>; > > > >> + #address-cells = <1>; > > > >> + #size-cells = <1>; > > > >> + }; > > > >> +}; > > > >> + > > > >> &uart0 { > > > >> pinctrl-names = "default"; > > > >> pinctrl-0 = <&uart0_pb_pins>; > > > >> -- > > > >> 2.46.4 > > > >> > > > > > > > > > >
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts index bfdf1728cd14b..7ad22fc85d1fd 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts @@ -344,6 +344,21 @@ &r_pio { vcc-pm-supply = <®_aldo3>; }; +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pc_pins>, <&spi0_cs0_pc_pin>, + <&spi0_hold_pc_pin>, <&spi0_wp_pc_pin>; + status = "okay"; + + flash@0 { + compatible = "winbond,w25q128", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + #address-cells = <1>; + #size-cells = <1>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>;