mbox series

[v23,0/7] soc: mediatek: SVS: introduce MTK SVS

Message ID 20220221063939.14969-1-roger.lu@mediatek.com
Headers show
Series soc: mediatek: SVS: introduce MTK SVS | expand

Message

Roger Lu Feb. 21, 2022, 6:39 a.m. UTC
The Smart Voltage Scaling(SVS) engine is a piece of hardware
which calculates suitable SVS bank voltages to OPP voltage table.
Then, DVFS driver could apply those SVS bank voltages to PMIC/Buck
when receiving OPP_EVENT_ADJUST_VOLTAGE.

1. SVS driver uses OPP adjust event in [1] to update OPP table voltage part.
2. SVS driver gets thermal/GPU device by node [2][3] and CPU device by get_cpu_device().
After retrieving subsys device, SVS driver calls device_link_add() to make sure probe/suspend callback priority.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git/commit/?h=opp/linux-next&id=25cb20a212a1f989385dfe23230817e69c62bee5
[2] https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git/commit/?h=opp/linux-next&id=b325ce39785b1408040d90365a6ab1aa36e94f87
[3] https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux.git/commit/?h=v5.16-next/dts64&id=a8168cebf1bca1b5269e8a7eb2626fb76814d6e2

change since v22:
- Make "svsb_volt = max(svsb->volt[i] + temp_voffset, svsb->vmin);" become one line.
- Remove voffset read/write commands for better system safety.
- Add more comments on @turn_freq_base.

Roger Lu (7):
  [v23,1/7] dt-bindings: soc: mediatek: add mtk svs dt-bindings
  [v23,2/7] arm64: dts: mt8183: add svs device information
  [v23,3/7] soc: mediatek: SVS: introduce MTK SVS engine
  [v23,4/7] soc: mediatek: SVS: add monitor mode
  [v23,5/7] soc: mediatek: SVS: add debug commands
  [v23,6/7] dt-bindings: soc: mediatek: add mt8192 svs dt-bindings
  [v23,7/7] soc: mediatek: SVS: add mt8192 SVS GPU driver

 .../bindings/soc/mediatek/mtk-svs.yaml        |   91 +
 arch/arm64/boot/dts/mediatek/mt8183.dtsi      |   16 +
 drivers/soc/mediatek/Kconfig                  |   10 +
 drivers/soc/mediatek/Makefile                 |    1 +
 drivers/soc/mediatek/mtk-svs.c                | 2398 +++++++++++++++++
 5 files changed, 2516 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mtk-svs.yaml
 create mode 100644 drivers/soc/mediatek/mtk-svs.c

Comments

AngeloGioacchino Del Regno Feb. 22, 2022, 9:27 a.m. UTC | #1
Il 21/02/22 07:39, Roger Lu ha scritto:
> Document the binding for enabling mtk svs on MediaTek SoC.
> 
> Signed-off-by: Roger Lu <roger.lu@mediatek.com>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
AngeloGioacchino Del Regno Feb. 22, 2022, 9:27 a.m. UTC | #2
Il 21/02/22 07:39, Roger Lu ha scritto:
> Add compatible/reg/irq/clock/efuse setting in svs node.
> 
> Signed-off-by: Roger Lu <roger.lu@mediatek.com>
> Acked-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Sorry, there was a mistake in the tag (my bad!) - I didn't mean Acked-by, but:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
AngeloGioacchino Del Regno Feb. 22, 2022, 9:27 a.m. UTC | #3
Il 21/02/22 07:39, Roger Lu ha scritto:
> The purpose of SVS is to help find the suitable voltages
> for DVFS. Therefore, if SVS bank voltages are concerned
> to be wrong, we can show/disable SVS bank voltages by
> this patch.
> 
> Signed-off-by: Roger Lu <roger.lu@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Cheers,
Angelo
AngeloGioacchino Del Regno March 2, 2022, 2:35 p.m. UTC | #4
Il 21/02/22 07:39, Roger Lu ha scritto:
> The Smart Voltage Scaling(SVS) engine is a piece of hardware
> which calculates suitable SVS bank voltages to OPP voltage table.
> Then, DVFS driver could apply those SVS bank voltages to PMIC/Buck
> when receiving OPP_EVENT_ADJUST_VOLTAGE.
> 
> 1. SVS driver uses OPP adjust event in [1] to update OPP table voltage part.
> 2. SVS driver gets thermal/GPU device by node [2][3] and CPU device by get_cpu_device().
> After retrieving subsys device, SVS driver calls device_link_add() to make sure probe/suspend callback priority.
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git/commit/?h=opp/linux-next&id=25cb20a212a1f989385dfe23230817e69c62bee5
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git/commit/?h=opp/linux-next&id=b325ce39785b1408040d90365a6ab1aa36e94f87
> [3] https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux.git/commit/?h=v5.16-next/dts64&id=a8168cebf1bca1b5269e8a7eb2626fb76814d6e2
> 
> change since v22:
> - Make "svsb_volt = max(svsb->volt[i] + temp_voffset, svsb->vmin);" become one line.
> - Remove voffset read/write commands for better system safety.
> - Add more comments on @turn_freq_base.
> 
> Roger Lu (7):
>    [v23,1/7] dt-bindings: soc: mediatek: add mtk svs dt-bindings
>    [v23,2/7] arm64: dts: mt8183: add svs device information
>    [v23,3/7] soc: mediatek: SVS: introduce MTK SVS engine
>    [v23,4/7] soc: mediatek: SVS: add monitor mode
>    [v23,5/7] soc: mediatek: SVS: add debug commands
>    [v23,6/7] dt-bindings: soc: mediatek: add mt8192 svs dt-bindings
>    [v23,7/7] soc: mediatek: SVS: add mt8192 SVS GPU driver
> 
>   .../bindings/soc/mediatek/mtk-svs.yaml        |   91 +
>   arch/arm64/boot/dts/mediatek/mt8183.dtsi      |   16 +
>   drivers/soc/mediatek/Kconfig                  |   10 +
>   drivers/soc/mediatek/Makefile                 |    1 +
>   drivers/soc/mediatek/mtk-svs.c                | 2398 +++++++++++++++++
>   5 files changed, 2516 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mtk-svs.yaml
>   create mode 100644 drivers/soc/mediatek/mtk-svs.c
> 

Hello,
the entire series has got reviews, and this has already reached 23 iterations.
I personally have no more complaints about this one.

Does anyone have any KO comments about this series?

Cheers,
Angelo
Kevin Hilman March 18, 2022, 4:48 p.m. UTC | #5
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
writes:

> Il 21/02/22 07:39, Roger Lu ha scritto:
>> The Smart Voltage Scaling(SVS) engine is a piece of hardware
>> which calculates suitable SVS bank voltages to OPP voltage table.
>> Then, DVFS driver could apply those SVS bank voltages to PMIC/Buck
>> when receiving OPP_EVENT_ADJUST_VOLTAGE.
>> 
>> 1. SVS driver uses OPP adjust event in [1] to update OPP table voltage part.
>> 2. SVS driver gets thermal/GPU device by node [2][3] and CPU device by get_cpu_device().
>> After retrieving subsys device, SVS driver calls device_link_add() to make sure probe/suspend callback priority.
>> 
>> [1] https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git/commit/?h=opp/linux-next&id=25cb20a212a1f989385dfe23230817e69c62bee5
>> [2] https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git/commit/?h=opp/linux-next&id=b325ce39785b1408040d90365a6ab1aa36e94f87
>> [3] https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux.git/commit/?h=v5.16-next/dts64&id=a8168cebf1bca1b5269e8a7eb2626fb76814d6e2
>> 
>> change since v22:
>> - Make "svsb_volt = max(svsb->volt[i] + temp_voffset, svsb->vmin);" become one line.
>> - Remove voffset read/write commands for better system safety.
>> - Add more comments on @turn_freq_base.
>> 
>> Roger Lu (7):
>>    [v23,1/7] dt-bindings: soc: mediatek: add mtk svs dt-bindings
>>    [v23,2/7] arm64: dts: mt8183: add svs device information
>>    [v23,3/7] soc: mediatek: SVS: introduce MTK SVS engine
>>    [v23,4/7] soc: mediatek: SVS: add monitor mode
>>    [v23,5/7] soc: mediatek: SVS: add debug commands
>>    [v23,6/7] dt-bindings: soc: mediatek: add mt8192 svs dt-bindings
>>    [v23,7/7] soc: mediatek: SVS: add mt8192 SVS GPU driver
>> 
>>   .../bindings/soc/mediatek/mtk-svs.yaml        |   91 +
>>   arch/arm64/boot/dts/mediatek/mt8183.dtsi      |   16 +
>>   drivers/soc/mediatek/Kconfig                  |   10 +
>>   drivers/soc/mediatek/Makefile                 |    1 +
>>   drivers/soc/mediatek/mtk-svs.c                | 2398 +++++++++++++++++
>>   5 files changed, 2516 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mtk-svs.yaml
>>   create mode 100644 drivers/soc/mediatek/mtk-svs.c
>> 
>
> Hello,
> the entire series has got reviews, and this has already reached 23 iterations.
> I personally have no more complaints about this one.
>
> Does anyone have any KO comments about this series?

Reviewed-by: Kevin Hilman <khilman@baylibre.com>

I haven't reviewed closely since much earlier versions, but reviewing it
again now, I think this series is in good shape now.  Thank you Angelo
for all of your detailed reviews.

Also thank you Roger for your persistence and dedication on getting this
feature upstream.  It has been a long road, but you've stuck with it.

Kevin