Skip to content

Commit 2829823

Browse files
aurel32Yixun Lan
authored andcommitted
riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter
Add the QSPI controller node for the Milk-V Jupiter board and describe the attached SPI NOR flash (GD25Q64E). The flash supports a frequency up to 133MHz (80 MHz for reads), and the SoC supports a frequency up to 104 MHz. However tests have shown that the flash is not reliably detected above 26.5 MHz, consistent with frequency used in the vendor kernel. Therefore, use this frequency. The m25p,fast-read properties is taken from the vendor kernel, and the GD25Q64E datasheet confirms tha the fast read opcodes are supported. Add a corresponding flash partition layout, matching the layout and the names used in the vendor U-Boot. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Yixun Lan <dlan@kernel.org> Link: https://lore.kernel.org/r/20260326183745.1370642-5-aurelien@aurel32.net Signed-off-by: Yixun Lan <dlan@kernel.org>
1 parent 7af5ede commit 2829823

1 file changed

Lines changed: 42 additions & 1 deletion

File tree

arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
regulator-always-on;
174174
};
175175

176-
buck4 {
176+
buck4_3v3: buck4 {
177177
regulator-min-microvolt = <500000>;
178178
regulator-max-microvolt = <3300000>;
179179
regulator-ramp-delay = <5000>;
@@ -256,6 +256,47 @@
256256
};
257257
};
258258

259+
&qspi {
260+
pinctrl-names = "default";
261+
pinctrl-0 = <&qspi_cfg>;
262+
status = "okay";
263+
264+
flash@0 {
265+
compatible = "jedec,spi-nor";
266+
reg = <0>;
267+
spi-max-frequency = <26500000>;
268+
spi-rx-bus-width = <4>;
269+
spi-tx-bus-width = <4>;
270+
vcc-supply = <&buck4_3v3>; /* QSPI_VCC1833 */
271+
m25p,fast-read;
272+
273+
partitions {
274+
compatible = "fixed-partitions";
275+
#address-cells = <1>;
276+
#size-cells = <1>;
277+
278+
bootinfo@0 {
279+
reg = <0x0 0x10000>;
280+
};
281+
private@10000 {
282+
reg = <0x10000 0x10000>;
283+
};
284+
fsbl@20000 {
285+
reg = <0x20000 0x40000>;
286+
};
287+
env@60000 {
288+
reg = <0x60000 0x10000>;
289+
};
290+
opensbi@70000 {
291+
reg = <0x70000 0x30000>;
292+
};
293+
uboot@a00000 {
294+
reg = <0xa0000 0x760000>;
295+
};
296+
};
297+
};
298+
};
299+
259300
&uart0 {
260301
pinctrl-names = "default";
261302
pinctrl-0 = <&uart0_2_cfg>;

0 commit comments

Comments
 (0)