* [v3,1/5] dt-binding: mediatek: watchdog: fix the description of compatible
2020-07-30 10:21 add watchdog support for mt8192 Crystal Guo
@ 2020-07-30 10:21 ` Crystal Guo
2020-07-30 11:11 ` Matthias Brugger
2020-07-30 10:21 ` [v3,2/5] arm64: dts: mt8183: update watchdog device node Crystal Guo
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Crystal Guo @ 2020-07-30 10:21 UTC (permalink / raw)
To: linux, robh+dt, matthias.bgg
Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
linux-watchdog, seiya.wang, Crystal Guo
Besides watchdog, mt2712 and nt8183 also provide sub-system software
reset features. But mt6589 not support this feature
Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
---
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 4dd36bd..45eedc2 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.
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [v3,1/5] dt-binding: mediatek: watchdog: fix the description of compatible
2020-07-30 10:21 ` [v3,1/5] dt-binding: mediatek: watchdog: fix the description of compatible Crystal Guo
@ 2020-07-30 11:11 ` Matthias Brugger
0 siblings, 0 replies; 9+ messages in thread
From: Matthias Brugger @ 2020-07-30 11:11 UTC (permalink / raw)
To: Crystal Guo, linux, robh+dt
Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
linux-watchdog, seiya.wang
On 30/07/2020 12:21, Crystal Guo wrote:
> Besides watchdog, mt2712 and nt8183 also provide sub-system software
> reset features. But mt6589 not support this feature
>
> Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
My proposal for the commit message:
"The watchdog driver for MT2712 and MT8183 relies on DT data, so the fallback
compatible MT6589 won't work."
With that or anything like that:
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> 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 4dd36bd..45eedc2 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.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [v3,2/5] arm64: dts: mt8183: update watchdog device node
2020-07-30 10:21 add watchdog support for mt8192 Crystal Guo
2020-07-30 10:21 ` [v3,1/5] dt-binding: mediatek: watchdog: fix the description of compatible Crystal Guo
@ 2020-07-30 10:21 ` Crystal Guo
2020-07-30 11:11 ` Matthias Brugger
2020-07-30 10:21 ` [v3,3/5] dt-binding: mediatek: mt8192: update mtk-wdt document Crystal Guo
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Crystal Guo @ 2020-07-30 10:21 UTC (permalink / raw)
To: linux, robh+dt, matthias.bgg
Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
linux-watchdog, seiya.wang, Crystal Guo
update watchdog device node for MT8183
Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
---
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index 1e03c84..f8d8357 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -310,8 +310,7 @@
};
watchdog: watchdog@10007000 {
- compatible = "mediatek,mt8183-wdt",
- "mediatek,mt6589-wdt";
+ compatible = "mediatek,mt8183-wdt";
reg = <0 0x10007000 0 0x100>;
#reset-cells = <1>;
};
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [v3,2/5] arm64: dts: mt8183: update watchdog device node
2020-07-30 10:21 ` [v3,2/5] arm64: dts: mt8183: update watchdog device node Crystal Guo
@ 2020-07-30 11:11 ` Matthias Brugger
0 siblings, 0 replies; 9+ messages in thread
From: Matthias Brugger @ 2020-07-30 11:11 UTC (permalink / raw)
To: Crystal Guo, linux, robh+dt
Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
linux-watchdog, seiya.wang
On 30/07/2020 12:21, Crystal Guo wrote:
> update watchdog device node for MT8183
Explain why you update it.
>
> Signed-off-by: Crystal Guo <crystal.guo@mediatek.com>
> ---
> arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> index 1e03c84..f8d8357 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> @@ -310,8 +310,7 @@
> };
>
> watchdog: watchdog@10007000 {
> - compatible = "mediatek,mt8183-wdt",
> - "mediatek,mt6589-wdt";
> + compatible = "mediatek,mt8183-wdt";
> reg = <0 0x10007000 0 0x100>;
> #reset-cells = <1>;
> };
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [v3,3/5] dt-binding: mediatek: mt8192: update mtk-wdt document
2020-07-30 10:21 add watchdog support for mt8192 Crystal Guo
2020-07-30 10:21 ` [v3,1/5] dt-binding: mediatek: watchdog: fix the description of compatible Crystal Guo
2020-07-30 10:21 ` [v3,2/5] arm64: dts: mt8183: update watchdog device node Crystal Guo
@ 2020-07-30 10:21 ` Crystal Guo
2020-07-30 10:21 ` [v3,4/5] dt-binding: mt8192: add toprgu reset-controller head file Crystal Guo
2020-07-30 10:21 ` [v3,5/5] watchdog: mt8192: add wdt support Crystal Guo
4 siblings, 0 replies; 9+ messages in thread
From: Crystal Guo @ 2020-07-30 10:21 UTC (permalink / raw)
To: 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 45eedc2..e36ba60 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.
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [v3,4/5] dt-binding: mt8192: add toprgu reset-controller head file
2020-07-30 10:21 add watchdog support for mt8192 Crystal Guo
` (2 preceding siblings ...)
2020-07-30 10:21 ` [v3,3/5] dt-binding: mediatek: mt8192: update mtk-wdt document Crystal Guo
@ 2020-07-30 10:21 ` Crystal Guo
2020-07-30 10:21 ` [v3,5/5] watchdog: mt8192: add wdt support Crystal Guo
4 siblings, 0 replies; 9+ messages in thread
From: Crystal Guo @ 2020-07-30 10:21 UTC (permalink / raw)
To: 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>
---
.../dt-bindings/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 0000000..84fee34
--- /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 MT8183_TOPRGU_MM_SW_RST 1
+#define MT8183_TOPRGU_MFG_SW_RST 2
+#define MT8183_TOPRGU_VENC_SW_RST 3
+#define MT8183_TOPRGU_VDEC_SW_RST 4
+#define MT8183_TOPRGU_IMG_SW_RST 5
+#define MT8183_TOPRGU_MD_SW_RST 7
+#define MT8183_TOPRGU_CONN_SW_RST 9
+#define MT8183_TOPRGU_CONN_MCU_SW_RST 12
+#define MT8183_TOPRGU_IPU0_SW_RST 14
+#define MT8183_TOPRGU_IPU1_SW_RST 15
+#define MT8183_TOPRGU_AUDIO_SW_RST 17
+#define MT8183_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 */
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [v3,5/5] watchdog: mt8192: add wdt support
2020-07-30 10:21 add watchdog support for mt8192 Crystal Guo
` (3 preceding siblings ...)
2020-07-30 10:21 ` [v3,4/5] dt-binding: mt8192: add toprgu reset-controller head file Crystal Guo
@ 2020-07-30 10:21 ` Crystal Guo
2020-07-30 16:06 ` Guenter Roeck
4 siblings, 1 reply; 9+ messages in thread
From: Crystal Guo @ 2020-07-30 10:21 UTC (permalink / raw)
To: 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>
---
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 d6a6393..aef0c2d 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 @@ struct mtk_wdt_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 int mtk_wdt_resume(struct device *dev)
{ .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);
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [v3,5/5] watchdog: mt8192: add wdt support
2020-07-30 10:21 ` [v3,5/5] watchdog: mt8192: add wdt support Crystal Guo
@ 2020-07-30 16:06 ` Guenter Roeck
0 siblings, 0 replies; 9+ messages in thread
From: Guenter Roeck @ 2020-07-30 16:06 UTC (permalink / raw)
To: Crystal Guo, robh+dt, matthias.bgg
Cc: srv_heupstream, linux-mediatek, linux-arm-kernel, linux-kernel,
linux-watchdog, seiya.wang
On 7/30/20 3:21 AM, Crystal Guo wrote:
> 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 d6a6393..aef0c2d 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 @@ struct mtk_wdt_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 int mtk_wdt_resume(struct device *dev)
> { .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);
>
^ permalink raw reply [flat|nested] 9+ messages in thread