From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "niklaus.liu" <Niklaus.Liu@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, sirius.wang@mediatek.com,
vince-wl.liu@mediatek.com, jh.hsu@mediatek.com,
zhigang.qin@mediatek.com, sen.chu@mediatek.com
Subject: Re: [PATCH 1/1] soc: mediatek regulator: Add Support for mt8189
Date: Mon, 3 Nov 2025 16:14:18 +0100 [thread overview]
Message-ID: <7f743fd5-a64f-4378-b8da-198e45fc66e2@collabora.com> (raw)
In-Reply-To: <20251103134241.3773-2-Niklaus.Liu@mediatek.com>
Il 03/11/25 14:42, niklaus.liu ha scritto:
> From: Niklaus Liu <niklaus.liu@mediatek.com>
>
Please change the title to
"soc: mediatek: mtk-regulator-coupler: Add support for MT8189"
> Enhance the regulator coupler driver to support GPU power control on the
> MediaTek MT8189 platform. This update ensures proper coordination of
> multiple regulators required for GPU operation,improving power management
> and system stability.
>
> Signed-off-by: Niklaus Liu <niklaus.liu@mediatek.com>
> ---
> drivers/soc/mediatek/mtk-regulator-coupler.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/mediatek/mtk-regulator-coupler.c b/drivers/soc/mediatek/mtk-regulator-coupler.c
> index 0b6a2884145e..f6e3b2a3a5a8 100644
> --- a/drivers/soc/mediatek/mtk-regulator-coupler.c
> +++ b/drivers/soc/mediatek/mtk-regulator-coupler.c
> @@ -42,6 +42,18 @@ static int mediatek_regulator_balance_voltage(struct regulator_coupler *coupler,
> int max_uV = INT_MAX;
> int ret;
>
> + /*
> + * When vsram_gpu is enabled or disabled and the use_count of the
> + * vsram_gpu regulator is zero, the regulator coupler driver will
> + * execute regulator_do_balance_voltage, which adjusts the vsram_gpu
> + * voltage to the minimum value. This may result in vsram_gpu being
> + * lower than vgpu. Therefore, when enabling or disabling vsram_gpu,
> + * the 8189 temporarily skips the regulator coupler driver's modification
> + * of the vsram_gpu voltage.
> + */
Looks like you are misconfiguring something here.... VSRAM_GPU on, VGPU off should
not be supported if those are coupled.
It's either both are ON, or both are getting OFF: in case of both being offlined,
it doesn't matter if the voltage is dropping, because the SRAM is getting powered
OFF, as much as the GPU is.
Makes me wonder if you're assigning the power supplies to both of the MFG power
domains *and* to Panfrost (vgpu == mali-supply).
Note that VGPU should be assigned to the outer power domain (the main one, usually
MFG0), and that VSRAM_GPU should be assigned to the inner-next domain (which is
usually MFG1).
Check how it's done in mt8195.dtsi, mt8195-cherry.dtsi :-)
> + if (of_machine_is_compatible("mediatek,mt8189") && rdev == mrc->vsram_rdev)
> + return 0;
> +
> /*
> * If the target device is on, setting the SRAM voltage directly
> * is not supported as it scales through its coupled supply voltage.
> @@ -148,7 +160,8 @@ static int mediatek_regulator_coupler_init(void)
> if (!of_machine_is_compatible("mediatek,mt8183") &&
> !of_machine_is_compatible("mediatek,mt8186") &&
> !of_machine_is_compatible("mediatek,mt8188") &&
Keep entries sorted alphabetically please, 8189 goes here.
Regards,
Angelo
> - !of_machine_is_compatible("mediatek,mt8192"))
> + !of_machine_is_compatible("mediatek,mt8192") &&
> + !of_machine_is_compatible("mediatek,mt8189"))
> return 0;
>
> return regulator_coupler_register(&mediatek_coupler.coupler);
prev parent reply other threads:[~2025-11-03 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 13:42 niklaus.liu
2025-11-03 13:42 ` [PATCH 1/1] soc: mediatek regulator: Add Support for mt8189 niklaus.liu
2025-11-03 15:14 ` AngeloGioacchino Del Regno [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=7f743fd5-a64f-4378-b8da-198e45fc66e2@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=Niklaus.Liu@mediatek.com \
--cc=jh.hsu@mediatek.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=sen.chu@mediatek.com \
--cc=sirius.wang@mediatek.com \
--cc=vince-wl.liu@mediatek.com \
--cc=zhigang.qin@mediatek.com \
/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
all inboxes | Powered by JetHome®