xilinx: Allow alternative boot strategies in zynq-common.h
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.956edb5d-5d6c-4991-9875-8dc26491146e@emailsignatures365.codetwo.com
PATCH v2 1/2 xilinx: Allow alternative boot strategies in zynq-common.h
Allow config headers that include zynq-common.h to provide their own (distro) boot strategies. This is implemented by skipping the section when BOOT_ENV has already been defined.
---
Changes in v2:
Avoid #ifdef nesting (as suggested by MS)
include/configs/zynq-common.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
include/configs/zynq-common.h +6 -2
@@ -46,7 +46,10 @@#ifdef CONFIG_XPL_BUILD #define BOOTENV -#else +#endif + +/* Only use this section if no BOOTENV has been configured yet */ +#ifndef BOOTENV #ifdef CONFIG_CMD_MMC #define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) func(MMC, mmc, 1)
@@ -167,7 +170,8 @@ BOOT_TARGET_DEVICES_DHCP(func)#include <config_distro_bootcmd.h> -#endif /* CONFIG_XPL_BUILD */ + +#endif /* BOOTENV */ /* Default environment */ #ifndef CFG_EXTRA_ENV_SETTINGS
Signature · 18 lines
2.43.0 Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: [email protected] W: www.topic.nl Please consider the environment before printing this e-mail
PATCH v2 2/2 topic: Use distro_boot for topic-miami boards
Adjust configuration and devicetree so the topic-miami board actually boots.
Replace the custom scripting and just use distro_boot. Override the standard zynq routines.
The board attempts to boot from SD card first, and falls back to booting UBIFS from the QSPI NOR flash.
---
Changes in v2:
Disable CONFIG_BOARD_LATE_INIT which interferes with boot order in dts file s/pca953x@41/gpio@41/
arch/arm/dts/zynq-topic-miami.dts | 33 ++++----- configs/topic_miami_defconfig | 21 +++++- include/configs/topic_miami.h | 116 ++++++++++++++---------------- 3 files changed, 89 insertions(+), 81 deletions(-)
arch/arm/dts/zynq-topic-miami.dts +17 -16
@@ -11,6 +11,10 @@ model = "Topic Miami Zynq Board"; compatible = "topic,miami", "xlnx,zynq-7000"; + config { + u-boot,spl-payload-offset = <0x20000>; + }; + aliases { serial0 = &uart0; spi0 = &qspi;
@@ -35,6 +39,7 @@ status = "okay"; num-cs = <1>; flash@0 { + bootph-all; compatible = "st,m25p80", "n25q256a", "jedec,spi-nor"; m25p,fast-read; reg = <0x0>;
@@ -44,24 +49,12 @@ #address-cells = <1>; #size-cells = <1>; partition@0 { - label = "qspi-u-boot-spl"; - reg = <0x00000 0x10000>; - }; - partition@10000 { - label = "qspi-u-boot-img"; - reg = <0x10000 0x60000>; + label = "qspi-boot-bin"; + reg = <0x00000 0x100000>; }; - partition@70000 { - label = "qspi-device-tree"; - reg = <0x70000 0x10000>; - }; - partition@80000 { - label = "qspi-linux"; - reg = <0x80000 0x400000>; - }; - partition@480000 { + partition@100000 { label = "qspi-rootfs"; - reg = <0x480000 0x1b80000>; + reg = <0x100000 0>; }; }; };
@@ -74,6 +67,14 @@ &i2c1 { status = "okay"; clock-frequency = <400000>; + /* GPIO expander */ + gpioex: gpio@41 { + compatible = "nxp,pca9536"; + reg = <0x41>; + gpio-line-names = "USB_RESET", "VTT_SHDWN_N", "V_PRESENT", "DEBUG_PRESENT"; + gpio-controller; + #gpio-cells = <2>; + }; }; &clkc {
configs/topic_miami_defconfig +18 -3
@@ -28,9 +28,9 @@ CONFIG_SYS_CUSTOM_LDSCRIPT=y CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds" CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=0 -CONFIG_BOOTCOMMAND="if mmcinfo; then if fatload mmc 0 0x1900000 ${bootscript}; then source 0x1900000; fi; fi; run $modeboot" CONFIG_USE_PREBOOT=y CONFIG_SYS_PBSIZE=2077 +# CONFIG_BOARD_LATE_INIT is not set CONFIG_CLOCKS=y CONFIG_SPL_MAX_SIZE=0x30000 # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
@@ -40,15 +40,25 @@ CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 CONFIG_SYS_PROMPT="zynq-uboot> " CONFIG_SYS_MAXARGS=32 +# CONFIG_CMD_BOOTEFI is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_SPL is not set CONFIG_CMD_THOR_DOWNLOAD=y CONFIG_THOR_RESET_OFF=y +# CONFIG_CMD_SAVEENV is not set CONFIG_CMD_MEMTEST=y CONFIG_CMD_DFU=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_MTD=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y +# CONFIG_CMD_EFICONFIG is not set +CONFIG_CMD_SQUASHFS=y +CONFIG_MTDIDS_DEFAULT="nor0=spi0.0" +CONFIG_MTDPARTS_DEFAULT="mtdparts=spi0.0:0x100000(qspi-boot-bin),-(qspi-rootfs)" +CONFIG_CMD_UBI=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
@@ -56,14 +66,18 @@ CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_RAM=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000 -CONFIG_FPGA_XILINX=y -CONFIG_FPGA_ZYNQPL=y +CONFIG_DM_PCA953X=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_CADENCE=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ZYNQ=y +CONFIG_DM_MTD=y +CONFIG_MTD_BLOCK=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set +CONFIG_SPI_FLASH_MTD=y +CONFIG_MTD_UBI_BEB_LIMIT=0 +CONFIG_UBI_BLOCK=y CONFIG_DEBUG_UART_ZYNQ=y CONFIG_ARM_DCC=y CONFIG_ZYNQ_SERIAL=y
@@ -79,3 +93,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x0300 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_SYS_TIMER_COUNTS_DOWN=y +CONFIG_LZ4=y
include/configs/topic_miami.h +54 -62
129 lines not on this page · raw message
Signature · 18 lines
2.43.0 Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: [email protected] W: www.topic.nl Please consider the environment before printing this e-mail
Quoted 31 lines · Mike Looijmans
Allow config headers that include
zynq-common.hto provide their own (distro) boot strategies. This is implemented by skipping the section whenBOOT_ENVhas already been defined.Signed-off-by Mike Looijmans <[email protected]>---
Changes in v2:
Avoid #ifdef nesting (as suggested by MS)include/configs/zynq-common.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)include/configs/zynq-common.h +4
-1@@ -46,7 +46,10 @@#ifdef CONFIG_XPL_BUILD #define BOOTENV -#else +#endif + +/* Only use this section if no BOOTENV has been configured yet */ +#ifndef BOOTENV #ifdef CONFIG_CMD_MMC #define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) func(MMC, mmc, 1)
include/configs/zynq-common.h line 177
Quoted 9 lines
include/configs/zynq-common.h +2
-1@@ -167,7 +170,8 @@ BOOT_TARGET_DEVICES_DHCP(func)#include <config_distro_bootcmd.h> -#endif /* CONFIG_XPL_BUILD */ + +#endif /* BOOTENV */ /* Default environment */ #ifndef CFG_EXTRA_ENV_SETTINGS
Applied.
M