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
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
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
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
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
Hi Maintainers,
Gentle pin for this patch.
Thanks
On Wed, 2020-10-14 at 21:19 +0800, Crystal Guo wrote:
> 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.
>
On Mon, Nov 16, 2020 at 8:27 PM Crystal Guo <crystal.guo@mediatek.com> wrote: > > Hi Maintainers, > > Gentle pin for this patch. > > Thanks > > On Wed, 2020-10-14 at 21:19 +0800, Crystal Guo wrote: > > 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, > > > > 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. > > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek
On Mon, 2020-12-21 at 08:59 +0800, Nicolas Boichat wrote: > On Mon, Nov 16, 2020 at 8:27 PM Crystal Guo <crystal.guo@mediatek.com> wrote: > > > > Hi Maintainers, > > > > Gentle pin for this patch. > > > > Thanks > > > > On Wed, 2020-10-14 at 21:19 +0800, Crystal Guo wrote: > > > 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. > > > > > > 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. > > > > > > > _______________________________________________ > > Linux-mediatek mailing list > > Linux-mediatek@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-mediatek
On Wed, Oct 14, 2020 at 09:19:34PM +0800, Crystal Guo wrote: > update mtk-wdt document for MT8192 platform > > Signed-off-by: Crystal Guo <crystal.guo@mediatek.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> > --- > 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. >
On Wed, Oct 14, 2020 at 09:19:36PM +0800, 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> 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 > --- > 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);