]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal: rcar_gen3_thermal: Add r8a779a0 support
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 26 Nov 2020 22:30:28 +0000 (23:30 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 8 Dec 2020 20:18:01 +0000 (21:18 +0100)
Add support for R-Car V3U. The new THCODE values are taken from the
example in the datasheet.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201126223028.3119044-4-niklas.soderlund+renesas@ragnatech.se
drivers/thermal/rcar_gen3_thermal.c

index 94f2c133a47f66b67ab27c9bda00126c3c14ee46..75c69fe6e9553f2591858368612193e2e5be0947 100644 (file)
 #define MCELSIUS(temp) ((temp) * 1000)
 #define GEN3_FUSE_MASK 0xFFF
 
-#define TSC_MAX_NUM    3
+#define TSC_MAX_NUM    4
 
 /* default THCODE values if FUSEs are missing */
 static const int thcodes[TSC_MAX_NUM][3] = {
        { 3397, 2800, 2221 },
        { 3393, 2795, 2216 },
        { 3389, 2805, 2237 },
+       { 3415, 2694, 2195 },
 };
 
 /* Structure for thermal temperature calculation */
@@ -276,6 +277,10 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
                .compatible = "renesas,r8a77980-thermal",
                .data = &rcar_gen3_ths_tj_1,
        },
+       {
+               .compatible = "renesas,r8a779a0-thermal",
+               .data = &rcar_gen3_ths_tj_1,
+       },
        {},
 };
 MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);