From 7ca0f72a90aad0f0f5a6e51b0920739166bed2fa Mon Sep 17 00:00:00 2001 From: Sunil Hegde Date: Wed, 25 Mar 2026 17:42:59 +0530 Subject: [PATCH 1/4] UPSTREAM-PEND: dts: bindings: watchdog: ti,j7-rti-wdt: Add... PR: 105913 Currently all boards use the driver which only configures NMI mode for a window violation. With this change: - If interrupts are present in the DT, hardware is NMI capable - If reset-capable property is true, hardware can generate a reset By this we can define the capabilities of the hardware based on which the driver can configure NMI or Reset mode. The existing nodes in the boards which support NMI will not be affected since all of them provide IRQ numbers. Signed-off-by: Sunil Hegde --- dts/bindings/watchdog/ti,j7-rti-wdt.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dts/bindings/watchdog/ti,j7-rti-wdt.yaml b/dts/bindings/watchdog/ti,j7-rti-wdt.yaml index 3baed1e3744c..f8ed7ca978d1 100644 --- a/dts/bindings/watchdog/ti,j7-rti-wdt.yaml +++ b/dts/bindings/watchdog/ti,j7-rti-wdt.yaml @@ -14,3 +14,16 @@ properties: clock-frequency: type: int required: true + + interrupts: + description: + Watchdog interrupt line, if present NMI mode is supported. + + reset-capable: + type: boolean + description: + Indicates reset mode is supported by hardware. + If set, watchdog timeout will trigger a reset. + The SoC can only be configured for either NMI + or Reset mode at a time. Support for NMI or Reset is SoC + specific. From bf8dcbd82463792488e67fd94cc862220294cebf Mon Sep 17 00:00:00 2001 From: Sunil Hegde Date: Wed, 18 Mar 2026 12:36:30 +0530 Subject: [PATCH 2/4] UPSTREAM-PEND: drivers: watchdog: wdt_ti_rtc: Configure... PR: 105913 If DT has IRQ defined, the board supports NMI mode, if reset-capable property is set then the board can support reset as well. Based on these DT properties and the flags passed by the application, NMI mode or Reset mode can be set. Signed-off-by: Sunil Hegde --- drivers/watchdog/wdt_ti_rti.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/watchdog/wdt_ti_rti.c b/drivers/watchdog/wdt_ti_rti.c index bb644a4b806f..51f3f53b2975 100644 --- a/drivers/watchdog/wdt_ti_rti.c +++ b/drivers/watchdog/wdt_ti_rti.c @@ -71,6 +71,8 @@ struct wdt_ti_rti_config { DEVICE_MMIO_ROM; uint64_t freq; + bool nmi_supported; + bool reset_supported; void (*irq_config_func)(void); }; @@ -146,8 +148,17 @@ static int wdt_ti_rti_timeout(const struct device *dev, const struct wdt_timeout return -EINVAL; } - /* Only NMI is supported */ if (cfg->flags == WDT_FLAG_RESET_SOC) { + /* Reset mode requested */ + if (!config->reset_supported) { + return -ENOTSUP; + } + regs->WWDRXNCTRL = RTIWWDRX_RESET; + } else { + /* NMI mode requested */ + if (!config->nmi_supported) { + return -ENOTSUP; + } regs->WWDRXNCTRL = RTIWWDRX_NMI; } @@ -171,6 +182,7 @@ static int wdt_ti_rti_feed(const struct device *dev, int channel_id) return 0; } +#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(interrupts) static void wdt_ti_rti_isr(const struct device *dev) { struct wdt_ti_rti_data *data = DEV_DATA(dev); @@ -184,6 +196,7 @@ static void wdt_ti_rti_isr(const struct device *dev) regs->WDKEY = WDKEY_SEQ0; regs->WDKEY = WDKEY_SEQ1; } +#endif static int wdt_ti_rti_init(const struct device *dev) { @@ -197,7 +210,9 @@ static int wdt_ti_rti_init(const struct device *dev) return -EINVAL; } - config->irq_config_func(); + if (config->nmi_supported) { + config->irq_config_func(); + } return 0; } @@ -211,15 +226,19 @@ static DEVICE_API(wdt, wdt_ti_rti_api) = { #define WDT_TI_RTI_INIT(i) \ static void wdt_ti_rti_irq_config_##i(void) \ { \ - IRQ_CONNECT(DT_INST_IRQN(i), DT_INST_IRQ(i, priority), wdt_ti_rti_isr, \ - DEVICE_DT_INST_GET(i), 0); \ - irq_enable(DT_INST_IRQN(i)); \ + IF_ENABLED(DT_INST_IRQ_HAS_IDX(i, 0), ( \ + IRQ_CONNECT(DT_INST_IRQN(i), DT_INST_IRQ(i, priority), wdt_ti_rti_isr, \ + DEVICE_DT_INST_GET(i), 0); \ + irq_enable(DT_INST_IRQN(i)); \ + )); \ }; \ static struct wdt_ti_rti_data wdt_ti_rti_data_##i = {}; \ \ static struct wdt_ti_rti_config wdt_ti_rti_config_##i = { \ DEVICE_MMIO_ROM_INIT(DT_DRV_INST(i)), \ .freq = DT_INST_PROP(i, clock_frequency), \ + .nmi_supported = DT_INST_IRQ_HAS_IDX(i, 0), \ + .reset_supported = DT_INST_PROP(i, reset_capable), \ .irq_config_func = wdt_ti_rti_irq_config_##i, \ }; \ \ From 083a123b36f1a5c7c056adbc5d292d850c5c6803 Mon Sep 17 00:00:00 2001 From: Sunil Hegde Date: Wed, 18 Mar 2026 12:45:59 +0530 Subject: [PATCH 3/4] UPSTREAM-PEND: dts: vendor: ti: am62l-main: Add SCMI... PR: 105913 - Add scmi clocks for both RTI0 and RTI1 nodes. - Add reset-capable property so that the driver can configure reset mode supported by AM62L boards. Signed-off-by: Sunil Hegde --- dts/vendor/ti/am62l-main.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dts/vendor/ti/am62l-main.dtsi b/dts/vendor/ti/am62l-main.dtsi index 02fb6ba4f96a..0f9269d636bb 100644 --- a/dts/vendor/ti/am62l-main.dtsi +++ b/dts/vendor/ti/am62l-main.dtsi @@ -239,6 +239,8 @@ compatible = "ti,j7-rti-wdt"; reg = <0x0e000000 0x100>; clock-frequency = ; + clocks = <&scmi_clk 277>; + reset-capable; status = "disabled"; }; @@ -246,6 +248,8 @@ compatible = "ti,j7-rti-wdt"; reg = <0x0e010000 0x100>; clock-frequency = ; + clocks = <&scmi_clk 283>; + reset-capable; status = "disabled"; }; From 8e91c3710504a0b399442a687315c8c7bc3c31f7 Mon Sep 17 00:00:00 2001 From: Sunil Hegde Date: Fri, 20 Mar 2026 12:26:53 +0530 Subject: [PATCH 4/4] UPSTREAM-PEND: boards: ti: am62l_evm: a53.dts: Enable RTI0 PR: 105913 Set status for watchdog node and also add an alias for watchdog. Signed-off-by: Sunil Hegde --- boards/ti/am62l_evm/am62l_evm_am62l3_a53.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boards/ti/am62l_evm/am62l_evm_am62l3_a53.dts b/boards/ti/am62l_evm/am62l_evm_am62l3_a53.dts index 2e3881d1b8e3..1d2a5ab97c46 100644 --- a/boards/ti/am62l_evm/am62l_evm_am62l3_a53.dts +++ b/boards/ti/am62l_evm/am62l_evm_am62l3_a53.dts @@ -23,6 +23,7 @@ aliases { led0 = &ld9; + watchdog0 = &main_rti0; }; leds: leds { @@ -197,3 +198,7 @@ ngpios = <24>; }; }; + +&main_rti0 { + status = "okay"; +};