mbox series

[v2,0/4] soc: mediatek: svs: add support for mt8186 and

Message ID 20220523084034.26802-1-jia-wei.chang@mediatek.com
Headers show
Series soc: mediatek: svs: add support for mt8186 and | expand

Message

Jia-Wei Chang May 23, 2022, 8:40 a.m. UTC
From: Jia-Wei Chang <jia-wei.chang@mediatek.com>

This series supports MT8186 and MT8195 Smart Voltage Scaling (SVS)
hardware which used as optimization of opp voltage table for
corresponding dvfs drivers.

This series is based on Roger's series [1].
[1]: Message ID: 20220516004311.18358-1-roger.lu@mediatek.com

Change since v2:
- Reuse platform probe of MT8192 for MT8195.
- Remove unnecessary svs bank parameters of MT8195.
- Remove sw id check for MT8195 efuse parsing.

Change since v1:
- Add myself as a co-maintainer of mtk-svs.yaml.
- Fix MT8186 error handling in platform probe.
- Add dt-bindings and support for MT8195 platform.

Jia-Wei Chang (4):
  dt-bindings: soc: mediatek: add mt8186 svs dt-bindings
  soc: mediatek: svs: add support for mt8186
  dt-bindings: soc: mediatek: add mt8195 svs dt-bindings
  soc: mediatek: svs: add support for mt8195

 .../bindings/soc/mediatek/mtk-svs.yaml        |   3 +
 drivers/soc/mediatek/mtk-svs.c                | 502 +++++++++++++++++-
 2 files changed, 498 insertions(+), 7 deletions(-)

Comments

Jia-Wei Chang May 26, 2022, 5:52 a.m. UTC | #1
On Mon, 2022-05-23 at 11:38 +0200, AngeloGioacchino Del Regno wrote:
> Il 23/05/22 10:40, Tim Chang ha scritto:
> > From: Jia-Wei Chang <jia-wei.chang@mediatek.com>
> > 
> > MT8186 svs has a number of banks which used as optimization of opp
> > voltage table for corresponding dvfs drivers.
> > MT8186 svs big core uses 2-line high bank and low bank to optimize
> > the
> > voltage of opp table for higher and lower frequency respectively.
> > 
> > Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com>
> > Reviewed-by: AngeloGioacchino Del Regno <
> > angelogioacchino.delregno@collabora.com>
> > ---
> >   drivers/soc/mediatek/mtk-svs.c | 351
> > ++++++++++++++++++++++++++++++++-
> >   1 file changed, 344 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/soc/mediatek/mtk-svs.c
> > b/drivers/soc/mediatek/mtk-svs.c
> > index 606a00a2e57d..656d0361ff7d 100644
> > --- a/drivers/soc/mediatek/mtk-svs.c
> > +++ b/drivers/soc/mediatek/mtk-svs.c
> 
> ..snip..
> 
> > @@ -2245,6 +2569,16 @@ static const struct svs_platform_data
> > svs_mt8192_platform_data = {
> >   	.bank_max = ARRAY_SIZE(svs_mt8192_banks),
> >   };
> >   
> > +static const struct svs_platform_data svs_mt8186_platform_data = {
> > +	.name = "mt8186-svs",
> > +	.banks = svs_mt8186_banks,
> > +	.efuse_parsing = svs_mt8186_efuse_parsing,
> > +	.probe = svs_mt8186_platform_probe,
> > +	.irqflags = IRQF_TRIGGER_HIGH,
> 
> I know I gave you my R-b tag earlier, but I've just noticed that:
> please remove
> irqflags, as this kind of flags are specified in devicetree and it is
> not
> necessary to specify them here.
> 
> Thanks,
> Angelo

Hi Angelo,

Sure, I will remove it in the next version.
Thanks.