Message ID | 20201005150313.149754-4-konradybcio@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | pm8994 / msm8992/4 DT updates | expand |
On 05/10/2020 17:03, Konrad Dybcio wrote: > This will shut down the platform in case the PMIC overheats. > > Signed-off-by: Konrad Dybcio <konradybcio@gmail.com> > --- > arch/arm64/boot/dts/qcom/pm8994.dtsi | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/pm8994.dtsi b/arch/arm64/boot/dts/qcom/pm8994.dtsi > index 7825208b0d8b..9ab5657f7d23 100644 > --- a/arch/arm64/boot/dts/qcom/pm8994.dtsi > +++ b/arch/arm64/boot/dts/qcom/pm8994.dtsi > @@ -4,6 +4,30 @@ > #include <dt-bindings/interrupt-controller/irq.h> > #include <dt-bindings/spmi/spmi.h> > > +/ { > + thermal-zones { > + pm8994 { > + polling-delay-passive = <250>; > + polling-delay = <1000>; > + > + thermal-sensors = <&pm8994_temp>; > + > + trips { > + pm8994_alert0: pm8994-alert0 { > + temperature = <95000>; > + hysteresis = <2000>; > + type = "passive"; > + }; Don't you want to add a 'hot' trip point, so userspace can get the notification and have an opportunity to do some action like unplugging some CPU before a wild shutdown happens ? > + pm8994_crit: pm8994-crit { > + temperature = <125000>; > + hysteresis = <2000>; > + type = "critical"; > + }; > + }; > + }; > + }; > +}; > + > &spmi_bus { > > pmic@0 { >
>Don't you want to add a 'hot' trip point, so userspace can get the >notification and have an opportunity to do some action like unplugging >some CPU before a wild shutdown happens ? PM8998 doesn't do that and so I followed. Anyway, msm8992/4 will never have all CPUs online at once, unless it's put in a freezer, so unplugging isn't much of an argument :D If you want though, I can resend this patch AND add a hot point to pm8998. Konrad
On 05/10/2020 17:28, Konrad Dybcio wrote: >> Don't you want to add a 'hot' trip point, so userspace can get the >> notification and have an opportunity to do some action like unplugging >> some CPU before a wild shutdown happens ? > > PM8998 doesn't do that and so I followed. > > Anyway, msm8992/4 will never have all CPUs online at once, unless > it's put in a freezer, so unplugging isn't much of an argument :D What do you mean by they are not "online at once" ? > If you want though, I can resend this patch AND add a hot point to pm8998. It is just a suggestion, it is up to you and the SoC maintainer.
>What do you mean by they are not "online at once" ?
msm8992/4 are infamous for their thermal issues. Manufacturers have
been known for straight up disabling some cores or tuning the kernel
in such a way that some cores get disabled due to the thermal
constraints.
Konrad
On 05/10/2020 17:49, Konrad Dybcio wrote: >> What do you mean by they are not "online at once" ? > > msm8992/4 are infamous for their thermal issues. Manufacturers have > been known for straight up disabling some cores or tuning the kernel > in such a way that some cores get disabled due to the thermal > constraints. Thanks for the clarification. I was imagining some kind of hardware feature :)
diff --git a/arch/arm64/boot/dts/qcom/pm8994.dtsi b/arch/arm64/boot/dts/qcom/pm8994.dtsi index 7825208b0d8b..9ab5657f7d23 100644 --- a/arch/arm64/boot/dts/qcom/pm8994.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8994.dtsi @@ -4,6 +4,30 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/spmi/spmi.h> +/ { + thermal-zones { + pm8994 { + polling-delay-passive = <250>; + polling-delay = <1000>; + + thermal-sensors = <&pm8994_temp>; + + trips { + pm8994_alert0: pm8994-alert0 { + temperature = <95000>; + hysteresis = <2000>; + type = "passive"; + }; + pm8994_crit: pm8994-crit { + temperature = <125000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; +}; + &spmi_bus { pmic@0 {
This will shut down the platform in case the PMIC overheats. Signed-off-by: Konrad Dybcio <konradybcio@gmail.com> --- arch/arm64/boot/dts/qcom/pm8994.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)