dt-bindings: thermal: mediatek: Fix thermal zone definitions for MT8188
authorJulien Panis <jpanis@baylibre.com>
Mon, 3 Jun 2024 10:50:49 +0000 (12:50 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 15 Jul 2024 11:31:39 +0000 (13:31 +0200)
Fix thermal zone names for consistency with the other SoCs:
- GPU0 must be used as the first GPU item.
- SOCx deal with audio DSP, video, and infra subsystems.

The naming must be fixed "atomically" so compilation does not break.
As a result, the change is made in the dt-bindings and in the LVTS
driver within a single commit, despite the checkpatch warning.

The definitions can be safely modified here because they are used only
in the LVTS driver, which is modified accordingly, and have not yet
been included in a released kernel.

Fixes: 78c88534e5e1 ("dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8188")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Julien Panis <jpanis@baylibre.com>
Link: https://lore.kernel.org/r/20240603-mtk-thermal-mt818x-dtsi-v7-2-8c8e3c7a3643@baylibre.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/mediatek/lvts_thermal.c
include/dt-bindings/thermal/mediatek,lvts-thermal.h

index d3a8a1a3e6a31d43318e81001e287b8ab2cfbbcc..73148bd8da1fcfdc6b8114e585fede4d86dfad82 100644 (file)
@@ -1488,11 +1488,11 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[] = {
        },
        {
                .lvts_sensor = {
-                       { .dt_id = MT8188_AP_GPU1,
+                       { .dt_id = MT8188_AP_GPU0,
                          .cal_offsets = { 43, 44, 45 } },
-                       { .dt_id = MT8188_AP_GPU2,
+                       { .dt_id = MT8188_AP_GPU1,
                          .cal_offsets = { 46, 47, 48 } },
-                       { .dt_id = MT8188_AP_SOC1,
+                       { .dt_id = MT8188_AP_ADSP,
                          .cal_offsets = { 49, 50, 51 } },
                },
                VALID_SENSOR_MAP(1, 1, 1, 0),
@@ -1500,9 +1500,9 @@ static const struct lvts_ctrl_data mt8188_lvts_ap_data_ctrl[] = {
        },
        {
                .lvts_sensor = {
-                       { .dt_id = MT8188_AP_SOC2,
+                       { .dt_id = MT8188_AP_VDO,
                          .cal_offsets = { 52, 53, 54 } },
-                       { .dt_id = MT8188_AP_SOC3,
+                       { .dt_id = MT8188_AP_INFRA,
                          .cal_offsets = { 55, 56, 57 } },
                },
                VALID_SENSOR_MAP(1, 1, 0, 0),
index 85d25b4d726d1f26880b0a5185105e449f6190d9..ddc7302a510aa14bb575681f7072f20b3b89a165 100644 (file)
 #define MT8188_MCU_BIG_CPU1    5
 
 #define MT8188_AP_APU          0
-#define MT8188_AP_GPU1         1
-#define MT8188_AP_GPU2         2
-#define MT8188_AP_SOC1         3
-#define MT8188_AP_SOC2         4
-#define MT8188_AP_SOC3         5
+#define MT8188_AP_GPU0         1
+#define MT8188_AP_GPU1         2
+#define MT8188_AP_ADSP         3
+#define MT8188_AP_VDO          4
+#define MT8188_AP_INFRA                5
 #define MT8188_AP_CAM1         6
 #define MT8188_AP_CAM2         7