* [PATCH 1/3] dt-bindings: reset: mediatek: add MT7629 TOPRGU reset indices
2026-09-26 11:13 [PATCH 0/3] Add MT7629 TOPRGU reset support Chuanhong Guo
@ 2026-09-26 11:13 ` Chuanhong Guo
2026-09-29 8:44 ` Krzysztof Kozlowski
2026-09-26 11:14 ` [PATCH 2/3] watchdog: mediatek: add MT7629 reset controller support Chuanhong Guo
2026-09-26 11:14 ` [PATCH 3/3] ARM: dts: mediatek: expose the MT7629 TOPRGU reset controller Chuanhong Guo
2 siblings, 1 reply; 7+ messages in thread
From: Chuanhong Guo @ 2026-09-26 11:13 UTC (permalink / raw)
To: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Wim Van Sebroeck,
Guenter Roeck
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
linux-watchdog, Chuanhong Guo
Define all seven reset IDs documented in the MT7629 TOPRGU SWSYSRST
register: INFRA, ETHDMA, DDRPHY, INFRA_AO, CONN, APMIXED and CONN_MCU.
Use their register bit positions as reset IDs.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
include/dt-bindings/reset/mt7629-resets.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/dt-bindings/reset/mt7629-resets.h b/include/dt-bindings/reset/mt7629-resets.h
index 6bb85734f68d..828919eee298 100644
--- a/include/dt-bindings/reset/mt7629-resets.h
+++ b/include/dt-bindings/reset/mt7629-resets.h
@@ -53,6 +53,15 @@
#define MT7629_PCIE0_USER_RST 30
#define MT7629_PCIE0_PIPE_RST 31
+/* TOPRGU resets */
+#define MT7629_TOPRGU_INFRA_SW_RST 0
+#define MT7629_TOPRGU_ETHDMA_SW_RST 1
+#define MT7629_TOPRGU_DDRPHY_SW_RST 6
+#define MT7629_TOPRGU_INFRA_AO_SW_RST 8
+#define MT7629_TOPRGU_CONN_SW_RST 9
+#define MT7629_TOPRGU_APMIXED_SW_RST 10
+#define MT7629_TOPRGU_CONN_MCU_SW_RST 12
+
/* SSUSB Subsystem resets */
#define MT7629_SSUSB_PHY_PWR_RST 3
#define MT7629_SSUSB_MAC_PWR_RST 4
--
2.55.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: reset: mediatek: add MT7629 TOPRGU reset indices
2026-09-26 11:13 ` [PATCH 1/3] dt-bindings: reset: mediatek: add MT7629 TOPRGU reset indices Chuanhong Guo
@ 2026-09-29 8:44 ` Krzysztof Kozlowski
2026-10-01 3:44 ` Chuanhong Guo
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-29 8:44 UTC (permalink / raw)
To: Chuanhong Guo
Cc: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Wim Van Sebroeck,
Guenter Roeck, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-watchdog
On Sat, Sep 26, 2026 at 07:13:59PM +0800, Chuanhong Guo wrote:
> Define all seven reset IDs documented in the MT7629 TOPRGU SWSYSRST
> register: INFRA, ETHDMA, DDRPHY, INFRA_AO, CONN, APMIXED and CONN_MCU.
> Use their register bit positions as reset IDs.
If so, I say you don't need bindings then... but fine except:
>
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> ---
> include/dt-bindings/reset/mt7629-resets.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/include/dt-bindings/reset/mt7629-resets.h b/include/dt-bindings/reset/mt7629-resets.h
> index 6bb85734f68d..828919eee298 100644
> --- a/include/dt-bindings/reset/mt7629-resets.h
> +++ b/include/dt-bindings/reset/mt7629-resets.h
> @@ -53,6 +53,15 @@
> #define MT7629_PCIE0_USER_RST 30
> #define MT7629_PCIE0_PIPE_RST 31
>
> +/* TOPRGU resets */
Didn't new bindings switch to continues indexes?
> +#define MT7629_TOPRGU_INFRA_SW_RST 0
> +#define MT7629_TOPRGU_ETHDMA_SW_RST 1
> +#define MT7629_TOPRGU_DDRPHY_SW_RST 6
> +#define MT7629_TOPRGU_INFRA_AO_SW_RST 8
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: reset: mediatek: add MT7629 TOPRGU reset indices
2026-09-29 8:44 ` Krzysztof Kozlowski
@ 2026-10-01 3:44 ` Chuanhong Guo
2026-10-01 5:33 ` Krzysztof Kozlowski
0 siblings, 1 reply; 7+ messages in thread
From: Chuanhong Guo @ 2026-10-01 3:44 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Wim Van Sebroeck,
Guenter Roeck, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-watchdog
Hi!
On Tue, Sep 29, 2026 at 4:44 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Sat, Sep 26, 2026 at 07:13:59PM +0800, Chuanhong Guo wrote:
> > Define all seven reset IDs documented in the MT7629 TOPRGU SWSYSRST
> > register: INFRA, ETHDMA, DDRPHY, INFRA_AO, CONN, APMIXED and CONN_MCU.
> > Use their register bit positions as reset IDs.
>
> If so, I say you don't need bindings then... but fine except:
>
> >
> > Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> > ---
> > include/dt-bindings/reset/mt7629-resets.h | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/include/dt-bindings/reset/mt7629-resets.h b/include/dt-bindings/reset/mt7629-resets.h
> > index 6bb85734f68d..828919eee298 100644
> > --- a/include/dt-bindings/reset/mt7629-resets.h
> > +++ b/include/dt-bindings/reset/mt7629-resets.h
> > @@ -53,6 +53,15 @@
> > #define MT7629_PCIE0_USER_RST 30
> > #define MT7629_PCIE0_PIPE_RST 31
> >
> > +/* TOPRGU resets */
>
> Didn't new bindings switch to continues indexes?
>
This is written for the existing reset driver in mtk_wdt.c. I don't
want to add a reset id remap when all the other SoCs in that
driver use binding ids matching their hardware bits.
Is this OK for existing drivers?
I can also live with plain numbers in the device tree if that's preferred.
Another option would be to include mt7622-resets.h for mt7629 dt
as their TOPRGU definitions match exactly. But that would bring other
unused mt7622 definitions into mt7629 dt, probably not ideal.
> > +#define MT7629_TOPRGU_INFRA_SW_RST 0
> > +#define MT7629_TOPRGU_ETHDMA_SW_RST 1
> > +#define MT7629_TOPRGU_DDRPHY_SW_RST 6
> > +#define MT7629_TOPRGU_INFRA_AO_SW_RST 8
>
> Best regards,
> Krzysztof
>
--
Regards,
Chuanhong Guo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: reset: mediatek: add MT7629 TOPRGU reset indices
2026-10-01 3:44 ` Chuanhong Guo
@ 2026-10-01 5:33 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-01 5:33 UTC (permalink / raw)
To: Chuanhong Guo
Cc: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Wim Van Sebroeck,
Guenter Roeck, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-watchdog
On 01/10/2026 05:44, Chuanhong Guo wrote:
> Hi!
>
> On Tue, Sep 29, 2026 at 4:44 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Sat, Sep 26, 2026 at 07:13:59PM +0800, Chuanhong Guo wrote:
>>> Define all seven reset IDs documented in the MT7629 TOPRGU SWSYSRST
>>> register: INFRA, ETHDMA, DDRPHY, INFRA_AO, CONN, APMIXED and CONN_MCU.
>>> Use their register bit positions as reset IDs.
>>
>> If so, I say you don't need bindings then... but fine except:
>>
>>>
>>> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
>>> ---
>>> include/dt-bindings/reset/mt7629-resets.h | 9 +++++++++
>>> 1 file changed, 9 insertions(+)
>>>
>>> diff --git a/include/dt-bindings/reset/mt7629-resets.h b/include/dt-bindings/reset/mt7629-resets.h
>>> index 6bb85734f68d..828919eee298 100644
>>> --- a/include/dt-bindings/reset/mt7629-resets.h
>>> +++ b/include/dt-bindings/reset/mt7629-resets.h
>>> @@ -53,6 +53,15 @@
>>> #define MT7629_PCIE0_USER_RST 30
>>> #define MT7629_PCIE0_PIPE_RST 31
>>>
>>> +/* TOPRGU resets */
>>
>> Didn't new bindings switch to continues indexes?
>>
>
> This is written for the existing reset driver in mtk_wdt.c. I don't
> want to add a reset id remap when all the other SoCs in that
> driver use binding ids matching their hardware bits.
>
> Is this OK for existing drivers?
It's fine.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] watchdog: mediatek: add MT7629 reset controller support
2026-09-26 11:13 [PATCH 0/3] Add MT7629 TOPRGU reset support Chuanhong Guo
2026-09-26 11:13 ` [PATCH 1/3] dt-bindings: reset: mediatek: add MT7629 TOPRGU reset indices Chuanhong Guo
@ 2026-09-26 11:14 ` Chuanhong Guo
2026-09-26 11:14 ` [PATCH 3/3] ARM: dts: mediatek: expose the MT7629 TOPRGU reset controller Chuanhong Guo
2 siblings, 0 replies; 7+ messages in thread
From: Chuanhong Guo @ 2026-09-26 11:14 UTC (permalink / raw)
To: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Wim Van Sebroeck,
Guenter Roeck
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
linux-watchdog, Chuanhong Guo
MT7629 currently matches the MT6589 fallback, which exposes reset IDs
0 through 11. The MT7629 CONN_MCU reset is at bit 12 of the SWSYSRST
register and cannot be requested through this fallback.
Add MT7629 match data with 13 reset IDs to cover the CONN_MCU reset.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
drivers/watchdog/mtk_wdt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 1b95392c0f78..ad5f8fee0abc 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -69,6 +69,7 @@
#define DRV_VERSION "1.0"
#define MT6589_TOPRGU_SW_RST_NUM 12
+#define MT7629_TOPRGU_SW_RST_NUM 13
#define MT7988_TOPRGU_SW_RST_NUM 24
static bool nowayout = WATCHDOG_NOWAYOUT;
@@ -108,6 +109,10 @@ static const struct mtk_wdt_data mt6795_data = {
.toprgu_sw_rst_num = MT6795_TOPRGU_SW_RST_NUM,
};
+static const struct mtk_wdt_data mt7629_data = {
+ .toprgu_sw_rst_num = MT7629_TOPRGU_SW_RST_NUM,
+};
+
static const struct mtk_wdt_data mt7986_data = {
.toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM,
};
@@ -590,6 +595,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,mt7629-wdt", .data = &mt7629_data },
{ .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data },
{ .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data },
{ .compatible = "mediatek,mt8167-wdt", .data = &mt8167_data },
--
2.55.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 3/3] ARM: dts: mediatek: expose the MT7629 TOPRGU reset controller
2026-09-26 11:13 [PATCH 0/3] Add MT7629 TOPRGU reset support Chuanhong Guo
2026-09-26 11:13 ` [PATCH 1/3] dt-bindings: reset: mediatek: add MT7629 TOPRGU reset indices Chuanhong Guo
2026-09-26 11:14 ` [PATCH 2/3] watchdog: mediatek: add MT7629 reset controller support Chuanhong Guo
@ 2026-09-26 11:14 ` Chuanhong Guo
2 siblings, 0 replies; 7+ messages in thread
From: Chuanhong Guo @ 2026-09-26 11:14 UTC (permalink / raw)
To: Philipp Zabel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Wim Van Sebroeck,
Guenter Roeck
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
linux-watchdog, Chuanhong Guo
The watchdog block also provides subsystem resets through TOPRGU.
Add #reset-cells so that devices can reference these reset lines.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
arch/arm/boot/dts/mediatek/mt7629.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/mediatek/mt7629.dtsi b/arch/arm/boot/dts/mediatek/mt7629.dtsi
index acab0883a3bb..465900ce38c0 100644
--- a/arch/arm/boot/dts/mediatek/mt7629.dtsi
+++ b/arch/arm/boot/dts/mediatek/mt7629.dtsi
@@ -144,6 +144,7 @@ watchdog: watchdog@10212000 {
compatible = "mediatek,mt7629-wdt",
"mediatek,mt6589-wdt";
reg = <0x10212000 0x100>;
+ #reset-cells = <1>;
};
pio: pinctrl@10217000 {
--
2.55.0
^ permalink raw reply [flat|nested] 7+ messages in thread