Skip to contentSkip to conversation

thermal: amlogic: introduce A1 SoC family Thermal Sensor controller

PATCH Applied Dmitry Rokosov 4 participants 11 messages Mar 28, 2024 – May 14, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover thermal: amlogic: introduce A1 SoC family Thermal Sensor controller

It is primarily based on the G12A thermal controller, with only a slight variation in the offset value of the efuse parameters. Therefore, this patch series provides appropriate platform data and dt-bindings to ensure proper support.

Changes v2 since v1 at [1]:
- provide Neil RvB
- remove 'amlogic,a1-thermal' fallback, cause it's not needed

Links:

    [1] https://lore.kernel.org/all/[email protected]/

Dmitry Rokosov (2):
dt-bindings: thermal: amlogic: add support for A1 thermal sensor
thermal: amlogic: support A1 SoC family Thermal Sensor controller

 .../devicetree/bindings/thermal/amlogic,thermal.yaml | 12 +++++++-----
 drivers/thermal/amlogic_thermal.c                    | 10 ++++++++++
 2 files changed, 17 insertions(+), 5 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/2 dt-bindings: thermal: amlogic: add support for A1 thermal sensor

Provide right compatible properties for Amlogic A1 Thermal Sensor controller. A1 family supports only one thermal node - CPU thermal sensor.

---
 .../devicetree/bindings/thermal/amlogic,thermal.yaml | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml +7 -5
index 20f8f9b3b971..01fccdfc4178 100644
@@ -13,11 +13,13 @@ description: Binding for Amlogic Thermal
 
 properties:
   compatible:
-    items:
-      - enum:
-          - amlogic,g12a-cpu-thermal
-          - amlogic,g12a-ddr-thermal
-      - const: amlogic,g12a-thermal
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,g12a-cpu-thermal
+              - amlogic,g12a-ddr-thermal
+          - const: amlogic,g12a-thermal
+      - const: amlogic,a1-cpu-thermal
 
   reg:
     maxItems: 1
Signature · 1 line
2.43.0
#3 lore raw

[thermal: thermal/fixes] dt-bindings: thermal: amlogic: add support for A1 thermal sensor

In reply to Dmitry Rokosov
The following commit has been merged into the thermal/fixes branch of thermal:

The following commit has been merged into the thermal/fixes branch of thermal:

Commit-ID:     63d96b1253169126a791d6b1b0ef2e708ffb0d75
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//63d96b1253169126a791d6b1b0ef2e708ffb0d75
Author:        Dmitry Rokosov <[email protected]>
AuthorDate:    Thu, 28 Mar 2024 22:13:10 +03:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Tue, 23 Apr 2024 12:40:29 +02:00

dt-bindings: thermal: amlogic: add support for A1 thermal sensor

Provide right compatible properties for Amlogic A1 Thermal Sensor controller. A1 family supports only one thermal node - CPU thermal sensor.

---
 Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml | 12 ++++---
 1 file changed, 7 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml +7 -5
index 20f8f9b..01fccdf 100644
@@ -13,11 +13,13 @@ description: Binding for Amlogic Thermal
 
 properties:
   compatible:
-    items:
-      - enum:
-          - amlogic,g12a-cpu-thermal
-          - amlogic,g12a-ddr-thermal
-      - const: amlogic,g12a-thermal
+    oneOf:
+      - items:
+          - enum:
+              - amlogic,g12a-cpu-thermal
+              - amlogic,g12a-ddr-thermal
+          - const: amlogic,g12a-thermal
+      - const: amlogic,a1-cpu-thermal
 
   reg:
     maxItems: 1
#4 lore raw

PATCH v2 2/2 thermal: amlogic: support A1 SoC family Thermal Sensor controller

In reply to Dmitry Rokosov

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.

---
 drivers/thermal/amlogic_thermal.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/thermal/amlogic_thermal.c +10 -0
index 5877cde25b79..1d23afd32013 100644
@@ -222,6 +222,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",
@@ -231,6 +237,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);
Signature · 1 line
2.43.0
#5 lore raw

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

The following commit has been merged into the thermal/fixes branch of thermal:

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 <[email protected]>
AuthorDate:    Thu, 28 Mar 2024 22:13:11 +03:00
Committer:     Daniel Lezcano <[email protected]>
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.

---
 drivers/thermal/amlogic_thermal.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/thermal/amlogic_thermal.c +10 -0
index df7a5ed..cd4776a 100644
@@ -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);
#6 lore raw
In reply to Dmitry Rokosov
Quoted 4 lines · Dmitry Rokosov

It is primarily based on the G12A thermal controller, with only a slight variation in the offset value of the efuse parameters. Therefore, this patch series provides appropriate platform data and dt-bindings to ensure proper support.

Applied, thanks

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#7 lore raw

Hello Daniel,

Could you please let me know in which repository you have applied this change? I am trying to cherry-pick the original applied commit and apply it to our internal mainline branch instead of the internal commit. However, I am unable to find the applied series in any of the repositories on git.kernel.org.

Quoted 8 lines · Daniel Lezcano
Quoted 4 lines · Dmitry Rokosov

It is primarily based on the G12A thermal controller, with only a slight variation in the offset value of the efuse parameters. Therefore, this patch series provides appropriate platform data and dt-bindings to ensure proper support.

Applied, thanks

Signature · 2 lines
Thank you,
Dmitry
#8 lore raw

Hello Neil,

I hope you're doing well. I was wondering if you could assist me with below problem.

I'm a bit confused about which kernel repository the series was applied to. I asked Daniel about it, but unfortunately, I didn't receive any feedback from him. Could you provide some clarification on this matter?

Thank you in advance for your help.

Quoted 18 lines · Dmitry Rokosov

Hello Daniel,

Could you please let me know in which repository you have applied this change? I am trying to cherry-pick the original applied commit and apply it to our internal mainline branch instead of the internal commit. However, I am unable to find the applied series in any of the repositories on git.kernel.org.

Quoted 8 lines · Daniel Lezcano
Quoted 4 lines · Dmitry Rokosov

It is primarily based on the G12A thermal controller, with only a slight variation in the offset value of the efuse parameters. Therefore, this patch series provides appropriate platform data and dt-bindings to ensure proper support.

Applied, thanks

Signature · 2 lines
Thank you,
Dmitry
#9 lore raw

Hi Dmitry,

Quoted 10 lines · Dmitry Rokosov

Hello Neil,

I hope you're doing well. I was wondering if you could assist me with below problem.

I'm a bit confused about which kernel repository the series was applied to. I asked Daniel about it, but unfortunately, I didn't receive any feedback from him. Could you provide some clarification on this matter?

Thank you in advance for your help.

I was OoO the last two weeks.

Your series is in my tree [1], which is pulled automatically by the linux-pm tree in its bleeding-edge branch.

Today, this branch will move to the linux-next branch [2] which will also be pulled by the linux-pm/next branch automatically.

Hope that helps and sorry for the delay to answer

-- Daniel

[1] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/log/?h=thermal/bleeding-edge

[2] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/log/?h=thermal/linux-next

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#10 lore raw

Hello Daniel,

Quoted 23 lines · Daniel Lezcano

Hi Dmitry,

Quoted 10 lines · Dmitry Rokosov

Hello Neil,

I hope you're doing well. I was wondering if you could assist me with below problem.

I'm a bit confused about which kernel repository the series was applied to. I asked Daniel about it, but unfortunately, I didn't receive any feedback from him. Could you provide some clarification on this matter?

Thank you in advance for your help.

I was OoO the last two weeks.

Your series is in my tree [1], which is pulled automatically by the linux-pm tree in its bleeding-edge branch.

Today, this branch will move to the linux-next branch [2] which will also be pulled by the linux-pm/next branch automatically.

Quoted 7 lines

Hope that helps and sorry for the delay to answer

-- Daniel

[1] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/log/?h=thermal/bleeding-edge

[2] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/log/?h=thermal/linux-next

Thanks a lot for the update! Now I see the patches in the above repos.

Signature · 7 lines
Thank you,
Dmitry

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic