Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>
To: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"krzk@kernel.org" <krzk@kernel.org>
Cc: "Singo Chang (張興國)" <Singo.Chang@mediatek.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Paul-pl Chen (陳柏霖)" <Paul-pl.Chen@mediatek.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>
Subject: Re: [PATCH 2/2] soc: mediatek: Add MT8196 VMM driver support
Date: Wed, 28 May 2025 04:24:26 +0000	[thread overview]
Message-ID: <6c41738df74af4fc1e409cb781d55e765ff38529.camel@mediatek.com> (raw)
In-Reply-To: <ea79d8fd-8134-4d14-92f6-f656be20cd9f@kernel.org>

Hi Krzysztof,

Thanks for your review.

On Thu, 2025-05-22 at 17:10 +0200, Krzysztof Kozlowski wrote:
> 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> On 22/05/2025 17:03, Nancy.Lin wrote:
> > From: Nancy Lin <nancy.lin@mediatek.com>
> > 
> > Add a driver for the MediaTek MT8196 VMM (Vcore for MultiMedia)
> > controller, which acts as the main power supplier for multimedia
> > power
> > domains such as display, video encode, and video decode on MediaTek
> > SoCs.
> > 
> > The VMM controller provides virtual regulators for multimedia IPs
> > and
> > coordinates with the hardware common clock framework (hwccf) and
> > the
> > Video Companioin Processor (VCP) to manage power domains. The
> > driver
> > uses a hardware voter through HWCCF to notify the VCP to turn on or
> > off VMM-related bucks.
> > 
> > Signed-off-by: Nancy Lin <nancy.lin@mediatek.com>
> > ---
> >  drivers/soc/mediatek/Kconfig       |  12 +
> >  drivers/soc/mediatek/Makefile      |   1 +
> >  drivers/soc/mediatek/mtk-vmm-drv.c | 471
> > +++++++++++++++++++++++++++++
> >  3 files changed, 484 insertions(+)
> >  create mode 100644 drivers/soc/mediatek/mtk-vmm-drv.c
> > 
> > diff --git a/drivers/soc/mediatek/Kconfig
> > b/drivers/soc/mediatek/Kconfig
> > index d7293977f06e..4db4a0876083 100644
> > --- a/drivers/soc/mediatek/Kconfig
> > +++ b/drivers/soc/mediatek/Kconfig
> > @@ -69,6 +69,18 @@ config MTK_MMSYS
> >         Say yes here to add support for the MediaTek Multimedia
> >         Subsystem (MMSYS).
> > 
> > +config MTK_VMM
> > +     tristate "MediaTek VMM driver"
> > +     help
> > +       Say Y here to enable support for the MediaTek VMM (Vcore
> > for
> > +       MultiMedia) controller, which acts as the main power
> > supplier
> > +       for multimedia power domains such as display, video encode
> > and
> > +       decode on MediaTek SoCs. The VMM controller provides
> > virtual
> > +       regulators for multimedia IPs and coordinates with the
> > hardware
> > +       common clock framework (hwccf) and the Video Companion
> > Processor
> > +       (VCP) to manage power domains. The VMM driver uses hardware
> > voter
> > +       through hwccf to notify VCP to turn on/off VMM-related
> > bucks.
> > +
> >  config MTK_SVS
> >       tristate "MediaTek Smart Voltage Scaling(SVS)"
> >       depends on NVMEM_MTK_EFUSE && NVMEM
> > diff --git a/drivers/soc/mediatek/Makefile
> > b/drivers/soc/mediatek/Makefile
> > index 0665573e3c4b..2b2071614ac4 100644
> > --- a/drivers/soc/mediatek/Makefile
> > +++ b/drivers/soc/mediatek/Makefile
> > @@ -6,6 +6,7 @@ obj-$(CONFIG_MTK_INFRACFG) += mtk-infracfg.o
> >  obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o
> >  obj-$(CONFIG_MTK_REGULATOR_COUPLER) += mtk-regulator-coupler.o
> >  obj-$(CONFIG_MTK_MMSYS) += mtk-mmsys.o
> > +obj-$(CONFIG_MTK_VMM) += mtk-vmm-drv.o
> >  obj-$(CONFIG_MTK_MMSYS) += mtk-mutex.o
> >  obj-$(CONFIG_MTK_SVS) += mtk-svs.o
> >  obj-$(CONFIG_MTK_SOCINFO) += mtk-socinfo.o
> > diff --git a/drivers/soc/mediatek/mtk-vmm-drv.c
> > b/drivers/soc/mediatek/mtk-vmm-drv.c
> > new file mode 100644
> > index 000000000000..de4ceb7d59fa
> > --- /dev/null
> > +++ b/drivers/soc/mediatek/mtk-vmm-drv.c
> > @@ -0,0 +1,471 @@
> > +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> > +/*
> > + * Copyright (c) 2025 MediaTek Inc.
> > + * Author: Yunfei Dong <yunfei.dong@mediatek.com>
> > + */
> > +
> > +#include <linux/clk.h>
> > +#include <linux/delay.h>
> > +#include <linux/device.h>
> > +#include <linux/kthread.h>
> > +#include <linux/mfd/syscon.h>
> > +#include <linux/module.h>
> > +#include <linux/of_platform.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/pm_domain.h>
> > +#include <linux/pm_runtime.h>
> > +#include <linux/regmap.h>
> > +#include <linux/regulator/driver.h>
> > +#if IS_ENABLED(CONFIG_MTK_VCP_RPROC)
> 
> And that's the proof you send some sort of downstream code.
> 
> This does not exist.
> 
Sorry, I forgot add reference patch. This patch is based on [1].

[1] Add vcp driver
https://patchwork.kernel.org/project/linux-mediatek/list/?series=949232



> > +#include <linux/remoteproc.h>
> > +#include <linux/remoteproc/mtk_vcp_public.h>
> > +#endif
> > +
> > +#define mtk_vmm_dbg(dev, fmt, args...) \
> > +     dev_dbg(dev, "[vmm] %s(%d): " fmt "\n", __func__, __LINE__,
> > ##args)
> 
> No, you do not get your own debug code.
> 
> NAK.
> 
> This is nowhere close to upstream code. Don't send us downstream
> patterns please.
> 
OK, I will remove own debug code and refine it. Thanks!

Best regards,
Nancy


> Best regards,
> Krzysztof


      reply	other threads:[~2025-05-28  4:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 15:03 [PATCH 0/2] Add MT8196 VMM driver support Nancy.Lin
2025-05-22 15:03 ` [PATCH 1/2] dt-bindings: regulator: mediatek: Add MT8196 vmm controller Nancy.Lin
2025-05-22 15:09   ` Krzysztof Kozlowski
2025-05-22 15:18     ` Krzysztof Kozlowski
2025-05-28  4:01     ` Nancy Lin (林欣螢)
2025-05-28  6:29       ` Krzysztof Kozlowski
2025-05-22 16:28   ` Rob Herring (Arm)
2025-05-23  2:55   ` CK Hu (胡俊光)
2025-05-22 15:03 ` [PATCH 2/2] soc: mediatek: Add MT8196 VMM driver support Nancy.Lin
2025-05-22 15:10   ` Krzysztof Kozlowski
2025-05-28  4:24     ` Nancy Lin (林欣螢) [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=6c41738df74af4fc1e409cb781d55e765ff38529.camel@mediatek.com \
    --to=nancy.lin@mediatek.com \
    --cc=Jason-JH.Lin@mediatek.com \
    --cc=Paul-pl.Chen@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Singo.Chang@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=chunkuang.hu@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@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