* [PATCH 1/2] dt-bindings: watchdog: ti,rti-wdt: Add ti,am62l-rti-wdt compatible
2026-02-03 1:19 [PATCH 0/2] Add reaction control to RTI watchdog Judith Mendez
@ 2026-02-03 1:19 ` Judith Mendez
2026-02-03 1:19 ` [PATCH 2/2] watchdog: rti_wdt: Add reaction control to rti Judith Mendez
2026-02-03 1:24 ` [PATCH 0/2] Add reaction control to RTI watchdog Judith Mendez
2 siblings, 0 replies; 4+ messages in thread
From: Judith Mendez @ 2026-02-03 1:19 UTC (permalink / raw)
To: Judith Mendez, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Tero Kristo, linux-watchdog, devicetree, linux-kernel
Add a new compatible for WWD on am62l SoC [0].
[0] https://www.ti.com/product/AM62L
Signed-off-by: Judith Mendez <jm@ti.com>
---
Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml b/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml
index 62ddc284a524c..f57d5c2b80243 100644
--- a/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/ti,rti-wdt.yaml
@@ -24,6 +24,7 @@ properties:
compatible:
enum:
- ti,j7-rti-wdt
+ - ti,am62l-rti-wdt
reg:
maxItems: 1
--
2.52.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/2] watchdog: rti_wdt: Add reaction control to rti
2026-02-03 1:19 [PATCH 0/2] Add reaction control to RTI watchdog Judith Mendez
2026-02-03 1:19 ` [PATCH 1/2] dt-bindings: watchdog: ti,rti-wdt: Add ti,am62l-rti-wdt compatible Judith Mendez
@ 2026-02-03 1:19 ` Judith Mendez
2026-02-03 1:24 ` [PATCH 0/2] Add reaction control to RTI watchdog Judith Mendez
2 siblings, 0 replies; 4+ messages in thread
From: Judith Mendez @ 2026-02-03 1:19 UTC (permalink / raw)
To: Judith Mendez, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Tero Kristo, linux-watchdog, devicetree, linux-kernel
This allows to configure reaction between NMI and reset for WWD.
On K3 SoC's other than AM62l, watchdog reset output is routed to
the ESM module which can subsequently route the signal to safety
master or SoC reset. On AM62l [0], the watchdog reset output is routed
to the SoC HW reset block. So, add a new compatible for AM62l to
add SoC data and configure reaction to reset instead of NMI.
[0] https://www.ti.com/lit/pdf/sprujb4
Signed-off-by: Judith Mendez <jm@ti.com>
---
drivers/watchdog/rti_wdt.c | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
index be7d7db475911..9b8d2ea2606c3 100644
--- a/drivers/watchdog/rti_wdt.c
+++ b/drivers/watchdog/rti_wdt.c
@@ -35,7 +35,8 @@
#define RTIWWDRXCTRL 0xa4
#define RTIWWDSIZECTRL 0xa8
-#define RTIWWDRX_NMI 0xa
+#define RTIWWDRXN_RST 0x5
+#define RTIWWDRXN_NMI 0xa
#define RTIWWDSIZE_50P 0x50
#define RTIWWDSIZE_25P 0x500
@@ -63,22 +64,29 @@
static int heartbeat;
+struct rti_wdt_data {
+ bool reset;
+};
+
/*
* struct to hold data for each WDT device
* @base - base io address of WD device
* @freq - source clock frequency of WDT
* @wdd - hold watchdog device as is in WDT core
+ * @data - hold configuration data
*/
struct rti_wdt_device {
void __iomem *base;
unsigned long freq;
struct watchdog_device wdd;
+ const struct rti_wdt_data *data;
};
static int rti_wdt_start(struct watchdog_device *wdd)
{
u32 timer_margin;
struct rti_wdt_device *wdt = watchdog_get_drvdata(wdd);
+ u8 reaction;
int ret;
ret = pm_runtime_resume_and_get(wdd->parent);
@@ -101,8 +109,12 @@ static int rti_wdt_start(struct watchdog_device *wdd)
*/
wdd->min_hw_heartbeat_ms = 520 * wdd->timeout + MAX_HW_ERROR;
- /* Generate NMI when wdt expires */
- writel_relaxed(RTIWWDRX_NMI, wdt->base + RTIWWDRXCTRL);
+ /* Generate reset or NMI when timer expires/serviced outside of window */
+ reaction = RTIWWDRXN_NMI;
+ if (wdt->data->reset)
+ reaction = RTIWWDRXN_RST;
+
+ writel_relaxed(reaction, wdt->base + RTIWWDRXCTRL);
/* Open window size 50%; this is the largest window size available */
writel_relaxed(RTIWWDSIZE_50P, wdt->base + RTIWWDSIZECTRL);
@@ -254,6 +266,8 @@ static int rti_wdt_probe(struct platform_device *pdev)
wdd->timeout = DEFAULT_HEARTBEAT;
wdd->parent = dev;
+ wdt->data = of_device_get_match_data(dev);
+
watchdog_set_drvdata(wdd, wdt);
watchdog_set_nowayout(wdd, 1);
watchdog_set_restart_priority(wdd, 128);
@@ -361,8 +375,17 @@ static void rti_wdt_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
}
+static struct rti_wdt_data j7_wdt = {
+ .reset = false,
+};
+
+static struct rti_wdt_data am62l_wdt = {
+ .reset = true,
+};
+
static const struct of_device_id rti_wdt_of_match[] = {
- { .compatible = "ti,j7-rti-wdt", },
+ { .compatible = "ti,j7-rti-wdt", .data = &j7_wdt },
+ { .compatible = "ti,am62l-rti-wdt", .data = &am62l_wdt },
{},
};
MODULE_DEVICE_TABLE(of, rti_wdt_of_match);
--
2.52.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] Add reaction control to RTI watchdog
2026-02-03 1:19 [PATCH 0/2] Add reaction control to RTI watchdog Judith Mendez
2026-02-03 1:19 ` [PATCH 1/2] dt-bindings: watchdog: ti,rti-wdt: Add ti,am62l-rti-wdt compatible Judith Mendez
2026-02-03 1:19 ` [PATCH 2/2] watchdog: rti_wdt: Add reaction control to rti Judith Mendez
@ 2026-02-03 1:24 ` Judith Mendez
2 siblings, 0 replies; 4+ messages in thread
From: Judith Mendez @ 2026-02-03 1:24 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Tero Kristo, linux-watchdog, devicetree, linux-kernel
Hi all,
On 2/2/26 7:19 PM, Judith Mendez wrote:
> On most K3 SoC's, watchdog reset output is routed to an ESM module
> which can subsequently route the signal to safety master or SoC reset.
> On AM62L [0], the watchdog reset output is routed to the SoC HW reset
> block.
>
> This series adds the reacton control to RTI, configures reset reaction
> for am62l_wdt and adds a new ti,am62l-rti-wdt compatible to be used for
> AM62L SoC [0].
>
So sorry, please ignore this series, I sent the wrong version.
~ Judith
^ permalink raw reply [flat|nested] 4+ messages in thread