Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4284937imw; Tue, 19 Jul 2022 03:49:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tJrrjFFK54DBUXiRGNbPcOtKIcytNruyZpT/UMenznanJv0eA0s5dY7PWzUUMyPoRu8Njx X-Received: by 2002:a05:6402:150d:b0:43a:2cac:ca24 with SMTP id f13-20020a056402150d00b0043a2cacca24mr43028199edw.110.1658227776629; Tue, 19 Jul 2022 03:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658227776; cv=none; d=google.com; s=arc-20160816; b=iS2wdz1M7Suv6KClCM3VSwR9a5ozhcJshjBTOUYPYBLZhn6zzWLPD317qozRPK2v9Z RJJu8eOWCoTvp1i0/hzTpFtUYOkYDiNAWuQgJ/WYY3on4iwVbRrFDPs2I0q4DY4YiP/J IWbXNO+K022uFk5nQy/8z7FovA3sQngd08qB/VJF356o/mfrcmWTRy8c+yUpInOJDjH8 gulGgLejd8Nwkz5G7f1sh/fGoyYinHgP9Yy65zBB4cy/Uz3WgPRg9UCUT4p1fzW/OZOZ M+IF56IPDjjwc//Rz1x1ejR4hR5bsajeIwnKM5OOPZJtJRNhjmlHR96+1JQYNL3kXKcT 8R/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=qEgzAhFksddpH3cvao6+tKOAxjQySxBashdkg8JJJTE=; b=PmtliiIAiIBy3h+HN7K/DGUkVxWPNYqBpixC7Id/55l6gY7OAYC2DgoIuNEpGVzrrH TE6U9hG69Px9JdOEwwbZJwLLMKG8DBuKGAFRGx6E3Us6Z5wG4ZUX9T4QLWRuj5TNh7jb YSn56Lg8p0HWlsTLCrXeaWQsbjgXIOdVheILYydxvWgYT5RxRzErRcTgIBAtmYV05Yyt kRwA68Wly+76VNyZliSZyxGzbeQEzLeStqibq6blCcBHUM/z8jJpOzDEkXKtiZ6wzN5f GIb5Ihldt4XKLm6o0o80luMBWE8uD1LCm7VOQ8AA9u3MhezlrBQpaxEXk792lfMiNwNL q00A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i14-20020aa7dd0e000000b0043a785074bdsi17573796edv.108.2022.07.19.03.49.11; Tue, 19 Jul 2022 03:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234639AbiGSKjk (ORCPT + 99 others); Tue, 19 Jul 2022 06:39:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230262AbiGSKji (ORCPT ); Tue, 19 Jul 2022 06:39:38 -0400 Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [5.144.164.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FBC5248F5; Tue, 19 Jul 2022 03:39:38 -0700 (PDT) Received: from [192.168.1.101] (abxj77.neoplus.adsl.tpnet.pl [83.9.3.77]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 605F63F715; Tue, 19 Jul 2022 12:39:36 +0200 (CEST) Message-ID: Date: Tue, 19 Jul 2022 12:39:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 3/3] thermal: qcom: tsens: Implement re-initialization workaround quirk Content-Language: en-US To: bhupesh.sharma@linaro.org, linux-pm@vger.kernel.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, Amit Kucheria , Thara Gopinath , linux-arm-msm@vger.kernel.org References: <20220701145815.2037993-1-bhupesh.sharma@linaro.org> <20220701145815.2037993-4-bhupesh.sharma@linaro.org> <09ff7e3a-7dd5-db35-3795-89151afb5363@somainline.org> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18.07.2022 08:34, bhupesh.sharma@linaro.org wrote: > Hi Konrad, > > On 7/15/22 8:26 PM, Konrad Dybcio wrote: >> >> >> On 1.07.2022 16:58, Bhupesh Sharma wrote: >> > Since for some QCoM tsens controllers, its suggested to >> > monitor the controller health periodically and in case an >> > issue is detected, to re-initialize the tsens controller >> > via trustzone, add the support for the same in the >> > qcom tsens driver. >> > >> > Note that Once the tsens controller is reset using scm call, >> > all SROT and TM region registers will enter the reset mode. >> > >> > While all the SROT registers will be re-programmed and >> > re-enabled in trustzone prior to the scm call exit, the TM >> > region registers will not re-initialized in trustzone and thus >> > need to be handled by the tsens driver. >> > >> > Cc: Amit Kucheria >> > Cc: Thara Gopinath >> > Cc: linux-pm@vger.kernel.org >> > Cc: linux-arm-msm@vger.kernel.org >> > Signed-off-by: Bhupesh Sharma >> > Reported-by: kernel test robot >> > --- >> Hi, I think this should be also checked and applied on init. This >> seems required for at least SM6375, as the controller starts (or >> well, doesn't start...) in an unknown state and the driver does >> not like it, as the TSENS_EN indicates it is disabled. >> Downstream runs this right at probe.. > > Hmm.. very interesting. I was not aware of the SM6375 case, as for SM8150 > the controller starts in a valid state but may require reinit during operation. > > So, I did not use the downstream approach to do it right at _probe() and then > later while get_temp() is called. > > Let me add that in v2. BTW do you want me to set the need_reinit_wa as true > for SM6375 as well, or would you like to add that with a followup-patch ? Please set it, I'll happily test it! Konrad > > Regards, > Bhupesh