* [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree
@ 2026-03-10 7:53 alice.guo
2026-03-10 7:53 ` [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias alice.guo
` (9 more replies)
0 siblings, 10 replies; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
CI: https://github.com/u-boot/u-boot/pull/902/checks
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
Alice Guo (10):
imx: Add helper to get watchdog base address from DT alias
watchdog: ulp_wdog: Get watchdog base address from device tree
imx: soc: Get watchdog base addresses from device tree
imx7ulp: dtsi: Add wdog1 and wdog2 nodes with aliases
imx8ulp: dtsi: Add wdog3 alias and bootph-all property
imx93: dtsi: Add wdog3/wdog4/wdog5 alias and bootph-all property
imx91: dtsi: Add wdog3/wdog4/wdog5 alias and bootph-all property
imx943: dtsi: Add wdog3 and wdog4 nodes with aliases
imx95: dtsi: Add wdog3 and wdog4 nodes with aliases
imx: Remove hardcoded watchdog base address macros
arch/arm/dts/imx7ulp.dtsi | 8 +++++
arch/arm/dts/imx8ulp-u-boot.dtsi | 10 ++++++
arch/arm/dts/imx91-u-boot.dtsi | 18 ++++++++++
arch/arm/dts/imx93-u-boot.dtsi | 18 ++++++++++
arch/arm/dts/imx93.dtsi | 21 ++++++++++++
arch/arm/dts/imx943-u-boot.dtsi | 21 ++++++++++++
arch/arm/dts/imx95-u-boot.dtsi | 19 +++++++++++
arch/arm/include/asm/arch-imx8ulp/imx-regs.h | 2 --
arch/arm/include/asm/arch-imx9/imx-regs.h | 9 -----
arch/arm/include/asm/mach-imx/sys_proto.h | 2 ++
arch/arm/mach-imx/Makefile | 4 +--
arch/arm/mach-imx/fdt.c | 51 ++++++++++++++++++++++++++++
arch/arm/mach-imx/imx8ulp/soc.c | 15 +++++++-
arch/arm/mach-imx/imx9/scmi/soc.c | 16 +++++++--
arch/arm/mach-imx/imx9/soc.c | 17 ++++++++--
arch/arm/mach-imx/mx7ulp/soc.c | 16 +++++++--
drivers/watchdog/ulp_wdog.c | 38 +++++++++++++++------
include/configs/imx8ulp_evk.h | 2 --
include/configs/imx91_evk.h | 2 --
include/configs/imx91_frdm.h | 2 --
include/configs/imx93_evk.h | 3 --
include/configs/imx93_frdm.h | 3 --
include/configs/imx93_qsb.h | 2 --
include/configs/imx93_var_som.h | 3 --
include/configs/imx94_evk.h | 3 --
include/configs/imx95_evk.h | 2 --
include/configs/kontron-osm-s-mx93.h | 2 --
include/configs/mx7ulp_com.h | 3 --
include/configs/mx7ulp_evk.h | 3 --
include/configs/phycore_imx93.h | 3 --
include/configs/toradex-smarc-imx95.h | 2 --
31 files changed, 252 insertions(+), 68 deletions(-)
---
base-commit: ba7bf918dafcd093ad733b07ba490baeb20cf5da
change-id: 20260310-wdog-9ad08a8da9dc
Best regards,
--
Alice Guo <alice.guo@nxp.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-12 7:17 ` Peng Fan
2026-03-10 7:53 ` [PATCH v1 02/10] watchdog: ulp_wdog: Get watchdog base address from device tree alice.guo
` (8 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Add imx_wdog_alias_to_addr() to get watchdog register base address from
device tree aliases. This function is used by mx7ulp, imx8ulp and imx9
SoCs to locate watchdog hardware.
The function supports:
- Matching specific alias (e.g., "wdog0") or any "wdog*" if name is
NULL.
- Optional device tree status check via check_status parameter.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/include/asm/mach-imx/sys_proto.h | 2 ++
arch/arm/mach-imx/Makefile | 4 +--
arch/arm/mach-imx/fdt.c | 51 +++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h
index 46da7a1eff5..8b88b333b4f 100644
--- a/arch/arm/include/asm/mach-imx/sys_proto.h
+++ b/arch/arm/include/asm/mach-imx/sys_proto.h
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <asm/mach-imx/regs-common.h>
#include <asm/mach-imx/module_fuse.h>
+#include <fdtdec.h>
#include <linux/bitops.h>
#include "../arch-imx/cpu.h"
@@ -327,4 +328,5 @@ enum boot_device get_boot_device(void);
int disable_cpu_nodes(void *blob, const char * const *nodes_path,
u32 num_disabled_cores, u32 max_cores);
int fixup_thermal_trips(void *blob, const char *name);
+fdt_addr_t imx_wdog_alias_to_addr(char *name, bool check_status);
#endif
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 0f6e737c0b9..b4f316d8c47 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -21,11 +21,9 @@ obj-$(CONFIG_IMX_HAB) += hab.o
obj-y += cpu.o
endif
-ifeq ($(SOC),$(filter $(SOC),imx8m imx9))
-ifneq ($(CONFIG_XPL_BUILD),y)
+ifeq ($(SOC),$(filter $(SOC),mx7ulp imx8m imx8ulp imx9))
obj-y += fdt.o
endif
-endif
ifeq ($(SOC),$(filter $(SOC),mx5 mx6))
obj-y += cpu.o speed.o
diff --git a/arch/arm/mach-imx/fdt.c b/arch/arm/mach-imx/fdt.c
index f19ab9edce4..93016a11acc 100644
--- a/arch/arm/mach-imx/fdt.c
+++ b/arch/arm/mach-imx/fdt.c
@@ -6,8 +6,11 @@
#include <errno.h>
#include <fdtdec.h>
#include <malloc.h>
+#include <asm/global_data.h>
#include <asm/arch/sys_proto.h>
+DECLARE_GLOBAL_DATA_PTR;
+
static void disable_thermal_cpu_nodes(void *blob, u32 num_disabled_cores, u32 max_cores)
{
static const char * const thermal_path[] = {
@@ -127,3 +130,51 @@ int fixup_thermal_trips(void *blob, const char *name)
return 0;
}
+
+fdt_addr_t imx_wdog_alias_to_addr(char *name, bool check_status)
+{
+ const void *fdt = gd->fdt_blob;
+ int aliases_off, prop_off;
+ char *wdog_name_to_match;
+ fdt_addr_t addr;
+
+ if (!fdt || fdt_check_header(fdt))
+ return FDT_ADDR_T_NONE;
+
+ aliases_off = fdt_path_offset(fdt, "/aliases");
+ if (aliases_off < 0)
+ return FDT_ADDR_T_NONE;
+
+ wdog_name_to_match = name ? name : "wdog";
+
+ fdt_for_each_property_offset(prop_off, fdt, aliases_off) {
+ const char *alias_name;
+ const char *path;
+ int len;
+ int node_off;
+
+ path = fdt_getprop_by_offset(fdt, prop_off, &alias_name, &len);
+ if (!path || !alias_name)
+ continue;
+
+ if (strncmp(alias_name, wdog_name_to_match, strlen(wdog_name_to_match)) != 0)
+ continue;
+
+ node_off = fdt_path_offset(fdt, path);
+ if (node_off < 0)
+ continue;
+
+ if (check_status) {
+ if (!fdtdec_get_is_enabled(fdt, node_off))
+ continue;
+ }
+
+ addr = fdtdec_get_addr_size_auto_noparent(fdt, node_off, "reg", 0, NULL, true);
+ if (addr == FDT_ADDR_T_NONE)
+ continue;
+
+ return addr;
+ }
+
+ return FDT_ADDR_T_NONE;
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 02/10] watchdog: ulp_wdog: Get watchdog base address from device tree
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
2026-03-10 7:53 ` [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-12 7:19 ` Peng Fan
2026-03-10 7:53 ` [PATCH v1 03/10] imx: soc: Get watchdog base addresses " alice.guo
` (7 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Replace hardcoded WDOG_BASE_ADDR with dynamic address lookup from device
tree.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
drivers/watchdog/ulp_wdog.c | 38 +++++++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 11 deletions(-)
diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
index 83f19dc0e86..3840a3db784 100644
--- a/drivers/watchdog/ulp_wdog.c
+++ b/drivers/watchdog/ulp_wdog.c
@@ -6,6 +6,7 @@
#include <cpu_func.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
+#include <asm/arch/sys_proto.h>
#include <dm.h>
#include <wdt.h>
@@ -51,11 +52,22 @@ struct ulp_wdt_priv {
#define CLK_RATE_1KHZ 1000
#define CLK_RATE_32KHZ 125
-void hw_watchdog_set_timeout(u16 val)
+static struct wdog_regs *ulp_watchdog_get_wdog_regs(void)
{
- /* setting timeout value */
- struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR;
+ fdt_addr_t addr;
+
+ addr = imx_wdog_alias_to_addr(NULL, true);
+ if (addr == FDT_ADDR_T_NONE) {
+ printf("Error: Failed to get watchdog base address from DT\n");
+ return NULL;
+ }
+
+ return (struct wdog_regs *)addr;
+}
+void hw_watchdog_set_timeout(struct wdog_regs *wdog, u16 val)
+{
+ /* setting timeout value */
writel(val, &wdog->toval);
}
@@ -89,7 +101,7 @@ void ulp_watchdog_init(struct wdog_regs *wdog, u16 timeout)
while (!(readl(&wdog->cs) & WDGCS_ULK))
;
- hw_watchdog_set_timeout(timeout);
+ hw_watchdog_set_timeout(wdog, timeout);
writel(0, &wdog->win);
/* setting 1-kHz clock source, enable counter running, and clear interrupt */
@@ -107,16 +119,17 @@ void ulp_watchdog_init(struct wdog_regs *wdog, u16 timeout)
ulp_watchdog_reset(wdog);
}
-void hw_watchdog_reset(void)
+void hw_watchdog_reset(struct wdog_regs *wdog)
{
- struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR;
-
ulp_watchdog_reset(wdog);
}
void hw_watchdog_init(void)
{
- struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR;
+ struct wdog_regs *wdog = ulp_watchdog_get_wdog_regs();
+
+ if (!wdog)
+ return;
ulp_watchdog_init(wdog, CONFIG_WATCHDOG_TIMEOUT_MSECS);
}
@@ -124,9 +137,12 @@ void hw_watchdog_init(void)
#if !CONFIG_IS_ENABLED(SYSRESET)
void reset_cpu(void)
{
- struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR;
+ struct wdog_regs *wdog = ulp_watchdog_get_wdog_regs();
u32 cmd32 = 0;
+ if (!wdog)
+ return;
+
if (readl(&wdog->cs) & WDGCS_CMD32EN) {
writel(UNLOCK_WORD, &wdog->cnt);
cmd32 = WDGCS_CMD32EN;
@@ -141,7 +157,7 @@ void reset_cpu(void)
while (!(readl(&wdog->cs) & WDGCS_ULK))
;
- hw_watchdog_set_timeout(5); /* 5ms timeout for general; 40ms timeout for imx93 */
+ hw_watchdog_set_timeout(wdog, 5); /* 5ms timeout for general; 40ms timeout for imx93 */
writel(0, &wdog->win);
/* enable counter running */
@@ -155,7 +171,7 @@ void reset_cpu(void)
while (!(readl(&wdog->cs) & WDGCS_RCS))
;
- hw_watchdog_reset();
+ hw_watchdog_reset(wdog);
while (1);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 03/10] imx: soc: Get watchdog base addresses from device tree
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
2026-03-10 7:53 ` [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias alice.guo
2026-03-10 7:53 ` [PATCH v1 02/10] watchdog: ulp_wdog: Get watchdog base address from device tree alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-12 9:01 ` Peng Fan
2026-03-10 7:53 ` [PATCH v1 04/10] imx7ulp: dtsi: Add wdog1 and wdog2 nodes with aliases alice.guo
` (6 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Replace hardcoded watchdog base addresses with dynamic address lookup
from device tree.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/mach-imx/imx8ulp/soc.c | 15 ++++++++++++++-
arch/arm/mach-imx/imx9/scmi/soc.c | 16 ++++++++++++++--
arch/arm/mach-imx/imx9/soc.c | 17 ++++++++++++++---
arch/arm/mach-imx/mx7ulp/soc.c | 16 ++++++++++++++--
4 files changed, 56 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c
index 1ee483065e8..081ba9d60b6 100644
--- a/arch/arm/mach-imx/imx8ulp/soc.c
+++ b/arch/arm/mach-imx/imx8ulp/soc.c
@@ -341,9 +341,22 @@ static void disable_wdog(void __iomem *wdog_base)
;
}
+static char *wdog_list[] = {"wdog3"};
+
void init_wdog(void)
{
- disable_wdog((void __iomem *)WDG3_RBASE);
+ fdt_addr_t addr;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(wdog_list); i++) {
+ addr = imx_wdog_alias_to_addr(wdog_list[i], false);
+ if (addr == FDT_ADDR_T_NONE) {
+ debug("watchdog alias %s not found\n", wdog_list[i]);
+ continue;
+ }
+
+ disable_wdog((void __iomem *)addr);
+ }
}
static struct mm_region imx8ulp_arm64_mem_map[] = {
diff --git a/arch/arm/mach-imx/imx9/scmi/soc.c b/arch/arm/mach-imx/imx9/scmi/soc.c
index c1458ccca3c..692c6743418 100644
--- a/arch/arm/mach-imx/imx9/scmi/soc.c
+++ b/arch/arm/mach-imx/imx9/scmi/soc.c
@@ -734,11 +734,23 @@ static void gpio_reset(ulong gpio_base)
writel(0, gpio_base + 0x1c);
}
+static char *wdog_list[] = {"wdog3", "wdog4"};
+
int arch_cpu_init(void)
{
if (IS_ENABLED(CONFIG_SPL_BUILD)) {
- disable_wdog((void __iomem *)WDG3_BASE_ADDR);
- disable_wdog((void __iomem *)WDG4_BASE_ADDR);
+ fdt_addr_t addr;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(wdog_list); i++) {
+ addr = imx_wdog_alias_to_addr(wdog_list[i], false);
+ if (addr == FDT_ADDR_T_NONE) {
+ debug("watchdog alias %s not found\n", wdog_list[i]);
+ continue;
+ }
+
+ disable_wdog((void __iomem *)addr);
+ }
gpio_reset(GPIO2_BASE_ADDR);
gpio_reset(GPIO3_BASE_ADDR);
diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c
index 583c3a5a464..031226ec97f 100644
--- a/arch/arm/mach-imx/imx9/soc.c
+++ b/arch/arm/mach-imx/imx9/soc.c
@@ -279,11 +279,22 @@ static void disable_wdog(void __iomem *wdog_base)
;
}
+static char *wdog_list[] = {"wdog3", "wdog4", "wdog5"};
+
void init_wdog(void)
{
- disable_wdog((void __iomem *)WDG3_BASE_ADDR);
- disable_wdog((void __iomem *)WDG4_BASE_ADDR);
- disable_wdog((void __iomem *)WDG5_BASE_ADDR);
+ fdt_addr_t addr;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(wdog_list); i++) {
+ addr = imx_wdog_alias_to_addr(wdog_list[i], false);
+ if (addr == FDT_ADDR_T_NONE) {
+ debug("watchdog alias %s not found\n", wdog_list[i]);
+ continue;
+ }
+
+ disable_wdog((void __iomem *)addr);
+ }
}
static struct mm_region imx93_mem_map[] = {
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 5306e76223f..27ba8a37162 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -146,6 +146,8 @@ static void disable_wdog(u32 wdog_base)
while (!(readl(wdog_base + 0x00) & 0x400));
}
+static char *wdog_list[] = {"wdog1", "wdog2"};
+
void init_wdog(void)
{
/*
@@ -161,8 +163,18 @@ void init_wdog(void)
* In this function, we will disable both WDOG1 and WDOG2,
* and set update bit for both. So that kernel can reconfigure them.
*/
- disable_wdog(WDG1_RBASE);
- disable_wdog(WDG2_RBASE);
+ fdt_addr_t addr;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(wdog_list); i++) {
+ addr = imx_wdog_alias_to_addr(wdog_list[i], false);
+ if (addr == FDT_ADDR_T_NONE) {
+ debug("watchdog alias %s not found\n", wdog_list[i]);
+ continue;
+ }
+
+ disable_wdog((u32)addr);
+ }
}
static bool ldo_mode_is_enabled(void)
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 04/10] imx7ulp: dtsi: Add wdog1 and wdog2 nodes with aliases
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
` (2 preceding siblings ...)
2026-03-10 7:53 ` [PATCH v1 03/10] imx: soc: Get watchdog base addresses " alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-10 7:53 ` [PATCH v1 05/10] imx8ulp: dtsi: Add wdog3 alias and bootph-all property alice.guo
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Add wdog1 and wdog2 alias entries and introduce the wdog2 device node,
allowing the watchdog register base addresses to be obtained through
imx_wdog_alias_to_addr().
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/dts/imx7ulp.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/dts/imx7ulp.dtsi b/arch/arm/dts/imx7ulp.dtsi
index bcec98b9641..8795e3ae7e9 100644
--- a/arch/arm/dts/imx7ulp.dtsi
+++ b/arch/arm/dts/imx7ulp.dtsi
@@ -31,6 +31,8 @@
serial2 = &lpuart6;
serial3 = &lpuart7;
usbphy0 = &usbphy1;
+ wdog1 = &wdog1;
+ wdog2 = &wdog2;
};
cpus {
@@ -295,6 +297,12 @@
clock-names = "divcore", "hsrun_divcore";
};
+ wdog2: watchdog@40430000 {
+ compatible = "fsl,imx7ulp-wdt";
+ reg = <0x40430000 0x10000>;
+ timeout-sec = <40>;
+ };
+
pcc3: clock-controller@40b30000 {
compatible = "fsl,imx7ulp-pcc3";
reg = <0x40b30000 0x10000>;
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 05/10] imx8ulp: dtsi: Add wdog3 alias and bootph-all property
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
` (3 preceding siblings ...)
2026-03-10 7:53 ` [PATCH v1 04/10] imx7ulp: dtsi: Add wdog1 and wdog2 nodes with aliases alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-10 7:53 ` [PATCH v1 06/10] imx93: dtsi: Add wdog3/wdog4/wdog5 " alice.guo
` (4 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Add wdog3 alias and mark it with bootph-all to make the watchdog
available in SPL and U-Boot proper. This allows the watchdog base
address to be retrieved via imx_wdog_alias_to_addr().
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/dts/imx8ulp-u-boot.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/dts/imx8ulp-u-boot.dtsi b/arch/arm/dts/imx8ulp-u-boot.dtsi
index 30baaeff8ef..e7312232b26 100644
--- a/arch/arm/dts/imx8ulp-u-boot.dtsi
+++ b/arch/arm/dts/imx8ulp-u-boot.dtsi
@@ -61,3 +61,13 @@
};
};
#endif
+
+/{
+ aliases {
+ wdog3 = &wdog3;
+ };
+};
+
+&wdog3 {
+ bootph-all;
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 06/10] imx93: dtsi: Add wdog3/wdog4/wdog5 alias and bootph-all property
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
` (4 preceding siblings ...)
2026-03-10 7:53 ` [PATCH v1 05/10] imx8ulp: dtsi: Add wdog3 alias and bootph-all property alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-10 7:53 ` [PATCH v1 07/10] imx91: " alice.guo
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Introduce wdog3, wdog4, and wdog5 aliases and mark the corresponding
nodes with bootph-all to enable imx_wdog_alias_to_addr() to resolve the
watchdog register base addresses via the device tree.
When CONFIG_OF_UPSTREAM is disabled, upstream device tree files are not
used. Therefore, wdog4 and wdog5 nodes need to be added directly to
arch/arm/dts/imx93.dtsi.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/dts/imx93-u-boot.dtsi | 18 ++++++++++++++++++
arch/arm/dts/imx93.dtsi | 21 +++++++++++++++++++++
2 files changed, 39 insertions(+)
diff --git a/arch/arm/dts/imx93-u-boot.dtsi b/arch/arm/dts/imx93-u-boot.dtsi
index dc86746ac90..c946f45c7f0 100644
--- a/arch/arm/dts/imx93-u-boot.dtsi
+++ b/arch/arm/dts/imx93-u-boot.dtsi
@@ -4,6 +4,12 @@
*/
/ {
+ aliases {
+ wdog3 = &wdog3;
+ wdog4 = &wdog4;
+ wdog5 = &wdog5;
+ };
+
binman: binman {
multiple-images;
@@ -96,3 +102,15 @@
0x000001b2 0x800001b6>;
#thermal-sensor-cells = <1>;
};
+
+&wdog3 {
+ bootph-all;
+};
+
+&wdog4 {
+ bootph-all;
+};
+
+&wdog5 {
+ bootph-all;
+};
diff --git a/arch/arm/dts/imx93.dtsi b/arch/arm/dts/imx93.dtsi
index d6964714ea0..549a30fc9f0 100644
--- a/arch/arm/dts/imx93.dtsi
+++ b/arch/arm/dts/imx93.dtsi
@@ -41,6 +41,9 @@
serial5 = &lpuart6;
serial6 = &lpuart7;
serial7 = &lpuart8;
+ wdog3 = &wdog3;
+ wdog4 = &wdog4;
+ wdog5 = &wdog5;
};
cpus {
@@ -414,6 +417,24 @@
timeout-sec = <40>;
};
+ wdog4: watchdog@424a0000 {
+ compatible = "fsl,imx93-wdt";
+ reg = <0x424a0000 0x10000>;
+ interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_WDOG4_GATE>;
+ timeout-sec = <40>;
+ status = "disabled";
+ };
+
+ wdog5: watchdog@424b0000 {
+ compatible = "fsl,imx93-wdt";
+ reg = <0x424b0000 0x10000>;
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk IMX93_CLK_WDOG5_GATE>;
+ timeout-sec = <40>;
+ status = "disabled";
+ };
+
tpm3: pwm@424e0000 {
compatible = "fsl,imx7ulp-pwm";
reg = <0x424e0000 0x1000>;
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 07/10] imx91: dtsi: Add wdog3/wdog4/wdog5 alias and bootph-all property
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
` (5 preceding siblings ...)
2026-03-10 7:53 ` [PATCH v1 06/10] imx93: dtsi: Add wdog3/wdog4/wdog5 " alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-10 7:53 ` [PATCH v1 08/10] imx943: dtsi: Add wdog3 and wdog4 nodes with aliases alice.guo
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Add wdog3/wdog4/wdog5 alias and mark it with bootph-all to allow the
watchdog base address to be retrieved via imx_wdog_alias_to_addr().
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/dts/imx91-u-boot.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm/dts/imx91-u-boot.dtsi b/arch/arm/dts/imx91-u-boot.dtsi
index 5b639c965d6..c3df0e9e4fb 100644
--- a/arch/arm/dts/imx91-u-boot.dtsi
+++ b/arch/arm/dts/imx91-u-boot.dtsi
@@ -4,6 +4,12 @@
*/
/ {
+ aliases {
+ wdog3 = &wdog3;
+ wdog4 = &wdog4;
+ wdog5 = &wdog5;
+ };
+
binman: binman {
multiple-images;
};
@@ -90,3 +96,15 @@
};
};
};
+
+&wdog3 {
+ bootph-all;
+};
+
+&wdog4 {
+ bootph-all;
+};
+
+&wdog5 {
+ bootph-all;
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 08/10] imx943: dtsi: Add wdog3 and wdog4 nodes with aliases
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
` (6 preceding siblings ...)
2026-03-10 7:53 ` [PATCH v1 07/10] imx91: " alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-10 7:53 ` [PATCH v1 09/10] imx95: " alice.guo
2026-03-10 7:53 ` [PATCH v1 10/10] imx: Remove hardcoded watchdog base address macros alice.guo
9 siblings, 0 replies; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Add wdog3 and wdog4 watchdog device tree nodes and their aliases to
support dynamic watchdog address lookup.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/dts/imx943-u-boot.dtsi | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm/dts/imx943-u-boot.dtsi b/arch/arm/dts/imx943-u-boot.dtsi
index 2b93ba9a38b..0619bcd5475 100644
--- a/arch/arm/dts/imx943-u-boot.dtsi
+++ b/arch/arm/dts/imx943-u-boot.dtsi
@@ -4,6 +4,11 @@
*/
/ {
+ aliases {
+ wdog3 = &wdog3;
+ wdog4 = &wdog4;
+ };
+
binman {
multiple-images;
@@ -143,6 +148,18 @@
bootph-all;
};
+&aips4 {
+ bootph-all;
+
+ wdog4: watchdog@49230000 {
+ bootph-all;
+
+ compatible = "fsl,imx94-wdt", "fsl,imx93-wdt";
+ reg = <0x49230000 0x10000>;
+ status = "disabled";
+ };
+};
+
&clk_ext1 {
bootph-all;
};
@@ -444,3 +461,7 @@
&sram0 {
bootph-all;
};
+
+&wdog3 {
+ bootph-all;
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 09/10] imx95: dtsi: Add wdog3 and wdog4 nodes with aliases
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
` (7 preceding siblings ...)
2026-03-10 7:53 ` [PATCH v1 08/10] imx943: dtsi: Add wdog3 and wdog4 nodes with aliases alice.guo
@ 2026-03-10 7:53 ` alice.guo
2026-03-10 7:53 ` [PATCH v1 10/10] imx: Remove hardcoded watchdog base address macros alice.guo
9 siblings, 0 replies; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
Add wdog3 and wdog4 watchdog device tree nodes and their aliases to
support dynamic watchdog address lookup.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/dts/imx95-u-boot.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm/dts/imx95-u-boot.dtsi b/arch/arm/dts/imx95-u-boot.dtsi
index 6dec159752b..f4ce335e471 100644
--- a/arch/arm/dts/imx95-u-boot.dtsi
+++ b/arch/arm/dts/imx95-u-boot.dtsi
@@ -4,6 +4,11 @@
*/
/ {
+ aliases {
+ wdog3 = &wdog3;
+ wdog4 = &wdog4;
+ };
+
binman {
multiple-images;
@@ -138,6 +143,16 @@
&aips2 {
bootph-all;
+
+ wdog4: watchdog@424a0000 {
+ bootph-all;
+
+ compatible = "fsl,imx93-wdt";
+ reg = <0x424a0000 0x10000>;
+ clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>;
+ timeout-sec = <40>;
+ status = "disabled";
+ };
};
&aips3 {
@@ -238,3 +253,7 @@
&scmi_buf1 {
bootph-all;
};
+
+&wdog3 {
+ bootph-all;
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v1 10/10] imx: Remove hardcoded watchdog base address macros
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
` (8 preceding siblings ...)
2026-03-10 7:53 ` [PATCH v1 09/10] imx95: " alice.guo
@ 2026-03-10 7:53 ` alice.guo
9 siblings, 0 replies; 15+ messages in thread
From: alice.guo @ 2026-03-10 7:53 UTC (permalink / raw)
To: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream
Cc: Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric), Joseph Guo,
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
From: Alice Guo <alice.guo@nxp.com>
The watchdog base addresses are now obtained from the devicetree via
the imx_wdog_alias_to_addr() function. Remove the hardcoded macro
definitions as they are no longer needed.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
arch/arm/include/asm/arch-imx8ulp/imx-regs.h | 2 --
arch/arm/include/asm/arch-imx9/imx-regs.h | 9 ---------
include/configs/imx8ulp_evk.h | 2 --
include/configs/imx91_evk.h | 2 --
include/configs/imx91_frdm.h | 2 --
include/configs/imx93_evk.h | 3 ---
include/configs/imx93_frdm.h | 3 ---
include/configs/imx93_qsb.h | 2 --
include/configs/imx93_var_som.h | 3 ---
include/configs/imx94_evk.h | 3 ---
include/configs/imx95_evk.h | 2 --
include/configs/kontron-osm-s-mx93.h | 2 --
include/configs/mx7ulp_com.h | 3 ---
include/configs/mx7ulp_evk.h | 3 ---
include/configs/phycore_imx93.h | 3 ---
include/configs/toradex-smarc-imx95.h | 2 --
16 files changed, 46 deletions(-)
diff --git a/arch/arm/include/asm/arch-imx8ulp/imx-regs.h b/arch/arm/include/asm/arch-imx8ulp/imx-regs.h
index a038cc1df33..f9c5e21c14f 100644
--- a/arch/arm/include/asm/arch-imx8ulp/imx-regs.h
+++ b/arch/arm/include/asm/arch-imx8ulp/imx-regs.h
@@ -20,8 +20,6 @@
#define SIM1_BASE_ADDR 0x29290000
-#define WDG3_RBASE 0x292a0000UL
-
#define SIM_SEC_BASE_ADDR 0x2802B000
#define CGC1_SOSCDIV_ADDR 0x292C0108
diff --git a/arch/arm/include/asm/arch-imx9/imx-regs.h b/arch/arm/include/asm/arch-imx9/imx-regs.h
index 2d084e5227a..fbf2e6a2b01 100644
--- a/arch/arm/include/asm/arch-imx9/imx-regs.h
+++ b/arch/arm/include/asm/arch-imx9/imx-regs.h
@@ -17,15 +17,6 @@
#define ANATOP_BASE_ADDR 0x44480000UL
-#ifdef CONFIG_IMX94
-#define WDG3_BASE_ADDR 0x49220000UL
-#define WDG4_BASE_ADDR 0x49230000UL
-#else
-#define WDG3_BASE_ADDR 0x42490000UL
-#define WDG4_BASE_ADDR 0x424a0000UL
-#endif
-#define WDG5_BASE_ADDR 0x424b0000UL
-
#define GPIO2_BASE_ADDR 0x43810000UL
#define GPIO3_BASE_ADDR 0x43820000UL
#define GPIO4_BASE_ADDR 0x43840000UL
diff --git a/include/configs/imx8ulp_evk.h b/include/configs/imx8ulp_evk.h
index edfd6f70815..b4f80fb944b 100644
--- a/include/configs/imx8ulp_evk.h
+++ b/include/configs/imx8ulp_evk.h
@@ -30,6 +30,4 @@
#define PHYS_SDRAM 0x80000000
#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
-/* Using ULP WDOG for reset */
-#define WDOG_BASE_ADDR WDG3_RBASE
#endif
diff --git a/include/configs/imx91_evk.h b/include/configs/imx91_evk.h
index 9c5014fd0a5..13918e2b873 100644
--- a/include/configs/imx91_evk.h
+++ b/include/configs/imx91_evk.h
@@ -16,6 +16,4 @@
#define PHYS_SDRAM 0x80000000
#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
diff --git a/include/configs/imx91_frdm.h b/include/configs/imx91_frdm.h
index 6d051ed88a5..480b3fb477a 100644
--- a/include/configs/imx91_frdm.h
+++ b/include/configs/imx91_frdm.h
@@ -20,6 +20,4 @@
#define PHYS_SDRAM 0x80000000
#define PHYS_SDRAM_SIZE SZ_2G /* 2GB DDR */
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
diff --git a/include/configs/imx93_evk.h b/include/configs/imx93_evk.h
index ffd72a38bcb..67774f54790 100644
--- a/include/configs/imx93_evk.h
+++ b/include/configs/imx93_evk.h
@@ -26,7 +26,4 @@
#define PHYS_SDRAM 0x80000000
#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
-/* Using ULP WDOG for reset */
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
diff --git a/include/configs/imx93_frdm.h b/include/configs/imx93_frdm.h
index c98c10774cb..bcea360b399 100644
--- a/include/configs/imx93_frdm.h
+++ b/include/configs/imx93_frdm.h
@@ -20,7 +20,4 @@
#define PHYS_SDRAM 0x80000000
#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
-/* Using ULP WDOG for reset */
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
diff --git a/include/configs/imx93_qsb.h b/include/configs/imx93_qsb.h
index a7b94f7ab57..350f094c2a6 100644
--- a/include/configs/imx93_qsb.h
+++ b/include/configs/imx93_qsb.h
@@ -16,6 +16,4 @@
#define PHYS_SDRAM 0x80000000
#define PHYS_SDRAM_SIZE 0x80000000 /* 2GB DDR */
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
diff --git a/include/configs/imx93_var_som.h b/include/configs/imx93_var_som.h
index 9dc10aea407..6a425e6d1ea 100644
--- a/include/configs/imx93_var_som.h
+++ b/include/configs/imx93_var_som.h
@@ -38,7 +38,4 @@
#define CFG_SYS_FSL_USDHC_NUM 2
-/* Using ULP WDOG for reset */
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
diff --git a/include/configs/imx94_evk.h b/include/configs/imx94_evk.h
index f93c3c4e4a8..2623c13db06 100644
--- a/include/configs/imx94_evk.h
+++ b/include/configs/imx94_evk.h
@@ -18,7 +18,4 @@
#define PHYS_SDRAM_SIZE 0x70000000UL /* 2GB - 256MB DDR */
#define PHYS_SDRAM_2_SIZE 0x180000000 /* 8GB */
-/* Using ULP WDOG for reset */
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
diff --git a/include/configs/imx95_evk.h b/include/configs/imx95_evk.h
index 3d22740b3f4..1fdc9ce21ef 100644
--- a/include/configs/imx95_evk.h
+++ b/include/configs/imx95_evk.h
@@ -23,6 +23,4 @@
#define PHYS_SDRAM_2_SIZE 0x380000000 /* 14GB (Totally 16GB) */
#endif
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
diff --git a/include/configs/kontron-osm-s-mx93.h b/include/configs/kontron-osm-s-mx93.h
index ab2b42298c8..fed75e6fa12 100644
--- a/include/configs/kontron-osm-s-mx93.h
+++ b/include/configs/kontron-osm-s-mx93.h
@@ -25,6 +25,4 @@
#define CFG_MXC_USB_FLAGS 0
#endif
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif /* __KONTRON_MX93_CONFIG_H */
diff --git a/include/configs/mx7ulp_com.h b/include/configs/mx7ulp_com.h
index d27e9d2eaa1..501c3059cc3 100644
--- a/include/configs/mx7ulp_com.h
+++ b/include/configs/mx7ulp_com.h
@@ -15,9 +15,6 @@
#include "imx7ulp_spl.h"
#endif
-/* Using ULP WDOG for reset */
-#define WDOG_BASE_ADDR WDG1_RBASE
-
#define CFG_SYS_HZ_CLOCK 1000000 /* Fixed at 1MHz from TSTMR */
/* UART */
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index ace1eee70cf..21dbec837f0 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -11,9 +11,6 @@
#include <linux/sizes.h>
#include <asm/arch/imx-regs.h>
-/* Using ULP WDOG for reset */
-#define WDOG_BASE_ADDR WDG1_RBASE
-
#define CFG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
/* UART */
diff --git a/include/configs/phycore_imx93.h b/include/configs/phycore_imx93.h
index 07364dff403..a6dd0478585 100644
--- a/include/configs/phycore_imx93.h
+++ b/include/configs/phycore_imx93.h
@@ -22,7 +22,4 @@
#define PHYS_SDRAM 0x80000000
#define PHYS_SDRAM_SIZE 0x80000000
-/* Using ULP WDOG for reset */
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif /* __PHYCORE_IMX93_H */
diff --git a/include/configs/toradex-smarc-imx95.h b/include/configs/toradex-smarc-imx95.h
index e1aebd70af2..8a880b96503 100644
--- a/include/configs/toradex-smarc-imx95.h
+++ b/include/configs/toradex-smarc-imx95.h
@@ -19,6 +19,4 @@
#define PHYS_SDRAM_SIZE (SZ_2G - SZ_256M)
#define PHYS_SDRAM_2_SIZE SZ_6G
-#define WDOG_BASE_ADDR WDG3_BASE_ADDR
-
#endif
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias
2026-03-10 7:53 ` [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias alice.guo
@ 2026-03-12 7:17 ` Peng Fan
2026-03-12 9:52 ` Rasmus Villemoes
0 siblings, 1 reply; 15+ messages in thread
From: Peng Fan @ 2026-03-12 7:17 UTC (permalink / raw)
To: alice.guo
Cc: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream,
Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric),
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
On Tue, Mar 10, 2026 at 03:53:35PM +0800, alice.guo@oss.nxp.com wrote:
>From: Alice Guo <alice.guo@nxp.com>
>
>Add imx_wdog_alias_to_addr() to get watchdog register base address from
>device tree aliases. This function is used by mx7ulp, imx8ulp and imx9
>SoCs to locate watchdog hardware.
>
>The function supports:
>- Matching specific alias (e.g., "wdog0") or any "wdog*" if name is
> NULL.
>- Optional device tree status check via check_status parameter.
I not see wdog alias is used by anyone.
Is it feasible to iterate the dtb by searching all the wdog nodes?
I think it should be fine to iterate all the wdog nodes and configure them
as disabled, no need to check which is wdog1 or wdog2.
How do you think?
Regards
Peng
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 02/10] watchdog: ulp_wdog: Get watchdog base address from device tree
2026-03-10 7:53 ` [PATCH v1 02/10] watchdog: ulp_wdog: Get watchdog base address from device tree alice.guo
@ 2026-03-12 7:19 ` Peng Fan
0 siblings, 0 replies; 15+ messages in thread
From: Peng Fan @ 2026-03-12 7:19 UTC (permalink / raw)
To: alice.guo
Cc: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream,
Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric),
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
On Tue, Mar 10, 2026 at 03:53:36PM +0800, alice.guo@oss.nxp.com wrote:
>From: Alice Guo <alice.guo@nxp.com>
>
>Replace hardcoded WDOG_BASE_ADDR with dynamic address lookup from device
>tree.
We need to convert this driver to DM, not patching non-DM.
Stefan requested to convert to DM quite some time ago.
Thanks,
Peng
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 03/10] imx: soc: Get watchdog base addresses from device tree
2026-03-10 7:53 ` [PATCH v1 03/10] imx: soc: Get watchdog base addresses " alice.guo
@ 2026-03-12 9:01 ` Peng Fan
0 siblings, 0 replies; 15+ messages in thread
From: Peng Fan @ 2026-03-12 9:01 UTC (permalink / raw)
To: alice.guo
Cc: NXP i.MX U-Boot Team, u-boot, Christoph Stoidner, upstream,
Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini, Peng Fan,
Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut, Jacky Bai,
Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Rasmus Villemoes, Primoz Fiser,
Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric),
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
On Tue, Mar 10, 2026 at 03:53:37PM +0800, alice.guo@oss.nxp.com wrote:
>From: Alice Guo <alice.guo@nxp.com>
>
>Replace hardcoded watchdog base addresses with dynamic address lookup
>from device tree.
>
>Signed-off-by: Alice Guo <alice.guo@nxp.com>
>---
> arch/arm/mach-imx/imx8ulp/soc.c | 15 ++++++++++++++-
> arch/arm/mach-imx/imx9/scmi/soc.c | 16 ++++++++++++++--
> arch/arm/mach-imx/imx9/soc.c | 17 ++++++++++++++---
> arch/arm/mach-imx/mx7ulp/soc.c | 16 ++++++++++++++--
> 4 files changed, 56 insertions(+), 8 deletions(-)
>
>diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c
>index 1ee483065e8..081ba9d60b6 100644
>--- a/arch/arm/mach-imx/imx8ulp/soc.c
>+++ b/arch/arm/mach-imx/imx8ulp/soc.c
>@@ -341,9 +341,22 @@ static void disable_wdog(void __iomem *wdog_base)
> ;
> }
>
>+static char *wdog_list[] = {"wdog3"};
>+
> void init_wdog(void)
> {
>- disable_wdog((void __iomem *)WDG3_RBASE);
>+ fdt_addr_t addr;
>+ int i;
>+
>+ for (i = 0; i < ARRAY_SIZE(wdog_list); i++) {
>+ addr = imx_wdog_alias_to_addr(wdog_list[i], false);
>+ if (addr == FDT_ADDR_T_NONE) {
>+ debug("watchdog alias %s not found\n", wdog_list[i]);
>+ continue;
>+ }
>+
>+ disable_wdog((void __iomem *)addr);
>+ }
> }
>
> static struct mm_region imx8ulp_arm64_mem_map[] = {
>diff --git a/arch/arm/mach-imx/imx9/scmi/soc.c b/arch/arm/mach-imx/imx9/scmi/soc.c
>index c1458ccca3c..692c6743418 100644
>--- a/arch/arm/mach-imx/imx9/scmi/soc.c
>+++ b/arch/arm/mach-imx/imx9/scmi/soc.c
>@@ -734,11 +734,23 @@ static void gpio_reset(ulong gpio_base)
> writel(0, gpio_base + 0x1c);
> }
>
>+static char *wdog_list[] = {"wdog3", "wdog4"};
>+
> int arch_cpu_init(void)
> {
> if (IS_ENABLED(CONFIG_SPL_BUILD)) {
>- disable_wdog((void __iomem *)WDG3_BASE_ADDR);
>- disable_wdog((void __iomem *)WDG4_BASE_ADDR);
>+ fdt_addr_t addr;
>+ int i;
>+
>+ for (i = 0; i < ARRAY_SIZE(wdog_list); i++) {
>+ addr = imx_wdog_alias_to_addr(wdog_list[i], false);
>+ if (addr == FDT_ADDR_T_NONE) {
>+ debug("watchdog alias %s not found\n", wdog_list[i]);
>+ continue;
>+ }
>+
>+ disable_wdog((void __iomem *)addr);
>+ }
>
> gpio_reset(GPIO2_BASE_ADDR);
> gpio_reset(GPIO3_BASE_ADDR);
>diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c
>index 583c3a5a464..031226ec97f 100644
>--- a/arch/arm/mach-imx/imx9/soc.c
>+++ b/arch/arm/mach-imx/imx9/soc.c
>@@ -279,11 +279,22 @@ static void disable_wdog(void __iomem *wdog_base)
> ;
> }
>
>+static char *wdog_list[] = {"wdog3", "wdog4", "wdog5"};
>+
> void init_wdog(void)
> {
>- disable_wdog((void __iomem *)WDG3_BASE_ADDR);
>- disable_wdog((void __iomem *)WDG4_BASE_ADDR);
>- disable_wdog((void __iomem *)WDG5_BASE_ADDR);
>+ fdt_addr_t addr;
>+ int i;
>+
>+ for (i = 0; i < ARRAY_SIZE(wdog_list); i++) {
>+ addr = imx_wdog_alias_to_addr(wdog_list[i], false);
>+ if (addr == FDT_ADDR_T_NONE) {
>+ debug("watchdog alias %s not found\n", wdog_list[i]);
>+ continue;
>+ }
>+
>+ disable_wdog((void __iomem *)addr);
>+ }
> }
>
> static struct mm_region imx93_mem_map[] = {
>diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
>index 5306e76223f..27ba8a37162 100644
>--- a/arch/arm/mach-imx/mx7ulp/soc.c
>+++ b/arch/arm/mach-imx/mx7ulp/soc.c
>@@ -146,6 +146,8 @@ static void disable_wdog(u32 wdog_base)
> while (!(readl(wdog_base + 0x00) & 0x400));
> }
>
>+static char *wdog_list[] = {"wdog1", "wdog2"};
>+
> void init_wdog(void)
> {
> /*
>@@ -161,8 +163,18 @@ void init_wdog(void)
> * In this function, we will disable both WDOG1 and WDOG2,
> * and set update bit for both. So that kernel can reconfigure them.
> */
>- disable_wdog(WDG1_RBASE);
>- disable_wdog(WDG2_RBASE);
>+ fdt_addr_t addr;
>+ int i;
>+
>+ for (i = 0; i < ARRAY_SIZE(wdog_list); i++) {
>+ addr = imx_wdog_alias_to_addr(wdog_list[i], false);
>+ if (addr == FDT_ADDR_T_NONE) {
>+ debug("watchdog alias %s not found\n", wdog_list[i]);
>+ continue;
>+ }
>+
>+ disable_wdog((u32)addr);
>+ }
It should be better to use
fdt_for_each_comaptible_node or ofnode_for_each_compatible_node
Regards
Peng
> }
>
> static bool ldo_mode_is_enabled(void)
>
>--
>2.43.0
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias
2026-03-12 7:17 ` Peng Fan
@ 2026-03-12 9:52 ` Rasmus Villemoes
0 siblings, 0 replies; 15+ messages in thread
From: Rasmus Villemoes @ 2026-03-12 9:52 UTC (permalink / raw)
To: Peng Fan
Cc: alice.guo, NXP i.MX U-Boot Team, u-boot, Christoph Stoidner,
upstream, Joseph Guo, Stefano Babic, Fabio Estevam, Tom Rini,
Peng Fan, Ye Li, Ranjani Vaidyanathan, Ji Luo, Marek Vasut,
Jacky Bai, Stefan Roese, Marek Vasut, David Zang, Simon Glass,
João Paulo Gonçalves, Primoz Fiser, Frieder Schrempf,
Jérémie Dautheribes (Schneider Electric),
Mathieu Othacehe, Francesco Dolcini, Jindong Yue, Frank Li,
Max Krummenacher, Ernest Van Hoecke, Emanuele Ghidoli, Alice Guo
On Thu, Mar 12 2026, Peng Fan <peng.fan@oss.nxp.com> wrote:
> On Tue, Mar 10, 2026 at 03:53:35PM +0800, alice.guo@oss.nxp.com wrote:
>>From: Alice Guo <alice.guo@nxp.com>
>>
>>Add imx_wdog_alias_to_addr() to get watchdog register base address from
>>device tree aliases. This function is used by mx7ulp, imx8ulp and imx9
>>SoCs to locate watchdog hardware.
>>
>>The function supports:
>>- Matching specific alias (e.g., "wdog0") or any "wdog*" if name is
>> NULL.
>>- Optional device tree status check via check_status parameter.
>
> I not see wdog alias is used by anyone.
Indeed, don't use the stem 'wdog'. Use the stem 'watchdog', as e.g. the
linux watchdog framework does enumerate watchdog devices based on their
DT alias, but using 'watchdog' as the stem:
drivers/watchdog/watchdog_core.c- /* Use alias for watchdog id if possible */
drivers/watchdog/watchdog_core.c- if (wdd->parent) {
drivers/watchdog/watchdog_core.c: ret = of_alias_get_id(wdd->parent->of_node, "watchdog");
drivers/watchdog/watchdog_core.c- if (ret >= 0)
drivers/watchdog/watchdog_core.c- id = ida_alloc_range(&watchdog_ida, ret, ret,
drivers/watchdog/watchdog_core.c- GFP_KERNEL);
drivers/watchdog/watchdog_core.c- }
Rasmus
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-03-12 12:48 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 7:53 [PATCH 00/10] imx: Switch watchdog addressing from macros to devicetree alice.guo
2026-03-10 7:53 ` [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias alice.guo
2026-03-12 7:17 ` Peng Fan
2026-03-12 9:52 ` Rasmus Villemoes
2026-03-10 7:53 ` [PATCH v1 02/10] watchdog: ulp_wdog: Get watchdog base address from device tree alice.guo
2026-03-12 7:19 ` Peng Fan
2026-03-10 7:53 ` [PATCH v1 03/10] imx: soc: Get watchdog base addresses " alice.guo
2026-03-12 9:01 ` Peng Fan
2026-03-10 7:53 ` [PATCH v1 04/10] imx7ulp: dtsi: Add wdog1 and wdog2 nodes with aliases alice.guo
2026-03-10 7:53 ` [PATCH v1 05/10] imx8ulp: dtsi: Add wdog3 alias and bootph-all property alice.guo
2026-03-10 7:53 ` [PATCH v1 06/10] imx93: dtsi: Add wdog3/wdog4/wdog5 " alice.guo
2026-03-10 7:53 ` [PATCH v1 07/10] imx91: " alice.guo
2026-03-10 7:53 ` [PATCH v1 08/10] imx943: dtsi: Add wdog3 and wdog4 nodes with aliases alice.guo
2026-03-10 7:53 ` [PATCH v1 09/10] imx95: " alice.guo
2026-03-10 7:53 ` [PATCH v1 10/10] imx: Remove hardcoded watchdog base address macros alice.guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox