Thread (8 messages) 8 messages, 4 authors, 2025-07-22

Re: [PATCH 2/3] thermal: amlogic: Support C3 thermal controller driver

From: Neil Armstrong <neil.armstrong@linaro.org>
Date: 2025-07-22 10:04:35
Also in: linux-amlogic, linux-arm-kernel, linux-pm, lkml

On 18/07/2025 08:37, Xianwei Zhao via B4 Relay wrote:
quoted hunk ↗ jump to hunk
From: Xianwei Zhao <xianwei.zhao@amlogic.com>

Add the thermal controller driver for the C3 SoC family.

The main difference compared to other Amlogic chips lies in the
offset of the sec_ao base (referred to as u_efuse_off), which is
handled differently. Everything else remains consistent.

Signed-off-by: Liming Xue <redacted>
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
  drivers/thermal/amlogic_thermal.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 5448d772db12..d1b08119c818 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -226,6 +226,12 @@ static const struct amlogic_thermal_data amlogic_thermal_a1_cpu_param = {
  	.regmap_config = &amlogic_thermal_regmap_config_g12a,
  };
  
+static const struct amlogic_thermal_data amlogic_thermal_c3_cpu_param = {
+	.u_efuse_off = 0x108,
+	.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",
@@ -239,6 +245,10 @@ static const struct of_device_id of_amlogic_thermal_match[] = {
  		.compatible = "amlogic,a1-cpu-thermal",
  		.data = &amlogic_thermal_a1_cpu_param,
  	},
+	{
+		.compatible = "amlogic,c3-cpu-thermal",
+		.data = &amlogic_thermal_c3_cpu_param,
+	},
  	{ /* sentinel */ }
  };
  MODULE_DEVICE_TABLE(of, of_amlogic_thermal_match);
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help