]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thermal/drivers/rcar_gen3: Add support for R-Car V4H default trim values
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 25 Jun 2025 18:16:58 +0000 (20:16 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 25 Sep 2025 20:10:59 +0000 (22:10 +0200)
Add default trimming values for the four temperature sensors located
in Renesas R-Car V4H Working Sample SoC. The trimming values are
identical for all four THS temperature sensors.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20250625181739.28391-2-marek.vasut+renesas@mailbox.org
drivers/thermal/renesas/rcar_gen3_thermal.c

index 413b373523e4beb9136f281811f7b01cfbf84a0f..01858e72f4e0ab07766c5f7acaf0444e904c765c 100644 (file)
@@ -371,6 +371,16 @@ static const struct rcar_gen3_thermal_fuse_default rcar_gen3_thermal_fuse_defaul
        },
 };
 
+static const struct rcar_gen3_thermal_fuse_default rcar_gen3_thermal_fuse_default_info_v4h = {
+       .ptat = { 3274, 2164, 985 },
+       .thcodes = { /* All four THS units share the same trimming */
+               { 3218, 2617, 1980 },
+               { 3218, 2617, 1980 },
+               { 3218, 2617, 1980 },
+               { 3218, 2617, 1980 },
+       }
+};
+
 static const struct rcar_thermal_info rcar_m3w_thermal_info = {
        .scale = 157,
        .adj_below = -41,
@@ -395,6 +405,14 @@ static const struct rcar_thermal_info rcar_gen4_thermal_info = {
        .fuse_defaults = &rcar_gen3_thermal_fuse_default_info_gen3,
 };
 
+static const struct rcar_thermal_info rcar_v4h_thermal_info = {
+       .scale = 167,
+       .adj_below = -41,
+       .adj_above = 126,
+       .fuses = &rcar_gen3_thermal_fuse_info_gen4,
+       .fuse_defaults = &rcar_gen3_thermal_fuse_default_info_v4h,
+};
+
 static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
        {
                .compatible = "renesas,r8a774a1-thermal",
@@ -438,7 +456,7 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
        },
        {
                .compatible = "renesas,r8a779g0-thermal",
-               .data = &rcar_gen4_thermal_info,
+               .data = &rcar_v4h_thermal_info,
        },
        {
                .compatible = "renesas,r8a779h0-thermal",