arm64: dts: mediatek: cherry: Add platform thermal configuration

This platform has three auxiliary NTC thermistors, connected to the
SoC's ADC pins. Enable the auxadc in order to be able to read the
ADC values, add a generic-adc-thermal LUT for each and finally assign
them to the SoC's thermal zones.
Tested-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Reviewed-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Reviewed-by: default avatarAlexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230424112523.1436926-2-angelogioacchino.delregno@collabora.com
parent b85ea95d
...@@ -127,6 +127,77 @@ ppvar_sys: regulator-ppvar-sys { ...@@ -127,6 +127,77 @@ ppvar_sys: regulator-ppvar-sys {
regulator-boot-on; regulator-boot-on;
}; };
/* Murata NCP03WF104F05RL */
tboard_thermistor1: thermal-sensor-t1 {
compatible = "generic-adc-thermal";
#thermal-sensor-cells = <0>;
io-channels = <&auxadc 0>;
io-channel-names = "sensor-channel";
temperature-lookup-table = < (-10000) 1553
(-5000) 1485
0 1406
5000 1317
10000 1219
15000 1115
20000 1007
25000 900
30000 796
35000 697
40000 605
45000 523
50000 449
55000 384
60000 327
65000 279
70000 237
75000 202
80000 172
85000 147
90000 125
95000 107
100000 92
105000 79
110000 68
115000 59
120000 51
125000 44>;
};
tboard_thermistor2: thermal-sensor-t2 {
compatible = "generic-adc-thermal";
#thermal-sensor-cells = <0>;
io-channels = <&auxadc 1>;
io-channel-names = "sensor-channel";
temperature-lookup-table = < (-10000) 1553
(-5000) 1485
0 1406
5000 1317
10000 1219
15000 1115
20000 1007
25000 900
30000 796
35000 697
40000 605
45000 523
50000 449
55000 384
60000 327
65000 279
70000 237
75000 202
80000 172
85000 147
90000 125
95000 107
100000 92
105000 79
110000 68
115000 59
120000 51
125000 44>;
};
usb_vbus: regulator-5v0-usb-vbus { usb_vbus: regulator-5v0-usb-vbus {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "usb-vbus"; regulator-name = "usb-vbus";
...@@ -189,6 +260,10 @@ &afe { ...@@ -189,6 +260,10 @@ &afe {
memory-region = <&afe_mem>; memory-region = <&afe_mem>;
}; };
&auxadc {
status = "okay";
};
&dp_intf0 { &dp_intf0 {
status = "okay"; status = "okay";
...@@ -1160,6 +1235,36 @@ mt6315_7_vbuck1: vbuck1 { ...@@ -1160,6 +1235,36 @@ mt6315_7_vbuck1: vbuck1 {
}; };
}; };
&thermal_zones {
soc-area-thermal {
polling-delay = <1000>;
polling-delay-passive = <250>;
thermal-sensors = <&tboard_thermistor1>;
trips {
trip-crit {
temperature = <84000>;
hysteresis = <1000>;
type = "critical";
};
};
};
pmic-area-thermal {
polling-delay = <1000>;
polling-delay-passive = <0>;
thermal-sensors = <&tboard_thermistor2>;
trips {
trip-crit {
temperature = <84000>;
hysteresis = <1000>;
type = "critical";
};
};
};
};
&u3phy0 { &u3phy0 {
status = "okay"; status = "okay";
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment