* [PATCH 0/3] QCM2290 LMH
@ 2024-03-08 22:08 Konrad Dybcio
2024-03-08 22:08 ` [PATCH 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible Konrad Dybcio
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-03-08 22:08 UTC (permalink / raw)
To: Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thara Gopinath, Amit Kucheria
Cc: Marijn Suijten, linux-arm-msm, linux-pm, devicetree,
linux-kernel, Dmitry Baryshkov, Konrad Dybcio, stable,
Loic Poulain
Wire up LMH on QCM2290 and fix a bad bug while at it.
P1-2 for thermal, P3 for qcom
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (2):
dt-bindings: thermal: lmh: Add QCM2290 compatible
thermal: qcom: lmh: Check for SCM avaiability at probe
Loic Poulain (1):
arm64: dts: qcom: qcm2290: Add LMH node
Documentation/devicetree/bindings/thermal/qcom-lmh.yaml | 13 +++++++++----
arch/arm64/boot/dts/qcom/qcm2290.dtsi | 14 +++++++++++++-
drivers/thermal/qcom/lmh.c | 3 +++
3 files changed, 25 insertions(+), 5 deletions(-)
---
base-commit: 8ffc8b1bbd505e27e2c8439d326b6059c906c9dd
change-id: 20240308-topic-rb1_lmh-1e0f440c392a
Best regards,
--
Konrad Dybcio <konrad.dybcio@linaro.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible
2024-03-08 22:08 [PATCH 0/3] QCM2290 LMH Konrad Dybcio
@ 2024-03-08 22:08 ` Konrad Dybcio
2024-03-09 11:06 ` Krzysztof Kozlowski
2024-03-08 22:08 ` [PATCH 2/3] thermal: qcom: lmh: Check for SCM avaiability at probe Konrad Dybcio
2024-03-08 22:08 ` [PATCH 3/3] arm64: dts: qcom: qcm2290: Add LMH node Konrad Dybcio
2 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2024-03-08 22:08 UTC (permalink / raw)
To: Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thara Gopinath, Amit Kucheria
Cc: Marijn Suijten, linux-arm-msm, linux-pm, devicetree,
linux-kernel, Dmitry Baryshkov, Konrad Dybcio
Document the QCM2290 LMH.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Documentation/devicetree/bindings/thermal/qcom-lmh.yaml | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml b/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
index 5ff72ce5c887..b815d8c5da51 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
@@ -17,10 +17,15 @@ description:
properties:
compatible:
- enum:
- - qcom,sc8180x-lmh
- - qcom,sdm845-lmh
- - qcom,sm8150-lmh
+ oneOf:
+ - enum:
+ - qcom,msm8998-lmh
+ - qcom,sc8180x-lmh
+ - qcom,sdm845-lmh
+ - qcom,sm8150-lmh
+ - items:
+ - const: qcom,qcm2290-lmh
+ - const: qcom,sm8150-lmh
reg:
items:
--
2.44.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] thermal: qcom: lmh: Check for SCM avaiability at probe
2024-03-08 22:08 [PATCH 0/3] QCM2290 LMH Konrad Dybcio
2024-03-08 22:08 ` [PATCH 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible Konrad Dybcio
@ 2024-03-08 22:08 ` Konrad Dybcio
2024-03-09 10:40 ` Dmitry Baryshkov
2024-03-08 22:08 ` [PATCH 3/3] arm64: dts: qcom: qcm2290: Add LMH node Konrad Dybcio
2 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2024-03-08 22:08 UTC (permalink / raw)
To: Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thara Gopinath, Amit Kucheria
Cc: Marijn Suijten, linux-arm-msm, linux-pm, devicetree,
linux-kernel, Dmitry Baryshkov, Konrad Dybcio, stable
Up until now, the necessary scm availability check has not been
performed, leading to possible null pointer dereferences (which did
happen for me on RB1).
Fix that.
Fixes: 53bca371cdf7 ("thermal/drivers/qcom: Add support for LMh driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/thermal/qcom/lmh.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/thermal/qcom/lmh.c b/drivers/thermal/qcom/lmh.c
index f6edb12ec004..5225b3621a56 100644
--- a/drivers/thermal/qcom/lmh.c
+++ b/drivers/thermal/qcom/lmh.c
@@ -95,6 +95,9 @@ static int lmh_probe(struct platform_device *pdev)
unsigned int enable_alg;
u32 node_id;
+ if (!qcom_scm_is_available())
+ return -EPROBE_DEFER;
+
lmh_data = devm_kzalloc(dev, sizeof(*lmh_data), GFP_KERNEL);
if (!lmh_data)
return -ENOMEM;
--
2.44.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: qcm2290: Add LMH node
2024-03-08 22:08 [PATCH 0/3] QCM2290 LMH Konrad Dybcio
2024-03-08 22:08 ` [PATCH 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible Konrad Dybcio
2024-03-08 22:08 ` [PATCH 2/3] thermal: qcom: lmh: Check for SCM avaiability at probe Konrad Dybcio
@ 2024-03-08 22:08 ` Konrad Dybcio
2 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-03-08 22:08 UTC (permalink / raw)
To: Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thara Gopinath, Amit Kucheria
Cc: Marijn Suijten, linux-arm-msm, linux-pm, devicetree,
linux-kernel, Dmitry Baryshkov, Konrad Dybcio, Loic Poulain
From: Loic Poulain <loic.poulain@linaro.org>
Add a node for the Limits Mangement Hardware to ensure it can be
configured by the operating system.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
[Konrad: add commit msg, rebase]
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/qcm2290.dtsi | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
index 89beac833d43..1aacad50e7fc 100644
--- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
@@ -1858,7 +1858,7 @@ cpufreq_hw: cpufreq@f521000 {
compatible = "qcom,qcm2290-cpufreq-hw", "qcom,cpufreq-hw";
reg = <0x0 0x0f521000 0x0 0x1000>;
reg-names = "freq-domain0";
- interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts-extended = <&lmh_cluster 0>;
interrupt-names = "dcvsh-irq-0";
clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&gcc GPLL0>;
clock-names = "xo", "alternate";
@@ -1866,6 +1866,18 @@ cpufreq_hw: cpufreq@f521000 {
#freq-domain-cells = <1>;
#clock-cells = <1>;
};
+
+ lmh_cluster: lmh@f550800 {
+ compatible = "qcom,qcm2290-lmh", "qcom,sm8150-lmh";
+ reg = <0x0 0x0f550800 0x0 0x400>;
+ interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+ 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 {
--
2.44.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] thermal: qcom: lmh: Check for SCM avaiability at probe
2024-03-08 22:08 ` [PATCH 2/3] thermal: qcom: lmh: Check for SCM avaiability at probe Konrad Dybcio
@ 2024-03-09 10:40 ` Dmitry Baryshkov
0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2024-03-09 10:40 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Bjorn Andersson, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
Lukasz Luba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Thara Gopinath, Amit Kucheria, Marijn Suijten, linux-arm-msm,
linux-pm, devicetree, linux-kernel, stable
On Sat, 9 Mar 2024 at 00:08, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> Up until now, the necessary scm availability check has not been
> performed, leading to possible null pointer dereferences (which did
> happen for me on RB1).
>
> Fix that.
>
> Fixes: 53bca371cdf7 ("thermal/drivers/qcom: Add support for LMh driver")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> drivers/thermal/qcom/lmh.c | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible
2024-03-08 22:08 ` [PATCH 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible Konrad Dybcio
@ 2024-03-09 11:06 ` Krzysztof Kozlowski
2024-03-09 13:05 ` Konrad Dybcio
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-09 11:06 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Rafael J. Wysocki,
Daniel Lezcano, Zhang Rui, Lukasz Luba, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thara Gopinath, Amit Kucheria
Cc: Marijn Suijten, linux-arm-msm, linux-pm, devicetree,
linux-kernel, Dmitry Baryshkov
On 08/03/2024 23:08, Konrad Dybcio wrote:
> Document the QCM2290 LMH.
>
MSM8998 appeared as well. Please either explain in the commit msg or
drop it from the binding (if it is not correct).
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> Documentation/devicetree/bindings/thermal/qcom-lmh.yaml | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml b/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
> index 5ff72ce5c887..b815d8c5da51 100644
> --- a/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
> +++ b/Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
> @@ -17,10 +17,15 @@ description:
>
> properties:
> compatible:
> - enum:
> - - qcom,sc8180x-lmh
> - - qcom,sdm845-lmh
> - - qcom,sm8150-lmh
> + oneOf:
> + - enum:
> + - qcom,msm8998-lmh
^^ Here
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible
2024-03-09 11:06 ` Krzysztof Kozlowski
@ 2024-03-09 13:05 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-03-09 13:05 UTC (permalink / raw)
To: Krzysztof Kozlowski, Bjorn Andersson, Rafael J. Wysocki,
Daniel Lezcano, Zhang Rui, Lukasz Luba, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thara Gopinath, Amit Kucheria
Cc: Marijn Suijten, linux-arm-msm, linux-pm, devicetree,
linux-kernel, Dmitry Baryshkov
On 9.03.2024 12:06, Krzysztof Kozlowski wrote:
> On 08/03/2024 23:08, Konrad Dybcio wrote:
>> Document the QCM2290 LMH.
>>
>
> MSM8998 appeared as well. Please either explain in the commit msg or
> drop it from the binding (if it is not correct).
Hm, git messed with my branches.. I'll send the correct patch in v2.
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-09 13:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 22:08 [PATCH 0/3] QCM2290 LMH Konrad Dybcio
2024-03-08 22:08 ` [PATCH 1/3] dt-bindings: thermal: lmh: Add QCM2290 compatible Konrad Dybcio
2024-03-09 11:06 ` Krzysztof Kozlowski
2024-03-09 13:05 ` Konrad Dybcio
2024-03-08 22:08 ` [PATCH 2/3] thermal: qcom: lmh: Check for SCM avaiability at probe Konrad Dybcio
2024-03-09 10:40 ` Dmitry Baryshkov
2024-03-08 22:08 ` [PATCH 3/3] arm64: dts: qcom: qcm2290: Add LMH node Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®