* [PATCH 0/3] thermal: Support Amlogic C3 thermal
@ 2025-07-18 6:37 Xianwei Zhao via B4 Relay
2025-07-18 6:37 ` [PATCH 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2025-07-18 6:37 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>
---
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 | 1 +
arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi | 11 +++++++++++
drivers/thermal/amlogic_thermal.c | 10 ++++++++++
3 files changed, 22 insertions(+)
---
base-commit: 58abdca0eb653c1a2e755ba9ba406ee475d87636
change-id: 20250718-c3-thermal-cfdf0a2bbf52
Best regards,
--
Xianwei Zhao <xianwei.zhao@amlogic.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3
2025-07-18 6:37 [PATCH 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
@ 2025-07-18 6:37 ` Xianwei Zhao via B4 Relay
2025-07-20 23:41 ` Rob Herring
2025-07-18 6:37 ` [PATCH 2/3] thermal: amlogic: Support C3 thermal controller driver Xianwei Zhao via B4 Relay
2025-07-18 6:37 ` [PATCH 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node Xianwei Zhao via B4 Relay
2 siblings, 1 reply; 8+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2025-07-18 6:37 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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
index 70b273271754..095b92aa5ace 100644
--- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
@@ -22,6 +22,7 @@ properties:
- amlogic,g12a-ddr-thermal
- const: amlogic,g12a-thermal
- const: amlogic,a1-cpu-thermal
+ - const: amlogic,c3-cpu-thermal
reg:
maxItems: 1
--
2.37.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] thermal: amlogic: Support C3 thermal controller driver
2025-07-18 6:37 [PATCH 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
2025-07-18 6:37 ` [PATCH 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
@ 2025-07-18 6:37 ` Xianwei Zhao via B4 Relay
2025-07-22 10:04 ` Neil Armstrong
2025-07-18 6:37 ` [PATCH 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node Xianwei Zhao via B4 Relay
2 siblings, 1 reply; 8+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2025-07-18 6:37 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>
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node
2025-07-18 6:37 [PATCH 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
2025-07-18 6:37 ` [PATCH 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
2025-07-18 6:37 ` [PATCH 2/3] thermal: amlogic: Support C3 thermal controller driver Xianwei Zhao via B4 Relay
@ 2025-07-18 6:37 ` Xianwei Zhao via B4 Relay
2025-07-22 10:05 ` Neil Armstrong
2 siblings, 1 reply; 8+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2025-07-18 6:37 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>
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3
2025-07-18 6:37 ` [PATCH 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
@ 2025-07-20 23:41 ` Rob Herring
2025-07-21 2:28 ` Xianwei Zhao
0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2025-07-20 23:41 UTC (permalink / raw)
To: Xianwei Zhao
Cc: Guillaume La Roque, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl, linux-pm,
linux-amlogic, devicetree, linux-kernel, linux-arm-kernel,
Liming Xue
On Fri, Jul 18, 2025 at 02:37:41PM +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 | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> index 70b273271754..095b92aa5ace 100644
> --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> @@ -22,6 +22,7 @@ properties:
> - amlogic,g12a-ddr-thermal
> - const: amlogic,g12a-thermal
> - const: amlogic,a1-cpu-thermal
> + - const: amlogic,c3-cpu-thermal
Combine with the a1 entry using 'enum'.
>
> reg:
> maxItems: 1
>
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3
2025-07-20 23:41 ` Rob Herring
@ 2025-07-21 2:28 ` Xianwei Zhao
0 siblings, 0 replies; 8+ messages in thread
From: Xianwei Zhao @ 2025-07-21 2:28 UTC (permalink / raw)
To: Rob Herring
Cc: Guillaume La Roque, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl, linux-pm,
linux-amlogic, devicetree, linux-kernel, linux-arm-kernel,
Liming Xue
Hi Rob,
Thanks for your reply.
On 2025/7/21 07:41, Rob Herring wrote:
> [ EXTERNAL EMAIL ]
>
> On Fri, Jul 18, 2025 at 02:37:41PM +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 | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
>> index 70b273271754..095b92aa5ace 100644
>> --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
>> +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
>> @@ -22,6 +22,7 @@ properties:
>> - amlogic,g12a-ddr-thermal
>> - const: amlogic,g12a-thermal
>> - const: amlogic,a1-cpu-thermal
>> + - const: amlogic,c3-cpu-thermal
>
> Combine with the a1 entry using 'enum'.
>
Will do.
>>
>> reg:
>> maxItems: 1
>>
>> --
>> 2.37.1
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] thermal: amlogic: Support C3 thermal controller driver
2025-07-18 6:37 ` [PATCH 2/3] thermal: amlogic: Support C3 thermal controller driver Xianwei Zhao via B4 Relay
@ 2025-07-22 10:04 ` Neil Armstrong
0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2025-07-22 10:04 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
On 18/07/2025 08:37, Xianwei Zhao via B4 Relay wrote:
> 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>
> 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>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node
2025-07-18 6:37 ` [PATCH 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node Xianwei Zhao via B4 Relay
@ 2025-07-22 10:05 ` Neil Armstrong
0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2025-07-22 10:05 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
On 18/07/2025 08:37, Xianwei Zhao via B4 Relay wrote:
> 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>
> 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>;
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-07-22 10:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 6:37 [PATCH 0/3] thermal: Support Amlogic C3 thermal Xianwei Zhao via B4 Relay
2025-07-18 6:37 ` [PATCH 1/3] dt-bindings: thermal: amlogic: Add compatible string for C3 Xianwei Zhao via B4 Relay
2025-07-20 23:41 ` Rob Herring
2025-07-21 2:28 ` Xianwei Zhao
2025-07-18 6:37 ` [PATCH 2/3] thermal: amlogic: Support C3 thermal controller driver Xianwei Zhao via B4 Relay
2025-07-22 10:04 ` Neil Armstrong
2025-07-18 6:37 ` [PATCH 3/3] arm64: dts: amlogic: c3: Add tempsensor controller node Xianwei Zhao via B4 Relay
2025-07-22 10:05 ` 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).