devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Garmin Chang (張家銘)" <Garmin.Chang@mediatek.com>
To: "wenst@chromium.org" <wenst@chromium.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	"linux-mediatek@lists.infradead.org" 
	<linux-mediatek@lists.infradead.org>,
	Project_Global_Chrome_Upstream_Group 
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH v5 11/19] clk: mediatek: Add MT8188 vdecsys clock support
Date: Thu, 9 Mar 2023 05:26:15 +0000	[thread overview]
Message-ID: <f11a414d229b7783aba2ce5aa36bed3f6604e712.camel@mediatek.com> (raw)
In-Reply-To: <CAGXv+5HtzbrA5dpzXSoSXMFooHXoeX7iwJA9A1HJKQ09qm+Umw@mail.gmail.com>

On Fri, 2023-02-03 at 15:17 +0800, Chen-Yu Tsai wrote:
> On Thu, Jan 19, 2023 at 8:49 PM Garmin.Chang <
> Garmin.Chang@mediatek.com> wrote:
> > 
> > Add MT8188 vdec clock controllers which provide clock gate
> > control for video decoder.
> > 
> > Signed-off-by: Garmin.Chang <Garmin.Chang@mediatek.com>
> > ---
> >  drivers/clk/mediatek/Makefile          |  2 +-
> >  drivers/clk/mediatek/clk-mt8188-vdec.c | 90
> > ++++++++++++++++++++++++++
> >  2 files changed, 91 insertions(+), 1 deletion(-)
> >  create mode 100644 drivers/clk/mediatek/clk-mt8188-vdec.c
> > 
> > diff --git a/drivers/clk/mediatek/Makefile
> > b/drivers/clk/mediatek/Makefile
> > index a0fd87a882b5..7d09e9fc6538 100644
> > --- a/drivers/clk/mediatek/Makefile
> > +++ b/drivers/clk/mediatek/Makefile
> > @@ -86,7 +86,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-
> > mcu.o clk-mt8186-topckgen.o clk-mt
> >  obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-
> > mt8188-topckgen.o \
> >                                    clk-mt8188-peri_ao.o clk-mt8188-
> > infra_ao.o \
> >                                    clk-mt8188-cam.o clk-mt8188-
> > ccu.o clk-mt8188-img.o \
> > -                                  clk-mt8188-ipe.o clk-mt8188-
> > mfg.o
> > +                                  clk-mt8188-ipe.o clk-mt8188-
> > mfg.o clk-mt8188-vdec.o
> >  obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
> >  obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
> >  obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
> > diff --git a/drivers/clk/mediatek/clk-mt8188-vdec.c
> > b/drivers/clk/mediatek/clk-mt8188-vdec.c
> > new file mode 100644
> > index 000000000000..e05a27957136
> > --- /dev/null
> > +++ b/drivers/clk/mediatek/clk-mt8188-vdec.c
> > @@ -0,0 +1,90 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +//
> > +// Copyright (c) 2022 MediaTek Inc.
> > +// Author: Garmin Chang <garmin.chang@mediatek.com>
> > +
> > +#include <linux/clk-provider.h>
> > +#include <linux/platform_device.h>
> > +#include <dt-bindings/clock/mediatek,mt8188-clk.h>
> > +
> > +#include "clk-gate.h"
> > +#include "clk-mtk.h"
> > +
> > +static const struct mtk_gate_regs vde0_cg_regs = {
> 
> Could you replace all instances of "vde" (both upper and lower case)
> with "vdec" to be consistent with usages elsewhere?

Thank you for your suggestions.
OK, I will modify this series in v6.
> 
> > +       .set_ofs = 0x0,
> > +       .clr_ofs = 0x4,
> > +       .sta_ofs = 0x0,
> > +};
> > +
> > +static const struct mtk_gate_regs vde1_cg_regs = {
> > +       .set_ofs = 0x200,
> > +       .clr_ofs = 0x204,
> > +       .sta_ofs = 0x200,
> > +};
> > +
> > +static const struct mtk_gate_regs vde2_cg_regs = {
> > +       .set_ofs = 0x8,
> > +       .clr_ofs = 0xc,
> > +       .sta_ofs = 0x8,
> > +};
> > +
> > +#define GATE_VDE0(_id, _name, _parent, _shift)                 \
> > +       GATE_MTK(_id, _name, _parent, &vde0_cg_regs, _shift,
> > &mtk_clk_gate_ops_setclr_inv)
> > +
> > +#define GATE_VDE1(_id, _name, _parent, _shift)                 \
> > +       GATE_MTK(_id, _name, _parent, &vde1_cg_regs, _shift,
> > &mtk_clk_gate_ops_setclr_inv)
> > +
> > +#define GATE_VDE2(_id, _name, _parent, _shift)                 \
> > +       GATE_MTK(_id, _name, _parent, &vde2_cg_regs, _shift,
> > &mtk_clk_gate_ops_setclr_inv)
> > +
> > +static const struct mtk_gate vde1_clks[] = {
> > +       /* VDE1_0 */
> > +       GATE_VDE0(CLK_VDE1_SOC_VDEC, "vde1_soc_vdec", "top_vdec",
> > 0),
> > +       GATE_VDE0(CLK_VDE1_SOC_VDEC_ACTIVE, "vde1_soc_vdec_active",
> > "top_vdec", 4),
> > +       GATE_VDE0(CLK_VDE1_SOC_VDEC_ENG, "vde1_soc_vdec_eng",
> > "top_vdec", 8),
> > +       /* VDE1_1 */
> > +       GATE_VDE1(CLK_VDE1_SOC_LAT, "vde1_soc_lat", "top_vdec", 0),
> > +       GATE_VDE1(CLK_VDE1_SOC_LAT_ACTIVE, "vde1_soc_lat_active",
> > "top_vdec", 4),
> > +       GATE_VDE1(CLK_VDE1_SOC_LAT_ENG, "vde1_soc_lat_eng",
> > "top_vdec", 8),
> > +       /* VDE12 */
> 
> Add an underscore like the above?
> 
> ChenYu
OK, I will add underscore in v6.
> 
> > +       GATE_VDE2(CLK_VDE1_SOC_LARB1, "vde1_soc_larb1", "top_vdec",
> > 0),
> > +};
> > +
> > +static const struct mtk_gate vde2_clks[] = {
> > +       /* VDE2_0 */
> > +       GATE_VDE0(CLK_VDE2_VDEC, "vde2_vdec", "top_vdec", 0),
> > +       GATE_VDE0(CLK_VDE2_VDEC_ACTIVE, "vde2_vdec_active",
> > "top_vdec", 4),
> > +       GATE_VDE0(CLK_VDE2_VDEC_ENG, "vde2_vdec_eng", "top_vdec",
> > 8),
> > +       /* VDE2_1 */
> > +       GATE_VDE1(CLK_VDE2_LAT, "vde2_lat", "top_vdec", 0),
> > +       /* VDE2_2 */
> > +       GATE_VDE2(CLK_VDE2_LARB1, "vde2_larb1", "top_vdec", 0),
> > +};
> > +
> > +static const struct mtk_clk_desc vde1_desc = {
> > +       .clks = vde1_clks,
> > +       .num_clks = ARRAY_SIZE(vde1_clks),
> > +};
> > +
> > +static const struct mtk_clk_desc vde2_desc = {
> > +       .clks = vde2_clks,
> > +       .num_clks = ARRAY_SIZE(vde2_clks),
> > +};
> > +
> > +static const struct of_device_id of_match_clk_mt8188_vde[] = {
> > +       { .compatible = "mediatek,mt8188-vdecsys-soc", .data =
> > &vde1_desc },
> > +       { .compatible = "mediatek,mt8188-vdecsys", .data =
> > &vde2_desc },
> > +       { /* sentinel */ }
> > +};
> > +
> > +static struct platform_driver clk_mt8188_vde_drv = {
> > +       .probe = mtk_clk_simple_probe,
> > +       .remove = mtk_clk_simple_remove,
> > +       .driver = {
> > +               .name = "clk-mt8188-vde",
> > +               .of_match_table = of_match_clk_mt8188_vde,
> > +       },
> > +};
> > +
> > +builtin_platform_driver(clk_mt8188_vde_drv);
> > +MODULE_LICENSE("GPL");
> > --
> > 2.18.0
> > 
> > 

  reply	other threads:[~2023-03-09  5:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230119124848.26364-1-Garmin.Chang@mediatek.com>
     [not found] ` <20230119124848.26364-2-Garmin.Chang@mediatek.com>
2023-01-20  8:29   ` [PATCH v5 01/19] dt-bindings: clock: mediatek: Add new MT8188 clock Krzysztof Kozlowski
2023-02-03  6:23 ` [PATCH v5 00/19] MediaTek MT8188 clock support Chen-Yu Tsai
2023-03-09  2:55   ` Garmin Chang (張家銘)
     [not found] ` <20230119124848.26364-5-Garmin.Chang@mediatek.com>
2023-02-03  6:45   ` [PATCH v5 04/19] clk: mediatek: Add MT8188 peripheral " Chen-Yu Tsai
     [not found] ` <20230119124848.26364-6-Garmin.Chang@mediatek.com>
2023-02-03  6:48   ` [PATCH v5 05/19] clk: mediatek: Add MT8188 infrastructure " Chen-Yu Tsai
     [not found] ` <20230119124848.26364-7-Garmin.Chang@mediatek.com>
2023-02-03  6:53   ` [PATCH v5 06/19] clk: mediatek: Add MT8188 camsys " Chen-Yu Tsai
     [not found] ` <20230119124848.26364-8-Garmin.Chang@mediatek.com>
2023-02-03  6:55   ` [PATCH v5 07/19] clk: mediatek: Add MT8188 ccusys " Chen-Yu Tsai
     [not found] ` <20230119124848.26364-9-Garmin.Chang@mediatek.com>
2023-02-03  6:58   ` [PATCH v5 08/19] clk: mediatek: Add MT8188 imgsys " Chen-Yu Tsai
     [not found] ` <20230119124848.26364-10-Garmin.Chang@mediatek.com>
2023-02-03  6:59   ` [PATCH v5 09/19] clk: mediatek: Add MT8188 ipesys " Chen-Yu Tsai
     [not found] ` <20230119124848.26364-11-Garmin.Chang@mediatek.com>
2023-02-03  7:02   ` [PATCH v5 10/19] clk: mediatek: Add MT8188 mfgcfg " Chen-Yu Tsai
2023-03-09  5:30     ` Garmin Chang (張家銘)
     [not found] ` <20230119124848.26364-12-Garmin.Chang@mediatek.com>
2023-02-03  7:17   ` [PATCH v5 11/19] clk: mediatek: Add MT8188 vdecsys " Chen-Yu Tsai
2023-03-09  5:26     ` Garmin Chang (張家銘) [this message]
     [not found] ` <20230119124848.26364-13-Garmin.Chang@mediatek.com>
2023-02-03  7:19   ` [PATCH v5 12/19] clk: mediatek: Add MT8188 vdosys0 " Chen-Yu Tsai
2023-02-03 10:49     ` AngeloGioacchino Del Regno
2023-03-09  5:49       ` Garmin Chang (張家銘)
2023-03-09 11:25         ` AngeloGioacchino Del Regno
2023-03-09  5:15     ` Garmin Chang (張家銘)
     [not found] ` <20230119124848.26364-15-Garmin.Chang@mediatek.com>
2023-02-03  7:25   ` [PATCH v5 14/19] clk: mediatek: Add MT8188 vencsys " Chen-Yu Tsai
2023-03-09  5:28     ` Garmin Chang (張家銘)
     [not found] ` <20230119124848.26364-18-Garmin.Chang@mediatek.com>
2023-02-03  7:31   ` [PATCH v5 17/19] clk: mediatek: Add MT8188 wpesys " Chen-Yu Tsai
     [not found] ` <20230119124848.26364-16-Garmin.Chang@mediatek.com>
2023-01-19 15:45   ` [PATCH v5 15/19] clk: mediatek: Add MT8188 vppsys0 " Matthias Brugger
2023-02-03  7:33   ` Chen-Yu Tsai
2023-03-09  3:23     ` Garmin Chang (張家銘)
     [not found] ` <20230119124848.26364-17-Garmin.Chang@mediatek.com>
2023-01-19 15:48   ` [PATCH v5 16/19] clk: mediatek: Add MT8188 vppsys1 " Matthias Brugger
2023-02-03  7:35   ` Chen-Yu Tsai
2023-03-09  3:21     ` Garmin Chang (張家銘)
     [not found] ` <20230119124848.26364-19-Garmin.Chang@mediatek.com>
2023-02-03  7:36   ` [PATCH v5 18/19] clk: mediatek: Add MT8188 imp i2c wrapper " Chen-Yu Tsai
     [not found] ` <20230119124848.26364-20-Garmin.Chang@mediatek.com>
2023-02-03  7:39   ` [PATCH v5 19/19] clk: mediatek: Add MT8188 adsp " Chen-Yu Tsai
2023-03-09  3:17     ` Garmin Chang (張家銘)
     [not found] ` <20230119124848.26364-3-Garmin.Chang@mediatek.com>
2023-02-03  7:44   ` [PATCH v5 02/19] clk: mediatek: Add MT8188 apmixedsys " Chen-Yu Tsai
2023-03-09  5:41     ` Garmin Chang (張家銘)

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=f11a414d229b7783aba2ce5aa36bed3f6604e712.camel@mediatek.com \
    --to=garmin.chang@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=wenst@chromium.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).