From 5e3b8e5c49d405dd183bb9ce9dd61802f8cc40cc Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 5 Dec 2024 11:38:15 +0100 Subject: arm64: versal: Wire SPIs for dfu_alt_info variable generation Enable automatic dfu_alt_info variable generation based on MTD partition. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/67ff88c8c7186138353c0b74ed37a318fb4b199e.1733395093.git.michal.simek@amd.com --- board/xilinx/versal/board.c | 41 ++++++++++++++++++++++++++++++++++++ configs/xilinx_versal_virt_defconfig | 1 + 2 files changed, 42 insertions(+) diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index fd5c6ced795..964a779b5f1 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -346,6 +347,31 @@ enum env_location env_get_location(enum env_operation op, int prio) #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 bootseq = 0, len = 0; @@ -371,6 +397,21 @@ void set_dfu_alt_info(char *interface, char *devstr) len += snprintf(buf + len, DFU_ALT_BUF_LEN, ".bin fat %d 1", bootseq); break; + case QSPI_MODE_24BIT: + case QSPI_MODE_32BIT: + case OSPI_MODE: + { + u32 base = 0; + u32 size = 0x1500000; + u32 limit = size; + + mtd_found_part(&base, &limit); + + len += snprintf(buf + len, DFU_ALT_BUF_LEN, + "sf 0:0=boot.bin raw 0x%x 0x%x", + base, limit); + } + break; default: return; } diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig index c8f166c1221..fb757c1067d 100644 --- a/configs/xilinx_versal_virt_defconfig +++ b/configs/xilinx_versal_virt_defconfig @@ -83,6 +83,7 @@ CONFIG_CLK_VERSAL=y CONFIG_DFU_TIMEOUT=y CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y +CONFIG_DFU_SF=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1800000 CONFIG_ARM_FFA_TRANSPORT=y CONFIG_FPGA_XILINX=y -- cgit v1.3.1 From a6ca9310ef0e929c57ad8873463cc483fc716e59 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 5 Dec 2024 11:38:16 +0100 Subject: arm64: versal: Support operations around multiboot register Read multiboot register and show it's value by default. Also extend logic in dfu_alt_info string generation to support capsule update for different offsets. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/72ba2efd0fb7b66a86b409a1521fe288a4dd3453.1733395093.git.michal.simek@amd.com --- board/xilinx/versal/board.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index 964a779b5f1..d05220f96ff 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -36,9 +36,15 @@ static xilinx_desc versalpl = { }; #endif +static u32 versal_multi_boot(void) +{ + return readl(0xF1110004); +} + int board_init(void) { printf("EL Level:\tEL%d\n", current_el()); + printf("Multiboot:\t%d\n", versal_multi_boot()); #if defined(CONFIG_FPGA_VERSALPL) fpga_init(); @@ -375,6 +381,7 @@ static void mtd_found_part(u32 *base, u32 *size) void set_dfu_alt_info(char *interface, char *devstr) { int bootseq = 0, len = 0; + u32 multiboot = versal_multi_boot(); u32 bootmode = versal_get_bootmode(); ALLOC_CACHE_ALIGN_BUFFER(char, buf, DFU_ALT_BUF_LEN); @@ -384,6 +391,8 @@ void set_dfu_alt_info(char *interface, char *devstr) memset(buf, 0, sizeof(buf)); + multiboot = env_get_hex("multiboot", multiboot); + switch (bootmode) { case EMMC_MODE: case SD_MODE: @@ -394,6 +403,10 @@ void set_dfu_alt_info(char *interface, char *devstr) 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); break; @@ -401,7 +414,7 @@ void set_dfu_alt_info(char *interface, char *devstr) case QSPI_MODE_32BIT: case OSPI_MODE: { - u32 base = 0; + u32 base = multiboot * SZ_32K; u32 size = 0x1500000; u32 limit = size; -- cgit v1.3.1 From d1de34798a5b829f38357a4faa1a31f6f44ab83b Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 6 Jan 2025 10:20:40 +0100 Subject: arm64: versal: RO multi_boot register in non JTAG bootmode The main reason for this change is that upstream QEMU has no multiboot register implemented that's why access to it fails which ends up in CI failure for our target. That's why in JTAG bootmode returns 0 which is correct behaviour because multiboot register is not used in this mode and value should be ignored and as a side effect it is also fixing CI/Qemu issue. Also move versal_get_bootmode() to avoid function declaration. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/484b9cafc45e72308a1a29a3ab772020f96784cc.1736155238.git.michal.simek@amd.com --- board/xilinx/versal/board.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index d05220f96ff..cff810e02ad 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -36,8 +36,29 @@ static xilinx_desc versalpl = { }; #endif +static u8 versal_get_bootmode(void) +{ + u8 bootmode; + u32 reg = 0; + + reg = readl(&crp_base->boot_mode_usr); + + if (reg >> BOOT_MODE_ALT_SHIFT) + reg >>= BOOT_MODE_ALT_SHIFT; + + bootmode = reg & BOOT_MODES_MASK; + + return bootmode; +} + static u32 versal_multi_boot(void) { + u8 bootmode = versal_get_bootmode(); + + /* Mostly workaround for QEMU CI pipeline */ + if (bootmode == JTAG_MODE) + return 0; + return readl(0xF1110004); } @@ -120,21 +141,6 @@ unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc, return ret; } -static u8 versal_get_bootmode(void) -{ - u8 bootmode; - u32 reg = 0; - - reg = readl(&crp_base->boot_mode_usr); - - if (reg >> BOOT_MODE_ALT_SHIFT) - reg >>= BOOT_MODE_ALT_SHIFT; - - bootmode = reg & BOOT_MODES_MASK; - - return bootmode; -} - static int boot_targets_setup(void) { u8 bootmode; -- cgit v1.3.1 From 71db6bf278bdc20aeb417aeb543b87deefffc60e Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 9 Dec 2024 10:10:56 +0100 Subject: arm64: zynqmp: Do not use hardcoded address in do_zynqmp_reboot() multi_boot is already the part of csu_base structure that's why use it directly instead of using register offset value. Fixes: fc001432e5b0 ("arm64: zynqmp: Add u-boot command to boot into recovery image") Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/3e5c6ea426b81cc73b90e6425764e41a98deb2a6.1733735454.git.michal.simek@amd.com --- arch/arm/mach-zynqmp/zynqmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-zynqmp/zynqmp.c b/arch/arm/mach-zynqmp/zynqmp.c index 8ee25e4c316..3aa218545bb 100644 --- a/arch/arm/mach-zynqmp/zynqmp.c +++ b/arch/arm/mach-zynqmp/zynqmp.c @@ -349,7 +349,7 @@ static int do_zynqmp_reboot(struct cmd_tbl *cmdtp, int flag, multiboot = hextoul(argv[2], NULL); - ret = zynqmp_mmio_write(0xFFCA0010, 0xfff, multiboot); + ret = zynqmp_mmio_write((ulong)&csu_base->multi_boot, 0xfff, multiboot); if (ret != 0) { printf("Failed: mmio write\n"); return ret; -- cgit v1.3.1 From 9ce8f720af95a5ed447ee3c565b08ef8a9898019 Mon Sep 17 00:00:00 2001 From: Naman Trivedi Date: Thu, 12 Dec 2024 09:12:41 +0100 Subject: arm64: zynqmp: add clock-output-names property in clock nodes Replace underscores with hyphens in the clock node names as per dt-schema rule. Also, add clock-output-names property to all clock nodes, so that the resulting clock name do not change when clock node name is changed. Signed-off-by: Naman Trivedi Acked-by: Senthil Nathan Thangaraj Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/1080e31393c3e1b49735b77e7ddc14d570b83222.1733991159.git.michal.simek@amd.com --- arch/arm/dts/zynqmp-clk-ccf.dtsi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/dts/zynqmp-clk-ccf.dtsi b/arch/arm/dts/zynqmp-clk-ccf.dtsi index 60d1b1acf9a..385fed8a852 100644 --- a/arch/arm/dts/zynqmp-clk-ccf.dtsi +++ b/arch/arm/dts/zynqmp-clk-ccf.dtsi @@ -10,39 +10,44 @@ #include / { - pss_ref_clk: pss_ref_clk { + pss_ref_clk: pss-ref-clk { bootph-all; compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <33333333>; + clock-output-names = "pss_ref_clk"; }; - video_clk: video_clk { + video_clk: video-clk { bootph-all; compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <27000000>; + clock-output-names = "video_clk"; }; - pss_alt_ref_clk: pss_alt_ref_clk { + pss_alt_ref_clk: pss-alt-ref-clk { bootph-all; compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <0>; + clock-output-names = "pss_alt_ref_clk"; }; - gt_crx_ref_clk: gt_crx_ref_clk { + gt_crx_ref_clk: gt-crx-ref-clk { bootph-all; compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <108000000>; + clock-output-names = "gt_crx_ref_clk"; }; - aux_ref_clk: aux_ref_clk { + aux_ref_clk: aux-ref-clk { bootph-all; compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <27000000>; + clock-output-names = "aux_ref_clk"; }; }; -- cgit v1.3.1 From bb1562e347e7c53e626d83dcf3907b12e8c364ad Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 12 Dec 2024 10:41:44 +0100 Subject: arm64: zynqmp: Sync DTs with Linux v6.13-rc1 Sync zynqmp* DTS files with v6.13-rc1 Linux kernel including three patches from Sean: arm64: zynqmp: Enable AMS for all boards arm64: zynqmp: Expose AMS to userspace as HWMON arm64: zynqmp: Add thermal zones Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/06e466d64c9d8e718e2f06a76cc65d6da2a37a7b.1733996500.git.michal.simek@amd.com --- arch/arm/dts/zynqmp-sm-k26-revA.dts | 18 ------- arch/arm/dts/zynqmp-zcu100-revC.dts | 4 -- arch/arm/dts/zynqmp-zcu102-revA.dts | 4 -- arch/arm/dts/zynqmp-zcu104-revA.dts | 4 -- arch/arm/dts/zynqmp-zcu104-revC.dts | 4 -- arch/arm/dts/zynqmp.dtsi | 101 +++++++++++++++++++++++++++++++++++- 6 files changed, 100 insertions(+), 35 deletions(-) diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts index 620f5185cc4..b514dc27f71 100644 --- a/arch/arm/dts/zynqmp-sm-k26-revA.dts +++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts @@ -90,20 +90,6 @@ }; }; - ams { - compatible = "iio-hwmon"; - io-channels = <&xilinx_ams 0>, <&xilinx_ams 1>, <&xilinx_ams 2>, - <&xilinx_ams 3>, <&xilinx_ams 4>, <&xilinx_ams 5>, - <&xilinx_ams 6>, <&xilinx_ams 7>, <&xilinx_ams 8>, - <&xilinx_ams 9>, <&xilinx_ams 10>, <&xilinx_ams 11>, - <&xilinx_ams 12>, <&xilinx_ams 13>, <&xilinx_ams 14>, - <&xilinx_ams 15>, <&xilinx_ams 16>, <&xilinx_ams 17>, - <&xilinx_ams 18>, <&xilinx_ams 19>, <&xilinx_ams 20>, - <&xilinx_ams 21>, <&xilinx_ams 22>, <&xilinx_ams 23>, - <&xilinx_ams 24>, <&xilinx_ams 25>, <&xilinx_ams 26>, - <&xilinx_ams 27>, <&xilinx_ams 28>, <&xilinx_ams 29>; - }; - pwm-fan { compatible = "pwm-fan"; status = "okay"; @@ -369,10 +355,6 @@ "", "", "", ""; /* 170 - 173 */ }; -&xilinx_ams { - status = "okay"; -}; - &ams_ps { status = "okay"; }; diff --git a/arch/arm/dts/zynqmp-zcu100-revC.dts b/arch/arm/dts/zynqmp-zcu100-revC.dts index c9051360931..3542844e697 100644 --- a/arch/arm/dts/zynqmp-zcu100-revC.dts +++ b/arch/arm/dts/zynqmp-zcu100-revC.dts @@ -593,10 +593,6 @@ status = "okay"; }; -&xilinx_ams { - status = "okay"; -}; - &ams_ps { status = "okay"; }; diff --git a/arch/arm/dts/zynqmp-zcu102-revA.dts b/arch/arm/dts/zynqmp-zcu102-revA.dts index dd63d22f45e..955810ae717 100644 --- a/arch/arm/dts/zynqmp-zcu102-revA.dts +++ b/arch/arm/dts/zynqmp-zcu102-revA.dts @@ -1065,10 +1065,6 @@ status = "okay"; }; -&xilinx_ams { - status = "okay"; -}; - &ams_ps { status = "okay"; }; diff --git a/arch/arm/dts/zynqmp-zcu104-revA.dts b/arch/arm/dts/zynqmp-zcu104-revA.dts index 31effbf27a8..64d822255ec 100644 --- a/arch/arm/dts/zynqmp-zcu104-revA.dts +++ b/arch/arm/dts/zynqmp-zcu104-revA.dts @@ -527,10 +527,6 @@ status = "okay"; }; -&xilinx_ams { - status = "okay"; -}; - &ams_ps { status = "okay"; }; diff --git a/arch/arm/dts/zynqmp-zcu104-revC.dts b/arch/arm/dts/zynqmp-zcu104-revC.dts index 999b2431bdf..3e883d717c2 100644 --- a/arch/arm/dts/zynqmp-zcu104-revC.dts +++ b/arch/arm/dts/zynqmp-zcu104-revC.dts @@ -539,10 +539,6 @@ status = "okay"; }; -&xilinx_ams { - status = "okay"; -}; - &ams_ps { status = "okay"; }; diff --git a/arch/arm/dts/zynqmp.dtsi b/arch/arm/dts/zynqmp.dtsi index 70ca5e6379f..e8750b08162 100644 --- a/arch/arm/dts/zynqmp.dtsi +++ b/arch/arm/dts/zynqmp.dtsi @@ -18,6 +18,7 @@ #include #include #include +#include / { compatible = "xlnx,zynqmp"; @@ -36,6 +37,7 @@ #size-cells = <0>; cpu0: cpu@0 { + #cooling-cells = <2>; compatible = "arm,cortex-a53"; device_type = "cpu"; enable-method = "psci"; @@ -46,6 +48,7 @@ }; cpu1: cpu@1 { + #cooling-cells = <2>; compatible = "arm,cortex-a53"; device_type = "cpu"; enable-method = "psci"; @@ -56,6 +59,7 @@ }; cpu2: cpu@2 { + #cooling-cells = <2>; compatible = "arm,cortex-a53"; device_type = "cpu"; enable-method = "psci"; @@ -66,6 +70,7 @@ }; cpu3: cpu@3 { + #cooling-cells = <2>; compatible = "arm,cortex-a53"; device_type = "cpu"; enable-method = "psci"; @@ -388,6 +393,101 @@ }; }; + ams { + compatible = "iio-hwmon"; + io-channels = <&xilinx_ams 0>, <&xilinx_ams 1>, <&xilinx_ams 2>, + <&xilinx_ams 3>, <&xilinx_ams 4>, <&xilinx_ams 5>, + <&xilinx_ams 6>, <&xilinx_ams 7>, <&xilinx_ams 8>, + <&xilinx_ams 9>, <&xilinx_ams 10>, <&xilinx_ams 11>, + <&xilinx_ams 12>, <&xilinx_ams 13>, <&xilinx_ams 14>, + <&xilinx_ams 15>, <&xilinx_ams 16>, <&xilinx_ams 17>, + <&xilinx_ams 18>, <&xilinx_ams 19>, <&xilinx_ams 20>, + <&xilinx_ams 21>, <&xilinx_ams 22>, <&xilinx_ams 23>, + <&xilinx_ams 24>, <&xilinx_ams 25>, <&xilinx_ams 26>, + <&xilinx_ams 27>, <&xilinx_ams 28>, <&xilinx_ams 29>; + }; + + + tsens_apu: thermal-sensor-apu { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&xilinx_ams 7>; + io-channel-names = "sensor-channel"; + }; + + tsens_rpu: thermal-sensor-rpu { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&xilinx_ams 8>; + io-channel-names = "sensor-channel"; + }; + + tsens_pl: thermal-sensor-pl { + compatible = "generic-adc-thermal"; + #thermal-sensor-cells = <0>; + io-channels = <&xilinx_ams 20>; + io-channel-names = "sensor-channel"; + }; + + thermal-zones { + apu-thermal { + polling-delay-passive = <1000>; + polling-delay = <5000>; + thermal-sensors = <&tsens_apu>; + + trips { + apu_passive: passive { + temperature = <93000>; + hysteresis = <3500>; + type = "passive"; + }; + + apu_critical: critical { + temperature = <96500>; + hysteresis = <3500>; + type = "critical"; + }; + }; + + cooling-maps { + map { + trip = <&apu_passive>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + rpu-thermal { + polling-delay = <10000>; + thermal-sensors = <&tsens_rpu>; + + trips { + critical { + temperature = <96500>; + hysteresis = <3500>; + type = "critical"; + }; + }; + }; + + pl-thermal { + polling-delay = <10000>; + thermal-sensors = <&tsens_pl>; + + trips { + critical { + temperature = <96500>; + hysteresis = <3500>; + type = "critical"; + }; + }; + }; + }; + amba: axi { compatible = "simple-bus"; bootph-all; @@ -1153,7 +1253,6 @@ xilinx_ams: ams@ffa50000 { compatible = "xlnx,zynqmp-ams"; - status = "disabled"; interrupt-parent = <&gic>; interrupts = ; reg = <0x0 0xffa50000 0x0 0x800>; -- cgit v1.3.1 From 539cf291adec4aca10c3ca9252b18718cf7eb0bc Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 18 Dec 2024 12:40:44 +0100 Subject: zynqmp: Remove usb init initialization for Kria USB hub initialization is done by driver introduced by commit 09f557e106ef ("usb: onboard-hub: Add i2c initialization for usb5744 hub") that's why there is no need to do initialization via variables. Reported-by: Love Kumar Acked-by: Ilias Apalodimas Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/96e9c80aeeed4e9664858bf236476997d17a9914.1734522042.git.michal.simek@amd.com --- board/xilinx/zynqmp/zynqmp_kria.env | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/board/xilinx/zynqmp/zynqmp_kria.env b/board/xilinx/zynqmp/zynqmp_kria.env index ff3a0924de7..b0c2ac6f2e8 100644 --- a/board/xilinx/zynqmp/zynqmp_kria.env +++ b/board/xilinx/zynqmp/zynqmp_kria.env @@ -62,14 +62,8 @@ bootmenu_0=eMMC Boot=run som_mmc_boot bootmenu_1=SD Boot=run som_cc_boot bootmenu_delay=5 -usb_hub_init=mw 1000 0056 && sleep 1 && i2c write 1000 2d aa 2 -s - -# usb hub init -kv260_setup=i2c dev 1 && run usb_hub_init -# usb hub init -kr260_setup=i2c dev 1 && run usb_hub_init; i2c dev 2 && run usb_hub_init; -# usb hub init with enabling PM nodes for ... -kd240_setup=i2c dev 1 && run usb_hub_init;zynqmp pmufw node 33; zynqmp pmufw node 47 +# Enabling PM nodes for uart0 and can0 +kd240_setup=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 !!!"; @@ -79,7 +73,7 @@ tpm_kd240=if test ${card1_rev} = A; then run tpm_reset; fi board_setup=\ rtc dev 0; \ zynqmp mmio_write 0xFFCA0010 0xfff 0; \ -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-KV-G; then run tpm_kv260; fi;\ +if test ${card1_name} = SCK-KR-G; then run tpm_reset; fi;\ if test ${card1_name} = SCK-KD-G; then run kd240_setup; run tpm_kd240; fi;\ run tpm_setup -- cgit v1.3.1 From c2612feb65f692817c892d5aaf896255fc391a3f Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 16 Dec 2024 08:52:34 +0100 Subject: xilinx: Sort OF_LIST and add missing vpk120 and zcu670 platforms Sort OF_LIST entries and also add missing vpk120 and zcu670 platforms. Compilation is failing when these DTs are exported via DEVICE_TREE because binman is not able to create a link for default configuration. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/505996b6ef969b1b677ab921462c75c798c366e7.1734335553.git.michal.simek@amd.com --- configs/xilinx_zynqmp_virt_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig index 09f487acf0d..b13079cdf70 100644 --- a/configs/xilinx_zynqmp_virt_defconfig +++ b/configs/xilinx_zynqmp_virt_defconfig @@ -110,7 +110,7 @@ CONFIG_CMD_UBI=y CONFIG_PARTITION_TYPE_GUID=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_BOARD=y -CONFIG_OF_LIST="avnet-ultra96-rev1 zynqmp-a2197-revA zynqmp-e-a2197-00-revA zynqmp-e-a2197-00-revB zynqmp-g-a2197-00-revA zynqmp-m-a2197-01-revA zynqmp-m-a2197-02-revA zynqmp-m-a2197-03-revA zynqmp-p-a2197-00-revA zynqmp-zc1232-revA zynqmp-zc1254-revA zynqmp-zc1751-xm015-dc1 zynqmp-zc1751-xm016-dc2 zynqmp-zc1751-xm017-dc3 zynqmp-zc1751-xm018-dc4 zynqmp-zc1751-xm019-dc5 zynqmp-zcu100-revC zynqmp-zcu102-rev1.1 zynqmp-zcu102-rev1.0 zynqmp-zcu102-revA zynqmp-zcu102-revB zynqmp-zcu104-revA zynqmp-zcu104-revC zynqmp-zcu106-revA zynqmp-zcu106-rev1.0 zynqmp-zcu111-revA zynqmp-zcu1275-revA zynqmp-zcu1275-revB zynqmp-zcu1285-revA zynqmp-zcu208-revA zynqmp-zcu216-revA zynqmp-topic-miamimp-xilinx-xdp-v1r1 zynqmp-sm-k26-revA zynqmp-smk-k26-revA zynqmp-dlc21-revA" +CONFIG_OF_LIST="avnet-ultra96-rev1 zynqmp-a2197-revA zynqmp-dlc21-revA zynqmp-e-a2197-00-revA zynqmp-e-a2197-00-revB zynqmp-g-a2197-00-revA zynqmp-m-a2197-01-revA zynqmp-m-a2197-02-revA zynqmp-m-a2197-03-revA zynqmp-p-a2197-00-revA zynqmp-sm-k26-revA zynqmp-smk-k26-revA zynqmp-topic-miamimp-xilinx-xdp-v1r1 zynqmp-vpk120-revA zynqmp-vp-x-a2785-00-revA zynqmp-zc1232-revA zynqmp-zc1254-revA zynqmp-zc1751-xm015-dc1 zynqmp-zc1751-xm016-dc2 zynqmp-zc1751-xm017-dc3 zynqmp-zc1751-xm018-dc4 zynqmp-zc1751-xm019-dc5 zynqmp-zcu100-revC zynqmp-zcu102-rev1.0 zynqmp-zcu102-rev1.1 zynqmp-zcu102-revA zynqmp-zcu102-revB zynqmp-zcu104-revA zynqmp-zcu104-revC zynqmp-zcu106-rev1.0 zynqmp-zcu106-revA zynqmp-zcu111-revA zynqmp-zcu1275-revA zynqmp-zcu1275-revB zynqmp-zcu1285-revA zynqmp-zcu208-revA zynqmp-zcu216-revA zynqmp-zcu670-revA zynqmp-zcu670-revB" CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent interrupts iommus power-domains" CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_FAT=y -- cgit v1.3.1 From 7a8417845d6485596b6f1550a426b0831b3514c9 Mon Sep 17 00:00:00 2001 From: Neal Frager Date: Wed, 18 Dec 2024 13:01:29 +0000 Subject: board: zynqmp: zynqmp-sm-k26-revA: release DP from reset This releases the DP configuration from reset early on during the boot process for K26 SOM. It will also avoid the boot hang situation should any attempt be made to configure the DP registers while it is still in reset. Fixes the same issue as described by the commit 8b81010a2fe3 ("video: zynqmp: Add support for reset"). Signed-off-by: Neal Frager Link: https://lore.kernel.org/r/20241218130129.687650-1-neal.frager@amd.com Signed-off-by: Michal Simek --- board/xilinx/zynqmp/zynqmp-sm-k26-revA/psu_init_gpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/xilinx/zynqmp/zynqmp-sm-k26-revA/psu_init_gpl.c b/board/xilinx/zynqmp/zynqmp-sm-k26-revA/psu_init_gpl.c index e5598807e8c..f8d7c8466f6 100644 --- a/board/xilinx/zynqmp/zynqmp-sm-k26-revA/psu_init_gpl.c +++ b/board/xilinx/zynqmp/zynqmp-sm-k26-revA/psu_init_gpl.c @@ -465,7 +465,7 @@ static unsigned long psu_peripherals_pre_init_data(void) static unsigned long psu_peripherals_init_data(void) { - psu_mask_write(0xFD1A0100, 0x0000807CU, 0x00000000U); + psu_mask_write(0xFD1A0100, 0x0001807CU, 0x00000000U); psu_mask_write(0xFF5E0238, 0x001A0000U, 0x00000000U); psu_mask_write(0xFF5E023C, 0x0093C018U, 0x00000000U); psu_mask_write(0xFF5E0238, 0x00000001U, 0x00000000U); -- cgit v1.3.1 From caf1d916c51544f8176ea2d4bd17662aabf229e3 Mon Sep 17 00:00:00 2001 From: Venkatesh Yadav Abbarapu Date: Fri, 3 Jan 2025 10:18:12 +0530 Subject: config: xilinx: Enable the SPI_STACKED_PARALLEL config option Enable the SPI_STACKED_PARALLEL config option for all AMD/xilinx platforms, as this is required for parallel and stacked memories. Signed-off-by: Venkatesh Yadav Abbarapu Link: https://lore.kernel.org/r/20250103044812.18828-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek --- configs/amd_versal2_mini_qspi_defconfig | 1 + configs/xilinx_versal_mini_qspi_defconfig | 1 + configs/xilinx_versal_net_mini_qspi_defconfig | 1 + configs/xilinx_zynqmp_kria_defconfig | 1 + configs/xilinx_zynqmp_mini_qspi_defconfig | 1 + configs/zynq_cse_qspi_defconfig | 1 + 6 files changed, 6 insertions(+) diff --git a/configs/amd_versal2_mini_qspi_defconfig b/configs/amd_versal2_mini_qspi_defconfig index eb63f060c1b..2750fa2cc27 100644 --- a/configs/amd_versal2_mini_qspi_defconfig +++ b/configs/amd_versal2_mini_qspi_defconfig @@ -74,5 +74,6 @@ CONFIG_PL01X_SERIAL=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ZYNQMP_GQSPI=y +CONFIG_SPI_STACKED_PARALLEL=y # CONFIG_GZIP is not set # CONFIG_LMB is not set diff --git a/configs/xilinx_versal_mini_qspi_defconfig b/configs/xilinx_versal_mini_qspi_defconfig index 4d23b353409..529815afe16 100644 --- a/configs/xilinx_versal_mini_qspi_defconfig +++ b/configs/xilinx_versal_mini_qspi_defconfig @@ -78,4 +78,5 @@ CONFIG_ARM_DCC=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ZYNQMP_GQSPI=y +CONFIG_SPI_STACKED_PARALLEL=y # CONFIG_LMB is not set diff --git a/configs/xilinx_versal_net_mini_qspi_defconfig b/configs/xilinx_versal_net_mini_qspi_defconfig index 8453be5a590..818c62c6959 100644 --- a/configs/xilinx_versal_net_mini_qspi_defconfig +++ b/configs/xilinx_versal_net_mini_qspi_defconfig @@ -76,4 +76,5 @@ CONFIG_ARM_DCC=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ZYNQMP_GQSPI=y +CONFIG_SPI_STACKED_PARALLEL=y # CONFIG_LMB is not set diff --git a/configs/xilinx_zynqmp_kria_defconfig b/configs/xilinx_zynqmp_kria_defconfig index 8fb66f7cb08..a68bd522f90 100644 --- a/configs/xilinx_zynqmp_kria_defconfig +++ b/configs/xilinx_zynqmp_kria_defconfig @@ -197,6 +197,7 @@ CONFIG_SOC_XILINX_ZYNQMP=y CONFIG_SPI=y CONFIG_ZYNQ_SPI=y CONFIG_ZYNQMP_GQSPI=y +CONFIG_SPI_STACKED_PARALLEL=y CONFIG_SYSRESET=y CONFIG_SYSRESET_CMD_POWEROFF=y CONFIG_SYSRESET_PSCI=y diff --git a/configs/xilinx_zynqmp_mini_qspi_defconfig b/configs/xilinx_zynqmp_mini_qspi_defconfig index 9d785413a8e..7667e67a05a 100644 --- a/configs/xilinx_zynqmp_mini_qspi_defconfig +++ b/configs/xilinx_zynqmp_mini_qspi_defconfig @@ -93,6 +93,7 @@ CONFIG_SPI_FLASH_WINBOND=y CONFIG_ARM_DCC=y CONFIG_SPI=y CONFIG_ZYNQMP_GQSPI=y +CONFIG_SPI_STACKED_PARALLEL=y # CONFIG_BINMAN_FDT is not set CONFIG_BINMAN_DTB="./arch/arm/dts/zynqmp-binman-mini.dtb" CONFIG_PANIC_HANG=y diff --git a/configs/zynq_cse_qspi_defconfig b/configs/zynq_cse_qspi_defconfig index cd84df1e290..6a5e1dd5d95 100644 --- a/configs/zynq_cse_qspi_defconfig +++ b/configs/zynq_cse_qspi_defconfig @@ -92,6 +92,7 @@ CONFIG_SPI_FLASH_WINBOND=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_ARM_DCC=y CONFIG_ZYNQ_QSPI=y +CONFIG_SPI_STACKED_PARALLEL=y CONFIG_SYS_TIMER_COUNTS_DOWN=y # CONFIG_GZIP is not set # CONFIG_LMB is not set -- cgit v1.3.1 From e7ce90145269d11d171e285b5d87dfbe517caa58 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 6 Jan 2025 09:42:21 +0100 Subject: arm64: zynqmp: Enable iio-hwmon description only for SOM Description is coming from SOM only that's why enable it only on SOM. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/08ee4ce2fe242905dd99cea2b87373b57d8fea91.1736152939.git.michal.simek@amd.com --- arch/arm/dts/zynqmp-sm-k26-revA.dts | 4 ++++ arch/arm/dts/zynqmp.dtsi | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/zynqmp-sm-k26-revA.dts b/arch/arm/dts/zynqmp-sm-k26-revA.dts index b514dc27f71..70acd3eb88b 100644 --- a/arch/arm/dts/zynqmp-sm-k26-revA.dts +++ b/arch/arm/dts/zynqmp-sm-k26-revA.dts @@ -97,6 +97,10 @@ }; }; +&ams { + status = "okay"; +}; + &modepin_gpio { label = "modepin"; }; diff --git a/arch/arm/dts/zynqmp.dtsi b/arch/arm/dts/zynqmp.dtsi index e8750b08162..0e0436ecce8 100644 --- a/arch/arm/dts/zynqmp.dtsi +++ b/arch/arm/dts/zynqmp.dtsi @@ -393,8 +393,9 @@ }; }; - ams { + ams: ams { compatible = "iio-hwmon"; + status = "disabled"; io-channels = <&xilinx_ams 0>, <&xilinx_ams 1>, <&xilinx_ams 2>, <&xilinx_ams 3>, <&xilinx_ams 4>, <&xilinx_ams 5>, <&xilinx_ams 6>, <&xilinx_ams 7>, <&xilinx_ams 8>, -- cgit v1.3.1 From b446b8a865613a8062765ad7141f508babc4a56a Mon Sep 17 00:00:00 2001 From: Jonathan Stroud Date: Mon, 6 Jan 2025 09:42:48 +0100 Subject: arm64: zynqmp: Add eeprom labels for System Controller dts Label all eeproms so we can open by label rather than a fixed i2c address. Signed-off-by: Jonathan Stroud Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/878558c3c859599d29bc4ae2278baebf84b368e0.1736152966.git.michal.simek@amd.com --- arch/arm/dts/zynqmp-e-a2197-00-revA.dts | 4 ++++ arch/arm/dts/zynqmp-sc-revB.dts | 1 + 2 files changed, 5 insertions(+) diff --git a/arch/arm/dts/zynqmp-e-a2197-00-revA.dts b/arch/arm/dts/zynqmp-e-a2197-00-revA.dts index 4e0587fd441..6e2d9542012 100644 --- a/arch/arm/dts/zynqmp-e-a2197-00-revA.dts +++ b/arch/arm/dts/zynqmp-e-a2197-00-revA.dts @@ -494,6 +494,7 @@ /* Use for storing information about SC board */ eeprom: eeprom@54 { /* u34 - m24128 16kB */ compatible = "st,24c128", "atmel,24c128"; + label = "eeprom_cc"; reg = <0x54>; /* 0x5c too */ }; si570_ref_clk: clock-generator@5d { /* u32 */ @@ -509,6 +510,7 @@ /* and connector J212D */ eeprom_ebm: eeprom@52 { /* x-ebm module */ compatible = "st,24c128", "atmel,24c128"; + label = "eeprom_ebm"; reg = <0x52>; }; }; @@ -520,6 +522,7 @@ /* expected eeprom 0x50 FMC cards */ eeprom_fmc1: eeprom@50 { compatible = "st,24c128", "atmel,24c128"; + label = "eeprom_fmc1"; reg = <0x50>; }; }; @@ -531,6 +534,7 @@ /* expected eeprom 0x50 FMC cards */ eeprom_fmc2: eeprom@50 { compatible = "st,24c128", "atmel,24c128"; + label = "eeprom_fmc2"; reg = <0x50>; }; }; diff --git a/arch/arm/dts/zynqmp-sc-revB.dts b/arch/arm/dts/zynqmp-sc-revB.dts index c4f70581695..6f5856017bf 100644 --- a/arch/arm/dts/zynqmp-sc-revB.dts +++ b/arch/arm/dts/zynqmp-sc-revB.dts @@ -175,6 +175,7 @@ /* Use for storing information about SC board */ eeprom: eeprom@54 { /* u34 - m24128 16kB */ compatible = "st,24c128", "atmel,24c128"; + label = "eeprom_cc"; reg = <0x54>; /* & 0x5c */ bootph-all; }; -- cgit v1.3.1 From 4d335292072d89598b8752d97624c813ce8668ea Mon Sep 17 00:00:00 2001 From: Venkatesh Yadav Abbarapu Date: Mon, 6 Jan 2025 14:36:30 +0530 Subject: board: xilinx: Add missing prototype for set_dfu_alt_info Add missing prototype to fix the sparse warning, warning: no previous prototype for 'set_dfu_alt_info' [-Wmissing-prototypes]. Signed-off-by: Venkatesh Yadav Abbarapu Link: https://lore.kernel.org/r/20250106090630.209938-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek --- board/xilinx/versal/board.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c index cff810e02ad..b4483d00ad1 100644 --- a/board/xilinx/versal/board.c +++ b/board/xilinx/versal/board.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include -- cgit v1.3.1 From f039cde1e2cf0eab7934679109648b9a6fda465c Mon Sep 17 00:00:00 2001 From: Ibai Erkiaga Date: Tue, 7 Jan 2025 14:51:08 +0000 Subject: zynqmp_gqspi: update to log_debug Update recent parallel memory support code to move to log_debug instead of debug as per logging in U-Boot documentation Signed-off-by: Ibai Erkiaga Link: https://lore.kernel.org/r/20250107145110.2855213-1-ibai.erkiaga-elorza@amd.com Signed-off-by: Michal Simek --- drivers/spi/zynqmp_gqspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c index 4251bf28cd3..2a095d0c58e 100644 --- a/drivers/spi/zynqmp_gqspi.c +++ b/drivers/spi/zynqmp_gqspi.c @@ -255,7 +255,7 @@ static u32 zynqmp_qspi_bus_select(struct zynqmp_qspi_priv *priv) GQSPI_GFIFO_CS_LOWER | GQSPI_GFIFO_CS_UPPER; else - debug("Wrong Bus selection:0x%x\n", priv->bus); + log_debug("Wrong Bus selection:0x%x\n", priv->bus); } else { if (priv->u_page) gqspi_fifo_reg = GQSPI_GFIFO_LOW_BUS | -- cgit v1.3.1 From 3a2bf24a85b2b35f1c7d6f0633d6aa528a6970b8 Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Tue, 14 Jan 2025 07:58:12 -0600 Subject: rtc: zynqmp: allow on Versal architectures Allow the ZyncMP RTC driver to be enabled on Versal architectures. Also, require DM_RTC since the driver uses the RTC driver model. Signed-off-by: Vincent Fazio Link: https://lore.kernel.org/r/20250114135812.2605618-1-vfazio@xes-inc.com Signed-off-by: Michal Simek --- drivers/rtc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 9c2d1398247..6467f20422b 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -294,7 +294,7 @@ config RTC_DAVINCI config RTC_ZYNQMP bool "Enable ZynqMP RTC driver" - depends on ARCH_ZYNQMP + depends on DM_RTC && (ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2) help Say "yes" here to support the on chip real time clock present on Xilinx ZynqMP SoC. -- cgit v1.3.1