Re: [PATCH v1 01/10] imx: Add helper to get watchdog base address from DT alias

Rasmus Villemoes
2026-03-12T12:48:43Z

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