mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
Merge tag 'xilinx-for-v2024.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx changes for v2024.07-rc1 xilinx: - Do not call env_get_location when !ENV_IS_NOWHERE - Add FDT_FIXUP_PARTITIONS support - Fix legacy format MAC decoding zynqmp: - Enable semihosting SPL support - DT updates - Kconfig resort/cleanup - Don't describe second image/capsule if !SPL - Add support for dfu/capsule description via MTD - Support JTAG as alternative boot mode - Add support for TEG soc variant zynqmp-kria: - Wire usb4 boot device - Update SDIO tristate pin configuration - Disable SPI_FLASH_BAR to avoid issue with SPI after update mbv: - Enable SPL and binman - Small platform changes zynqmp-nand: - Error out in case of unsupported SW ECC - Clean error path versal-net: - Support multiple locations for variables
This commit is contained in:
@@ -1321,6 +1321,14 @@ config ARCH_ZYNQMP
|
||||
select SPL_DM_SPI_FLASH if SPL_DM_SPI
|
||||
select SPL_DM_MAILBOX if SPL
|
||||
imply SPL_FIRMWARE if SPL
|
||||
imply SPL_FS_FAT if SPL
|
||||
imply SPL_LIBCOMMON_SUPPORT if SPL
|
||||
imply SPL_LIBDISK_SUPPORT if SPL
|
||||
imply SPL_LIBGENERIC_SUPPORT if SPL
|
||||
imply SPL_MMC if SPL && MMC_SDHCI_ZYNQ
|
||||
imply SPL_SERIAL if SPL
|
||||
imply SPL_SPI if SPL && ZYNQ_QSPI
|
||||
imply SPL_SPI_FLASH_SUPPORT if SPL && ZYNQ_QSPI
|
||||
select SPL_SEPARATE_BSS if SPL
|
||||
select SUPPORT_SPL
|
||||
imply ZYNQMP_IPI if DM_MAILBOX
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
#size-cells = <1>;
|
||||
arasan,has-mdma;
|
||||
num-cs = <2>;
|
||||
nand@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
nand-ecc-mode = "hw";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
autorepeat;
|
||||
fwuen {
|
||||
key-fwuen {
|
||||
label = "sw16";
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_MISC>;
|
||||
@@ -192,7 +192,7 @@
|
||||
status = "okay";
|
||||
/* QSPI should also have PINCTRL setup */
|
||||
flash@0 {
|
||||
compatible = "mt25qu512a", "m25p80", "jedec,spi-nor"; /* mt25qu512abb8e12 512Mib */
|
||||
compatible = "m25p80", "jedec,spi-nor"; /* mt25qu512abb8e12 512Mib */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
|
||||
@@ -356,6 +356,8 @@
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
rts-gpios = <&gpio 72 GPIO_ACTIVE_HIGH>;
|
||||
linux,rs485-enabled-at-boot-time;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_uart0_default>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
|
||||
@@ -66,6 +66,18 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <74250000>;
|
||||
};
|
||||
|
||||
dpcon {
|
||||
compatible = "dp-connector";
|
||||
label = "P11";
|
||||
type = "full-size";
|
||||
|
||||
port {
|
||||
dpcon_in: endpoint {
|
||||
remote-endpoint = <&dpsub_dp_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 { /* I2C_SCK C26/C27 - MIO from SOM */
|
||||
@@ -130,6 +142,14 @@
|
||||
phy-names = "dp-phy0";
|
||||
phys = <&psgtr 1 PHY_TYPE_DP 0 1>;
|
||||
assigned-clock-rates = <27000000>, <25000000>, <300000000>;
|
||||
|
||||
ports {
|
||||
port@5 {
|
||||
dpsub_dp_out: endpoint {
|
||||
remote-endpoint = <&dpcon_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&zynqmp_dpdma {
|
||||
|
||||
@@ -342,6 +342,7 @@
|
||||
slew-rate = <SLEW_RATE_SLOW>;
|
||||
power-source = <IO_STANDARD_LVCMOS18>;
|
||||
bias-disable;
|
||||
output-enable;
|
||||
};
|
||||
|
||||
conf-cd {
|
||||
|
||||
@@ -63,6 +63,18 @@
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <27000000>;
|
||||
};
|
||||
|
||||
dpcon {
|
||||
compatible = "dp-connector";
|
||||
label = "P11";
|
||||
type = "full-size";
|
||||
|
||||
port {
|
||||
dpcon_in: endpoint {
|
||||
remote-endpoint = <&dpsub_dp_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 { /* I2C_SCK C23/C24 - MIO from SOM */
|
||||
@@ -97,6 +109,14 @@
|
||||
phy-names = "dp-phy0", "dp-phy1";
|
||||
phys = <&psgtr 1 PHY_TYPE_DP 0 0>, <&psgtr 0 PHY_TYPE_DP 1 0>;
|
||||
assigned-clock-rates = <27000000>, <25000000>, <300000000>;
|
||||
|
||||
ports {
|
||||
port@5 {
|
||||
dpsub_dp_out: endpoint {
|
||||
remote-endpoint = <&dpcon_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&zynqmp_dpdma {
|
||||
@@ -329,6 +349,7 @@
|
||||
slew-rate = <SLEW_RATE_SLOW>;
|
||||
power-source = <IO_STANDARD_LVCMOS18>;
|
||||
bias-disable;
|
||||
output-enable;
|
||||
};
|
||||
|
||||
conf-cd {
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
autorepeat;
|
||||
j383 {
|
||||
key-j383 {
|
||||
label = "j383";
|
||||
gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
|
||||
linux,code = <BTN_MISC>;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
autorepeat;
|
||||
sw16 {
|
||||
button-16 {
|
||||
label = "sw16";
|
||||
gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
|
||||
linux,code = <BTN_MISC>;
|
||||
|
||||
@@ -136,8 +136,7 @@
|
||||
reg = <0x0>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x1>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-ecc-algo = "bch";
|
||||
nand-ecc-mode = "hw";
|
||||
nand-rb = <0>;
|
||||
label = "main-storage-0";
|
||||
nand-ecc-step-size = <1024>;
|
||||
@@ -173,8 +172,7 @@
|
||||
reg = <0x1>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x1>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-ecc-algo = "bch";
|
||||
nand-ecc-mode = "hw";
|
||||
nand-rb = <0>;
|
||||
label = "main-storage-1";
|
||||
nand-ecc-step-size = <1024>;
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
autorepeat;
|
||||
sw19 {
|
||||
switch-19 {
|
||||
label = "sw19";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
linux,code = <KEY_DOWN>;
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
autorepeat;
|
||||
sw19 {
|
||||
switch-19 {
|
||||
label = "sw19";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
linux,code = <KEY_DOWN>;
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
autorepeat;
|
||||
sw1 {
|
||||
switch-1 {
|
||||
label = "sw1";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
linux,code = <BTN_MISC>;
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
autorepeat;
|
||||
sw1 {
|
||||
switch-1 {
|
||||
label = "sw1";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
linux,code = <BTN_MISC>;
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
bootph-all;
|
||||
};
|
||||
|
||||
pmu {
|
||||
pmu: pmu {
|
||||
compatible = "arm,armv8-pmuv3";
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
|
||||
@@ -1001,14 +1001,14 @@
|
||||
status = "disabled";
|
||||
reg = <0x0 0xfe200000 0x0 0x40000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupt-names = "host", "peripheral", "otg";
|
||||
interrupt-names = "host", "peripheral", "otg", "wakeup";
|
||||
interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
|
||||
<GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
|
||||
/* iommus = <&smmu 0x860>; */
|
||||
snps,quirk-frame-length-adjustment = <0x20>;
|
||||
clock-names = "ref";
|
||||
snps,enable_guctl1_ipd_quirk;
|
||||
snps,resume-hs-terminations;
|
||||
/* dma-coherent; */
|
||||
};
|
||||
@@ -1033,14 +1033,14 @@
|
||||
status = "disabled";
|
||||
reg = <0x0 0xfe300000 0x0 0x40000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupt-names = "host", "peripheral", "otg";
|
||||
interrupt-names = "host", "peripheral", "otg", "wakeup";
|
||||
interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
|
||||
<GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
|
||||
/* iommus = <&smmu 0x861>; */
|
||||
snps,quirk-frame-length-adjustment = <0x20>;
|
||||
clock-names = "ref";
|
||||
snps,enable_guctl1_ipd_quirk;
|
||||
snps,resume-hs-terminations;
|
||||
/* dma-coherent; */
|
||||
};
|
||||
|
||||
@@ -1,29 +1,5 @@
|
||||
if ARCH_ZYNQMP
|
||||
|
||||
config SPL_FS_FAT
|
||||
default y
|
||||
|
||||
config SPL_LIBCOMMON_SUPPORT
|
||||
default y
|
||||
|
||||
config SPL_LIBDISK_SUPPORT
|
||||
default y
|
||||
|
||||
config SPL_LIBGENERIC_SUPPORT
|
||||
default y
|
||||
|
||||
config SPL_MMC
|
||||
default y if MMC_SDHCI_ZYNQ
|
||||
|
||||
config SPL_SERIAL
|
||||
default y
|
||||
|
||||
config SPL_SPI_FLASH_SUPPORT
|
||||
default y if ZYNQ_QSPI
|
||||
|
||||
config SPL_SPI
|
||||
default y if ZYNQ_QSPI
|
||||
|
||||
config SYS_BOARD
|
||||
string "Board name"
|
||||
default "zynqmp"
|
||||
@@ -135,7 +111,8 @@ config ZYNQMP_PSU_INIT_ENABLED
|
||||
|
||||
config SPL_ZYNQMP_PSU_INIT_ENABLED
|
||||
bool "Include psu_init in SPL"
|
||||
default y if SPL
|
||||
depends on SPL
|
||||
default y
|
||||
select BOARD_EARLY_INIT_F
|
||||
help
|
||||
Include psu_init by default in SPL.
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <image.h>
|
||||
#include <init.h>
|
||||
#include <log.h>
|
||||
#include <semihosting.h>
|
||||
#include <spl.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
@@ -66,6 +67,11 @@ void spl_board_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static u32 jtag_boot_device(void)
|
||||
{
|
||||
return semihosting_enabled() ? BOOT_DEVICE_SMH : BOOT_DEVICE_RAM;
|
||||
}
|
||||
|
||||
void board_boot_order(u32 *spl_boot_list)
|
||||
{
|
||||
spl_boot_list[0] = spl_boot_device();
|
||||
@@ -75,7 +81,7 @@ void board_boot_order(u32 *spl_boot_list)
|
||||
if (spl_boot_list[0] == BOOT_DEVICE_MMC2)
|
||||
spl_boot_list[1] = BOOT_DEVICE_MMC1;
|
||||
|
||||
spl_boot_list[2] = BOOT_DEVICE_RAM;
|
||||
spl_boot_list[2] = jtag_boot_device();
|
||||
}
|
||||
|
||||
u32 spl_boot_device(void)
|
||||
@@ -85,19 +91,20 @@ u32 spl_boot_device(void)
|
||||
|
||||
#if defined(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE_ENABLED)
|
||||
/* Change default boot mode at run-time */
|
||||
reg = CONFIG_SPL_ZYNQMP_ALT_BOOTMODE;
|
||||
writel(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE << BOOT_MODE_ALT_SHIFT,
|
||||
&crlapb_base->boot_mode);
|
||||
#endif
|
||||
|
||||
#else
|
||||
reg = readl(&crlapb_base->boot_mode);
|
||||
if (reg >> BOOT_MODE_ALT_SHIFT)
|
||||
reg >>= BOOT_MODE_ALT_SHIFT;
|
||||
#endif
|
||||
|
||||
bootmode = reg & BOOT_MODES_MASK;
|
||||
|
||||
switch (bootmode) {
|
||||
case JTAG_MODE:
|
||||
return BOOT_DEVICE_RAM;
|
||||
return jtag_boot_device();
|
||||
#ifdef CONFIG_SPL_MMC
|
||||
case SD_MODE1:
|
||||
case SD1_LSHFT_MODE: /* not working on silicon v1 */
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "binman.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -45,6 +45,7 @@ config XILINX_OF_BOARD_DTB_ADDR
|
||||
default 0x1000 if ARCH_VERSAL || ARCH_VERSAL_NET
|
||||
default 0x8000 if MICROBLAZE
|
||||
default 0x100000 if ARCH_ZYNQ || ARCH_ZYNQMP
|
||||
default 0x23000000 if TARGET_XILINX_MBV
|
||||
depends on OF_BOARD || OF_SEPARATE
|
||||
help
|
||||
Offset in the memory where the board configuration DTB is placed.
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <env.h>
|
||||
#include <image.h>
|
||||
#include <init.h>
|
||||
#include <jffs2/load_kernel.h>
|
||||
#include <lmb.h>
|
||||
#include <log.h>
|
||||
#include <asm/global_data.h>
|
||||
@@ -20,6 +21,7 @@
|
||||
#include <i2c.h>
|
||||
#include <linux/sizes.h>
|
||||
#include <malloc.h>
|
||||
#include <mtd_node.h>
|
||||
#include "board.h"
|
||||
#include <dm.h>
|
||||
#include <i2c_eeprom.h>
|
||||
@@ -43,7 +45,7 @@ struct efi_fw_image fw_images[] = {
|
||||
.image_index = 1,
|
||||
},
|
||||
#endif
|
||||
#if defined(XILINX_UBOOT_IMAGE_GUID)
|
||||
#if defined(XILINX_UBOOT_IMAGE_GUID) && defined(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME)
|
||||
{
|
||||
.image_type_id = XILINX_UBOOT_IMAGE_GUID,
|
||||
.fw_name = u"XILINX-UBOOT",
|
||||
@@ -103,10 +105,14 @@ static void xilinx_eeprom_legacy_cleanup(char *eeprom, int size)
|
||||
for (i = 0; i < size; i++) {
|
||||
byte = eeprom[i];
|
||||
|
||||
/* Remove all non printable chars but ignore MAC address */
|
||||
if ((i < offsetof(struct xilinx_legacy_format, eth_mac) ||
|
||||
i >= offsetof(struct xilinx_legacy_format, unused1)) &&
|
||||
(byte < '!' || byte > '~')) {
|
||||
/* Ignore MAC address */
|
||||
if (i >= offsetof(struct xilinx_legacy_format, eth_mac) &&
|
||||
i < offsetof(struct xilinx_legacy_format, unused1)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Remove all non printable chars */
|
||||
if (byte < '!' || byte > '~') {
|
||||
eeprom[i] = 0;
|
||||
continue;
|
||||
}
|
||||
@@ -358,6 +364,14 @@ void *board_fdt_blob_setup(int *err)
|
||||
void *fdt_blob;
|
||||
|
||||
*err = 0;
|
||||
|
||||
if (IS_ENABLED(CONFIG_TARGET_XILINX_MBV)) {
|
||||
fdt_blob = (void *)CONFIG_XILINX_OF_BOARD_DTB_ADDR;
|
||||
|
||||
if (fdt_magic(fdt_blob) == FDT_MAGIC)
|
||||
return fdt_blob;
|
||||
}
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SPL_BUILD) &&
|
||||
!IS_ENABLED(CONFIG_VERSAL_NO_DDR) &&
|
||||
!IS_ENABLED(CONFIG_ZYNQMP_NO_DDR)) {
|
||||
@@ -693,6 +707,13 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
u8 buf[MAX_RAND_SIZE];
|
||||
int nodeoffset, ret;
|
||||
|
||||
static const struct node_info nodes[] = {
|
||||
{ "arm,pl353-nand-r2p1", MTD_DEV_TYPE_NAND, },
|
||||
};
|
||||
|
||||
if (IS_ENABLED(CONFIG_FDT_FIXUP_PARTITIONS) && IS_ENABLED(CONFIG_NAND_ZYNQ))
|
||||
fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
|
||||
|
||||
if (uclass_get_device(UCLASS_RNG, 0, &dev) || !dev) {
|
||||
debug("No RNG device\n");
|
||||
return 0;
|
||||
|
||||
@@ -10,15 +10,25 @@ config SYS_CPU
|
||||
default "generic"
|
||||
|
||||
config TEXT_BASE
|
||||
default 0x80000000 if !RISCV_SMODE
|
||||
default 0x80400000 if RISCV_SMODE && ARCH_RV32I
|
||||
default 0x21200000
|
||||
|
||||
config SPL_TEXT_BASE
|
||||
default 0x20000000
|
||||
|
||||
config SPL_OPENSBI_LOAD_ADDR
|
||||
hex
|
||||
default 0x20200000
|
||||
|
||||
config BOARD_SPECIFIC_OPTIONS
|
||||
def_bool y
|
||||
select GENERIC_RISCV
|
||||
select SUPPORT_SPL
|
||||
imply BOARD_LATE_INIT
|
||||
imply SPL_RAM_SUPPORT
|
||||
imply SPL_RAM_DEVICE
|
||||
imply CMD_SBI
|
||||
imply CMD_PING
|
||||
imply OF_HAS_PRIOR_STAGE
|
||||
|
||||
source "board/xilinx/Kconfig"
|
||||
|
||||
|
||||
@@ -5,7 +5,17 @@
|
||||
* Michal Simek <michal.simek@amd.com>
|
||||
*/
|
||||
|
||||
#include <spl.h>
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL
|
||||
u32 spl_boot_device(void)
|
||||
{
|
||||
/* RISC-V QEMU only supports RAM as SPL boot device */
|
||||
return BOOT_DEVICE_RAM;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -371,3 +371,35 @@ int dram_init(void)
|
||||
void reset_cpu(void)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ENV_IS_NOWHERE)
|
||||
enum env_location env_get_location(enum env_operation op, int prio)
|
||||
{
|
||||
u8 bootmode = versal_net_get_bootmode();
|
||||
|
||||
if (prio)
|
||||
return ENVL_UNKNOWN;
|
||||
|
||||
switch (bootmode) {
|
||||
case EMMC_MODE:
|
||||
case SD_MODE:
|
||||
case SD1_LSHFT_MODE:
|
||||
case SD_MODE1:
|
||||
if (IS_ENABLED(CONFIG_ENV_IS_IN_FAT))
|
||||
return ENVL_FAT;
|
||||
if (IS_ENABLED(CONFIG_ENV_IS_IN_EXT4))
|
||||
return ENVL_EXT4;
|
||||
return ENVL_NOWHERE;
|
||||
case OSPI_MODE:
|
||||
case QSPI_MODE_24BIT:
|
||||
case QSPI_MODE_32BIT:
|
||||
if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
|
||||
return ENVL_SPI_FLASH;
|
||||
return ENVL_NOWHERE;
|
||||
case JTAG_MODE:
|
||||
case SELECTMAP_MODE:
|
||||
default:
|
||||
return ENVL_NOWHERE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -291,6 +291,7 @@ void reset_cpu(void)
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ENV_IS_NOWHERE)
|
||||
enum env_location env_get_location(enum env_operation op, int prio)
|
||||
{
|
||||
u32 bootmode = versal_get_bootmode();
|
||||
@@ -320,3 +321,4 @@ enum env_location env_get_location(enum env_operation op, int prio)
|
||||
return ENVL_NOWHERE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -588,6 +588,7 @@ int mmc_get_env_dev(void)
|
||||
return bootseq;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ENV_IS_NOWHERE)
|
||||
enum env_location env_get_location(enum env_operation op, int prio)
|
||||
{
|
||||
u32 bootmode = zynqmp_get_bootmode();
|
||||
@@ -621,11 +622,37 @@ enum env_location env_get_location(enum env_operation op, int prio)
|
||||
return ENVL_NOWHERE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SET_DFU_ALT_INFO)
|
||||
|
||||
#define DFU_ALT_BUF_LEN SZ_1K
|
||||
|
||||
static void mtd_found_part(u32 *base, u32 *size)
|
||||
{
|
||||
struct mtd_info *part, *mtd;
|
||||
|
||||
mtd_probe_devices();
|
||||
|
||||
mtd = get_mtd_device_nm("nor0");
|
||||
if (!IS_ERR_OR_NULL(mtd)) {
|
||||
list_for_each_entry(part, &mtd->partitions, node) {
|
||||
debug("0x%012llx-0x%012llx : \"%s\"\n",
|
||||
part->offset, part->offset + part->size,
|
||||
part->name);
|
||||
|
||||
if (*base >= part->offset &&
|
||||
*base < part->offset + part->size) {
|
||||
debug("Found my partition: %d/%s\n",
|
||||
part->index, part->name);
|
||||
*base = part->offset;
|
||||
*size = part->size;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void set_dfu_alt_info(char *interface, char *devstr)
|
||||
{
|
||||
int multiboot, bootseq = 0, len = 0;
|
||||
@@ -661,21 +688,38 @@ void set_dfu_alt_info(char *interface, char *devstr)
|
||||
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);
|
||||
if (strlen(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;
|
||||
case QSPI_MODE_24BIT:
|
||||
case QSPI_MODE_32BIT:
|
||||
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,
|
||||
multiboot * SZ_32K + CONFIG_SYS_SPI_U_BOOT_OFFS);
|
||||
{
|
||||
u32 base = multiboot * SZ_32K;
|
||||
u32 size = 0x1500000;
|
||||
u32 limit = size;
|
||||
|
||||
mtd_found_part(&base, &limit);
|
||||
|
||||
#if defined(CONFIG_SYS_SPI_U_BOOT_OFFS)
|
||||
size = limit;
|
||||
limit = CONFIG_SYS_SPI_U_BOOT_OFFS;
|
||||
#endif
|
||||
|
||||
len += snprintf(buf + len, DFU_ALT_BUF_LEN,
|
||||
"sf 0:0=boot.bin raw 0x%x 0x%x",
|
||||
base, limit);
|
||||
#if defined(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME) && defined(CONFIG_SYS_SPI_U_BOOT_OFFS)
|
||||
if (strlen(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME))
|
||||
len += snprintf(buf + len, DFU_ALT_BUF_LEN,
|
||||
";%s raw 0x%x 0x%x",
|
||||
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,
|
||||
base + limit, size - limit);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
||||
@@ -17,6 +17,7 @@ bootcmd_usb0=devnum=0; run usb_boot
|
||||
bootcmd_usb1=devnum=1; run usb_boot
|
||||
bootcmd_usb2=devnum=2; run usb_boot
|
||||
bootcmd_usb3=devnum=3; run usb_boot
|
||||
bootcmd_usb4=devnum=4; run usb_boot
|
||||
bootdelay=2
|
||||
bootfstype=fat
|
||||
bootm_low=0
|
||||
@@ -44,7 +45,8 @@ usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boo
|
||||
preboot=setenv boot_targets; setenv modeboot; run board_setup
|
||||
|
||||
# SOM specific boot methods
|
||||
som_cc_boot=if test ${card1_name} = SCK-KV-G; then setenv boot_targets mmc1 usb0 usb1 usb2 usb3 pxe dhcp && run distro_bootcmd; elif test ${card1_name} = SCK-KR-G; then setenv boot_targets usb0 usb1 usb2 usb3 pxe dhcp && run distro_bootcmd; else test ${card1_name} = SCK-KD-G; setenv boot_targets usb0 usb1 usb2 usb3 pxe dhcp && run distro_bootcmd; fi;"
|
||||
usb_boot_devices='usb0 usb1 usb2 usb3 usb4'
|
||||
som_cc_boot=if test ${card1_name} = SCK-KV-G; then setenv boot_targets mmc1 ${usb_boot_devices} pxe dhcp jtag && run distro_bootcmd; elif test ${card1_name} = SCK-KR-G; then setenv boot_targets ${usb_boot_devices} pxe dhcp jtag && run distro_bootcmd; else test ${card1_name} = SCK-KD-G; setenv boot_targets ${usb_boot_devices} pxe dhcp jtag && run distro_bootcmd; fi;"
|
||||
som_mmc_boot=setenv boot_targets mmc0 && run distro_bootcmd
|
||||
|
||||
k26_starter=SMK-K26-XCL2G
|
||||
|
||||
@@ -1,30 +1,43 @@
|
||||
CONFIG_RISCV=y
|
||||
CONFIG_TEXT_BASE=0x21200000
|
||||
CONFIG_SYS_MALLOC_LEN=0x800000
|
||||
CONFIG_SYS_MALLOC_LEN=0xe00000
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20200000
|
||||
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x21200000
|
||||
CONFIG_ENV_SIZE=0x20000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="xilinx-mbv32"
|
||||
CONFIG_SPL_STACK=0x20200000
|
||||
CONFIG_SPL_SIZE_LIMIT=0x40000
|
||||
CONFIG_SPL=y
|
||||
CONFIG_DEBUG_UART_BASE=0x40600000
|
||||
CONFIG_DEBUG_UART_CLOCK=1000000
|
||||
CONFIG_SYS_CLK_FREQ=100000000
|
||||
CONFIG_BOOT_SCRIPT_OFFSET=0x0
|
||||
CONFIG_SYS_LOAD_ADDR=0x80200000
|
||||
CONFIG_SYS_LOAD_ADDR=0x20200000
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_TARGET_XILINX_MBV=y
|
||||
# CONFIG_SPL_SMP is not set
|
||||
CONFIG_REMAKE_ELF=y
|
||||
CONFIG_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT_ADDRESS=0x20200000
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_DISPLAY_CPUINFO=y
|
||||
CONFIG_DISPLAY_BOARDINFO=y
|
||||
# CONFIG_BOARD_LATE_INIT is not set
|
||||
CONFIG_SPL_MAX_SIZE=0x40000
|
||||
CONFIG_SPL_BSS_START_ADDR=0x24000000
|
||||
CONFIG_SPL_BSS_MAX_SIZE=0x80000
|
||||
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
||||
CONFIG_SPL_SYS_MALLOC=y
|
||||
CONFIG_SPL_SYS_MALLOC_SIZE=0x800000
|
||||
# CONFIG_CMD_MII is not set
|
||||
CONFIG_CMD_TIMER=y
|
||||
CONFIG_OF_EMBED=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_DEBUG_UART_ANNOUNCE=y
|
||||
CONFIG_DEBUG_UART_SKIP_INIT=y
|
||||
CONFIG_XILINX_UARTLITE=y
|
||||
CONFIG_XILINX_TIMER=y
|
||||
# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_PANIC_HANG=y
|
||||
CONFIG_SPL_GZIP=y
|
||||
|
||||
@@ -1,27 +1,40 @@
|
||||
CONFIG_RISCV=y
|
||||
CONFIG_TEXT_BASE=0x21200000
|
||||
CONFIG_SYS_MALLOC_LEN=0x800000
|
||||
CONFIG_SYS_MALLOC_LEN=0xe00000
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
|
||||
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20200000
|
||||
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x21200000
|
||||
CONFIG_ENV_SIZE=0x20000
|
||||
CONFIG_DEFAULT_DEVICE_TREE="xilinx-mbv32"
|
||||
CONFIG_SPL_STACK=0x20200000
|
||||
CONFIG_SPL_SIZE_LIMIT=0x40000
|
||||
CONFIG_SPL=y
|
||||
CONFIG_DEBUG_UART_BASE=0x40600000
|
||||
CONFIG_DEBUG_UART_CLOCK=1000000
|
||||
CONFIG_SYS_CLK_FREQ=100000000
|
||||
CONFIG_BOOT_SCRIPT_OFFSET=0x0
|
||||
CONFIG_SYS_LOAD_ADDR=0x80200000
|
||||
CONFIG_SYS_LOAD_ADDR=0x20200000
|
||||
CONFIG_TARGET_XILINX_MBV=y
|
||||
CONFIG_SPL_OPENSBI_LOAD_ADDR=0x20100000
|
||||
CONFIG_RISCV_SMODE=y
|
||||
# CONFIG_SPL_SMP is not set
|
||||
CONFIG_REMAKE_ELF=y
|
||||
CONFIG_FIT=y
|
||||
CONFIG_SPL_LOAD_FIT_ADDRESS=0x20200000
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_DISPLAY_CPUINFO=y
|
||||
CONFIG_DISPLAY_BOARDINFO=y
|
||||
# CONFIG_BOARD_LATE_INIT is not set
|
||||
CONFIG_SPL_MAX_SIZE=0x40000
|
||||
CONFIG_SPL_BSS_START_ADDR=0x24000000
|
||||
CONFIG_SPL_BSS_MAX_SIZE=0x80000
|
||||
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
||||
CONFIG_SPL_SYS_MALLOC=y
|
||||
CONFIG_SPL_SYS_MALLOC_SIZE=0x800000
|
||||
CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS=0x2
|
||||
# CONFIG_CMD_MII is not set
|
||||
CONFIG_CMD_TIMER=y
|
||||
CONFIG_OF_EMBED=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_DEBUG_UART_UARTLITE=y
|
||||
CONFIG_DEBUG_UART_ANNOUNCE=y
|
||||
@@ -29,4 +42,6 @@ CONFIG_DEBUG_UART_SKIP_INIT=y
|
||||
CONFIG_XILINX_UARTLITE=y
|
||||
# CONFIG_RISCV_TIMER is not set
|
||||
CONFIG_XILINX_TIMER=y
|
||||
# CONFIG_BINMAN_FDT is not set
|
||||
CONFIG_PANIC_HANG=y
|
||||
CONFIG_SPL_GZIP=y
|
||||
|
||||
@@ -60,6 +60,9 @@ CONFIG_PARTITION_TYPE_GUID=y
|
||||
CONFIG_OF_BOARD=y
|
||||
CONFIG_DTB_RESELECT=y
|
||||
CONFIG_MULTI_DTB_FIT=y
|
||||
CONFIG_ENV_IS_NOWHERE=y
|
||||
CONFIG_ENV_IS_IN_FAT=y
|
||||
CONFIG_ENV_IS_IN_SPI_FLASH=y
|
||||
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_NET_RANDOM_ETHADDR=y
|
||||
|
||||
@@ -155,7 +155,6 @@ CONFIG_MMC_HS200_SUPPORT=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_ZYNQ=y
|
||||
CONFIG_DM_MTD=y
|
||||
CONFIG_SPI_FLASH_BAR=y
|
||||
CONFIG_SPI_FLASH_STMICRO=y
|
||||
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
|
||||
CONFIG_SPI_FLASH_MTD=y
|
||||
|
||||
@@ -1232,7 +1232,8 @@ static int arasan_probe(struct udevice *dev)
|
||||
struct nand_config *nand = &info->config;
|
||||
struct mtd_info *mtd;
|
||||
ofnode child;
|
||||
int err = -1;
|
||||
int ret;
|
||||
const char *str;
|
||||
|
||||
info->reg = dev_read_addr_ptr(dev);
|
||||
mtd = nand_to_mtd(nand_chip);
|
||||
@@ -1258,9 +1259,16 @@ static int arasan_probe(struct udevice *dev)
|
||||
writel(0x0, &info->reg->pgm_reg);
|
||||
|
||||
/* first scan to find the device and get the page size */
|
||||
if (nand_scan_ident(mtd, CONFIG_SYS_NAND_MAX_CHIPS, NULL)) {
|
||||
ret = nand_scan_ident(mtd, CONFIG_SYS_NAND_MAX_CHIPS, NULL);
|
||||
if (ret) {
|
||||
printf("%s: nand_scan_ident failed\n", __func__);
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
|
||||
str = ofnode_read_string(nand_chip->flash_node, "nand-ecc-mode");
|
||||
if (!str || strcmp(str, "hw") != 0) {
|
||||
printf("%s ecc mode is not supported\n", str);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
nand_chip->ecc.mode = NAND_ECC_HW;
|
||||
@@ -1282,26 +1290,26 @@ static int arasan_probe(struct udevice *dev)
|
||||
nand_chip->ecc.bytes = 0;
|
||||
nand_chip->ecc.layout = &ondie_nand_oob_64;
|
||||
} else {
|
||||
if (arasan_nand_ecc_init(mtd)) {
|
||||
ret = arasan_nand_ecc_init(mtd);
|
||||
if (ret) {
|
||||
printf("%s: nand_ecc_init failed\n", __func__);
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (nand_scan_tail(mtd)) {
|
||||
ret = nand_scan_tail(mtd);
|
||||
if (ret) {
|
||||
printf("%s: nand_scan_tail failed\n", __func__);
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (nand_register(0, mtd)) {
|
||||
ret = nand_register(0, mtd);
|
||||
if (ret) {
|
||||
printf("Nand Register Fail\n");
|
||||
goto fail;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
free(nand);
|
||||
return err;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct udevice_id arasan_nand_dt_ids[] = {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define ULITE_CONTROL_RST_TX 0x01
|
||||
#define ULITE_CONTROL_RST_RX 0x02
|
||||
|
||||
static bool little_endian;
|
||||
static bool little_endian __section(".data");
|
||||
|
||||
struct uartlite {
|
||||
unsigned int rx_fifo;
|
||||
|
||||
@@ -44,6 +44,7 @@ enum {
|
||||
ZYNQMP_VARIANT_DR = BIT(3),
|
||||
ZYNQMP_VARIANT_DR_SE = BIT(4),
|
||||
ZYNQMP_VARIANT_EG_SE = BIT(5),
|
||||
ZYNQMP_VARIANT_TEG = BIT(6),
|
||||
};
|
||||
|
||||
struct zynqmp_device {
|
||||
@@ -74,6 +75,11 @@ static const struct zynqmp_device zynqmp_devices[] = {
|
||||
.device = 3,
|
||||
.variants = ZYNQMP_VARIANT_EG | ZYNQMP_VARIANT_CG,
|
||||
},
|
||||
{
|
||||
.id = 0x04718093,
|
||||
.device = 3,
|
||||
.variants = ZYNQMP_VARIANT_TEG,
|
||||
},
|
||||
{
|
||||
.id = 0x04721093,
|
||||
.device = 4,
|
||||
@@ -299,6 +305,8 @@ static int soc_xilinx_zynqmp_detect_machine(struct udevice *dev, u32 idcode,
|
||||
strlcat(priv->machine, "dr", sizeof(priv->machine));
|
||||
} else if (device->variants & ZYNQMP_VARIANT_DR_SE) {
|
||||
strlcat(priv->machine, "dr_SE", sizeof(priv->machine));
|
||||
} else if (device->variants & ZYNQMP_VARIANT_TEG) {
|
||||
strlcat(priv->machine, "teg", sizeof(priv->machine));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
2
env/Kconfig
vendored
2
env/Kconfig
vendored
@@ -472,7 +472,7 @@ config ENV_FAT_DEVICE_AND_PART
|
||||
string "Device and partition for where to store the environemt in FAT"
|
||||
depends on ENV_IS_IN_FAT
|
||||
default "0:1" if TI_COMMON_CMD_OPTIONS
|
||||
default "0:auto" if ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
|
||||
default "0:auto" if ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET
|
||||
default ":auto" if ARCH_SUNXI
|
||||
default "0" if ARCH_AT91
|
||||
help
|
||||
|
||||
Reference in New Issue
Block a user