From nobody Mon Oct 6 19:09:55 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DA7D269AFB; Fri, 18 Jul 2025 07:38:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752824293; cv=none; b=DnNlZLCCVquMY1TVWgU9y//u8Jb3tpCjnHooHDEJjjx+Zp9OMTMhK4M085m4Sv8ZvlV6DzNFe3ezcm5Prcx2cyHN89UlnAx9rzCmeF3uhsD3nQqTcYPKT6/N49m7ROQTvUUH8L1cDiZi/K6EgDeLAVdkC0Zqns4JfRGTNgtAWWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752824293; c=relaxed/simple; bh=WjY6IyydNi+5JB/lny8B6ZDF5HeAFvckyWItEo3hAt0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E4jTJbRfJomxeS+X2FN3Fo+dS89A/KLP2MRxkzqpsk2rlHgBac4oBxMPncy0GqgfFUIWpo6NdHCZ9GVKpYxZmjzSC+fsuG9uDySDdm42N4944cqSNJS8jhf6AfwTtF0xjHyG2LqkIY1H8ggonYPTbbyuReKP+ptohryrMCYiNpI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B1hFQj3F; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B1hFQj3F" Received: by smtp.kernel.org (Postfix) with ESMTPS id 27B5FC4CEF5; Fri, 18 Jul 2025 07:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1752824293; bh=WjY6IyydNi+5JB/lny8B6ZDF5HeAFvckyWItEo3hAt0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=B1hFQj3FW4AkwlgzDbSNMX8u4nwhmy/GjOMvmzQPf8olo5KgMHyXkDVrzTN1xjtGQ b5wSyvARaa1/zvFhgHJVy8XDwc1AHePwWDyXwnoUSKOSZSMvl1s+3xfM+QycnVf0tN IAjbblhXUi/mj7ADBNjcv4WCosdez+jdxjZ9kUlxMxLYpDLs4gShOeHMUgDvIIPEqx ow+bGnMLPSIpOd4ys9gvRpyPg8HL8UfSxYFuZWvOu7nhcyK+OFNNc+HrNKZkmWk2jT 4w6kfQq4M7Sbhym6EHNurbX5iQYlXbgsezWVLjQCtMg7JAdjodOFnwn23VPodfLVqH B397Si4KDodoQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17682C83F1A; Fri, 18 Jul 2025 07:38:13 +0000 (UTC) From: George Moussalem via B4 Relay Date: Fri, 18 Jul 2025 11:38:04 +0400 Subject: [PATCH v14 2/2] arm64: dts: qcom: ipq5018: Update tsens node and thermal zones Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250718-ipq5018-tsens-v14-2-28d8a2472418@outlook.com> References: <20250718-ipq5018-tsens-v14-0-28d8a2472418@outlook.com> In-Reply-To: <20250718-ipq5018-tsens-v14-0-28d8a2472418@outlook.com> To: Amit Kucheria , Thara Gopinath , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Sricharan Ramabadhran , George Moussalem Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov , Konrad Dybcio , Dmitry Baryshkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1752824290; l=3848; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=SwJcY4cCvc+nIankAMt5+SCPwBFBGOQVItGhlf/eWGU=; b=GTCG1e6Toew3AUfHJHm9fwJ3pdtIkfCn7Hc6H/MDUo7DhW7lN6TNtlWiBmnIszihuvS55+XRT QC8elkaStAMAQ2KryJ8HLRI+nrydf4RXeSzSECjxfKU9qW6V/ucn/9q X-Developer-Key: i=george.moussalem@outlook.com; a=ed25519; pk=/PuRTSI9iYiHwcc6Nrde8qF4ZDhJBlUgpHdhsIjnqIk= X-Endpoint-Received: by B4 Relay for george.moussalem@outlook.com/20250321 with auth_id=364 X-Original-From: George Moussalem Reply-To: george.moussalem@outlook.com From: Sricharan Ramabadhran Remove qcom,tsens-v1 as fallback since this IP has no RPM and, as such, must use its own init routine available in the driver. Also adding a cooling device to the CPU thermal zone which uses CPU frequency scaling. In addition, remove superfluous polling-delay properties for which the default is already set to zero, correctly set hysteresis properties measured in milli Celsius as opposed to Celsius, and replace an underscore in an alias with a hyphen to align with device tree coding guidelines. Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Sricharan Ramabadhran Signed-off-by: George Moussalem --- arch/arm64/boot/dts/qcom/ipq5018.dtsi | 41 +++++++++++++++++++++----------= ---- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qc= om/ipq5018.dtsi index ee0001741d211b187e89a39a3caaa576251aff03..1b33ccf1a1b1af721b9690ae2c3= 5eb82985205f5 100644 --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi @@ -9,6 +9,7 @@ #include #include #include +#include =20 / { interrupt-parent =3D <&intc>; @@ -39,6 +40,7 @@ cpu0: cpu@0 { next-level-cache =3D <&l2_0>; clocks =3D <&apcs_glb APCS_ALIAS0_CORE_CLK>; operating-points-v2 =3D <&cpu_opp_table>; + #cooling-cells =3D <2>; }; =20 cpu1: cpu@1 { @@ -49,6 +51,7 @@ cpu1: cpu@1 { next-level-cache =3D <&l2_0>; clocks =3D <&apcs_glb APCS_ALIAS0_CORE_CLK>; operating-points-v2 =3D <&cpu_opp_table>; + #cooling-cells =3D <2>; }; =20 l2_0: l2-cache { @@ -255,9 +258,9 @@ tsens_s4_p2: s4-p2@254 { }; =20 tsens: thermal-sensor@4a9000 { - compatible =3D "qcom,ipq5018-tsens", "qcom,tsens-v1"; - reg =3D <0x004a9000 0x1000>, /* TM */ - <0x004a8000 0x1000>; /* SROT */ + compatible =3D "qcom,ipq5018-tsens"; + reg =3D <0x004a9000 0x1000>, + <0x004a8000 0x1000>; =20 nvmem-cells =3D <&tsens_mode>, <&tsens_base1>, @@ -744,56 +747,62 @@ pcie@0 { =20 thermal-zones { cpu-thermal { - polling-delay-passive =3D <0>; - polling-delay =3D <0>; thermal-sensors =3D <&tsens 2>; =20 trips { cpu-critical { temperature =3D <120000>; - hysteresis =3D <2>; + hysteresis =3D <1000>; type =3D "critical"; }; + + cpu_alert: cpu-passive { + temperature =3D <100000>; + hysteresis =3D <1000>; + type =3D "passive"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&cpu_alert>; + cooling-device =3D <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; }; }; =20 gephy-thermal { - polling-delay-passive =3D <0>; - polling-delay =3D <0>; thermal-sensors =3D <&tsens 4>; =20 trips { gephy-critical { temperature =3D <120000>; - hysteresis =3D <2>; + hysteresis =3D <1000>; type =3D "critical"; }; }; }; =20 top-glue-thermal { - polling-delay-passive =3D <0>; - polling-delay =3D <0>; thermal-sensors =3D <&tsens 3>; =20 trips { - top_glue-critical { + top-glue-critical { temperature =3D <120000>; - hysteresis =3D <2>; + hysteresis =3D <1000>; type =3D "critical"; }; }; }; =20 ubi32-thermal { - polling-delay-passive =3D <0>; - polling-delay =3D <0>; thermal-sensors =3D <&tsens 1>; =20 trips { ubi32-critical { temperature =3D <120000>; - hysteresis =3D <2>; + hysteresis =3D <1000>; type =3D "critical"; }; }; --=20 2.50.1