Skip to content

Commit

Permalink
Merge tag 'xilinx-for-v2024.10-rc2' of https://gitlab.denx.de/u-boot/…
Browse files Browse the repository at this point in the history
…custodians/u-boot-microblaze

AMD/Xilinx changes for v2024.10-rc2

amd/xilinx:
- Enable CONFIG_MMC_SPEED_MODE_SET

env:
- support overriding spi dev from board code

clk:
- Add set_rate support for display clocks

spi:
- Describe is25lp01gg flash

zynq:
- Add support for 7z010_lr and 7z020_lr

zynqmp:
- Add support for zu1eg_lr
- Enable NFS for Kria
- DT changes
- Cleanup firmware handling in board_init()

versal-net:
- Setup spi seq number based on boot device
- dt-schema update for mini configurations

versal2:
- Disable uartlite driver
- Add support for mini configurations
- Enable NFS
  • Loading branch information
trini committed Aug 6, 2024
2 parents 6f4c31c + 81b2831 commit 784c70c
Show file tree
Hide file tree
Showing 29 changed files with 440 additions and 25 deletions.
11 changes: 11 additions & 0 deletions arch/arm/dts/amd-versal2-mini.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Empty device tree for amd-versal2-mini
*
* Copyright (C) 2024, Advanced Micro Devices, Inc.
*/

/dts-v1/;

/ {
};
2 changes: 1 addition & 1 deletion arch/arm/dts/versal-mini-ospi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
ranges;

ospi: spi@f1010000 {
compatible = "cadence,qspi", "cdns,qspi-nor";
compatible = "cdns,qspi-nor";
status = "okay";
reg = <0 0xf1010000 0 0x10000 0 0xc0000000 0 0x20000000>;
clock-names = "ref_clk", "pclk";
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/dts/versal-net-mini-emmc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
bootph-all;
};

amba: amba {
amba: axi {
bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges;

sdhci1: sdhci@f1050000 {
sdhci1: mmc@f1050000 {
compatible = "xlnx,versal-net-emmc";
status = "okay";
non-removable;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/dts/versal-net-mini-ospi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
bootph-all;
};

amba: amba {
amba: axi {
bootph-all;
compatible = "simple-bus";
#address-cells = <0x2>;
#size-cells = <0x2>;
ranges;

ospi: spi@f1010000 {
compatible = "cadence,qspi", "cdns,qspi-nor";
compatible = "cdns,qspi-nor";
status = "okay";
reg = <0 0xf1010000 0 0x10000>, <0 0xc0000000 0 0x20000000>;
clock-names = "ref_clk", "pclk";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/versal-net-mini-qspi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
bootph-all;
};

amba: amba {
amba: axi {
bootph-all;
compatible = "simple-bus";
#address-cells = <2>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/dts/zynqmp-sck-kd-g-revA.dtso
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@
status = "okay";
rts-gpios = <&gpio 72 GPIO_ACTIVE_HIGH>;
linux,rs485-enabled-at-boot-time;
rs485-rts-delay = <10 10>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart0_default>;
assigned-clock-rates = <100000000>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/zynqmp-sm-k26-revA.dts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
pwm-fan {
compatible = "pwm-fan";
status = "okay";
pwms = <&ttc0 2 40000 0>;
pwms = <&ttc0 2 40000 1>;
};
};

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/dts/zynqmp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,7 @@
reg = <0x0 0xff000000 0x0 0x1000>;
clock-names = "uart_clk", "pclk";
power-domains = <&zynqmp_firmware PD_UART_0>;
resets = <&zynqmp_reset ZYNQMP_RESET_UART0>;
};

uart1: serial@ff010000 {
Expand All @@ -1036,6 +1037,7 @@
reg = <0x0 0xff010000 0x0 0x1000>;
clock-names = "uart_clk", "pclk";
power-domains = <&zynqmp_firmware PD_UART_1>;
resets = <&zynqmp_reset ZYNQMP_RESET_UART1>;
};

usb0: usb@ff9d0000 {
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-zynq/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ static const struct {
} zynq_fpga_descs[] = {
ZYNQ_DESC(7Z007S),
ZYNQ_DESC(7Z010),
ZYNQ_DESC(7Z010_LR),
ZYNQ_DESC(7Z012S),
ZYNQ_DESC(7Z014S),
ZYNQ_DESC(7Z015),
ZYNQ_DESC(7Z020_LR),
ZYNQ_DESC(7Z020),
ZYNQ_DESC(7Z030),
ZYNQ_DESC(7Z035),
Expand Down
45 changes: 45 additions & 0 deletions board/xilinx/versal-net/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,51 @@ static u8 versal_net_get_bootmode(void)
return bootmode;
}

int spi_get_env_dev(void)
{
struct udevice *dev;
const char *mode = NULL;
int bootseq = -1;

switch (versal_net_get_bootmode()) {
case QSPI_MODE_24BIT:
puts("QSPI_MODE_24\n");
if (uclass_get_device_by_name(UCLASS_SPI,
"spi@f1030000", &dev)) {
debug("QSPI driver for QSPI device is not present\n");
break;
}
mode = "xspi";
bootseq = dev_seq(dev);
break;
case QSPI_MODE_32BIT:
puts("QSPI_MODE_32\n");
if (uclass_get_device_by_name(UCLASS_SPI,
"spi@f1030000", &dev)) {
debug("QSPI driver for QSPI device is not present\n");
break;
}
mode = "xspi";
bootseq = dev_seq(dev);
break;
case OSPI_MODE:
puts("OSPI_MODE\n");
if (uclass_get_device_by_name(UCLASS_SPI,
"spi@f1010000", &dev)) {
debug("OSPI driver for OSPI device is not present\n");
break;
}
mode = "xspi";
bootseq = dev_seq(dev);
break;
default:
break;
}

debug("bootseq %d\n", bootseq);
return bootseq;
}

static int boot_targets_setup(void)
{
u8 bootmode;
Expand Down
13 changes: 0 additions & 13 deletions board/xilinx/zynqmp/zynqmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,7 @@ int board_init(void)
if (sizeof(CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE) > 1)
zynqmp_pmufw_load_config_object(zynqmp_pm_cfg_obj,
zynqmp_pm_cfg_obj_size);
#endif

#if defined(CONFIG_ZYNQMP_FIRMWARE)
struct udevice *dev;

uclass_get_device_by_name(UCLASS_FIRMWARE, "power-management", &dev);
if (!dev) {
uclass_get_device_by_name(UCLASS_FIRMWARE, "zynqmp-power", &dev);
if (!dev)
panic("PMU Firmware device not found - Enable it");
}
#endif

#if defined(CONFIG_SPL_BUILD)
printf("Silicon version:\t%d\n", zynqmp_get_silicon_version());

/* the CSU disables the JTAG interface when secure boot is enabled */
Expand Down
9 changes: 6 additions & 3 deletions board/xilinx/zynqmp/zynqmp_kria.env
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ kr260_setup=i2c dev 1 && run usb_hub_init; i2c dev 2 && run usb_hub_init;
kd240_setup=i2c dev 1 && run usb_hub_init;zynqmp pmufw node 33; zynqmp pmufw node 47

tpm_setup=tpm autostart;
tpm_reset=echo "!!! For TPM reset a full power cycle or pressing the POR_B button is required !!!";
tpm_kv260=if test ${card1_rev} = A -o ${card1_rev} = B -o ${card1_rev} = Y -o ${card1_rev} = Z -o ${card1_rev} = 1; then run tpm_reset; fi
tpm_kd240=if test ${card1_rev} = A; then run tpm_reset; fi

board_setup=\
zynqmp mmio_write 0xFFCA0010 0xfff 0; \
if test ${card1_name} = SCK-KV-G; then run kv260_setup; fi;\
if test ${card1_name} = SCK-KR-G; then run kr260_setup; fi;\
if test ${card1_name} = SCK-KD-G; then run kd240_setup; fi;\
if test ${card1_name} = SCK-KV-G; then run kv260_setup; run tpm_kv260; fi;\
if test ${card1_name} = SCK-KR-G; then run kr260_setup; run tpm_reset; fi;\
if test ${card1_name} = SCK-KD-G; then run kd240_setup; run tpm_kd240; fi;\
run tpm_setup
77 changes: 77 additions & 0 deletions configs/amd_versal2_mini_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
CONFIG_ARM=y
CONFIG_SYS_CONFIG_NAME="amd_versal2_mini"
# CONFIG_ARM64_CRC32 is not set
CONFIG_COUNTER_FREQUENCY=100000000
# CONFIG_ARM64_SUPPORT_AARCH32 is not set
CONFIG_ARCH_VERSAL2=y
CONFIG_TEXT_BASE=0xBBF00000
CONFIG_SYS_MALLOC_LEN=0x20000
CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_NR_DRAM_BANKS=3
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xBBF20000
CONFIG_ENV_SIZE=0x80
CONFIG_DEFAULT_DEVICE_TREE="amd-versal2-mini"
CONFIG_DEBUG_UART_BASE=0xf1920000
CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_SYS_MEM_RSVD_FOR_MMU=y
# CONFIG_PSCI_RESET is not set
CONFIG_SYS_LOAD_ADDR=0xBBF80000
CONFIG_DEBUG_UART=y
CONFIG_SYS_MEMTEST_START=0x00000000
CONFIG_SYS_MEMTEST_END=0x00001000
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
# CONFIG_LEGACY_IMAGE_FORMAT is not set
# CONFIG_AUTOBOOT is not set
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_BOARD_EARLY_INIT_R=y
# CONFIG_BOARD_LATE_INIT is not set
# CONFIG_CMDLINE_EDITING is not set
# CONFIG_AUTO_COMPLETE is not set
# CONFIG_SYS_LONGHELP is not set
CONFIG_SYS_PROMPT="versal2> "
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
# CONFIG_CMD_GO is not set
# CONFIG_CMD_RUN is not set
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EXPORTENV is not set
# CONFIG_CMD_IMPORTENV is not set
# CONFIG_CMD_EDITENV is not set
# CONFIG_CMD_SAVEENV is not set
# CONFIG_CMD_ENV_EXISTS is not set
# CONFIG_CMD_CRC32 is not set
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MX_CYCLIC=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_ECHO is not set
# CONFIG_CMD_ITEST is not set
# CONFIG_CMD_SOURCE is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_CACHE=y
# CONFIG_CMD_SLEEP is not set
CONFIG_OF_EMBED=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
# CONFIG_NET is not set
# CONFIG_DM_DEVICE_REMOVE is not set
# CONFIG_GPIO is not set
# CONFIG_I2C is not set
# CONFIG_INPUT is not set
# CONFIG_MMC is not set
# CONFIG_POWER is not set
CONFIG_DEBUG_UART_PL011=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_DEBUG_UART_SKIP_INIT=y
CONFIG_ARM_DCC=y
CONFIG_PL01X_SERIAL=y
# CONFIG_GZIP is not set
69 changes: 69 additions & 0 deletions configs/amd_versal2_mini_emmc_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
CONFIG_ARM=y
CONFIG_SYS_CONFIG_NAME="amd_versal2_mini"
CONFIG_COUNTER_FREQUENCY=100000000
CONFIG_ARCH_VERSAL2=y
CONFIG_TEXT_BASE=0x10000
CONFIG_SYS_MALLOC_LEN=0x80000
CONFIG_NR_DRAM_BANKS=1
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x10000
CONFIG_ENV_SIZE=0x80
CONFIG_DEFAULT_DEVICE_TREE="amd-versal2-mini"
CONFIG_DEBUG_UART_BASE=0xf1920000
CONFIG_DEBUG_UART_CLOCK=100000000
# CONFIG_PSCI_RESET is not set
CONFIG_SYS_LOAD_ADDR=0x8000000
CONFIG_DEBUG_UART=y
# CONFIG_EXPERT is not set
CONFIG_REMAKE_ELF=y
# CONFIG_AUTOBOOT is not set
CONFIG_SYS_CONSOLE_INFO_QUIET=y
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_BOARD_EARLY_INIT_R=y
# CONFIG_BOARD_LATE_INIT is not set
# CONFIG_CMDLINE_EDITING is not set
# CONFIG_AUTO_COMPLETE is not set
# CONFIG_SYS_LONGHELP is not set
CONFIG_SYS_PROMPT="versal2> "
# CONFIG_CMD_BDI is not set
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_BOOTD is not set
# CONFIG_CMD_BOOTM is not set
# CONFIG_CMD_BOOTI is not set
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_FDT is not set
# CONFIG_CMD_GO is not set
# CONFIG_CMD_RUN is not set
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EXPORTENV is not set
# CONFIG_CMD_IMPORTENV is not set
# CONFIG_CMD_EDITENV is not set
# CONFIG_CMD_SAVEENV is not set
# CONFIG_CMD_ENV_EXISTS is not set
# CONFIG_CMD_CRC32 is not set
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_MMC=y
# CONFIG_CMD_ECHO is not set
# CONFIG_CMD_ITEST is not set
# CONFIG_CMD_SOURCE is not set
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_OF_EMBED=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
# CONFIG_NET is not set
# CONFIG_DM_DEVICE_REMOVE is not set
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ZYNQ=y
CONFIG_DEBUG_UART_PL011=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_DEBUG_UART_SKIP_INIT=y
CONFIG_ARM_DCC=y
CONFIG_PL01X_SERIAL=y
CONFIG_FAT_WRITE=y
# CONFIG_GZIP is not set
# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set
Loading

0 comments on commit 784c70c

Please sign in to comment.