* [PATCH v2 0/3] thermal: Support Amlogic C3 thermal
@ 2025-07-22 11:26 Xianwei Zhao via B4 Relay
2025-07-22 11:26 ` [PATCH v2 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2025-07-22 11:26 UTC (permalink / raw)
To: Guillaume La Roque, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: linux-pm, linux-amlogic, devicetree, linux-kernel,
linux-arm-kernel, Xianwei Zhao, Liming Xue
Add Amlogic C3 thermal compatible string, private_data
of driver and device node.
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
Changes in v2:
- Modify the binding file according to Rob's suggestion.
- Link to v1: https://lore.kernel.org/r/20250718-c3-thermal-v1-0-674f9a991690@amlogic.com
---
Xianwei Zhao (3):
dt-bindings: thermal: amlogic: Add compatible string for C3
thermal: amlogic: Support C3 thermal controller driver
arm64: dts: amlogic: c3: Add tempsensor controller node
.../devicetree/bindings/thermal/amlogic,thermal.yaml | 4 +++-
arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi | 11 +++++++++++
drivers/thermal/amlogic_thermal.c | 10 ++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
---
base-commit: 58abdca0eb653c1a2e755ba9ba406ee475d87636
change-id: 20250718-c3-thermal-cfdf0a2bbf52
Best regards,
--
Xianwei Zhao <xianwei.zhao@amlogic.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3
2025-07-22 11:26 [PATCH v2 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
@ 2025-07-22 11:26 ` Xianwei Zhao via B4 Relay
2025-07-23 5:03 ` Rob Herring (Arm)
2025-07-22 11:26 ` [PATCH v2 2/3] thermal: amlogic: Support C3 thermal controller driver Xianwei Zhao via B4 Relay
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2025-07-22 11:26 UTC (permalink / raw)
To: Guillaume La Roque, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: linux-pm, linux-amlogic, devicetree, linux-kernel,
linux-arm-kernel, Xianwei Zhao, Liming Xue
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
Add the compatible properties for Amlogic C3 SoC family.
C3 family supports only one thermal node - CPU thermal
sensor.
Signed-off-by: Liming Xue <liming.xue@amlogic.com>
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
index 70b273271754..27ddb67c7743 100644
--- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
@@ -16,12 +16,14 @@ $ref: thermal-sensor.yaml#
properties:
compatible:
oneOf:
+ - enum:
+ - amlogic,a1-cpu-thermal
+ - amlogic,c3-cpu-thermal
- items:
- enum:
- amlogic,g12a-cpu-thermal
- amlogic,g12a-ddr-thermal
- const: amlogic,g12a-thermal
- - const: amlogic,a1-cpu-thermal
reg:
maxItems: 1
--
2.37.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] thermal: amlogic: Support C3 thermal controller driver
2025-07-22 11:26 [PATCH v2 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
2025-07-22 11:26 ` [PATCH v2 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
@ 2025-07-22 11:26 ` Xianwei Zhao via B4 Relay
2025-07-22 11:26 ` [PATCH v2 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node Xianwei Zhao via B4 Relay
2025-09-04 13:12 ` [PATCH v2 0/3] thermal: Support Amlogic C3 thermal Neil Armstrong
3 siblings, 0 replies; 6+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2025-07-22 11:26 UTC (permalink / raw)
To: Guillaume La Roque, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: linux-pm, linux-amlogic, devicetree, linux-kernel,
linux-arm-kernel, Xianwei Zhao, Liming Xue
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 <liming.xue@amlogic.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
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);
--
2.37.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node
2025-07-22 11:26 [PATCH v2 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
2025-07-22 11:26 ` [PATCH v2 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
2025-07-22 11:26 ` [PATCH v2 2/3] thermal: amlogic: Support C3 thermal controller driver Xianwei Zhao via B4 Relay
@ 2025-07-22 11:26 ` Xianwei Zhao via B4 Relay
2025-09-04 13:12 ` [PATCH v2 0/3] thermal: Support Amlogic C3 thermal Neil Armstrong
3 siblings, 0 replies; 6+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2025-07-22 11:26 UTC (permalink / raw)
To: Guillaume La Roque, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl
Cc: linux-pm, linux-amlogic, devicetree, linux-kernel,
linux-arm-kernel, Xianwei Zhao, Liming Xue
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
Add the Tempsensor controller node for C3 SoC family.
Signed-off-by: Liming Xue <liming.xue@amlogic.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi
index cb9ea3ca6ee0..c853390eca6c 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi
@@ -727,6 +727,17 @@ clkc_pll: clock-controller@8000 {
"fix";
};
+ temperature-sensor@20000 {
+ compatible = "amlogic,c3-cpu-thermal";
+ reg = <0x0 0x20000 0x0 0x50>;
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clkc_periphs CLKID_TS>;
+ assigned-clocks = <&clkc_periphs CLKID_TS>;
+ assigned-clock-rates = <500000>;
+ amlogic,ao-secure = <&sec_ao>;
+ #thermal-sensor-cells = <0>;
+ };
+
eth_phy: mdio-multiplexer@28000 {
compatible = "amlogic,g12a-mdio-mux";
reg = <0x0 0x28000 0x0 0xa4>;
--
2.37.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3
2025-07-22 11:26 ` [PATCH v2 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
@ 2025-07-23 5:03 ` Rob Herring (Arm)
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring (Arm) @ 2025-07-23 5:03 UTC (permalink / raw)
To: Xianwei Zhao
Cc: Liming Xue, Jerome Brunet, linux-amlogic, linux-kernel,
Daniel Lezcano, Kevin Hilman, Guillaume La Roque,
linux-arm-kernel, Conor Dooley, devicetree, Rafael J. Wysocki,
Krzysztof Kozlowski, Martin Blumenstingl, Neil Armstrong,
Lukasz Luba, Zhang Rui, linux-pm
On Tue, 22 Jul 2025 19:26:27 +0800, Xianwei Zhao wrote:
> Add the compatible properties for Amlogic C3 SoC family.
> C3 family supports only one thermal node - CPU thermal
> sensor.
>
> Signed-off-by: Liming Xue <liming.xue@amlogic.com>
> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
> ---
> Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/3] thermal: Support Amlogic C3 thermal
2025-07-22 11:26 [PATCH v2 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
` (2 preceding siblings ...)
2025-07-22 11:26 ` [PATCH v2 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node Xianwei Zhao via B4 Relay
@ 2025-09-04 13:12 ` Neil Armstrong
3 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2025-09-04 13:12 UTC (permalink / raw)
To: xianwei.zhao, Guillaume La Roque, Rafael J. Wysocki,
Daniel Lezcano, Zhang Rui, Lukasz Luba, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: linux-pm, linux-amlogic, devicetree, linux-kernel,
linux-arm-kernel, Liming Xue
Hi,
On 22/07/2025 13:26, Xianwei Zhao via B4 Relay wrote:
> Add Amlogic C3 thermal compatible string, private_data
> of driver and device node.
>
> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
> ---
> Changes in v2:
> - Modify the binding file according to Rob's suggestion.
> - Link to v1: https://lore.kernel.org/r/20250718-c3-thermal-v1-0-674f9a991690@amlogic.com
>
> ---
> Xianwei Zhao (3):
> dt-bindings: thermal: amlogic: Add compatible string for C3
> thermal: amlogic: Support C3 thermal controller driver
> arm64: dts: amlogic: c3: Add tempsensor controller node
>
> .../devicetree/bindings/thermal/amlogic,thermal.yaml | 4 +++-
> arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi | 11 +++++++++++
> drivers/thermal/amlogic_thermal.c | 10 ++++++++++
> 3 files changed, 24 insertions(+), 1 deletion(-)
> ---
> base-commit: 58abdca0eb653c1a2e755ba9ba406ee475d87636
> change-id: 20250718-c3-thermal-cfdf0a2bbf52
>
> Best regards,
Patches 1 & 2 are reviewed and ready to be merged. I'll take patch 3 for next cycle.
Thanks,
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-04 16:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 11:26 [PATCH v2 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
2025-07-22 11:26 ` [PATCH v2 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
2025-07-23 5:03 ` Rob Herring (Arm)
2025-07-22 11:26 ` [PATCH v2 2/3] thermal: amlogic: Support C3 thermal controller driver Xianwei Zhao via B4 Relay
2025-07-22 11:26 ` [PATCH v2 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node Xianwei Zhao via B4 Relay
2025-09-04 13:12 ` [PATCH v2 0/3] thermal: Support Amlogic C3 thermal Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).