Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [v6,0/4] watchdog: mt8192: add wdt support
@ 2020-10-14 13:19 Crystal Guo
  2020-10-14 13:19 ` [v6,1/4] dt-binding: mediatek: watchdog: fix the description of compatible Crystal Guo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Crystal Guo @ 2020-10-14 13:19 UTC (permalink / raw)
  To: wim, linux, robh+dt, matthias.bgg
  Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
	linux-watchdog, seiya.wang

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [v6,1/4] dt-binding: mediatek: watchdog: fix the description of compatible
  2020-10-14 13:19 [v6,0/4] watchdog: mt8192: add wdt support Crystal Guo
@ 2020-10-14 13:19 ` Crystal Guo
  2020-10-14 13:19 ` [v6,2/4] dt-binding: mediatek: mt8192: update mtk-wdt document Crystal Guo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Crystal Guo @ 2020-10-14 13:19 UTC (permalink / raw)
  To: wim, linux, robh+dt, matthias.bgg
  Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
	linux-watchdog, seiya.wang, Crystal Guo

The watchdog driver for MT2712 and MT8183 relies on DT data, so
the fallback compatible MT6589 won't work.

Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
index 4dd36bd3f1ad..45eedc2c3141 100644
--- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
@@ -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.
-- 
2.18.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [v6,2/4] dt-binding: mediatek: mt8192: update mtk-wdt document
  2020-10-14 13:19 [v6,0/4] watchdog: mt8192: add wdt support Crystal Guo
  2020-10-14 13:19 ` [v6,1/4] dt-binding: mediatek: watchdog: fix the description of compatible Crystal Guo
@ 2020-10-14 13:19 ` Crystal Guo
  2020-10-14 13:19 ` [v6,3/4] dt-binding: mt8192: add toprgu reset-controller head file Crystal Guo
  2020-10-14 13:19 ` [v6,4/4] watchdog: mt8192: add wdt support Crystal Guo
  3 siblings, 0 replies; 5+ messages in thread
From: Crystal Guo @ 2020-10-14 13:19 UTC (permalink / raw)
  To: wim, linux, robh+dt, matthias.bgg
  Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
	linux-watchdog, seiya.wang, Crystal Guo

update mtk-wdt document for MT8192 platform

Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
index 45eedc2c3141..e36ba60de829 100644
--- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
@@ -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.
 
-- 
2.18.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [v6,3/4] dt-binding: mt8192: add toprgu reset-controller head file
  2020-10-14 13:19 [v6,0/4] watchdog: mt8192: add wdt support Crystal Guo
  2020-10-14 13:19 ` [v6,1/4] dt-binding: mediatek: watchdog: fix the description of compatible Crystal Guo
  2020-10-14 13:19 ` [v6,2/4] dt-binding: mediatek: mt8192: update mtk-wdt document Crystal Guo
@ 2020-10-14 13:19 ` Crystal Guo
  2020-10-14 13:19 ` [v6,4/4] watchdog: mt8192: add wdt support Crystal Guo
  3 siblings, 0 replies; 5+ messages in thread
From: Crystal Guo @ 2020-10-14 13:19 UTC (permalink / raw)
  To: wim, linux, robh+dt, matthias.bgg
  Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
	linux-watchdog, seiya.wang, Crystal Guo

add toprgu reset-controller head file for MT8192 platform

Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
---
 .../reset-controller/mt8192-resets.h          | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 include/dt-bindings/reset-controller/mt8192-resets.h

diff --git a/include/dt-bindings/reset-controller/mt8192-resets.h b/include/dt-bindings/reset-controller/mt8192-resets.h
new file mode 100644
index 000000000000..be9a7ca245b9
--- /dev/null
+++ b/include/dt-bindings/reset-controller/mt8192-resets.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2020 MediaTek Inc.
+ * Author: Yong Liang <yong.liang@mediatek.com>
+ */
+
+#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 */
-- 
2.18.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [v6,4/4] watchdog: mt8192: add wdt support
  2020-10-14 13:19 [v6,0/4] watchdog: mt8192: add wdt support Crystal Guo
                   ` (2 preceding siblings ...)
  2020-10-14 13:19 ` [v6,3/4] dt-binding: mt8192: add toprgu reset-controller head file Crystal Guo
@ 2020-10-14 13:19 ` Crystal Guo
  3 siblings, 0 replies; 5+ messages in thread
From: Crystal Guo @ 2020-10-14 13:19 UTC (permalink / raw)
  To: wim, linux, robh+dt, matthias.bgg
  Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
	linux-watchdog, seiya.wang, Crystal Guo

Add support for watchdog device found in MT8192 SoC

Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
---
 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 d6a6393f609d..aef0c2db6a11 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -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);
-- 
2.18.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 13:19 [v6,0/4] watchdog: mt8192: add wdt support Crystal Guo
2020-10-14 13:19 ` [v6,1/4] dt-binding: mediatek: watchdog: fix the description of compatible Crystal Guo
2020-10-14 13:19 ` [v6,2/4] dt-binding: mediatek: mt8192: update mtk-wdt document Crystal Guo
2020-10-14 13:19 ` [v6,3/4] dt-binding: mt8192: add toprgu reset-controller head file Crystal Guo
2020-10-14 13:19 ` [v6,4/4] watchdog: mt8192: add wdt support Crystal Guo

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git