]> www.infradead.org Git - users/willy/xarray.git/commitdiff
thermal/drivers/brcmstb_thermal: Add support for BCM74110
authorFlorian Fainelli <florian.fainelli@broadcom.com>
Thu, 16 Jan 2025 19:38:42 +0000 (11:38 -0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 25 Mar 2025 19:52:04 +0000 (20:52 +0100)
BCM74110 uses a different process node compared to previous chips that
requires a different equation, account for that.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20250116193842.758788-3-florian.fainelli@broadcom.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/broadcom/brcmstb_thermal.c

index 270982740fded3381e504eb77b6d1190b852bfab..f46f2ddc174ea5ab6e459755921d6bd219442788 100644 (file)
@@ -286,14 +286,20 @@ static int brcmstb_set_trips(struct thermal_zone_device *tz, int low, int high)
        return 0;
 }
 
-static const struct thermal_zone_device_ops brcmstb_16nm_of_ops = {
+static const struct thermal_zone_device_ops brcmstb_of_ops = {
        .get_temp       = brcmstb_get_temp,
 };
 
+static const struct brcmstb_thermal_params brcmstb_8nm_params = {
+       .offset = 418670,
+       .mult   = 509,
+       .of_ops = &brcmstb_of_ops,
+};
+
 static const struct brcmstb_thermal_params brcmstb_16nm_params = {
        .offset = 457829,
        .mult   = 557,
-       .of_ops = &brcmstb_16nm_of_ops,
+       .of_ops = &brcmstb_of_ops,
 };
 
 static const struct thermal_zone_device_ops brcmstb_28nm_of_ops = {
@@ -308,6 +314,7 @@ static const struct brcmstb_thermal_params brcmstb_28nm_params = {
 };
 
 static const struct of_device_id brcmstb_thermal_id_table[] = {
+       { .compatible = "brcm,avs-tmon-bcm74110", .data = &brcmstb_8nm_params },
        { .compatible = "brcm,avs-tmon-bcm7216", .data = &brcmstb_16nm_params },
        { .compatible = "brcm,avs-tmon", .data = &brcmstb_28nm_params },
        {},