From: Guenter Roeck <linux@roeck-us.net>
To: Boris Lysov <arzamas-16@mail.ee>
Cc: matthias.bgg@gmail.com, robh+dt@kernel.org,
devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v3 3/3] watchdog: mtk_wdt: add support for mt6577
Date: Thu, 13 May 2021 08:23:07 -0700 [thread overview]
Message-ID: <20210513152307.GC3452915@roeck-us.net> (raw)
In-Reply-To: <20210513013515.31329-4-arzamas-16@mail.ee>
On Thu, May 13, 2021 at 04:35:15AM +0300, Boris Lysov wrote:
> This patch adds support for watchdog used by mt6577 and related SoCs such
> as mt6575 and mt8317. These watchdogs are known for having shifted WDT_MODE
> and SWSYSRST registers and using different SWSYSRST_KEY value.
>
> Signed-off-by: Boris Lysov <arzamas-16@mail.ee>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/mtk_wdt.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 0878fa33dffe..91d498b5d212 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
> @@ -54,6 +54,10 @@
> #define MT2712_SWSYSRST_KEY_SHIFT 24 // unlock_key [31:24]
> #define MT2712_SWSYSRST_KEY 0x88
>
> +#define MT6577_WDT_MODE_KEY_SHIFT 8 // unlock_key [15:8]
> +#define MT6577_SWSYSRST_KEY_SHIFT 8 // unlock_key [15:8]
> +#define MT6577_SWSYSRST_KEY 0x15
> +
> #define MT6589_WDT_MODE_KEY_SHIFT 24 // unlock_key [31:24]
> #define MT6589_SWSYSRST_KEY_SHIFT 24 // unlock_key [31:24]
> #define MT6589_SWSYSRST_KEY 0x88
> @@ -94,6 +98,13 @@ static const struct mtk_wdt_data mt2712_data = {
> .wdt_swsys_rst_key = MT2712_SWSYSRST_KEY,
> };
>
> +static const struct mtk_wdt_data mt6577_data = {
> + .toprgu_sw_rst_num = -1,
> + .wdt_mode_key_shift = MT6577_WDT_MODE_KEY_SHIFT,
> + .wdt_swsys_rst_key_shift = MT6577_SWSYSRST_KEY_SHIFT,
> + .wdt_swsys_rst_key = MT6577_SWSYSRST_KEY,
> +};
> +
> static const struct mtk_wdt_data mt6589_data = {
> .toprgu_sw_rst_num = -1,
> .wdt_mode_key_shift = MT6589_WDT_MODE_KEY_SHIFT,
> @@ -376,6 +387,7 @@ static int mtk_wdt_resume(struct device *dev)
>
> static const struct of_device_id mtk_wdt_dt_ids[] = {
> { .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data },
> + { .compatible = "mediatek,mt6577-wdt", .data = &mt6577_data },
> { .compatible = "mediatek,mt6589-wdt", .data = &mt6589_data },
> { .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data },
> { .compatible = "mediatek,mt8192-wdt", .data = &mt8192_data },
> --
> 2.20.1
>
prev parent reply other threads:[~2021-05-13 15:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-13 1:35 [PATCH v3 0/3] watchdog: mtk_wdt: refactor code to support more watchdogs Boris Lysov
2021-05-13 1:35 ` [PATCH v3 1/3] watchdog: mtk_wdt: Refactor code to support more SoCs Boris Lysov
2021-05-13 15:22 ` Guenter Roeck
2021-05-13 1:35 ` [PATCH v3 2/3] dt-bindings: watchdog: mediatek: add support for mt6577 SoC Boris Lysov
2021-05-13 2:28 ` Rob Herring
2021-05-13 15:22 ` Guenter Roeck
2021-05-13 1:35 ` [PATCH v3 3/3] watchdog: mtk_wdt: add support for mt6577 Boris Lysov
2021-05-13 15:23 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210513152307.GC3452915@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arzamas-16@mail.ee \
--cc=devicetree@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).