* [PATCH 1/3] dt-bindings: watchdog: mediatek,mtk-wdt: fix mt6797 compatible
2026-11-10 19:22 [PATCH 0/3] watchdog: mediatek: fix mt6797 Roman Vivchar via B4 Relay
@ 2026-11-10 19:22 ` Roman Vivchar via B4 Relay
2026-11-19 23:17 ` Rob Herring (Arm)
2026-11-20 4:28 ` Guenter Roeck
2026-11-10 19:22 ` [PATCH 2/3] watchdog: mediatek: add mt6797 support Roman Vivchar via B4 Relay
2026-11-10 19:22 ` [PATCH 3/3] arm64: dts: mediatek: mt6797: fix wdt compatible and add reset-cells Roman Vivchar via B4 Relay
2 siblings, 2 replies; 7+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-11-10 19:22 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Philipp Zabel
Cc: Ben Grisdale, linux-watchdog, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Roman Vivchar
From: Roman Vivchar <rva333@protonmail.com>
The TOPRGU reset bits on the mt6797 SoC do not match that of mt6589,
therefore they are not compatible [1].
Deprecate the mt6589 fallback for mt6797 and add its own compatible
string. Also add a new binding header for the actual watchdog resets on
the SoC.
Link: https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Register_Table_Part_1.pdf [1]
Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
.../bindings/watchdog/mediatek,mtk-wdt.yaml | 6 +++++-
include/dt-bindings/reset/mediatek,mt6797-wdt.h | 25 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml
index 8e8991ac95ea..d9b5675794cc 100644
--- a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml
@@ -24,6 +24,7 @@ properties:
- mediatek,mt6589-wdt
- mediatek,mt6735-wdt
- mediatek,mt6795-wdt
+ - mediatek,mt6797-wdt
- mediatek,mt7986-wdt
- mediatek,mt7988-wdt
- mediatek,mt8163-wdt
@@ -38,7 +39,6 @@ properties:
- mediatek,mt2701-wdt
- mediatek,mt6572-wdt
- mediatek,mt6582-wdt
- - mediatek,mt6797-wdt
- mediatek,mt7622-wdt
- mediatek,mt7623-wdt
- mediatek,mt7629-wdt
@@ -49,6 +49,10 @@ properties:
- mediatek,mt8365-wdt
- mediatek,mt8516-wdt
- const: mediatek,mt6589-wdt
+ - items:
+ - const: mediatek,mt6797-wdt
+ - const: mediatek,mt6589-wdt
+ deprecated: true
reg:
maxItems: 1
diff --git a/include/dt-bindings/reset/mediatek,mt6797-wdt.h b/include/dt-bindings/reset/mediatek,mt6797-wdt.h
new file mode 100644
index 000000000000..32a2bdaf47c7
--- /dev/null
+++ b/include/dt-bindings/reset/mediatek,mt6797-wdt.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+
+#ifndef _DT_BINDINGS_RESET_MEDIATEK_MT6797_WDT_H_
+#define _DT_BINDINGS_RESET_MEDIATEK_MT6797_WDT_H_
+
+/* TOPRGU resets */
+#define MT6797_TOPRGU_INFRA_RST 0
+#define MT6797_TOPRGU_MM_RST 1
+#define MT6797_TOPRGU_MFG_RST 2
+#define MT6797_TOPRGU_VENC_RST 3
+#define MT6797_TOPRGU_VDEC_RST 4
+#define MT6797_TOPRGU_IMG_RST 5
+#define MT6797_TOPRGU_DDRPHY_RST 6
+#define MT6797_TOPRGU_MD_RST 7
+#define MT6797_TOPRGU_INFRA_AO_RST 8
+#define MT6797_TOPRGU_CONN_RST 9
+#define MT6797_TOPRGU_APMIXED_RST 10
+#define MT6797_TOPRGU_PWRAP_SPICTL_RST 11
+#define MT6797_TOPRGU_CONN_MCU_RST 12
+#define MT6797_TOPRGU_MJC_RST 13
+#define MT6797_TOPRGU_AUDIO_RST 14
+#define MT6797_TOPRGU_C2K_SYS_RST 15
+#define MT6797_TOPRGU_C2K_WDT_RST 16
+
+#endif /* _DT_BINDINGS_RESET_MEDIATEK_MT6797_WDT_H_ */
--
2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/3] dt-bindings: watchdog: mediatek,mtk-wdt: fix mt6797 compatible
2026-11-10 19:22 ` [PATCH 1/3] dt-bindings: watchdog: mediatek,mtk-wdt: fix mt6797 compatible Roman Vivchar via B4 Relay
@ 2026-11-19 23:17 ` Rob Herring (Arm)
2026-11-20 4:28 ` Guenter Roeck
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring (Arm) @ 2026-11-19 23:17 UTC (permalink / raw)
To: Roman Vivchar
Cc: linux-mediatek, Philipp Zabel, Conor Dooley, devicetree,
AngeloGioacchino Del Regno, linux-kernel, Ben Grisdale,
Matthias Brugger, Guenter Roeck, linux-watchdog,
Krzysztof Kozlowski, Wim Van Sebroeck, linux-arm-kernel
On Tue, 10 Nov 2026 21:22:21 +0200, Roman Vivchar wrote:
> The TOPRGU reset bits on the mt6797 SoC do not match that of mt6589,
> therefore they are not compatible [1].
>
> Deprecate the mt6589 fallback for mt6797 and add its own compatible
> string. Also add a new binding header for the actual watchdog resets on
> the SoC.
>
> Link: https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Register_Table_Part_1.pdf [1]
> Signed-off-by: Roman Vivchar <rva333@protonmail.com>
> ---
> .../bindings/watchdog/mediatek,mtk-wdt.yaml | 6 +++++-
> include/dt-bindings/reset/mediatek,mt6797-wdt.h | 25 ++++++++++++++++++++++
> 2 files changed, 30 insertions(+), 1 deletion(-)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: watchdog: mediatek,mtk-wdt: fix mt6797 compatible
2026-11-10 19:22 ` [PATCH 1/3] dt-bindings: watchdog: mediatek,mtk-wdt: fix mt6797 compatible Roman Vivchar via B4 Relay
2026-11-19 23:17 ` Rob Herring (Arm)
@ 2026-11-20 4:28 ` Guenter Roeck
1 sibling, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2026-11-20 4:28 UTC (permalink / raw)
To: Roman Vivchar
Cc: Wim Van Sebroeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Philipp Zabel,
Ben Grisdale, linux-watchdog, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On Tue, Nov 10, 2026 at 09:22:21PM +0200, Roman Vivchar wrote:
> From: Roman Vivchar <rva333@protonmail.com>
>
> The TOPRGU reset bits on the mt6797 SoC do not match that of mt6589,
> therefore they are not compatible [1].
>
> Deprecate the mt6589 fallback for mt6797 and add its own compatible
> string. Also add a new binding header for the actual watchdog resets on
> the SoC.
>
> Link: https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Register_Table_Part_1.pdf [1]
> Signed-off-by: Roman Vivchar <rva333@protonmail.com>
> Acked-by: Rob Herring (Arm) <robh@kernel.org>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] watchdog: mediatek: add mt6797 support
2026-11-10 19:22 [PATCH 0/3] watchdog: mediatek: fix mt6797 Roman Vivchar via B4 Relay
2026-11-10 19:22 ` [PATCH 1/3] dt-bindings: watchdog: mediatek,mtk-wdt: fix mt6797 compatible Roman Vivchar via B4 Relay
@ 2026-11-10 19:22 ` Roman Vivchar via B4 Relay
2026-11-20 4:29 ` Guenter Roeck
2026-11-10 19:22 ` [PATCH 3/3] arm64: dts: mediatek: mt6797: fix wdt compatible and add reset-cells Roman Vivchar via B4 Relay
2 siblings, 1 reply; 7+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-11-10 19:22 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Philipp Zabel
Cc: Ben Grisdale, linux-watchdog, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Roman Vivchar
From: Roman Vivchar <rva333@protonmail.com>
Add support for mt6797 SoC watchdog, which provides 17 software resets.
The mapping table uses bits from the datasheet [1].
Link: https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Register_Table_Part_1.pdf [1]
Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
drivers/watchdog/mtk_wdt.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index a210fe1569e4..56341f746704 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -12,6 +12,7 @@
#include <dt-bindings/reset/mt2712-resets.h>
#include <dt-bindings/reset/mediatek,mt6735-wdt.h>
#include <dt-bindings/reset/mediatek,mt6795-resets.h>
+#include <dt-bindings/reset/mediatek,mt6797-wdt.h>
#include <dt-bindings/reset/mediatek,mt8167-wdt.h>
#include <dt-bindings/reset/mt7986-resets.h>
#include <dt-bindings/reset/mt8183-resets.h>
@@ -110,6 +111,31 @@ static const struct mtk_wdt_data mt6795_data = {
.toprgu_sw_rst_num = MT6795_TOPRGU_SW_RST_NUM,
};
+static const u8 mt6797_toprgu_sw_rst_tb[] = {
+ [MT6797_TOPRGU_INFRA_RST] = 0,
+ [MT6797_TOPRGU_MM_RST] = 1,
+ [MT6797_TOPRGU_MFG_RST] = 2,
+ [MT6797_TOPRGU_VENC_RST] = 3,
+ [MT6797_TOPRGU_VDEC_RST] = 4,
+ [MT6797_TOPRGU_IMG_RST] = 5,
+ [MT6797_TOPRGU_DDRPHY_RST] = 6,
+ [MT6797_TOPRGU_MD_RST] = 7,
+ [MT6797_TOPRGU_INFRA_AO_RST] = 8,
+ [MT6797_TOPRGU_CONN_RST] = 9,
+ [MT6797_TOPRGU_APMIXED_RST] = 10,
+ [MT6797_TOPRGU_PWRAP_SPICTL_RST] = 11,
+ [MT6797_TOPRGU_CONN_MCU_RST] = 12,
+ [MT6797_TOPRGU_MJC_RST] = 13,
+ [MT6797_TOPRGU_AUDIO_RST] = 15,
+ [MT6797_TOPRGU_C2K_SYS_RST] = 16,
+ [MT6797_TOPRGU_C2K_WDT_RST] = 17,
+};
+
+static const struct mtk_wdt_data mt6797_data = {
+ .toprgu_sw_rst_tb = mt6797_toprgu_sw_rst_tb,
+ .toprgu_sw_rst_num = ARRAY_SIZE(mt6797_toprgu_sw_rst_tb),
+};
+
static const struct mtk_wdt_data mt7629_data = {
.toprgu_sw_rst_num = MT7629_TOPRGU_SW_RST_NUM,
};
@@ -607,6 +633,7 @@ static const struct of_device_id mtk_wdt_dt_ids[] = {
{ .compatible = "mediatek,mt6589-wdt", .data = &mt6589_data },
{ .compatible = "mediatek,mt6735-wdt", .data = &mt6735_data },
{ .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data },
+ { .compatible = "mediatek,mt6797-wdt", .data = &mt6797_data },
{ .compatible = "mediatek,mt7629-wdt", .data = &mt7629_data },
{ .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data },
{ .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data },
--
2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] watchdog: mediatek: add mt6797 support
2026-11-10 19:22 ` [PATCH 2/3] watchdog: mediatek: add mt6797 support Roman Vivchar via B4 Relay
@ 2026-11-20 4:29 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2026-11-20 4:29 UTC (permalink / raw)
To: Roman Vivchar
Cc: Wim Van Sebroeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Philipp Zabel,
Ben Grisdale, linux-watchdog, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On Tue, Nov 10, 2026 at 09:22:22PM +0200, Roman Vivchar wrote:
> From: Roman Vivchar <rva333@protonmail.com>
>
> Add support for mt6797 SoC watchdog, which provides 17 software resets.
> The mapping table uses bits from the datasheet [1].
>
> Link: https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Register_Table_Part_1.pdf [1]
> Signed-off-by: Roman Vivchar <rva333@protonmail.com>
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] arm64: dts: mediatek: mt6797: fix wdt compatible and add reset-cells
2026-11-10 19:22 [PATCH 0/3] watchdog: mediatek: fix mt6797 Roman Vivchar via B4 Relay
2026-11-10 19:22 ` [PATCH 1/3] dt-bindings: watchdog: mediatek,mtk-wdt: fix mt6797 compatible Roman Vivchar via B4 Relay
2026-11-10 19:22 ` [PATCH 2/3] watchdog: mediatek: add mt6797 support Roman Vivchar via B4 Relay
@ 2026-11-10 19:22 ` Roman Vivchar via B4 Relay
2 siblings, 0 replies; 7+ messages in thread
From: Roman Vivchar via B4 Relay @ 2026-11-10 19:22 UTC (permalink / raw)
To: Wim Van Sebroeck, Guenter Roeck, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Philipp Zabel
Cc: Ben Grisdale, linux-watchdog, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Roman Vivchar
From: Roman Vivchar <rva333@protonmail.com>
The TOPRGU reset bits on the mt6797 SoC do not match that of mt6589,
therefore they are not compatible [1].
Remove the deprecated mt6589 fallback for mt6797 and add reset-cells to
enable other peripherals to use the TOPRGU resets.
Link: https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Register_Table_Part_1.pdf [1]
Signed-off-by: Roman Vivchar <rva333@protonmail.com>
---
arch/arm64/boot/dts/mediatek/mt6797.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt6797.dtsi b/arch/arm64/boot/dts/mediatek/mt6797.dtsi
index 8ac98a378fd6..c0f98ae132dc 100644
--- a/arch/arm64/boot/dts/mediatek/mt6797.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6797.dtsi
@@ -218,8 +218,9 @@ scpsys: power-controller@10006000 {
};
watchdog: watchdog@10007000 {
- compatible = "mediatek,mt6797-wdt", "mediatek,mt6589-wdt";
+ compatible = "mediatek,mt6797-wdt";
reg = <0 0x10007000 0 0x100>;
+ #reset-cells = <1>;
};
apmixedsys: apmixed@1000c000 {
--
2.56.0
^ permalink raw reply [flat|nested] 7+ messages in thread