aboutsummaryrefslogtreecommitdiff
path: root/board/xilinx
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-05 08:33:19 -0500
committerTom Rini <trini@konsulko.com>2022-12-05 08:33:19 -0500
commita50622d78c5c6babd1853ae913f339df54fe532c (patch)
treed9983965f00679f68b5a12cbc2dbc5dd64aafc4d /board/xilinx
parentbdaf047f51eda655f3d6bc9d076696f7733a57d8 (diff)
parent7ad3c09e7911e71c9a16a30aa052093a8f9b7e7c (diff)
Merge tag 'xilinx-for-v2023.01-rc3-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx changes for v2023.01-rc3-v2 xilinx: - Fix MAC address selection for System Controller from FRU - Cleanup Kconfig (ZYNQ_MAC_IN_EEPROM symbol) versal: - Create u-boot.elf for mini spi configurations versal-net: - Enable MT35XU flash zynq: - Add missing timer to DT for mini configurations zynqmp: - Do not include psu_init to U-Boot by default - Do not enable IPI by default to mini U-Boot - Update Luca's fragment - Fix SPL_FS_LOAD_PAYLOAD_NAME usage spi: - gqspi: Fix tapdelay values - gqspi: Fix 64bit address support - cadence: Remove condition for calling enable linear mode - nor-core: Invert logic to reflect sst26 flash unlocked net: - Add PCS/PMA phy support
Diffstat (limited to 'board/xilinx')
-rw-r--r--board/xilinx/Kconfig26
-rw-r--r--board/xilinx/common/fru.h1
-rw-r--r--board/xilinx/common/fru_ops.c6
-rw-r--r--board/xilinx/zynqmp/MAINTAINERS2
-rw-r--r--board/xilinx/zynqmp/Makefile6
-rw-r--r--board/xilinx/zynqmp/zynqmp.c45
6 files changed, 41 insertions, 45 deletions
diff --git a/board/xilinx/Kconfig b/board/xilinx/Kconfig
index 746a2332ad..4f0776e8bd 100644
--- a/board/xilinx/Kconfig
+++ b/board/xilinx/Kconfig
@@ -58,23 +58,6 @@ config BOOT_SCRIPT_OFFSET
help
Specifies distro boot script offset in NAND/QSPI/NOR flash.
-config ZYNQ_MAC_IN_EEPROM
- bool "Reading MAC address from EEPROM"
- help
- Enable this option if your MAC address is saved in eeprom and
- xlnx,eeprom DT property in chosen node points to it.
-
-if ZYNQ_MAC_IN_EEPROM
-
-config ZYNQ_GEM_I2C_MAC_OFFSET
- hex "Set the I2C MAC offset"
- default 0x0
- depends on DM_I2C
- help
- Set the MAC offset for i2C.
-
-endif
-
config CMD_FRU
bool "FRU information for product"
help
@@ -82,3 +65,12 @@ config CMD_FRU
information present in the device. The FRU Information is used
to primarily to provide "inventory" information about the boards
that the FRU Information Device is located on.
+
+config FRU_SC
+ bool "FRU system controller decoding"
+ help
+ Xilinx System Controller (SC) FRU format is describing boards from two
+ angles. One from DUT and then from SC. DUT is default option for
+ the main CPU. SC behaves more or less as slave and have different ID.
+ If you build U-Boot for SC you should enable this option to get proper
+ MAC address.
diff --git a/board/xilinx/common/fru.h b/board/xilinx/common/fru.h
index 59f6b722cf..586c41b66e 100644
--- a/board/xilinx/common/fru.h
+++ b/board/xilinx/common/fru.h
@@ -90,6 +90,7 @@ struct fru_table {
#define FRU_MULTIREC_MAC_OFFSET 4
#define FRU_LAST_REC BIT(7)
#define FRU_DUT_MACID 0x31
+#define FRU_SC_MACID 0x11
/* This should be minimum of fields */
#define FRU_BOARD_AREA_TOTAL_FIELDS 5
diff --git a/board/xilinx/common/fru_ops.c b/board/xilinx/common/fru_ops.c
index 49846ae3d6..c4f009affc 100644
--- a/board/xilinx/common/fru_ops.c
+++ b/board/xilinx/common/fru_ops.c
@@ -239,8 +239,12 @@ static int fru_parse_multirec(unsigned long addr)
if (mrc.rec_type == FRU_MULTIREC_TYPE_OEM) {
struct fru_multirec_mac *mac = (void *)addr + hdr_len;
+ u32 type = FRU_DUT_MACID;
- if (mac->ver == FRU_DUT_MACID) {
+ if (CONFIG_IS_ENABLED(FRU_SC))
+ type = FRU_SC_MACID;
+
+ if (mac->ver == type) {
mac_len = mrc.len - FRU_MULTIREC_MAC_OFFSET;
memcpy(&fru_data.mac.macid, mac->macid, mac_len);
}
diff --git a/board/xilinx/zynqmp/MAINTAINERS b/board/xilinx/zynqmp/MAINTAINERS
index 17a2766413..07b91b81c9 100644
--- a/board/xilinx/zynqmp/MAINTAINERS
+++ b/board/xilinx/zynqmp/MAINTAINERS
@@ -11,7 +11,7 @@ F: configs/xilinx_zynqmp*
F: configs/avnet_ultra96_rev1_defconfig
ARM ZYNQMP AVNET ULTRAZED EV BOARD
-M: Luca Ceresoli <luca@lucaceresoli.net>
+M: Luca Ceresoli <luca.ceresoli@bootlin.com>
S: Maintained
F: arch/arm/dts/avnet-ultrazedev-*
F: configs/avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0_defconfig
diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile
index a914028753..732f909fc2 100644
--- a/board/xilinx/zynqmp/Makefile
+++ b/board/xilinx/zynqmp/Makefile
@@ -31,11 +31,7 @@ $(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/
endif
endif
-ifdef_any_of = $(filter-out undefined,$(foreach v,$(1),$(origin $(v))))
-
-ifneq ($(call ifdef_any_of, CONFIG_ZYNQMP_PSU_INIT_ENABLED CONFIG_SPL_BUILD),)
-obj-y += $(init-objs)
-endif
+obj-$(CONFIG_$(SPL_)ZYNQMP_PSU_INIT_ENABLED) += $(init-objs)
ifdef CONFIG_SPL_BUILD
ifneq ($(CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE),"")
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 5fe0873fe2..579708d2e0 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -611,8 +611,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
void set_dfu_alt_info(char *interface, char *devstr)
{
- int multiboot;
- int bootseq = 0;
+ int multiboot, bootseq = 0, len = 0;
ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN);
@@ -634,29 +633,33 @@ void set_dfu_alt_info(char *interface, char *devstr)
case SD1_LSHFT_MODE:
case SD_MODE1:
bootseq = mmc_get_env_dev();
- if (!multiboot)
- snprintf(buf, DFU_ALT_BUF_LEN,
- "mmc %d=boot.bin fat %d 1;"
- "%s fat %d 1",
- bootseq, bootseq,
- CONFIG_SPL_FS_LOAD_PAYLOAD_NAME, bootseq);
- else
- snprintf(buf, DFU_ALT_BUF_LEN,
- "mmc %d=boot%04d.bin fat %d 1;"
- "%s fat %d 1",
- bootseq, multiboot, bootseq,
- CONFIG_SPL_FS_LOAD_PAYLOAD_NAME, bootseq);
+
+ len += snprintf(buf + len, DFU_ALT_BUF_LEN, "mmc %d=boot",
+ bootseq);
+
+ if (multiboot)
+ len += snprintf(buf + len, DFU_ALT_BUF_LEN,
+ "%04d", multiboot);
+
+ len += snprintf(buf + len, DFU_ALT_BUF_LEN, ".bin fat %d 1",
+ bootseq);
+#if defined(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME)
+ len += snprintf(buf + len, DFU_ALT_BUF_LEN, ";%s fat %d 1",
+ CONFIG_SPL_FS_LOAD_PAYLOAD_NAME, bootseq);
+#endif
break;
-#if defined(CONFIG_SYS_SPI_U_BOOT_OFFS)
case QSPI_MODE_24BIT:
case QSPI_MODE_32BIT:
- snprintf(buf, DFU_ALT_BUF_LEN,
- "sf 0:0=boot.bin raw %x 0x1500000;"
- "%s raw 0x%x 0x500000",
- multiboot * SZ_32K, CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,
- CONFIG_SYS_SPI_U_BOOT_OFFS);
- break;
+ len += snprintf(buf + len, DFU_ALT_BUF_LEN,
+ "sf 0:0=boot.bin raw %x 0x1500000",
+ multiboot * SZ_32K);
+#if defined(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME) && defined(CONFIG_SYS_SPI_U_BOOT_OFFS)
+ len += snprintf(buf + len, DFU_ALT_BUF_LEN,
+ ";%s raw 0x%x 0x500000",
+ CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,
+ CONFIG_SYS_SPI_U_BOOT_OFFS);
#endif
+ break;
default:
return;
}