Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp560528imw; Fri, 15 Jul 2022 08:32:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t1lIEzsSA3ZnAJwG5o4pqwb69iIngdalexm3sGBsT6BC4W1nE9sBiVo+ltKGW+j5QgTBLI X-Received: by 2002:a17:903:2285:b0:16c:33dc:8754 with SMTP id b5-20020a170903228500b0016c33dc8754mr14339301plh.126.1657899170149; Fri, 15 Jul 2022 08:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657899170; cv=none; d=google.com; s=arc-20160816; b=zcIDUOrqQvhXO+GMPvicYA3zQymtNzAN8v0WVG3cToLf2mH/uXUPE6fwnpW/jZ9agf Ph9kTgR2z6m+YvfNSLj4BSMGpCHpA3+yvb298FpuxpNj4JcrcxiDi9ehMUOzWGExDLcK X0Mz9y8R9Cu2PXU3i8gXlHGxj+JPfPhkoLlUgs8bbKnJNxRQZlOp+SzRJEyAv02YEt/A dEw3ff/kGbxBDt8xZ30SBenvJH0/AIwZV3NXBzsAvwGbCMWz2bGJRzidXEyZvjX0w4Ed ne8WoOVq4poRpWkEMHKH6XgpyVY0l6UBgzCqYsnsYYP5o0ZxInhWoCcEcpOVqfyoqw2X jZmA== 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:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=QTixjscfvkmBNLmVEClP3PyVqdRA8W9RIvLaWy3t2AY=; b=zzuSExR2V2GlR/P6wsAXGiLbc+UBJicEda4UbBCzuWJnwLwjkWgOMo26wPbrnorc6h Dp5mV7byTDCCCjmBuE80BQX6NhBiyhBsaY93f4+rb8SFOKkiuAryj270bNN78yntBp0J jsvcQv/s5tIywLhnzkSCpJSOI7Apy8Oot20UL68jRluLZR02aqedEzsH/q12h2jSBXz8 LMznbkq7Pby0Fc6s2ey5+gT9vAbRKTdqGvAeW/MSKiVfC6AnUVlTPJB8UpoCsmdMo9T0 1MxF3iPO8mcwW8c9ToFSicRBMQDx64wZW/rNEYdDKc+13qBfvkdzfo50IwIpjwjuYVxk oPuw== 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 u10-20020a056a00124a00b0052ab2efeec4si5684287pfi.280.2022.07.15.08.32.12; Fri, 15 Jul 2022 08:32:50 -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 S231411AbiGOO4t (ORCPT + 99 others); Fri, 15 Jul 2022 10:56:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbiGOO4r (ORCPT ); Fri, 15 Jul 2022 10:56:47 -0400 Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [5.144.164.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4346474DA for ; Fri, 15 Jul 2022 07:56:45 -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) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id C3F9E3F604; Fri, 15 Jul 2022 16:56:42 +0200 (CEST) Message-ID: <09ff7e3a-7dd5-db35-3795-89151afb5363@somainline.org> Date: Fri, 15 Jul 2022 16:56:41 +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 , linux-pm@vger.kernel.org Cc: 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> From: Konrad Dybcio In-Reply-To: <20220701145815.2037993-4-bhupesh.sharma@linaro.org> 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 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.. Konrad