Skip to contentSkip to conversation

HSD #1507453717: arm: socfpga: stratix10: add QSPI boot feature

PATCH New Jit Loon Lim 1 participant 2 messages Sep 6, 2022 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 HSD #1507453717: arm: socfpga: stratix10: add QSPI boot feature

From: "Ooi, Joyce" <[email protected]>

This patch adds the QSPI boot feature for Stratix10

---
 arch/arm/dts/Makefile                         |  3 +-
 arch/arm/dts/socfpga_stratix10_socdk_qspi.dts | 14 ++++
 configs/socfpga_stratix10_qspi_defconfig      | 73 +++++++++++++++++++
 include/configs/socfpga_soc64_common.h        |  8 ++
 4 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/socfpga_stratix10_socdk_qspi.dts
 create mode 100644 configs/socfpga_stratix10_qspi_defconfig
arch/arm/dts/Makefile +2 -1
index ceaa39e4b4..c58acb480d 100644
@@ -436,7 +436,8 @@ dtb-$(CONFIG_ARCH_SOCFPGA) +=				\
 	socfpga_cyclone5_sr1500.dtb			\
 	socfpga_cyclone5_vining_fpga.dtb		\
 	socfpga_n5x_socdk.dtb				\
-	socfpga_stratix10_socdk.dtb
+	socfpga_stratix10_socdk.dtb			\
+	socfpga_stratix10_socdk_qspi.dtb
 
 dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb	\
 	dra72-evm-revc.dtb dra71-evm.dtb dra76-evm.dtb
arch/arm/dts/socfpga_stratix10_socdk_qspi.dts new file +14 -0
new file mode 100644
index 0000000000..729b9e5b84
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2019 Intel Corporation
+ */
+
+#include "socfpga_stratix10_socdk.dts"
+#include "socfpga_stratix10_socdk-u-boot.dtsi"
+
+/ {
+	chosen {
+		u-boot,boot0 = <&flash0>;
+	};
+
+};
configs/socfpga_stratix10_qspi_defconfig new file +73 -0

73 lines not on this page · raw message

include/configs/socfpga_soc64_common.h +8 -0
index 06198ddd82..c966d31362 100644
@@ -37,6 +37,14 @@
  * Environment variable
  */
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	"qspibootimageaddr=0x020B0000\0" \
+	"qspifdtaddr=0x02090000\0" \
+	"bootimagesize=0x01400000\0" \
+	"fdtimagesize=0x00010000\0" \
+	"qspiload=sf read ${loadaddr} ${qspibootimageaddr} ${bootimagesize};" \
+		"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize}\0" \
+	"qspiboot=setenv bootargs earlycon root=/dev/mtdblock1 rw " \
+		"rootfstype=jffs2 rootwait;booti ${loadaddr} - ${fdt_addr}\0" \
 	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
 	"bootfile=" CONFIG_BOOTFILE "\0" \
 	"fdt_addr=8000000\0" \
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/2 HSD #1507453717: arm: socfpga: agilex: add QSPI boot feature

From: "Ooi, Joyce" <[email protected]>

This patch adds the QSPI boot feature for Agilex

---
 arch/arm/dts/Makefile                         |  1 +
 arch/arm/dts/socfpga_agilex_socdk.dts         |  1 +
 arch/arm/dts/socfpga_agilex_socdk_qspi.dts    | 14 ++++
 configs/socfpga_agilex_defconfig              |  1 +
 ...efconfig => socfpga_agilex_qspi_defconfig} | 74 ++++++++++++++++++-
 5 files changed, 89 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/socfpga_agilex_socdk_qspi.dts
 copy configs/{socfpga_agilex_defconfig => socfpga_agilex_qspi_defconfig} (55%)
arch/arm/dts/Makefile +1 -0
index c58acb480d..86e9407456 100644
@@ -419,6 +419,7 @@ dtb-$(CONFIG_TARGET_THUNDERX_88XX) += thunderx-88xx.dtb
 
 dtb-$(CONFIG_ARCH_SOCFPGA) +=				\
 	socfpga_agilex_socdk.dtb			\
+	socfpga_agilex_socdk_qspi.dtb			\
 	socfpga_arria5_secu1.dtb			\
 	socfpga_arria5_socdk.dtb			\
 	socfpga_arria10_chameleonv3_270_3.dtb		\
arch/arm/dts/socfpga_agilex_socdk.dts +1 -0
index bcdeecc0e0..de1cf93c17 100644
@@ -16,6 +16,7 @@
 
 	chosen {
 		stdout-path = "serial0:115200n8";
+		u-boot,boot0 = <&mmc>;
 	};
 
 	leds {
arch/arm/dts/socfpga_agilex_socdk_qspi.dts new file +14 -0
new file mode 100644
index 0000000000..e969b25a9b
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2019 Intel Corporation
+ */
+
+#include "socfpga_agilex_socdk.dts"
+#include "socfpga_agilex_socdk-u-boot.dtsi"
+
+/ {
+
+	chosen {
+		u-boot,boot0 = <&flash0>;
+	};
+};
configs/socfpga_agilex_defconfig +1 -0
index e2d869610c..1e35c08519 100644
@@ -66,6 +66,7 @@ CONFIG_DWAPB_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DW=y
 CONFIG_MMC_DW=y
+CONFIG_MTD=y
 CONFIG_SF_DEFAULT_MODE=0x2003
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/socfpga_agilex_qspi_defconfig renamed from configs/socfpga_agilex_defconfig +72 -2

82 lines not on this page · raw message

Signature · 1 line
2.26.2