* [PATCH v3] arm64: dts: mt8183-kukui: Add tboard thermal zones
@ 2021-06-04 9:37 Ben Tseng
2021-06-09 8:14 ` Matthias Brugger
0 siblings, 1 reply; 2+ messages in thread
From: Ben Tseng @ 2021-06-04 9:37 UTC (permalink / raw)
To: Fan Chen, Zhang Rui, Daniel Lezcano, linux-pm, srv_heupstream
Cc: Eduardo Valentin, Rob Herring, Mark Rutland, Matthias Brugger,
hsinyi, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Project_Global_Chrome_Upstream_Group,
Michael Kao, Ben Tseng
From: Michael Kao <michael.kao@mediatek.com>
Add tboard thermal zones.
The tboard thermal sensors are a kind of NTC sensors which are located
on PCB board to correlate the temperature of the case (Tskin).
pull-up voltage: 1800 mv
pull-up resistor: 75K
Vsense = pull-up voltage * Rntc / ( pull-up resistor + Rntc )
AuxIn = Vsense * 4096 / 1500
Signed-off-by: Michael Kao <michael.kao@mediatek.com>
Signed-off-by: Ben Tseng <ben.tseng@mediatek.com>
Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
---
Change in v3:
- Modify Tboard to tbaord in mt8183-kukui.dtsi
- Add more description about tboard thermal sensor
Change in v2:
- Rebase to kernel-v5.13-rc1
- Resend
---
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 14 ++++++++++++++
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
index ff56bcf..601f866 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
@@ -847,6 +847,20 @@
status = "okay";
};
+&thermal_zones {
+ tboard1 {
+ polling-delay = <1000>; /* milliseconds */
+ polling-delay-passive = <0>; /* milliseconds */
+ thermal-sensors = <&tboard_thermistor1>;
+ };
+
+ tboard2 {
+ polling-delay = <1000>; /* milliseconds */
+ polling-delay-passive = <0>; /* milliseconds */
+ thermal-sensors = <&tboard_thermistor2>;
+ };
+};
+
&u3phy {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index c5e822b..4173a5d 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -673,7 +673,7 @@
nvmem-cell-names = "calibration-data";
};
- thermal-zones {
+ thermal_zones: thermal-zones {
cpu_thermal: cpu_thermal {
polling-delay-passive = <100>;
polling-delay = <500>;
--
1.8.1.1.dirty
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] arm64: dts: mt8183-kukui: Add tboard thermal zones
2021-06-04 9:37 [PATCH v3] arm64: dts: mt8183-kukui: Add tboard thermal zones Ben Tseng
@ 2021-06-09 8:14 ` Matthias Brugger
0 siblings, 0 replies; 2+ messages in thread
From: Matthias Brugger @ 2021-06-09 8:14 UTC (permalink / raw)
To: Ben Tseng, Fan Chen, Zhang Rui, Daniel Lezcano, linux-pm, srv_heupstream
Cc: Eduardo Valentin, Rob Herring, Mark Rutland, hsinyi, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek,
Project_Global_Chrome_Upstream_Group, Michael Kao
On 04/06/2021 11:37, Ben Tseng wrote:
> From: Michael Kao <michael.kao@mediatek.com>
>
> Add tboard thermal zones.
> The tboard thermal sensors are a kind of NTC sensors which are located
> on PCB board to correlate the temperature of the case (Tskin).
>
> pull-up voltage: 1800 mv
> pull-up resistor: 75K
>
> Vsense = pull-up voltage * Rntc / ( pull-up resistor + Rntc )
> AuxIn = Vsense * 4096 / 1500
>
> Signed-off-by: Michael Kao <michael.kao@mediatek.com>
> Signed-off-by: Ben Tseng <ben.tseng@mediatek.com>
> Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
>
Applied to v5.13-next/dts64
Thanks!
> ---
> Change in v3:
> - Modify Tboard to tbaord in mt8183-kukui.dtsi
> - Add more description about tboard thermal sensor
>
> Change in v2:
> - Rebase to kernel-v5.13-rc1
> - Resend
> ---
> arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 14 ++++++++++++++
> arch/arm64/boot/dts/mediatek/mt8183.dtsi | 2 +-
> 2 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> index ff56bcf..601f866 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> @@ -847,6 +847,20 @@
> status = "okay";
> };
>
> +&thermal_zones {
> + tboard1 {
> + polling-delay = <1000>; /* milliseconds */
> + polling-delay-passive = <0>; /* milliseconds */
> + thermal-sensors = <&tboard_thermistor1>;
> + };
> +
> + tboard2 {
> + polling-delay = <1000>; /* milliseconds */
> + polling-delay-passive = <0>; /* milliseconds */
> + thermal-sensors = <&tboard_thermistor2>;
> + };
> +};
> +
> &u3phy {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> index c5e822b..4173a5d 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
> @@ -673,7 +673,7 @@
> nvmem-cell-names = "calibration-data";
> };
>
> - thermal-zones {
> + thermal_zones: thermal-zones {
> cpu_thermal: cpu_thermal {
> polling-delay-passive = <100>;
> polling-delay = <500>;
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-09 9:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 9:37 [PATCH v3] arm64: dts: mt8183-kukui: Add tboard thermal zones Ben Tseng
2021-06-09 8:14 ` Matthias Brugger
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).