Skip to contentSkip to conversation

arm: dts: xilinx: parallella: Enable QSPI and NOR flash

PATCH Applied Aleksander Jan Bajkowski 3 participants 3 messages Sep 17 – Nov 4

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: dts: xilinx: parallella: Enable QSPI and NOR flash

The Parallella board has a SPI-NOR flash connected to the QSPI controller. Enable the QSPI controller and add the corresponding SPI-NOR flash node to allow the system to access it.

---
 arch/arm/boot/dts/xilinx/zynq-parallella.dts | 33 ++++++++++++++++++++
 1 file changed, 33 insertions(+)
arch/arm/boot/dts/xilinx/zynq-parallella.dts +33 -0
index 366af4fcf8d9..1903aa1cd83b 100644
@@ -78,6 +78,39 @@ ldo2 {
 	};
 };
 
+&qspi {
+	bootph-all;
+	status = "okay";
+	num-cs = <1>;
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+		spi-max-frequency = <50000000>;
+		m25p,fast-read;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "uboot";
+				reg = <0x0 0x4e0000>;
+				read-only;
+			};
+
+			partition@4e0000 {
+				label = "uboot-env";
+				reg = <0x4e0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+};
+
 &sdhci1 {
 	status = "okay";
 };
Signature · 1 line
2.53.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] dts: uboot-env partition is marked read-only preventing fw_setenv updates --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dts: uboot-env partition is marked read-only preventing fw_setenv updates --

commit be87c0d3af6ecbab826ce9e10b9f662f4e9662e5
Author: Aleksander Jan Bajkowski <[email protected]>

arm: dts: xilinx: parallella: Enable QSPI and NOR flash

This commit enables the QSPI controller on the Parallella board and adds the corresponding SPI-NOR flash node along with its fixed partitions.

Quoted 3 lines
arch/arm/boot/dts/xilinx/zynq-parallella.dts +0 -0

[ ... ]

Quoted 5 lines
arch/arm/boot/dts/xilinx/zynq-parallella.dts +5 -0
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+

arch/arm/boot/dts/xilinx/zynq-parallella.dts ldo2 { · line 108

Quoted 10 lines
arch/arm/boot/dts/xilinx/zynq-parallella.dts +10 -0
+			partition@0 {
+				label = "uboot";
+				reg = <0x0 0x4e0000>;
+				read-only;
+			};
+
+			partition@4e0000 {
+				label = "uboot-env";
+				reg = <0x4e0000 0x10000>;
+				read-only;

[Severity: Medium]
Will this prevent standard userspace tools like fw_setenv from updating the U-Boot environment?

The kernel MTD subsystem parses the read-only property and clears the MTD_WRITEABLE flag for this partition. If a root user attempts to open or write to the corresponding /dev/mtdX device, the operation will fail with -EROFS or -EPERM.

While some board configurations intentionally restrict write access to the bootloader environment as a policy choice, is it intended to structurally prevent dynamic updates from Linux on the Parallella board?

Quoted 4 lines
arch/arm/boot/dts/xilinx/zynq-parallella.dts +4 -0
+			};
+		};
+	};
+};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to Aleksander Jan Bajkowski
Quoted 8 lines · Aleksander Jan Bajkowski

The Parallella board has a SPI-NOR flash connected to the QSPI controller. Enable the QSPI controller and add the corresponding SPI-NOR flash node to allow the system to access it.

---
  arch/arm/boot/dts/xilinx/zynq-parallella.dts | 33 ++++++++++++++++++++
  1 file changed, 33 insertions(+)

Applied.
M