2023-05-29 17:08:28

by Bernhard Rosenkränzer

[permalink] [raw]
Subject: [PATCH v3 0/5] Add LVTS support for mt8192

From: Balsam CHIHI <[email protected]>

Add full LVTS support (MCU thermal domain + AP thermal domain) to MediaTek MT8192 SoC.
Also, add Suspend and Resume support to LVTS Driver (all SoCs),
and update the documentation that describes the Calibration Data Offsets.

Changelog:
v3 :
- Rebased :
base-commit: 6a3d37b4d885129561e1cef361216f00472f7d2e
- Fix issues in v2 pointed out by Nícolas F. R. A. Prado <[email protected]>:
Use filtered mode to make sure threshold interrupts are triggered,
protocol documentation, cosmetics
- I ([email protected]) will be taking care of this patchset
from now on, since Balsam has left BayLibre. Thanks for
getting it almost ready, Balsam!

v2 :
- Based on top of thermal/linux-next :
base-commit: 7ac82227ee046f8234471de4c12a40b8c2d3ddcc
- Squash "add thermal zones and thermal nodes" and
"add temperature mitigation threshold" commits together to form
"arm64: dts: mediatek: mt8192: Add thermal nodes and thermal zones" commit.
- Add Suspend and Resume support to LVTS Driver.
- Update Calibration Data documentation.
- Fix calibration data offsets for mt8192
(Thanks to "Chen-Yu Tsai" and "Nícolas F. R. A. Prado").
https://lore.kernel.org/all/[email protected]/
Tested-by: Chen-Yu Tsai <[email protected]>

v1 :
- The initial series "Add LVTS support for mt8192" :
"https://lore.kernel.org/all/[email protected]/".

Balsam CHIHI (5):
dt-bindings: thermal: mediatek: Add LVTS thermal controller definition
for mt8192
thermal/drivers/mediatek/lvts_thermal: Add suspend and resume
thermal/drivers/mediatek/lvts_thermal: Add mt8192 support
arm64: dts: mediatek: mt8192: Add thermal nodes and thermal zones
thermal/drivers/mediatek/lvts_thermal: Update calibration data
documentation

arch/arm64/boot/dts/mediatek/mt8192.dtsi | 454 ++++++++++++++++++
drivers/thermal/mediatek/lvts_thermal.c | 160 +++++-
.../thermal/mediatek,lvts-thermal.h | 19 +
3 files changed, 631 insertions(+), 2 deletions(-)

base-commit: 6a3d37b4d885129561e1cef361216f00472f7d2e
--
2.41.0.rc2



2023-05-29 17:09:59

by Bernhard Rosenkränzer

[permalink] [raw]
Subject: [PATCH v3 1/5] dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for mt8192

From: Balsam CHIHI <[email protected]>

Add LVTS thermal controller definition for MT8192.

Signed-off-by: Balsam CHIHI <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Bernhard Rosenkränzer <[email protected]>
---
.../thermal/mediatek,lvts-thermal.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
index 8fa5a46675c46..5e9eb62174268 100644
--- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h
+++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
@@ -26,4 +26,23 @@
#define MT8195_AP_CAM0 15
#define MT8195_AP_CAM1 16

+#define MT8192_MCU_BIG_CPU0 0
+#define MT8192_MCU_BIG_CPU1 1
+#define MT8192_MCU_BIG_CPU2 2
+#define MT8192_MCU_BIG_CPU3 3
+#define MT8192_MCU_LITTLE_CPU0 4
+#define MT8192_MCU_LITTLE_CPU1 5
+#define MT8192_MCU_LITTLE_CPU2 6
+#define MT8192_MCU_LITTLE_CPU3 7
+
+#define MT8192_AP_VPU0 8
+#define MT8192_AP_VPU1 9
+#define MT8192_AP_GPU0 10
+#define MT8192_AP_GPU1 11
+#define MT8192_AP_INFRA 12
+#define MT8192_AP_CAM 13
+#define MT8192_AP_MD0 14
+#define MT8192_AP_MD1 15
+#define MT8192_AP_MD2 16
+
#endif /* __MEDIATEK_LVTS_DT_H */
--
2.41.0.rc2


2023-05-30 07:16:11

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH v3 1/5] dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for mt8192



On 29/05/2023 18:46, Bernhard Rosenkränzer wrote:
> From: Balsam CHIHI <[email protected]>
>
> Add LVTS thermal controller definition for MT8192.
>
> Signed-off-by: Balsam CHIHI <[email protected]>
> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
> Acked-by: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Bernhard Rosenkränzer <[email protected]>

Reviewed-by: Matthias Brugger <[email protected]>

> ---
> .../thermal/mediatek,lvts-thermal.h | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
> index 8fa5a46675c46..5e9eb62174268 100644
> --- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h
> +++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h
> @@ -26,4 +26,23 @@
> #define MT8195_AP_CAM0 15
> #define MT8195_AP_CAM1 16
>
> +#define MT8192_MCU_BIG_CPU0 0
> +#define MT8192_MCU_BIG_CPU1 1
> +#define MT8192_MCU_BIG_CPU2 2
> +#define MT8192_MCU_BIG_CPU3 3
> +#define MT8192_MCU_LITTLE_CPU0 4
> +#define MT8192_MCU_LITTLE_CPU1 5
> +#define MT8192_MCU_LITTLE_CPU2 6
> +#define MT8192_MCU_LITTLE_CPU3 7
> +
> +#define MT8192_AP_VPU0 8
> +#define MT8192_AP_VPU1 9
> +#define MT8192_AP_GPU0 10
> +#define MT8192_AP_GPU1 11
> +#define MT8192_AP_INFRA 12
> +#define MT8192_AP_CAM 13
> +#define MT8192_AP_MD0 14
> +#define MT8192_AP_MD1 15
> +#define MT8192_AP_MD2 16
> +
> #endif /* __MEDIATEK_LVTS_DT_H */