|
|
Log in / Subscribe / Register

Add support for tsens controller reinit via trustzone

From:  Bhupesh Sharma <bhupesh.sharma-AT-linaro.org>
To:  linux-pm-AT-vger.kernel.org
Subject:  [PATCH v4 0/4] Add support for tsens controller reinit via trustzone
Date:  Thu, 01 Sep 2022 16:24:10 +0530
Message-ID:  <20220901105414.1171813-1-bhupesh.sharma@linaro.org>
Cc:  bhupesh.sharma-AT-linaro.org, bhupesh.linux-AT-gmail.com, linux-kernel-AT-vger.kernel.org, andersson-AT-kernel.org, konrad.dybcio-AT-somainline.org, linux-arm-msm-AT-vger.kernel.org, daniel.lezcano-AT-linaro.org, robh+dt-AT-kernel.org, rafael-AT-kernel.org, Amit Kucheria <amitk-AT-kernel.org>, Thara Gopinath <thara.gopinath-AT-gmail.com>
Archive-link:  Article

Changes since v3:
-----------------
- v3 can be viewed here: https://lore.kernel.org/linux-arm-msm/20220804054638.3197...
- Addressed review comments from Bjorn regarding early exit paths, spin
  lock being held while returning from func, etc.
- Also added Bjorn's R-Bs for v3 patches.
- Rebased on latest linux-next (master branch) tip.

Changes since v2:
-----------------
- v2 can be viewed here: https://lore.kernel.org/linux-arm-msm/20220724122424.2509...
- Dropped sm6375 specific patch from v3, as suggested by Konrad.
- Rebased on latest linux-next (master branch) tip.

Changes since v1:
-----------------
- v1 can be viewed here: https://lore.kernel.org/linux-arm-msm/20220701145815.2037...
- Addressed several comments from Bjorn regarding locking, serialization
  etc received on v1.
- Addressed Konrad's concerns about the tsens controller found on sm6375
  SoC which seems to start in a bad state or is disabled when entering
  the linux world.
- This series would depend on sm6375 tsens controller changes being
  added by Konrad. It is based on linux-next (master branch) tip.

Some versions of Qualcomm tsens controller might enter a
'bad state' causing sensor temperatures/interrupts status
to be in an 'invalid' state.

It is recommended to re-initialize the tsens controller
via trustzone (secure registers) using scm call(s) when that
happens.

This patchset adds the support for the same.

Cc: andersson@kernel.org
Cc: Amit Kucheria <amitk@kernel.org>
Cc: Thara Gopinath <thara.gopinath@gmail.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org

Bhupesh Sharma (4):
  firmware: qcom: scm: Add support for tsens reinit workaround
  thermal: qcom: tsens: Add hooks for supplying platform specific reinit
    quirks
  thermal: qcom: tsens: Add driver support for re-initialization quirk
  thermal: qcom: tsens: Add reinit quirk support for tsens v2
    controllers

 drivers/firmware/qcom_scm.c     |  15 +++
 drivers/firmware/qcom_scm.h     |   4 +
 drivers/thermal/qcom/tsens-v2.c |  15 +++
 drivers/thermal/qcom/tsens.c    | 193 ++++++++++++++++++++++++++++++++
 drivers/thermal/qcom/tsens.h    |  18 ++-
 include/linux/qcom_scm.h        |   2 +
 6 files changed, 246 insertions(+), 1 deletion(-)

-- 
2.37.1



Copyright © 2022, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds