Skip to contentSkip to conversation

arm64: dts: mt8183-kukui: Enable thermal Tboard

PATCH In review Michael Kao 2 participants 3 messages Apr 9, 2021 – May 6, 2021

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

PATCH 1/1 arm64: dts: mt8183-kukui: Enable thermal Tboard

Add Tboard thermal sensor settings.

pull-up voltage: 1800 mv
pull-up resistor: 75K

Vsense = pull-up voltage * Rntc / ( pull-up resistor + Rntc ) AuxIn = Vsense * 4096 / 1500

TEST=boot kukui
check /sys/class/thermal/thermal_zone*/type
check /sys/class/thermal/thermal_zone*/temp

---
 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 14 ++++++++++++++
 arch/arm64/boot/dts/mediatek/mt8183.dtsi       |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +14 -0
index bf2ad1294dd3..202acb542b12 100644
@@ -801,6 +801,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";
 };
arch/arm64/boot/dts/mediatek/mt8183.dtsi +1 -1
index 1ad0a1d55d53..f0719dbef249 100644
@@ -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>;
Signature · 1 line
2.18.0
Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Michael Kao

Add Tboard thermal sensor settings.

pull-up voltage: 1800 mv
pull-up resistor: 75K

Quoted 6 lines

Vsense = pull-up voltage * Rntc / ( pull-up resistor + Rntc ) AuxIn = Vsense * 4096 / 1500

TEST=boot kukui
check /sys/class/thermal/thermal_zone*/type
check /sys/class/thermal/thermal_zone*/temp

the TEST lines can be removed.

Quoted 4 lines

---

This removes following error:

[   10.882325] generic-adc-thermal thermal-sensor1: Thermal zone
sensor register failed: -19
[   10.911912] generic-adc-thermal thermal-sensor2: Thermal zone

sensor register failed: -19

Quoted 45 lines
 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 14 ++++++++++++++
 arch/arm64/boot/dts/mediatek/mt8183.dtsi       |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +14 -0
index bf2ad1294dd3..202acb542b12 100644
@@ -801,6 +801,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";
 };
arch/arm64/boot/dts/mediatek/mt8183.dtsi +1 -2
index 1ad0a1d55d53..f0719dbef249 100644
@@ -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>;
--

2.18.0

#2 lore raw

Hi Maintainers,

Gentle pin for this patch.

Thanks

Quoted 77 lines · Hsin-Yi Wang
Quoted 6 lines · Michael Kao

Add Tboard thermal sensor settings.

pull-up voltage: 1800 mv
pull-up resistor: 75K

Quoted 6 lines

Vsense = pull-up voltage * Rntc / ( pull-up resistor + Rntc ) AuxIn = Vsense * 4096 / 1500

TEST=boot kukui
check /sys/class/thermal/thermal_zone*/type
check /sys/class/thermal/thermal_zone*/temp

the TEST lines can be removed.

Quoted 4 lines

---

This removes following error:

[   10.882325] generic-adc-thermal thermal-sensor1: Thermal zone
sensor register failed: -19
[   10.911912] generic-adc-thermal thermal-sensor2: Thermal zone

sensor register failed: -19

Quoted 47 lines
 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 14 ++++++++++++++
 arch/arm64/boot/dts/mediatek/mt8183.dtsi       |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +14 -0
index bf2ad1294dd3..202acb542b12 100644
@@ -801,6 +801,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";
 };
arch/arm64/boot/dts/mediatek/mt8183.dtsi +1 -2
index 1ad0a1d55d53..f0719dbef249 100644
@@ -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>;
--

2.18.0