[PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter
Yixun Lan
dlan at kernel.org
Tue Mar 24 02:02:20 PDT 2026
Hi Aurelien,
On 21:28 Sun 22 Mar , Aurelien Jarno wrote:
> 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.
>
So long as this is verified and works fine on board?
> Add a corresponding flash partition layout, matching the layout and the
> names used in the vendor U-Boot.
>
..
> Also add the bootph-pre-ram property to make the device tree usable by
> early firmware/bootloaders without modification, as U-Boot is stored on
> this NOR flash.
Is the dtb file actually used by U-Boot? I'd highly doubt about this,
if not the case or has not been tested, I'd suggest then not to add
this property..
>
> Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
> ---
> .../boot/dts/spacemit/k1-milkv-jupiter.dts | 44 ++++++++++++++++++-
> 1 file changed, 43 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> index 836311c3f035c..05ab5df50be51 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> @@ -173,7 +173,7 @@ buck3_1v8: buck3 {
> regulator-always-on;
> };
>
> - buck4 {
> + buck4_3v3: buck4 {
> regulator-min-microvolt = <500000>;
> regulator-max-microvolt = <3300000>;
> regulator-ramp-delay = <5000>;
> @@ -256,6 +256,48 @@ dldo7 {
> };
> };
>
> +&qspi {
> + pinctrl-names = "default";
> + pinctrl-0 = <&qspi_cfg>;
> + status = "okay";
> +
> + flash at 0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <26500000>;
> + spi-rx-bus-width = <4>;
> + spi-tx-bus-width = <4>;
> + vcc-supply = <&buck4_3v3>; /* QSPI_VCC1833 */
> + m25p,fast-read;
> + bootph-pre-ram;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + bootinfo at 0 {
> + reg = <0x0 0x10000>;
> + };
> + private at 10000 {
> + reg = <0x10000 0x10000>;
> + };
> + fsbl at 20000 {
> + reg = <0x20000 0x40000>;
> + };
> + env at 60000 {
> + reg = <0x60000 0x10000>;
> + };
> + opensbi at 70000 {
> + reg = <0x70000 0x30000>;
> + };
> + uboot at a00000 {
> + reg = <0xa0000 0x760000>;
> + };
> + };
> + };
> +};
> +
> &uart0 {
> pinctrl-names = "default";
> pinctrl-0 = <&uart0_2_cfg>;
> --
> 2.51.0
>
--
Yixun Lan (dlan)
More information about the linux-riscv
mailing list