diff options
Diffstat (limited to 'queue-6.6/arm64-dts-mediatek-cherry-add-platform-thermal-confi.patch')
-rw-r--r-- | queue-6.6/arm64-dts-mediatek-cherry-add-platform-thermal-confi.patch | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/queue-6.6/arm64-dts-mediatek-cherry-add-platform-thermal-confi.patch b/queue-6.6/arm64-dts-mediatek-cherry-add-platform-thermal-confi.patch new file mode 100644 index 0000000000..4f466e2ff7 --- /dev/null +++ b/queue-6.6/arm64-dts-mediatek-cherry-add-platform-thermal-confi.patch @@ -0,0 +1,158 @@ +From c9dbaf460590f6198b3ba62d475eb4adc18a75cb Mon Sep 17 00:00:00 2001 +From: Sasha Levin <sashal@kernel.org> +Date: Mon, 24 Apr 2023 13:25:20 +0200 +Subject: arm64: dts: mediatek: cherry: Add platform thermal configuration + +From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> + +[ Upstream commit 729f30eac8bce6783f889cf8390ea869d03407e6 ] + +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: Chen-Yu Tsai <wenst@chromium.org> +Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> +Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> +Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> +Link: https://lore.kernel.org/r/20230424112523.1436926-2-angelogioacchino.delregno@collabora.com +Stable-dep-of: 17b33dd9e4a3 ("arm64: dts: mediatek: cherry: Describe CPU supplies") +Signed-off-by: Sasha Levin <sashal@kernel.org> +--- + .../boot/dts/mediatek/mt8195-cherry.dtsi | 105 ++++++++++++++++++ + 1 file changed, 105 insertions(+) + +diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +index 3f508e5c18434..d721ddb230747 100644 +--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi ++++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +@@ -114,6 +114,77 @@ + 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 { + compatible = "regulator-fixed"; + regulator-name = "usb-vbus"; +@@ -176,6 +247,10 @@ + memory-region = <&afe_mem>; + }; + ++&auxadc { ++ status = "okay"; ++}; ++ + &dp_intf0 { + status = "okay"; + +@@ -1127,6 +1202,36 @@ + }; + }; + ++&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 { + status = "okay"; + }; +-- +2.43.0 + |