watchdog: mt8192: add wdt support
Subsystems (3)
v6 cover watchdog: mt8192: add wdt support
This patches aim to add watchdog support for MT8192.
change in v6:
1. add change log.
2. remove Reviewed-by tag on[v5,2/4]
change in v5:
fix typos on mt8192-reset.h (https://patchwork.kernel.org/patch/11697493/)
change in v4:
just revise v3 commit messages.
[v4,1/5] fix the description of compatible is Reviewed-by: Matthias and Guenter. [v4,2/5] update watchdog device node for mt8183 is Acked-by: Guenter, and will
be applied to v5.9-next/dts64.
[v4,4/5] add toprgu reset-controller head file for MT8192 platform is Reviewed-by: Matthias, and Acked-by: Guenter.
[v4,5/5] add support for watchdog device found in MT8192 SoC is Reviewed-by: Matthias and Guenter.
change in v3:
1. separate [v2,1/3] to fix the original mt2712 and mt8183 compatibles and add new board as:
[v3,1/5] fix mt2712 and mt8183 description of compatible, since mt2712
and mt8183 also provide sub-system software reset features, but mt6589 not support this feature. (Reviewed-by: Matthias)
[v3,2/5] update watchdog device node for mt8183
[v3,3/5] update mtk-wdt document for MT8192 platform
2. [v3, 4/5] is same as [v2,2/3] (Reviewed-by: Matthias)
3. modify the commit message of [v2,3/3]
[v3,5/5] add support for watchdog device found in MT8192 SoC(Reviewed-by: Matthias and Guenter)
v2 changes:
Abandon V1 changes,and add the following changes:
[v2,1/3] update mtk-wdt document for mt2712, mt8183 and mt8192.
[v2,2/3] add toprgu reset-controller head file for MT8192 platform (Reviewed-by: Matthias) [v2,3/3] add support for watchdog device found in MT8192 SoC( Reviewed-by: Matthias)
v1 changes:
Instead of submit the mt8192-reset.h, get the number of reset bits from dtsi directly.
Crystal Guo (4):
dt-binding: mediatek: watchdog: fix the description of compatible
dt-binding: mediatek: mt8192: update mtk-wdt document
dt-binding: mt8192: add toprgu reset-controller head file
watchdog: mt8192: add wdt support
.../devicetree/bindings/watchdog/mtk-wdt.txt | 5 ++-- drivers/watchdog/mtk_wdt.c | 6 ++++ .../reset-controller/mt8192-resets.h | 30 +++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 include/dt-bindings/reset-controller/mt8192-resets.h
PATCH v6 1/4 dt-binding: mediatek: watchdog: fix the description of compatible
The watchdog driver for MT2712 and MT8183 relies on DT data, so the fallback compatible MT6589 won't work.
--- Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +2 -2
@@ -4,13 +4,13 @@ Required properties: - compatible should contain: "mediatek,mt2701-wdt", "mediatek,mt6589-wdt": for MT2701 - "mediatek,mt2712-wdt", "mediatek,mt6589-wdt": for MT2712 + "mediatek,mt2712-wdt": for MT2712 "mediatek,mt6589-wdt": for MT6589 "mediatek,mt6797-wdt", "mediatek,mt6589-wdt": for MT6797 "mediatek,mt7622-wdt", "mediatek,mt6589-wdt": for MT7622 "mediatek,mt7623-wdt", "mediatek,mt6589-wdt": for MT7623 "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 - "mediatek,mt8183-wdt", "mediatek,mt6589-wdt": for MT8183 + "mediatek,mt8183-wdt": for MT8183 "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 - reg : Specifies base physical address and size of the registers.
Signature · 1 line
2.18.0
PATCH v6 2/4 dt-binding: mediatek: mt8192: update mtk-wdt document
In reply to Crystal Guoupdate mtk-wdt document for MT8192 platform
--- Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1 -0
@@ -12,6 +12,7 @@ Required properties: "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 "mediatek,mt8183-wdt": for MT8183 "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 + "mediatek,mt8192-wdt": for MT8192 - reg : Specifies base physical address and size of the registers.
Signature · 1 line
2.18.0
Re: [v6,2/4] dt-binding: mediatek: mt8192: update mtk-wdt document
Hi Maintainers,
Gentle pin for this patch.
Thanks
Quoted 19 lines · Crystal Guo
update mtk-wdt document for MT8192 platform
Signed-off-by Crystal Guo <[email protected]>--- Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1
-0@@ -12,6 +12,7 @@ Required properties: "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 "mediatek,mt8183-wdt": for MT8183 "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 + "mediatek,mt8192-wdt": for MT8192 - reg : Specifies base physical address and size of the registers.
Re: [v6,2/4] dt-binding: mediatek: mt8192: update mtk-wdt document
Quoted 9 lines · Crystal Guo
Hi Maintainers,
Gentle pin for this patch.
Thanks
Quoted 1 line · Crystal Guo
update mtk-wdt document for MT8192 platform
Rob: I assume your input is required here? Any chance we could have your ack/review on this trivial patch? It seems like the series is blocked pending on a review of this patch -- and I don't think it has been reviewed before.
Thanks,
Quoted 16 lines
Quoted 16 lines
Signed-off-by Crystal Guo <[email protected]>--- Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1
-0@@ -12,6 +12,7 @@ Required properties: "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 "mediatek,mt8183-wdt": for MT8183 "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 + "mediatek,mt8192-wdt": for MT8192
Quoted 7 lines
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt Required properties: · line 18
Quoted 2 lines
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +0
-0- reg : Specifies base physical address and size of the registers._______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Re: [v6,2/4] dt-binding: mediatek: mt8192: update mtk-wdt document
Quoted 9 lines · Nicolas Boichat
Quoted 8 lines · Crystal Guo
Hi Maintainers,
Gentle pin for this patch.
Thanks
On Wed, 2020-10-14 at 21:19 +0800, Crystal Guo wrote:
Quoted 10 lines
Quoted 1 line
Quoted 1 line
update mtk-wdt document for MT8192 platform
Rob: I assume your input is required here? Any chance we could have your ack/review on this trivial patch? It seems like the series is blocked pending on a review of this patch -- and I don't think it has been reviewed before.
Thanks,
Hi Maintainers,
Just a gentle ping, can you help to review or give some suggestions about this patch set?
Many thanks.
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Signed-off-by Crystal Guo <[email protected]>--- Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1
-0@@ -12,6 +12,7 @@ Required properties: "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 "mediatek,mt8183-wdt": for MT8183 "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 + "mediatek,mt8192-wdt": for MT8192
Quoted 7 lines
Quoted 7 lines
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt Required properties: · line 18
Quoted 2 lines
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +0
-0- reg : Specifies base physical address and size of the registers._______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Re: [v6,2/4] dt-binding: mediatek: mt8192: update mtk-wdt document
In reply to Crystal GuoQuoted 3 lines · Crystal Guo
update mtk-wdt document for MT8192 platform
Signed-off-by Crystal Guo <[email protected]>
Quoted 9 lines
--- Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +0
-0
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt Required properties: · line 18
Quoted 7 lines
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt +1
-0@@ -12,6 +12,7 @@ Required properties: "mediatek,mt7629-wdt", "mediatek,mt6589-wdt": for MT7629 "mediatek,mt8183-wdt": for MT8183 "mediatek,mt8516-wdt", "mediatek,mt6589-wdt": for MT8516 + "mediatek,mt8192-wdt": for MT8192 - reg : Specifies base physical address and size of the registers.
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
PATCH v6 3/4 dt-binding: mt8192: add toprgu reset-controller head file
In reply to Crystal Guoadd toprgu reset-controller head file for MT8192 platform
--- .../reset-controller/mt8192-resets.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/dt-bindings/reset-controller/mt8192-resets.h
include/dt-bindings/reset-controller/mt8192-resets.h new file +30 -0
@@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (c) 2020 MediaTek Inc. +* Author: Yong Liang <[email protected]> +*/ + +#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT8192 +#define _DT_BINDINGS_RESET_CONTROLLER_MT8192 + +#define MT8192_TOPRGU_MM_SW_RST 1 +#define MT8192_TOPRGU_MFG_SW_RST 2 +#define MT8192_TOPRGU_VENC_SW_RST 3 +#define MT8192_TOPRGU_VDEC_SW_RST 4 +#define MT8192_TOPRGU_IMG_SW_RST 5 +#define MT8192_TOPRGU_MD_SW_RST 7 +#define MT8192_TOPRGU_CONN_SW_RST 9 +#define MT8192_TOPRGU_CONN_MCU_SW_RST 12 +#define MT8192_TOPRGU_IPU0_SW_RST 14 +#define MT8192_TOPRGU_IPU1_SW_RST 15 +#define MT8192_TOPRGU_AUDIO_SW_RST 17 +#define MT8192_TOPRGU_CAMSYS_SW_RST 18 +#define MT8192_TOPRGU_MJC_SW_RST 19 +#define MT8192_TOPRGU_C2K_S2_SW_RST 20 +#define MT8192_TOPRGU_C2K_SW_RST 21 +#define MT8192_TOPRGU_PERI_SW_RST 22 +#define MT8192_TOPRGU_PERI_AO_SW_RST 23 + +#define MT8192_TOPRGU_SW_RST_NUM 23 + +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT8192 */
Signature · 1 line
2.18.0
PATCH v6 4/4 watchdog: mt8192: add wdt support
In reply to Crystal GuoAdd support for watchdog device found in MT8192 SoC
--- drivers/watchdog/mtk_wdt.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/watchdog/mtk_wdt.c +6 -0
@@ -11,6 +11,7 @@#include <dt-bindings/reset-controller/mt2712-resets.h> #include <dt-bindings/reset-controller/mt8183-resets.h> +#include <dt-bindings/reset-controller/mt8192-resets.h> #include <linux/delay.h> #include <linux/err.h> #include <linux/init.h>
@@ -76,6 +77,10 @@ static const struct mtk_wdt_data mt8183_data = { .toprgu_sw_rst_num = MT8183_TOPRGU_SW_RST_NUM, }; +static const struct mtk_wdt_data mt8192_data = { + .toprgu_sw_rst_num =MT8192_TOPRGU_SW_RST_NUM , +}; +static int toprgu_reset_update (struct reset_controller_dev *rcdev,unsigned long id,bool assert) {
@@ -322,6 +327,7 @@ static const struct of_device_id mtk_wdt_dt_ids[] = { { .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data }, { .compatible = "mediatek,mt6589-wdt" }, { .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data }, + { .compatible = "mediatek,mt8192-wdt", .data = &mt8192_data }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, mtk_wdt_dt_ids);
Signature · 1 line
2.18.0
Guenter Roeck
maintainerQuoted 5 lines · Crystal Guo
Add support for watchdog device found in MT8192 SoC
Signed-off-by Crystal Guo <[email protected]>Reviewed-by Matthias Brugger <[email protected]>Reviewed-by Guenter Roeck <[email protected]>
FTR, I now added this series to my watchdog-next tree. Hopefully Wim will pick it up from there.
Ultimately the bindings should be updated to yaml format, but I don't see the point of holding up the series for that, and the series has been collecting dust for long enough.
Guenter
Quoted 28 lines
--- drivers/watchdog/mtk_wdt.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/watchdog/mtk_wdt.c +5
-0@@ -11,6 +11,7 @@#include <dt-bindings/reset-controller/mt2712-resets.h> #include <dt-bindings/reset-controller/mt8183-resets.h> +#include <dt-bindings/reset-controller/mt8192-resets.h> #include <linux/delay.h> #include <linux/err.h> #include <linux/init.h> @@ -76,6 +77,10 @@ static const struct mtk_wdt_data mt8183_data = { .toprgu_sw_rst_num = MT8183_TOPRGU_SW_RST_NUM, }; +static const struct mtk_wdt_data mt8192_data = { + .toprgu_sw_rst_num =MT8192_TOPRGU_SW_RST_NUM , +}; +static int toprgu_reset_update (struct reset_controller_dev *rcdev,unsigned long id,bool assert) {
drivers/watchdog/mtk_wdt.c static const struct of_device_id mtk_wdt_dt_ids[] = { · line 333
Quoted 7 lines
drivers/watchdog/mtk_wdt.c +1
-0@@ -322,6 +327,7 @@ static const struct of_device_id mtk_wdt_dt_ids[] = { { .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data }, { .compatible = "mediatek,mt6589-wdt" }, { .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data }, + { .compatible = "mediatek,mt8192-wdt", .data = &mt8192_data }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, mtk_wdt_dt_ids);
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek