Skip to content

Commit 135e537

Browse files
HSD #14023640947: agilex5: support Non-Distroboot
The device configuration for Non-distroboot doesn't work for Agilex 5 device. Currently, the setup only works for S10 and Agilex 7. A variation is been created for Agilex 5. Signed-off-by: Tingting Meng <tingting.meng@intel.com>
1 parent 8700f94 commit 135e537

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

include/configs/socfpga_soc64_common.h

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,69 @@
204204

205205
#else
206206

207+
#if IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5)
208+
#define CFG_EXTRA_ENV_SETTINGS \
209+
"kernel_comp_addr_r=0x9000000\0" \
210+
"kernel_comp_size=0x01000000\0" \
211+
"qspibootimageaddr=0x020E0000\0" \
212+
"qspifdtaddr=0x020D0000\0" \
213+
"bootimagesize=0x01F00000\0" \
214+
"fdtimagesize=0x00010000\0" \
215+
"qspiload=sf read ${loadaddr} ${qspibootimageaddr} ${bootimagesize};" \
216+
"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize}\0" \
217+
"qspiboot=setenv bootargs earlycon root=/dev/mtdblock1 rw " \
218+
"rootfstype=jffs2 rootwait;booti ${loadaddr} - ${fdt_addr}\0" \
219+
"qspifitload=sf read ${loadaddr} ${qspibootimageaddr} ${bootimagesize}\0" \
220+
"qspifitboot=setenv bootargs earlycon root=/dev/mtdblock1 rw " \
221+
"rootfstype=jffs2 rootwait;bootm ${loadaddr}\0" \
222+
"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
223+
"bootfile=" CONFIG_BOOTFILE "\0" \
224+
"fdt_addr=86000000\0" \
225+
"fdtimage=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
226+
"mmcroot=/dev/mmcblk0p2\0" \
227+
"mmcboot=setenv bootargs " CONFIG_BOOTARGS \
228+
" root=${mmcroot} rw rootwait;" \
229+
"booti ${loadaddr} - ${fdt_addr}\0" \
230+
"mmcload=mmc rescan;" \
231+
"load mmc 0:1 ${loadaddr} ${bootfile};" \
232+
"load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
233+
"mmcfitboot=setenv bootargs " CONFIG_BOOTARGS \
234+
" root=${mmcroot} rw rootwait;" \
235+
"bootm ${loadaddr}\0" \
236+
"mmcfitload=mmc rescan;" \
237+
"load mmc 0:1 ${loadaddr} ${bootfile}\0" \
238+
"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
239+
"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
240+
"linux_qspi_enable=if sf probe; then " \
241+
"echo Enabling QSPI at Linux DTB...;" \
242+
"fdt addr ${fdt_addr}; fdt resize;" \
243+
"fdt set /soc/spi@108d2000 status okay;" \
244+
"if fdt set /soc/clocks/qspi-clk clock-frequency" \
245+
" ${qspi_clock}; then echo QSPI clock frequency updated;" \
246+
" elif fdt set /soc/clkmgr/clocks/qspi_clk clock-frequency" \
247+
" ${qspi_clock}; then echo QSPI clock frequency updated;" \
248+
" else fdt set /clocks/qspi-clk clock-frequency" \
249+
" ${qspi_clock}; echo QSPI clock frequency updated; fi; fi\0" \
250+
"scriptaddr=0x02100000\0" \
251+
"scriptfile=u-boot.scr\0" \
252+
"fatscript=if fatload mmc 0:1 ${scriptaddr} ${scriptfile};" \
253+
"then source ${scriptaddr}:script; fi\0" \
254+
"nandroot=ubi0:rootfs\0" \
255+
"nandload=ubi part root; ubi readvol ${loadaddr} kernel; ubi readvol ${fdt_addr} dtb\0" \
256+
"nandboot=setenv bootargs " CONFIG_BOOTARGS \
257+
" root=${nandroot} rw rootwait rootfstype=ubifs ubi.mtd=1; " \
258+
"booti ${loadaddr} - ${fdt_addr}\0" \
259+
"nandfitboot=setenv bootargs " CONFIG_BOOTARGS \
260+
" root=${nandroot} rw rootwait rootfstype=ubifs ubi.mtd=1; " \
261+
"bootm ${loadaddr}\0" \
262+
"nandfitload=ubi part root; ubi readvol ${loadaddr} kernel\0" \
263+
"socfpga_legacy_reset_compat=1\0" \
264+
"rsu_status=rsu dtb; rsu display_dcmf_version; "\
265+
"rsu display_dcmf_status; rsu display_max_retry\0" \
266+
"smc_fid_rd=0xC2000007\0" \
267+
"smc_fid_wr=0xC2000008\0" \
268+
"smc_fid_upd=0xC2000009\0 "
269+
#else
207270
#define CFG_EXTRA_ENV_SETTINGS \
208271
"kernel_comp_addr_r=0x9000000\0" \
209272
"kernel_comp_size=0x01000000\0" \
@@ -265,6 +328,8 @@
265328
"smc_fid_rd=0xC2000007\0" \
266329
"smc_fid_wr=0xC2000008\0" \
267330
"smc_fid_upd=0xC2000009\0 "
331+
332+
#endif /* IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5) no distro boot */
268333
#endif /*#if IS_ENABLED(CONFIG_DISTRO_DEFAULTS)*/
269334

270335
/*

0 commit comments

Comments
 (0)