From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2F473BD64B for ; Mon, 30 Mar 2026 16:52:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774889527; cv=none; b=hCr9JUjq7uPvKzmohYiO+fCHUNBEm4detqxNdNH0mLzBd4dV2P43v45Dn/h6yVBW6IA+DpNzGTXD6NvCmkm8/GbNB3LbBiD9cCvC/ByqPEeUrcm3pAEKi/i6DA/uR27Psl1V4mQAs/hmjzxJdwZ3rV9ZWIyokQEkA4PVJBpIIrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774889527; c=relaxed/simple; bh=ldfChzN1uSXhCMGPYXDm8BcwE4V0pQzO6G3r6/xavw4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NkRv++G4uIK98Fsg99HM3y1v4XgocWWFG0M+RsSxZqkiSfkkNJa9/P7KCUv9u+zJyflrztaoO6TgFq7iCeIdp6UMD1FbdLRqxjugGGCxQqrpNusley4IuzV0be5yjP2Txc+vgNPiY/kxYd0xDM3wLK5iqjyC7CSC9BcpX2i7i28= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MFBnh2mN; arc=none smtp.client-ip=209.85.222.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MFBnh2mN" Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-8cb38e86cf2so511501185a.1 for ; Mon, 30 Mar 2026 09:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774889524; x=1775494324; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HC6qv58XpG4CW/zjPsDlD07R3yCVlsOVxBcMpliJEEE=; b=MFBnh2mNS09vCaZMC0N/A1YnuUsX7cVw2fvGUJuOK8Z+UTFw6Qhm3VS9JBrdM0LA4i Kx3DhoVxx8E9rFDA3ZXu9aR6wiOkNZbn/jW48Mssg/bvG/CdJ4PX4RuXqzTJjWycaMcJ grOpv1/8+kc9ggp2omuaNkGfRWtm12mlPpOQWkd1cRbW30WxiDtY5Eg8S/JB7VifjzU9 EACDWhN/ZX8PwXUNsxltBQRwTUSf2BP0HvIZYubQ23l5BKHsPf3zz87jm/8cgILfXb0s MkgRH1u0MA4V77LJJF1ROWjNwBIwyHM4opkq/xrKRAZSx1aku4xPJmeNzWAGJ5Lx0+Js X0qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774889524; x=1775494324; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=HC6qv58XpG4CW/zjPsDlD07R3yCVlsOVxBcMpliJEEE=; b=s0ssVrsvjyQwdROhf+ZdBo8qB0kFkWikoxsiRxxV+774FrZ6B7c/3bKpUT/Uto8Nte f1nBM8Rpn8wA/WzqvzLi41LgBQix7kLOlWgNRsi10AzLhiq18fLzar7b/hZ7HW2Vmy23 mFvdNz31lh1pUL/8rP6JU8Q2GI2OaRZ7o4kWi57A7kO6W5MIUor8Ic0zteqZBqVlhJbz VBeSQqU1CY3oTQrVnB4b5gzP32ayOP2dbac1qoKjBY2ZaK2yEEzDFIjCrxuo5PWQ2hCn ur9IC/Vq0q1nlsUbfoVfDK7rAGLhBeM4J56q4gzU+KFnINd7WJa7MPaTgBveyZHTojnX kNCw== X-Forwarded-Encrypted: i=1; AJvYcCV8Szv6o2vu67CT4R+zd+FzHUsiQZU2sfQWyplqXxsXvJqB+aSfSuYp421H13nCltQjwafCPlmueFbQ5uyM@vger.kernel.org X-Gm-Message-State: AOJu0Ywxmi4qM2ugAdfEJQOrwPOzv7nXCvKp3TRmDaaJFIAQnR1cOKcW 5Q9Ceyai9kyESJBFpqdKMnKTvr/zXNMr0xhbuw6UAiGkddIM9s1gPXPv X-Gm-Gg: ATEYQzxIlQKRDkVTRVVhv6JrRF6oKelPgKcG05jbEFbTe6t9ECKA+no5tYxLFOdaYOT G8cg7inM5cgr9Ob4/ezdwzmNheVKUhlh2a1QGcHYb9MzFBxUzdCFkG6IIRA6oAwT5GxS3n1ktqZ xAMR2/b+k42merFajED2hVhMkA3KOe3jTlxW2t5Y1ZtWxLo5wGSGbFKg9xhsNwj55xvJFF+hH1S XQAtBJiXOcjpcVfnkZlH9jF6g3BnNYXI/SVvrfGrSynz7W9z9z63C9p6XyXvLIzB6wCXa+JRWGq 2LTUN5G136nuMQCxUl68+UGE2UtRoUoEQamc5eQmLQTzxmaY2dPHdCd5BOg/a68iPLCYwLz0M0S SE1/2WvSIEJg5DPt7jOZIuU0/4ajzNgkZNNeKxmvnS3g/YtYAuQYyADABTBvRWr1dTLpSStmqsv KYagSsovdjqeK4dUwIZKU8dCVu2SnizodsMQ== X-Received: by 2002:a05:620a:4092:b0:8ca:41af:32d6 with SMTP id af79cd13be357-8d01c84a6fbmr1675670985a.70.1774889523692; Mon, 30 Mar 2026 09:52:03 -0700 (PDT) Received: from localhost ([199.7.157.54]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8d02e697689sm548961885a.16.2026.03.30.09.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 09:52:03 -0700 (PDT) From: Richard Acayan To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Amit Kucheria , Thara Gopinath , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org Cc: Richard Acayan Subject: [PATCH v5 2/2] arm64: dts: qcom: sdm670: add thermal zones and thermal devices Date: Mon, 30 Mar 2026 12:52:37 -0400 Message-ID: <20260330165237.101045-3-mailingradian@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330165237.101045-1-mailingradian@gmail.com> References: <20260330165237.101045-1-mailingradian@gmail.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add thermal zones to safeguard from overheating to high temperatures, along with the thermal sensors (TSENS) and CPU frequency limits (LMh). The temperatures are very high, but should still be safeguard for devices that do not specify their own thermal zones. Signed-off-by: Richard Acayan --- arch/arm64/boot/dts/qcom/sdm670.dtsi | 400 +++++++++++++++++++++++++++ 1 file changed, 400 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm670.dtsi b/arch/arm64/boot/dts/qcom/sdm670.dtsi index f115bc6e64f3..c5f7655421a3 100644 --- a/arch/arm64/boot/dts/qcom/sdm670.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm670.dtsi @@ -20,6 +20,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -62,6 +63,7 @@ cpu0: cpu@0 { <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; power-domains = <&cpu_pd0>; power-domain-names = "psci"; + #cooling-cells = <2>; next-level-cache = <&l2_0>; l2_0: l2-cache { compatible = "cache"; @@ -89,6 +91,7 @@ cpu1: cpu@100 { <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; power-domains = <&cpu_pd1>; power-domain-names = "psci"; + #cooling-cells = <2>; next-level-cache = <&l2_100>; l2_100: l2-cache { compatible = "cache"; @@ -111,6 +114,7 @@ cpu2: cpu@200 { <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; power-domains = <&cpu_pd2>; power-domain-names = "psci"; + #cooling-cells = <2>; next-level-cache = <&l2_200>; l2_200: l2-cache { compatible = "cache"; @@ -133,6 +137,7 @@ cpu3: cpu@300 { <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; power-domains = <&cpu_pd3>; power-domain-names = "psci"; + #cooling-cells = <2>; next-level-cache = <&l2_300>; l2_300: l2-cache { compatible = "cache"; @@ -155,6 +160,7 @@ cpu4: cpu@400 { <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; power-domains = <&cpu_pd4>; power-domain-names = "psci"; + #cooling-cells = <2>; next-level-cache = <&l2_400>; l2_400: l2-cache { compatible = "cache"; @@ -177,6 +183,7 @@ cpu5: cpu@500 { <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; power-domains = <&cpu_pd5>; power-domain-names = "psci"; + #cooling-cells = <2>; next-level-cache = <&l2_500>; l2_500: l2-cache { compatible = "cache"; @@ -199,6 +206,7 @@ cpu6: cpu@600 { <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; power-domains = <&cpu_pd6>; power-domain-names = "psci"; + #cooling-cells = <2>; next-level-cache = <&l2_600>; l2_600: l2-cache { compatible = "cache"; @@ -221,6 +229,7 @@ cpu7: cpu@700 { <&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>; power-domains = <&cpu_pd7>; power-domain-names = "psci"; + #cooling-cells = <2>; next-level-cache = <&l2_700>; l2_700: l2-cache { compatible = "cache"; @@ -1408,6 +1417,8 @@ gpu: gpu@5000000 { nvmem-cells = <&gpu_speed_bin>; nvmem-cell-names = "speed_bin"; + #cooling-cells = <2>; + status = "disabled"; gpu_zap_shader: zap-shader { @@ -2100,6 +2111,28 @@ dispcc: clock-controller@af00000 { #power-domain-cells = <1>; }; + tsens0: thermal-sensor@c263000 { + compatible = "qcom,sdm670-tsens", "qcom,tsens-v2"; + reg = <0 0x0c263000 0 0x1000>, + <0 0x0c222000 0 0x1000>; + interrupts-extended = <&pdc 26 IRQ_TYPE_EDGE_RISING>, + <&pdc 28 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "uplow", "critical"; + #thermal-sensor-cells = <1>; + #qcom,sensors = <13>; + }; + + tsens1: thermal-sensor@c265000 { + compatible = "qcom,sdm670-tsens", "qcom,tsens-v2"; + reg = <0 0x0c265000 0 0x1000>, + <0 0x0c223000 0 0x1000>; + interrupts-extended = <&pdc 27 IRQ_TYPE_EDGE_RISING>, + <&pdc 29 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "uplow", "critical"; + #thermal-sensor-cells = <1>; + #qcom,sensors = <8>; + }; + apps_smmu: iommu@15000000 { compatible = "qcom,sdm670-smmu-500", "qcom,smmu-500", "arm,mmu-500"; reg = <0 0x15000000 0 0x80000>; @@ -2289,5 +2322,372 @@ cpufreq_hw: cpufreq@17d43000 { #freq-domain-cells = <1>; }; + + lmh_cluster1: lmh@17d70800 { + compatible = "qcom,sdm670-lmh", "qcom,sdm845-lmh"; + reg = <0 0x17d70800 0 0x400>; + interrupts = ; + cpus = <&cpu6>; + qcom,lmh-temp-arm-millicelsius = <65000>; + qcom,lmh-temp-low-millicelsius = <94500>; + qcom,lmh-temp-high-millicelsius = <95000>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + lmh_cluster0: lmh@17d78800 { + compatible = "qcom,sdm670-lmh", "qcom,sdm845-lmh"; + reg = <0 0x17d78800 0 0x400>; + interrupts = ; + cpus = <&cpu0>; + qcom,lmh-temp-arm-millicelsius = <65000>; + qcom,lmh-temp-low-millicelsius = <94500>; + qcom,lmh-temp-high-millicelsius = <95000>; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + thermal-zones { + aoss0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 0>; + + trips { + aoss0_crit: trip-point0 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 1>; + + trips { + cpu0_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 2>; + + trips { + cpu1_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu2-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 3>; + + trips { + cpu2_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu3-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 4>; + + trips { + cpu3_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cluster0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 5>; + + trips { + cluster0_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cluster1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 6>; + + trips { + cluster1_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu4-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 7>; + + trips { + cpu4_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu5-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 8>; + + trips { + cpu5_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu6-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 9>; + + trips { + cpu6_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + cpu7-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 10>; + + trips { + cpu7_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + gpu0-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 11>; + + cooling-maps { + map0 { + trip = <&gpu0_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + + trips { + gpu0_alert0: trip-point0 { + temperature = <95000>; + hysteresis = <1000>; + type = "passive"; + }; + + gpu0_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + gpu1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens0 12>; + + cooling-maps { + map0 { + trip = <&gpu1_alert0>; + cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + + trips { + gpu1_alert0: trip-point0 { + temperature = <95000>; + hysteresis = <1000>; + type = "passive"; + }; + + gpu1_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + aoss1-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 0>; + + trips { + aoss1_crit: trip-point0 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + q6-modem-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 1>; + + trips { + q6_modem_crit: trip-point0 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + mem-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 2>; + + trips { + mem_crit: trip-point1 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + wlan-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 3>; + + trips { + wlan_crit: trip-point0 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + q6-hvx-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 4>; + + trips { + q6_hvx_crit: trip-point0 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + camera-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 5>; + + trips { + camera_crit: trip-point0 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + video-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 6>; + + trips { + video_crit: trip-point0 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; + + modem-thermal { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&tsens1 7>; + + trips { + modem_crit: trip-point0 { + temperature = <125000>; + hysteresis = <1000>; + type = "critical"; + }; + }; + }; }; }; -- 2.53.0