Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3036318imw; Mon, 18 Jul 2022 00:17:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v5luITdtqPjBzbUJcWtuagdibXV6R8n7epSm5wktdZzqFw8FboHmMjAzNoQ3lJMhTbfZkD X-Received: by 2002:a17:90b:4f4c:b0:1f0:565a:35d8 with SMTP id pj12-20020a17090b4f4c00b001f0565a35d8mr38583543pjb.32.1658128631442; Mon, 18 Jul 2022 00:17:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658128631; cv=none; d=google.com; s=arc-20160816; b=WX/rgQoAp7ltVdWU5J02vaqR0fxlUkSaPjdpJ6ZLUsPHsErrFgfIUqvZfd/gool1CB +kcYaqj6mvVb0qnSUFcLJkfRumPwadEanSXHPuSUBZJPpvW9yuYT56+oy3z3BE6u80Qg ihzGr9TX15OcCkCqsyopEFCKw8DLM4JsPdEeG2ABOg+N4/jatQB0oDudHnJyqY61uorZ qZ8WjZ6sdvQ5awPkqJ3orTdYsItMHU4GZgsWtTNcHK1Ie2WHTPGGog9sXU4xleGd88yA +5OEoVZGtdSaV2zCV1DMwYuSXt524zZFIPAiWV2QhInlMsx9RdBLdrUSVm3b2LigQq7z IokA== 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:references :subject:to:from:user-agent:mime-version:date:message-id :dkim-signature; bh=S53fMGJ7d0alkGH+ulDHUMvLnCp992Os4EhV2Z3Vc40=; b=TBl5o3DGOGzENxy6J/dmO3iGM4VYP005vZG0bdvAay9vCz8Bf3d+Hq1bdU9sDT1i2d Vgte0VHLdyCpTwvwEf9IYinPb7QljjTUnC6ma7+T9QfvILiJ9UnUGGlHhiCbb80bG5iO E+ZF+vkTAFFvLmafLWhzXytvoUwJe5m4G8AXuzWkqclT9yciqU4Cy8T0C2Qgn6nXTnrN iAMPlQbBK7AWS/xNHS27mk0g7d9s4k/e1Q3weyLVFpKafeJJD2/h98I949+UKfneD6ut ww+mhHW+kpwLNYzCihW1MVRe3zJbyjCc6Xly4apPbEz//xQhl4glXwVVsTs5dWshTSsJ Y/xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1l54ay5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w185-20020a6382c2000000b004124f034b49si13830579pgd.529.2022.07.18.00.16.55; Mon, 18 Jul 2022 00:17:11 -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; dkim=pass header.i=@linaro.org header.s=google header.b=M1l54ay5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233176AbiGRGfM (ORCPT + 99 others); Mon, 18 Jul 2022 02:35:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233548AbiGRGe6 (ORCPT ); Mon, 18 Jul 2022 02:34:58 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DF7F17056 for ; Sun, 17 Jul 2022 23:34:56 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id e16so9777988pfm.11 for ; Sun, 17 Jul 2022 23:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:from:to:subject:references :in-reply-to:content-transfer-encoding; bh=S53fMGJ7d0alkGH+ulDHUMvLnCp992Os4EhV2Z3Vc40=; b=M1l54ay5r+9gA9iDuaHbt1PXGuBvWNoVXchA6ROAr9TQBryZ/CnJ26PZqZRccKEw4F qpe7QC3e78ETuC7W0zUIq8rTKN5Bm06w3EcK6mCKGQS6xXbqBtsGrQu0QQ74PuZtvSsc qRszhWok/lhvP62IiaQe5fnEcON/JE2Y+eYAa66B1gTDq9FWgJ7Mq68vPGLtXdxlPA2B Hc5p1nJTqiEnSkLEFrgZKejU4Z3AwCBcvjAf4CrmoGJ9y8hv3985HLS8OQfuS0OH987w adk450PypM9EmJCQMDmD4QonB6k4lTIh+8BOVd2RiWR8xg9SR4MkuR0dy17m8ewbiFrh ruzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from:to :subject:references:in-reply-to:content-transfer-encoding; bh=S53fMGJ7d0alkGH+ulDHUMvLnCp992Os4EhV2Z3Vc40=; b=D42BHVRoiOO61RIDUKQT0MCVvdzMPW75bUb4k8cuj4Kj0Q5xL8nQl5n9UTAE+6Pd2w ushuaXBn8ZSnzg5LbwmLFSwOLBZHjpu8Oe8pMBs7nlOcOeN5x+UiGd4Or6T2qn4SQeXT +NAqFzQ5CtGdU9E6W0jUrQty7Oygl6uyR76xREAq95KN3y3k2PWhqckx+6h1yA6yZqZq of5oRIAcyu5jCJeURNIpf2/LF+aSTGb2GCvDh8QHcDLlAoMi+jjjd/Q44IQJggAWAXLr TsXe8D4z/SuZhcz5QjBZ6j1uK2zSuideHdfUXw5kqrs+Ph5xi9lhSzeLCl82KhRX2YAH SJGg== X-Gm-Message-State: AJIora+SLI/jOMiSl7GqPQGaspd/auA5OaPLucPgbP8Pb44twXPBxjZB UfaREsVOJk5aebK6hlrNvVHafQ== X-Received: by 2002:a65:5b8e:0:b0:41a:3c3:b693 with SMTP id i14-20020a655b8e000000b0041a03c3b693mr7425087pgr.84.1658126095722; Sun, 17 Jul 2022 23:34:55 -0700 (PDT) Received: from ?IPV6:2401:4900:1f3b:709e:6fec:df37:6562:5a80? ([2401:4900:1f3b:709e:6fec:df37:6562:5a80]) by smtp.gmail.com with ESMTPSA id t13-20020a62d14d000000b00528a4238eadsm8547021pfl.13.2022.07.17.23.34.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Jul 2022 23:34:55 -0700 (PDT) Message-ID: Date: Mon, 18 Jul 2022 12:04:50 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 From: bhupesh.sharma@linaro.org To: Konrad Dybcio , 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 Subject: Re: [PATCH 3/3] thermal: qcom: tsens: Implement re-initialization workaround quirk References: <20220701145815.2037993-1-bhupesh.sharma@linaro.org> <20220701145815.2037993-4-bhupesh.sharma@linaro.org> <09ff7e3a-7dd5-db35-3795-89151afb5363@somainline.org> In-Reply-To: <09ff7e3a-7dd5-db35-3795-89151afb5363@somainline.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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 ? Regards, Bhupesh