From 2b7c6b6f3ca34970be61c5189d263f94f0c94917 Mon Sep 17 00:00:00 2001 From: João Paulo Gonçalves Date: Mon, 23 Jun 2025 14:39:54 -0300 Subject: boot: Make ft_board_setup_ex() generic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In some use cases, board-specific device tree changes must not be overwritten by system fixups. Although U-Boot provides ft_board_setup_ex() for this purpose, it is currently only used on TI Keystone. Make ft_board_setup_ex() to be a generic option, allowing its use by other architectures/boards. To maintain backward compatibility, enable it by default on TI Keystone. Signed-off-by: João Paulo Gonçalves --- arch/arm/Kconfig | 1 + boot/Kconfig | 10 ++++++++++ boot/image-fdt.c | 27 +++++++++++++-------------- cmd/fdt.c | 6 +++--- include/fdt_support.h | 15 ++++++++++----- 5 files changed, 37 insertions(+), 22 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9a22c7f6cea..da67f20675a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -810,6 +810,7 @@ config ARCH_KEYSTONE imply CMD_SAVES imply DM_I2C imply FIT + imply OF_BOARD_SETUP_EXTENDED imply SOC_TI imply TI_KEYSTONE_SERDES diff --git a/boot/Kconfig b/boot/Kconfig index 1f5ecb60c77..b0548358e8b 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1839,6 +1839,16 @@ config OF_BOARD_SETUP board-specific information in the device tree for use by the OS. The device tree is then passed to the OS. +config OF_BOARD_SETUP_EXTENDED + bool "Set up latest board-specific details in device tree before boot" + imply OF_BOARD_SETUP + help + This causes U-Boot to call ft_board_setup_ex() before booting into + the Operating System. Similar function as ft_board_setup(). However, + its modifications are not overwritten by other system changes and are + applied to the device tree as the very last step before boot. + The device tree is then passed to the OS. + config OF_SYSTEM_SETUP bool "Set up system-specific details in device tree before boot" help diff --git a/boot/image-fdt.c b/boot/image-fdt.c index 8f718ad29f6..1c5d9426b86 100644 --- a/boot/image-fdt.c +++ b/boot/image-fdt.c @@ -571,6 +571,7 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb) { ulong *initrd_start = &images->initrd_start; ulong *initrd_end = &images->initrd_end; + bool skip_board_fixup = false; int ret, fdt_ret, of_size; if (IS_ENABLED(CONFIG_OF_ENV_SETUP)) { @@ -621,18 +622,18 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb) fdt_fixup_pstore(blob); #endif if (IS_ENABLED(CONFIG_OF_BOARD_SETUP)) { - const char *skip_board_fixup; + skip_board_fixup = (env_get_ulong("skip_board_fixup", 10, 0) == 1); - skip_board_fixup = env_get("skip_board_fixup"); - if (skip_board_fixup && ((int)simple_strtol(skip_board_fixup, NULL, 10) == 1)) { - printf("skip board fdt fixup\n"); - } else { - fdt_ret = ft_board_setup(blob, gd->bd); - if (fdt_ret) { - printf("ERROR: board-specific fdt fixup failed: %s\n", - fdt_strerror(fdt_ret)); - goto err; - } + if (skip_board_fixup) + printf("skip all board fdt fixup\n"); + } + + if (IS_ENABLED(CONFIG_OF_BOARD_SETUP) && !skip_board_fixup) { + fdt_ret = ft_board_setup(blob, gd->bd); + if (fdt_ret) { + printf("ERROR: board-specific fdt fixup failed: %s\n", + fdt_strerror(fdt_ret)); + goto err; } } if (IS_ENABLED(CONFIG_OF_SYSTEM_SETUP)) { @@ -685,10 +686,8 @@ int image_setup_libfdt(struct bootm_headers *images, void *blob, bool lmb) if (CONFIG_IS_ENABLED(LMB) && lmb) lmb_reserve(map_to_sysmem(blob), of_size, LMB_NONE); -#if defined(CONFIG_ARCH_KEYSTONE) - if (IS_ENABLED(CONFIG_OF_BOARD_SETUP)) + if (IS_ENABLED(CONFIG_OF_BOARD_SETUP_EXTENDED) && !skip_board_fixup) ft_board_setup_ex(blob, gd->bd); -#endif return 0; err: diff --git a/cmd/fdt.c b/cmd/fdt.c index d16b141ce32..a67c30b21d5 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -691,9 +691,9 @@ static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) fdt_strerror(err)); return CMD_RET_FAILURE; } -#ifdef CONFIG_ARCH_KEYSTONE - ft_board_setup_ex(working_fdt, gd->bd); -#endif + + if (IS_ENABLED(CONFIG_OF_BOARD_SETUP_EXTENDED)) + ft_board_setup_ex(working_fdt, gd->bd); } #endif /* Create a chosen node */ diff --git a/include/fdt_support.h b/include/fdt_support.h index 049190cf3d7..47b8b63d13d 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -240,11 +240,16 @@ int board_rng_seed(struct abuf *buf); */ const char *board_fdt_chosen_bootargs(const struct fdt_property *fdt_ba); -/* - * The keystone2 SOC requires all 32 bit aliased addresses to be converted - * to their 36 physical format. This has to happen after all fdt nodes - * are added or modified by the image_setup_libfdt(). The ft_board_setup_ex() - * called at the end of the image_setup_libfdt() is to do that convertion. +/** + * ft_board_setup_ex() - Latest board-specific FDT changes + * + * @blob: FDT blob to update + * @bd: Pointer to board data + * + * Execute board-specific device tree modifications that must be the latest FDT + * changes and cannot be overwritten by other system fixups. + * + * This function is called if CONFIG_OF_BOARD_SETUP_EXTENDED is defined. */ void ft_board_setup_ex(void *blob, struct bd_info *bd); -- cgit v1.3.1 From 9e672e4260144bf43a5b38db48537ecc097d296c Mon Sep 17 00:00:00 2001 From: João Paulo Gonçalves Date: Mon, 23 Jun 2025 14:39:55 -0300 Subject: arm: mach-k3: Export common fdt fixups for use in board code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid code duplication by making the common TI K3 device tree fixup functions to be reusable by board-specific code. Signed-off-by: João Paulo Gonçalves --- arch/arm/mach-k3/am62ax/am62a7_fdt.c | 3 +- arch/arm/mach-k3/am62px/am62p5_fdt.c | 40 ++------------------------ arch/arm/mach-k3/am62x/am625_fdt.c | 41 ++------------------------- arch/arm/mach-k3/am65x/am654_fdt.c | 3 +- arch/arm/mach-k3/common_fdt.c | 38 ++++++++++++++++++++++++- arch/arm/mach-k3/common_fdt.h | 14 --------- arch/arm/mach-k3/include/mach/k3-common-fdt.h | 15 ++++++++++ arch/arm/mach-k3/j721e/j721e_fdt.c | 3 +- arch/arm/mach-k3/j721s2/j721s2_fdt.c | 3 +- arch/arm/mach-k3/j722s/j722s_fdt.c | 2 +- arch/arm/mach-k3/j784s4/j784s4_fdt.c | 3 +- 11 files changed, 62 insertions(+), 103 deletions(-) delete mode 100644 arch/arm/mach-k3/common_fdt.h create mode 100644 arch/arm/mach-k3/include/mach/k3-common-fdt.h diff --git a/arch/arm/mach-k3/am62ax/am62a7_fdt.c b/arch/arm/mach-k3/am62ax/am62a7_fdt.c index 7f764ab36b5..c7c5d2f0885 100644 --- a/arch/arm/mach-k3/am62ax/am62a7_fdt.c +++ b/arch/arm/mach-k3/am62ax/am62a7_fdt.c @@ -3,11 +3,10 @@ * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ */ +#include #include #include -#include "../common_fdt.h" - int ft_system_setup(void *blob, struct bd_info *bd) { fdt_fixup_reserved(blob, "tfa", CONFIG_K3_ATF_LOAD_ADDR, 0x80000); diff --git a/arch/arm/mach-k3/am62px/am62p5_fdt.c b/arch/arm/mach-k3/am62px/am62p5_fdt.c index 2c40fa5a594..4d8061354c8 100644 --- a/arch/arm/mach-k3/am62px/am62p5_fdt.c +++ b/arch/arm/mach-k3/am62px/am62p5_fdt.c @@ -3,8 +3,8 @@ * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ */ +#include #include -#include "../common_fdt.h" #include static void fdt_fixup_cores_wdt_nodes_am62p(void *blob, int core_nr) @@ -38,42 +38,6 @@ static void fdt_fixup_canfd_nodes_am62p(void *blob, bool has_canfd) } } -static int fdt_fixup_trips_node(void *blob, int zoneoffset, int maxc) -{ - int node, trip; - - node = fdt_subnode_offset(blob, zoneoffset, "trips"); - if (node < 0) - return -1; - - fdt_for_each_subnode(trip, blob, node) { - const char *type = fdt_getprop(blob, trip, "type", NULL); - - if (!type || (strncmp(type, "critical", 8) != 0)) - continue; - - if (fdt_setprop_u32(blob, trip, "temperature", 1000 * maxc) < 0) - return -1; - } - - return 0; -} - -static void fdt_fixup_thermal_zone_nodes_am62p(void *blob, int maxc) -{ - int node, zone; - - node = fdt_path_offset(blob, "/thermal-zones"); - if (node < 0) - return; - - fdt_for_each_subnode(zone, blob, node) { - if (fdt_fixup_trips_node(blob, zone, maxc) < 0) - printf("Failed to set temperature in %s critical trips\n", - fdt_get_name(blob, zone, NULL)); - } -} - static void fdt_fixup_cpu_freq_nodes_am62p(void *blob, int max_freq) { if (max_freq >= 1250000000) @@ -90,7 +54,7 @@ int ft_system_setup(void *blob, struct bd_info *bd) fdt_fixup_cores_wdt_nodes_am62p(blob, k3_get_core_nr()); fdt_fixup_video_codec_nodes_am62p(blob, k3_has_video_codec()); fdt_fixup_canfd_nodes_am62p(blob, k3_has_canfd()); - fdt_fixup_thermal_zone_nodes_am62p(blob, k3_get_max_temp()); + fdt_fixup_thermal_critical_trips_k3(blob, k3_get_max_temp()); fdt_fixup_cpu_freq_nodes_am62p(blob, k3_get_a53_max_frequency()); fdt_fixup_reserved(blob, "tfa", CONFIG_K3_ATF_LOAD_ADDR, 0x80000); fdt_fixup_reserved(blob, "optee", CONFIG_K3_OPTEE_LOAD_ADDR, 0x1800000); diff --git a/arch/arm/mach-k3/am62x/am625_fdt.c b/arch/arm/mach-k3/am62x/am625_fdt.c index ab9b573f3cf..e5d95ab7dd1 100644 --- a/arch/arm/mach-k3/am62x/am625_fdt.c +++ b/arch/arm/mach-k3/am62x/am625_fdt.c @@ -3,12 +3,11 @@ * Copyright 2023 Toradex - https://www.toradex.com/ */ +#include #include #include #include -#include "../common_fdt.h" - static void fdt_fixup_cores_nodes_am625(void *blob, int core_nr) { char node_path[32]; @@ -40,42 +39,6 @@ static void fdt_fixup_pru_node_am625(void *blob, int has_pru) fdt_del_node_path(blob, "/bus@f0000/pruss@30040000"); } -static int fdt_fixup_trips_node(void *blob, int zoneoffset, int maxc) -{ - int node, trip; - - node = fdt_subnode_offset(blob, zoneoffset, "trips"); - if (node < 0) - return -1; - - fdt_for_each_subnode(trip, blob, node) { - const char *type = fdt_getprop(blob, trip, "type", NULL); - - if (!type || (strncmp(type, "critical", 8) != 0)) - continue; - - if (fdt_setprop_u32(blob, trip, "temperature", 1000 * maxc) < 0) - return -1; - } - - return 0; -} - -static void fdt_fixup_thermal_zone_nodes_am625(void *blob, int maxc) -{ - int node, zone; - - node = fdt_path_offset(blob, "/thermal-zones"); - if (node < 0) - return; - - fdt_for_each_subnode(zone, blob, node) { - if (fdt_fixup_trips_node(blob, zone, maxc) < 0) - printf("Failed to set temperature in %s critical trips\n", - fdt_get_name(blob, zone, NULL)); - } -} - static void fdt_fixup_thermal_cooling_device_cpus_am625(void *blob, int core_nr) { static const char * const thermal_path[] = { @@ -115,7 +78,7 @@ int ft_system_setup(void *blob, struct bd_info *bd) fdt_fixup_cores_nodes_am625(blob, k3_get_core_nr()); fdt_fixup_gpu_nodes_am625(blob, k3_has_gpu()); fdt_fixup_pru_node_am625(blob, k3_has_pru()); - fdt_fixup_thermal_zone_nodes_am625(blob, k3_get_max_temp()); + fdt_fixup_thermal_critical_trips_k3(blob, k3_get_max_temp()); fdt_fixup_thermal_cooling_device_cpus_am625(blob, k3_get_core_nr()); fdt_fixup_reserved(blob, "tfa", CONFIG_K3_ATF_LOAD_ADDR, 0x80000); fdt_fixup_reserved(blob, "optee", CONFIG_K3_OPTEE_LOAD_ADDR, 0x1800000); diff --git a/arch/arm/mach-k3/am65x/am654_fdt.c b/arch/arm/mach-k3/am65x/am654_fdt.c index bcb15208be9..73bca424da3 100644 --- a/arch/arm/mach-k3/am65x/am654_fdt.c +++ b/arch/arm/mach-k3/am65x/am654_fdt.c @@ -3,10 +3,9 @@ * Copyright 2023 Toradex - https://www.toradex.com/ */ +#include #include -#include "../common_fdt.h" - int ft_system_setup(void *blob, struct bd_info *bd) { return fdt_fixup_msmc_ram_k3(blob); diff --git a/arch/arm/mach-k3/common_fdt.c b/arch/arm/mach-k3/common_fdt.c index 867ed173142..2777354c6ab 100644 --- a/arch/arm/mach-k3/common_fdt.c +++ b/arch/arm/mach-k3/common_fdt.c @@ -3,11 +3,11 @@ * Copyright 2023 Toradex - https://www.toradex.com/ */ +#include #include "common.h" #include #include #include -#include "common_fdt.h" static int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name) { @@ -164,3 +164,39 @@ add_carveout: return 0; } + +static int fdt_fixup_critical_trips(void *blob, int zoneoffset, int maxc) +{ + int node, trip; + + node = fdt_subnode_offset(blob, zoneoffset, "trips"); + if (node < 0) + return -1; + + fdt_for_each_subnode(trip, blob, node) { + const char *type = fdt_getprop(blob, trip, "type", NULL); + + if (!type || (strncmp(type, "critical", 8) != 0)) + continue; + + if (fdt_setprop_u32(blob, trip, "temperature", 1000 * maxc) < 0) + return -1; + } + + return 0; +} + +void fdt_fixup_thermal_critical_trips_k3(void *blob, int maxc) +{ + int node, zone; + + node = fdt_path_offset(blob, "/thermal-zones"); + if (node < 0) + return; + + fdt_for_each_subnode(zone, blob, node) { + if (fdt_fixup_critical_trips(blob, zone, maxc) < 0) + printf("Failed to set temperature in %s critical trips\n", + fdt_get_name(blob, zone, NULL)); + } +} diff --git a/arch/arm/mach-k3/common_fdt.h b/arch/arm/mach-k3/common_fdt.h deleted file mode 100644 index 52c07957483..00000000000 --- a/arch/arm/mach-k3/common_fdt.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright 2023 Toradex - https://www.toradex.com/ - */ - -#ifndef _COMMON_FDT_H -#define _COMMON_FDT_H - -int fdt_fixup_msmc_ram_k3(void *blob); -int fdt_del_node_path(void *blob, const char *path); -int fdt_fixup_reserved(void *blob, const char *name, - unsigned int new_address, unsigned int new_size); - -#endif /* _COMMON_FDT_H */ diff --git a/arch/arm/mach-k3/include/mach/k3-common-fdt.h b/arch/arm/mach-k3/include/mach/k3-common-fdt.h new file mode 100644 index 00000000000..38a5bb82d95 --- /dev/null +++ b/arch/arm/mach-k3/include/mach/k3-common-fdt.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright 2023 Toradex - https://www.toradex.com/ + */ + +#ifndef _K3_COMMON_FDT_H +#define _K3_COMMON_FDT_H + +int fdt_fixup_msmc_ram_k3(void *blob); +int fdt_del_node_path(void *blob, const char *path); +int fdt_fixup_reserved(void *blob, const char *name, + unsigned int new_address, unsigned int new_size); +void fdt_fixup_thermal_critical_trips_k3(void *blob, int maxc); + +#endif /* _K3_COMMON_FDT_H */ diff --git a/arch/arm/mach-k3/j721e/j721e_fdt.c b/arch/arm/mach-k3/j721e/j721e_fdt.c index bcb15208be9..73bca424da3 100644 --- a/arch/arm/mach-k3/j721e/j721e_fdt.c +++ b/arch/arm/mach-k3/j721e/j721e_fdt.c @@ -3,10 +3,9 @@ * Copyright 2023 Toradex - https://www.toradex.com/ */ +#include #include -#include "../common_fdt.h" - int ft_system_setup(void *blob, struct bd_info *bd) { return fdt_fixup_msmc_ram_k3(blob); diff --git a/arch/arm/mach-k3/j721s2/j721s2_fdt.c b/arch/arm/mach-k3/j721s2/j721s2_fdt.c index bcb15208be9..73bca424da3 100644 --- a/arch/arm/mach-k3/j721s2/j721s2_fdt.c +++ b/arch/arm/mach-k3/j721s2/j721s2_fdt.c @@ -3,10 +3,9 @@ * Copyright 2023 Toradex - https://www.toradex.com/ */ +#include #include -#include "../common_fdt.h" - int ft_system_setup(void *blob, struct bd_info *bd) { return fdt_fixup_msmc_ram_k3(blob); diff --git a/arch/arm/mach-k3/j722s/j722s_fdt.c b/arch/arm/mach-k3/j722s/j722s_fdt.c index 29c832d28ac..c7c5d2f0885 100644 --- a/arch/arm/mach-k3/j722s/j722s_fdt.c +++ b/arch/arm/mach-k3/j722s/j722s_fdt.c @@ -3,8 +3,8 @@ * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ */ +#include #include -#include "../common_fdt.h" #include int ft_system_setup(void *blob, struct bd_info *bd) diff --git a/arch/arm/mach-k3/j784s4/j784s4_fdt.c b/arch/arm/mach-k3/j784s4/j784s4_fdt.c index e1275097051..9c9a1382b41 100644 --- a/arch/arm/mach-k3/j784s4/j784s4_fdt.c +++ b/arch/arm/mach-k3/j784s4/j784s4_fdt.c @@ -6,10 +6,9 @@ * Apurva Nandan */ +#include #include -#include "../common_fdt.h" - int ft_system_setup(void *blob, struct bd_info *bd) { return fdt_fixup_msmc_ram_k3(blob); -- cgit v1.3.1 From 7f4baa866dd510fe123290526dc1c7387dd48255 Mon Sep 17 00:00:00 2001 From: João Paulo Gonçalves Date: Mon, 23 Jun 2025 14:39:56 -0300 Subject: arm: mach-k3: am62p: fixup thermal cooling device by cpu number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TI AM62Px devices support CPU throttling based on thermal alerts. However, the device tree assumes a 4-core configuration. Since the AM62P also supports 2-core configurations, add a fixup to dynamically adjust the cooling-device nodes within thermal zones based on the actual number of CPU cores available. Signed-off-by: João Paulo Gonçalves --- arch/arm/mach-k3/am62px/am62p5_fdt.c | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm/mach-k3/am62px/am62p5_fdt.c b/arch/arm/mach-k3/am62px/am62p5_fdt.c index 4d8061354c8..4a5ff594df6 100644 --- a/arch/arm/mach-k3/am62px/am62p5_fdt.c +++ b/arch/arm/mach-k3/am62px/am62p5_fdt.c @@ -6,6 +6,7 @@ #include #include #include +#include static void fdt_fixup_cores_wdt_nodes_am62p(void *blob, int core_nr) { @@ -49,12 +50,48 @@ static void fdt_fixup_cpu_freq_nodes_am62p(void *blob, int max_freq) } } +static void fdt_fixup_thermal_cooling_device_cpus_am62p(void *blob, int core_nr) +{ + static const char * const thermal_path[] = { + "/thermal-zones/main0-thermal/cooling-maps/map0", + "/thermal-zones/main1-thermal/cooling-maps/map0", + "/thermal-zones/main2-thermal/cooling-maps/map0" + }; + + int node, cnt, i, ret; + u32 cooling_dev[12]; + + for (i = 0; i < ARRAY_SIZE(thermal_path); i++) { + int new_count = core_nr * 3; /* Each CPU has 3 entries */ + int j; + + node = fdt_path_offset(blob, thermal_path[i]); + if (node < 0) + continue; + + cnt = fdtdec_get_int_array_count(blob, node, "cooling-device", + cooling_dev, ARRAY_SIZE(cooling_dev)); + if (cnt < 0) + continue; + + for (j = 0; j < new_count; j++) + cooling_dev[j] = cpu_to_fdt32(cooling_dev[j]); + + ret = fdt_setprop(blob, node, "cooling-device", cooling_dev, + new_count * sizeof(u32)); + if (ret < 0) + printf("Error %s, cooling-device setprop failed %d\n", + thermal_path[i], ret); + } +} + int ft_system_setup(void *blob, struct bd_info *bd) { fdt_fixup_cores_wdt_nodes_am62p(blob, k3_get_core_nr()); fdt_fixup_video_codec_nodes_am62p(blob, k3_has_video_codec()); fdt_fixup_canfd_nodes_am62p(blob, k3_has_canfd()); fdt_fixup_thermal_critical_trips_k3(blob, k3_get_max_temp()); + fdt_fixup_thermal_cooling_device_cpus_am62p(blob, k3_get_core_nr()); fdt_fixup_cpu_freq_nodes_am62p(blob, k3_get_a53_max_frequency()); fdt_fixup_reserved(blob, "tfa", CONFIG_K3_ATF_LOAD_ADDR, 0x80000); fdt_fixup_reserved(blob, "optee", CONFIG_K3_OPTEE_LOAD_ADDR, 0x1800000); -- cgit v1.3.1 From a03f4a632bf7c2337586394e5e7db6b368cfb37f Mon Sep 17 00:00:00 2001 From: João Paulo Gonçalves Date: Mon, 23 Jun 2025 14:39:57 -0300 Subject: board: toradex: verdin-am62p: Add fixup for critical trip points MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While TI AM62P supports up to 125°C junction temperature, Tj, for industrial and automotive parts, Toradex Verdin-AM62P hardware lifetime guarantees consider a 105°C Tj. Fixup the device tree temperature critical trip points to match the hardware specifications. The implementation ensures the architecture code will not overwrite the board specific changes by enabling CONFIG_OF_BOARD_SETUP_EXTENDED for the Verdin-AM62P. Signed-off-by: João Paulo Gonçalves Acked-by: Francesco Dolcini --- board/toradex/verdin-am62p/verdin-am62p.c | 8 ++++++++ configs/verdin-am62p_a53_defconfig | 1 + 2 files changed, 9 insertions(+) diff --git a/board/toradex/verdin-am62p/verdin-am62p.c b/board/toradex/verdin-am62p/verdin-am62p.c index 8b246e9d304..43d1c9312fe 100644 --- a/board/toradex/verdin-am62p/verdin-am62p.c +++ b/board/toradex/verdin-am62p/verdin-am62p.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -97,6 +98,13 @@ int ft_board_setup(void *blob, struct bd_info *bd) } #endif +#if IS_ENABLED(CONFIG_OF_BOARD_SETUP_EXTENDED) +void ft_board_setup_ex(void *blob, struct bd_info *bd) +{ + fdt_fixup_thermal_critical_trips_k3(blob, 105); +} +#endif + static void select_dt_from_module_version(void) { char variant[32]; diff --git a/configs/verdin-am62p_a53_defconfig b/configs/verdin-am62p_a53_defconfig index e782ad4faca..e4a28050079 100644 --- a/configs/verdin-am62p_a53_defconfig +++ b/configs/verdin-am62p_a53_defconfig @@ -37,6 +37,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_BOOTSTD_FULL=y CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_BOOTDELAY=1 +CONFIG_OF_BOARD_SETUP_EXTENDED=y CONFIG_BOOTCOMMAND="bootflow scan -b" CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile k3-am62p5-verdin-${variant}-${fdt_board}.dtb" -- cgit v1.3.1