diff mbox series

[thermal:,thermal/fixes] thermal/drivers/amlogic: Support A1 SoC family Thermal Sensor controller

Message ID 171568193533.10875.6369416976926253190.tip-bot2@tip-bot2
State New
Headers show
Series [thermal:,thermal/fixes] thermal/drivers/amlogic: Support A1 SoC family Thermal Sensor controller | expand

Commit Message

thermal-bot for Julien Panis May 14, 2024, 10:18 a.m. UTC
The following commit has been merged into the thermal/fixes branch of thermal:

Commit-ID:     7fcd7dfa5ec29afe0b3fe8ad6a5f42c19e71d6be
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//7fcd7dfa5ec29afe0b3fe8ad6a5f42c19e71d6be
Author:        Dmitry Rokosov <ddrokosov@salutedevices.com>
AuthorDate:    Thu, 28 Mar 2024 22:13:11 +03:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Tue, 23 Apr 2024 12:40:29 +02:00

thermal/drivers/amlogic: Support A1 SoC family Thermal Sensor controller

In comparison to other Amlogic chips, there is one key difference.
The offset for the sec_ao base, also known as u_efuse_off, is special,
while other aspects remain the same.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240328191322.17551-3-ddrokosov@salutedevices.com
---
 drivers/thermal/amlogic_thermal.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index df7a5ed..cd4776a 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -220,6 +220,12 @@  static const struct amlogic_thermal_data amlogic_thermal_g12a_ddr_param = {
 	.regmap_config = &amlogic_thermal_regmap_config_g12a,
 };
 
+static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
+	.u_efuse_off = 0x114,
+	.calibration_parameters = &amlogic_thermal_g12a,
+	.regmap_config = &amlogic_thermal_regmap_config_g12a,
+};
+
 static const struct of_device_id of_amlogic_thermal_match[] = {
 	{
 		.compatible = "amlogic,g12a-ddr-thermal",
@@ -229,6 +235,10 @@  static const struct of_device_id of_amlogic_thermal_match[] = {
 		.compatible = "amlogic,g12a-cpu-thermal",
 		.data = &amlogic_thermal_g12a_cpu_param,
 	},
+	{
+		.compatible = "amlogic,a1-cpu-thermal",
+		.data = &amlogic_thermal_a1_cpu_param,
+	},
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);