From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECB9EC3F6B0 for ; Fri, 12 Aug 2022 14:06:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239074AbiHLOGx (ORCPT ); Fri, 12 Aug 2022 10:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239054AbiHLOGv (ORCPT ); Fri, 12 Aug 2022 10:06:51 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 466AD8980B for ; Fri, 12 Aug 2022 07:06:50 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id qn6so2196139ejc.11 for ; Fri, 12 Aug 2022 07:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:from:to:cc; bh=Pv1Kl4JS+ZMoTNGLHszpnd7VfT3QEgm6cYLyuxdf2mQ=; b=ovrc2tsidM2Puk4E7t0O/YjnXHqLxj+xQuv1Ttuai8VY3eJF0YSy0FPL3vorntUW2B 0QZn6B/Ie8Ofbcepoqnh3FkHCFrw6j/32xfhLo0b7u3aysa4h7i4K507OnTChayDA1+A fRCTefwionwJDUlj1Sg+yvkiyDaCM6/ya/2XQR7/8GOlvm3dvQqSwLR9vmTBWLqlmwYk fMh6Ts45sPJFmDmDYdjTe3DN9goZ5aZtEbb9xe/38FgBJ/J4JVXxXz0JNjV9Fk/Hdtaq qo3lK2imkdAmhxjlKtFpkjM+4DUSHBzrz/70/fCMJCjbXpeB+KqJPC0WKnnYs/xv3AAV omUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc; bh=Pv1Kl4JS+ZMoTNGLHszpnd7VfT3QEgm6cYLyuxdf2mQ=; b=HWdmsgSPwc72EVQ4uKpp2SjGBJVb9qWTr00tjHh4ChSegF8//uFMwTMsSMTx26QnFk lTtE7WO7oaDJkuIAGZerO00GwXQFpg0E565zBnkzU1AlVNfdwlU60e0BGr3XQhrSFWE6 33tJmRBqZOF4xwJPQjfVZbEQejGjeNyAjV/5bLzqTktjFqorghs6bfeXmszqPk325zXq qUREEJKTDQjLHNsPjcSycVIlH9b/9In8m32U5peZwQ0hVMGZnOVWcFqP1iKoVpACixJY O2xcCoJeMwdXJ9ZQefG/OQ1ZCe+jjjSl8nxucmUqp055VGseisSiUdK1UYohoxCrX1Ag 5MXg== X-Gm-Message-State: ACgBeo128uxsX/lsqv4n4BDkgsj3fSD1SOqEtS/sAYI60xi0q5TJ449K VIsnYxDTgqFzzEyESt2tzi8kVA== X-Google-Smtp-Source: AA6agR6jRgNj+aT1UFQqpNRlUCku/01/4MHvqLsJFEpTOd0bsqzM73svFr8xWsCn2iRCHnaJmzahqQ== X-Received: by 2002:a17:907:9710:b0:731:67b1:dc3b with SMTP id jg16-20020a170907971000b0073167b1dc3bmr2831119ejc.709.1660313208660; Fri, 12 Aug 2022 07:06:48 -0700 (PDT) Received: from localhost (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id d24-20020a17090694d800b007030c97ae62sm802745ejy.191.2022.08.12.07.06.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Aug 2022 07:06:48 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 12 Aug 2022 16:06:47 +0200 Message-Id: To: "Krzysztof Kozlowski" , Cc: <~postmarketos/upstreaming@lists.sr.ht>, , "Andy Gross" , "Bjorn Andersson" , "Konrad Dybcio" , "Rob Herring" , "Krzysztof Kozlowski" , , , "Matthias Kaehlcke" Subject: Re: [PATCH] arm64: dts: qcom: pm6350: add temp sensor and thermal zone config From: "Luca Weiss" X-Mailer: aerc 0.11.0 References: <20220812114421.1195044-1-luca.weiss@fairphone.com> <81ae6a31-1f37-a677-f8f8-2340e37d3a63@linaro.org> In-Reply-To: <81ae6a31-1f37-a677-f8f8-2340e37d3a63@linaro.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Krzysztof, +CC Matthias Kaehlcke (author of patch mentioned further below) On Fri Aug 12, 2022 at 3:36 PM CEST, Krzysztof Kozlowski wrote: > On 12/08/2022 14:44, Luca Weiss wrote: > > Add temp-alarm device tree node and a default configuration for the > > corresponding thermal zone for this PMIC. Temperatures are based on > > downstream values. > >=20 > > Signed-off-by: Luca Weiss > > --- > > With this config I'm getting this in dmesg, not sure if it's a warning > > that should be solved or just an informative warning. > >=20 > > [ 0.268256] spmi-temp-alarm c440000.spmi:pmic@0:temp-alarm@2400: No = ADC is configured and critical temperature is above the maximum stage 2 thr= eshold of 140 C! Configuring stage 2 shutdown at 140 C. > >=20 > > As far as I can tell, based on downstream dts this PMIC doesn't have an > > ADC. > > You configure 145 and driver believes 140 is the limit, so it seems > warning should be addressed. Hm... > > From where did you get 145 degrees as limit? Downstream DTS? Yes, downstream dts[0]. >From what I can see in the downstream driver, it always disabled this "software override of stage 2 and 3 shutdowns"[1] In mainline only since f1599f9e4cd6 ("thermal: qcom-spmi: Use PMIC thermal stage 2 for critical trip points") this check exists, which is not part of downstream (wasn't in 4.19 yet), where this software override tries to get enabled so that thermal core can handle this. Any suggestion what I can do here? Maybe looking at msm-5.4 sources (and associated dts) might reveal something..? Maybe newer SoCs/PMICs have a different config? Regards Luca [0] https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/hea= ds/android-msm-barbet-4.19-android12L/qcom/pm6350.dtsi#126 [1] https://gerrit-public.fairphone.software/plugins/gitiles/kernel/msm-4.1= 9/+/refs/heads/kernel/11/fp4/drivers/thermal/qcom-spmi-temp-alarm.c#251 > > Best regards, > Krzysztof