From nobody Mon Oct 6 17:10:27 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 7BBD9230D35; 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=Zupf6v2gxxywyh+fBF5CzbRlMJ3a2xiftJqxkbdg7kyNH91v7b/w3C8QXEXfJfzp9uV3bUHYBobbq8SQBwx6nmpKftgDl8BpJk2QRGzUPHR9/0prXvB5OkgQQnc/FR/m/0oHPnwZwFKxwHLwRg7c50J+PZwagGbG4U4Qc/FTdLw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752824293; c=relaxed/simple; bh=F8qIKBf/Y+7w6Mrjy5Qh3Zs7+NqM+E+DJCh6vhK0yg4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m+nhZvwLPpPUkg+EXzm06I06WLBp/iyyfAd9ELoK21lSB36mnmWuLIs1IKvUlPhFJ3CDMWwmTcRWA/zGOB+DAjGM8Q2O6UZhWISnPM5pYyqjyrUH1AFy4h35AFmNsQUmWoHAwDIiSuXHFT5+jSK3B3DPkjGOn1WRBIJF7wXIs/Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gnTxQqD9; 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="gnTxQqD9" Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A04DC4CEF0; 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=F8qIKBf/Y+7w6Mrjy5Qh3Zs7+NqM+E+DJCh6vhK0yg4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=gnTxQqD9Bn4MJsOu4ekVHwQC8r9sXP/1W1q+iILqSYprKlWuRAcKsnBj6LQxInfrQ 6fnNNtWl2f454t6DeIQTKgXI0jYwI5zgn5oRNF5KjytASa7PlFvNMlZbGhYh+fezJI 28w2Ff9fJqgegNbnEFoWlWxANrz9ihZvyCn4NpYQtPOsX4MUQAIALDa9K+FtjU2l5d PwNXcGT5l/ehVH9dH2T6uJJ7dB7BTLihvcsOXYi6GWaNjbi8TzKMYvrOmu7UQ1ik/8 OGMmS+VNFUd7kSAhILo8AkgwZkjS2MfFBWGd+34YKO8EuOqL9MUxw8GZ7LJffGM8oe 2rEqfLe3m31hg== 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 08472C83F34; Fri, 18 Jul 2025 07:38:13 +0000 (UTC) From: George Moussalem via B4 Relay Date: Fri, 18 Jul 2025 11:38:03 +0400 Subject: [PATCH v14 1/2] dt-bindings: thermal: qcom-tsens: make ipq5018 tsens standalone compatible 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-1-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 , Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1752824290; l=1548; i=george.moussalem@outlook.com; s=20250321; h=from:subject:message-id; bh=N7b74cdo1JSNQJiBtizyhIJQsUtwECsbNozKY9HUsoQ=; b=CO6LksY2VIBLgRhDrZEuvg4ZEP/NQNwULQa6+XfO1yHoTPA70QUp4VHkeopfCluOUSiSZn8qn n+5Z8BT7epgCmC6FCpe7so5sg1HS/Mu3T8c8PJwItOYxjz94mNDH4yj 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: George Moussalem IPQ5018 tsens should not use qcom,tsens-v1 as fallback since it has no RPM and, as such, must deviates from the standard v1 init routine in the driver as this version of tsens needs to be explicitly reset and enabled in the driver. So let's make qcom,ipq5018-tsens a standalone compatible in the bindings. Fixes: 77c6d28192ef ("dt-bindings: thermal: qcom-tsens: Add ipq5018 compati= ble") Reviewed-by: Krzysztof Kozlowski Signed-off-by: George Moussalem --- Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Do= cumentation/devicetree/bindings/thermal/qcom-tsens.yaml index 0e653bbe9884953b58c4d8569b8d096db47fd54f..3cf16f6734fcfee20735d3da2cf= b0f708a11bca4 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml @@ -36,10 +36,15 @@ properties: - qcom,msm8974-tsens - const: qcom,tsens-v0_1 =20 + - description: + v1 of TSENS without RPM which requires to be explicitly reset + and enabled in the driver. + enum: + - qcom,ipq5018-tsens + - description: v1 of TSENS items: - enum: - - qcom,ipq5018-tsens - qcom,msm8937-tsens - qcom,msm8956-tsens - qcom,msm8976-tsens --=20 2.50.1 From nobody Mon Oct 6 17:10:27 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