From patchwork Tue Sep 10 17:14:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 1160503 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="FjmYkULy"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46SWqp45F1z9sP6 for ; Wed, 11 Sep 2019 03:15:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394240AbfIJROj (ORCPT ); Tue, 10 Sep 2019 13:14:39 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:39360 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731510AbfIJROj (ORCPT ); Tue, 10 Sep 2019 13:14:39 -0400 Received: by mail-qt1-f194.google.com with SMTP id n7so21654695qtb.6 for ; Tue, 10 Sep 2019 10:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=HbUIStHt9W/VIVERFYwcoKZrgnGZv23yOnmmJWnfWUc=; b=FjmYkULyMuJcFn7OokF8bYWgJVx6OD7aYCYCSC4Dqpj2ITrv4r5yGTCwjVijbaDYUu We/YcdS0ku60UXpQrNszmQVVnDD79Ay70tiYuCT3+S4VSUQV3DmyKfeifQHF4HU8S03J GD0OaCoNlipM/xrnjeL1Cqxx490vIOr1y3FICsO/9bPIeazxhgb8bRjQOD1SPoNBX2Yc WvY8JpScsb04OvYCiw0AxSgJLN0hPOOVYQuykM1XIBmppbJUdl7xKJs0QlqX2n+pK2xP S1ec721gVt9+qSGz+RiuI42Jjz41w8LxB+2VxEVYOVhytvSgi+CywF8UpAjALOYAZae2 GDMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HbUIStHt9W/VIVERFYwcoKZrgnGZv23yOnmmJWnfWUc=; b=LZZutk+aSJU4T0nsSL2iRfxVQA2l+dgFKSZ6XBaYy4DZEZJA5T1EFwuMnjS+OhhvnM OZIOENbMufuiSnzmfpn20vp0mVMKxiqmTsnJCymsfqxTx6MUFJwYQG7BA9x46PvbO+17 qxNc1ijbpvzhMBCtsSjWA2+DOK5oTpylZ8gccyQCwyt5DMYvx6/PoTDpwsQMDzqJdwuH fn9vjsOGTOlygXsrMeD3NV7O0Fwj66PhlRzFZPFHiwPWPsKVyrmfQuBxOVqeRBT5FduS klVOwOFwAJHzFOvA0dHlTxUIQyUzzvnTj+pCbko4j8MGHdrUSNMAidP0t5lvFxCcv7te ATMg== X-Gm-Message-State: APjAAAXC/VBE7wuFXHC45L8EP2fbQouFPJ8EwPgR0Ri2GmAPzQiAv5AD CGXJIl/GQOLzsDbBlESzFl2p/A== X-Google-Smtp-Source: APXvYqygj73ABNv7vOyOOorsAJk5oGGfIsSa/ouC8yqhBl2cKmgH+hBRVUAQ4JHsBlgT4pb76Bt4fg== X-Received: by 2002:ac8:647:: with SMTP id e7mr9928642qth.78.1568135678393; Tue, 10 Sep 2019 10:14:38 -0700 (PDT) Received: from Thara-Work-Ubuntu.fios-router.home (pool-71-255-246-27.washdc.fios.verizon.net. [71.255.246.27]) by smtp.googlemail.com with ESMTPSA id g45sm3400713qtc.9.2019.09.10.10.14.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Sep 2019 10:14:37 -0700 (PDT) From: Thara Gopinath To: edubezval@gmail.com, rui.zhang@intel.com, ulf.hansson@linaro.org, daniel.lezcano@linaro.org, bjorn.andersson@linaro.org, robh+dt@kernel.org, agross@kernel.org Cc: amit.kucheria@verdurent.com, mark.rutland@arm.com, rjw@rjwysocki.net, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/5] Introduce Power domain based warming device driver Date: Tue, 10 Sep 2019 13:14:31 -0400 Message-Id: <1568135676-9328-1-git-send-email-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.1.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Certain resources modeled as a generic power domain in linux kernel can be used to warm up the SoC (mx power domain on sdm845) if the temperature falls below certain threshold. These power domains can be considered as thermal warming devices. (opposite of thermal cooling devices). In kernel, these warming devices can be modeled as a thermal cooling device. In fact, since linux kernel today has no instance of a resource modeled as a power domain acting as a thermal warming device, a generic power domain based thermal warming device driver that can be used pan-Socs is the approach taken in this patch series. Since thermal warming devices can be thought of as the mirror opposite of thermal cooling devices, this patch series re-uses thermal cooling device framework. To use these power domains as warming devices require further tweaks in the thermal framework which are out of scope of this patch series. The first patch in this series extends the genpd framework to export out the performance states of a power domain so that when a power domain is modeled as a cooling device, the number of possible states and current state of the cooling device can be retrieved from the genpd framework. The second patch implements the newly added genpd callback for Qualcomm RPMH power domain driver which hosts the mx power domain. The third patch describes the dt binding required for a generic power domain based warming device The fourth patch introduces the generic power domain warming device driver The fifth patch introduces the DT entreis for sdm845 to register mx power domain as a thermal warming device v1->v2: - Rename the patch series from "qcom: Model RPMH power domains as thermal cooling devices" to "Introduce Power domain based thermal warming devices" as it is more appropriate. - Introduce a new patch(patch 3) describing the dt-bindings for generic power domain warming device. - Patch specific changes mentioned in respective patches. Thara Gopinath (5): PM/Domains: Add support for retrieving genpd performance states information soc: qcom: rpmhpd: Introduce function to retrieve power domain performance state count dt-bindings: thermal: Add generic power domain warming device binding thermal: Add generic power domain warming device driver. arm64: dts: qcom: Add node for RPMH power domain warming device on sdm845. .../bindings/thermal/pwr-domain-warming.txt | 32 ++++ arch/arm64/boot/dts/qcom/sdm845.dtsi | 7 + drivers/base/power/domain.c | 37 +++++ drivers/soc/qcom/rpmhpd.c | 9 ++ drivers/thermal/Kconfig | 11 ++ drivers/thermal/Makefile | 2 + drivers/thermal/pwr_domain_warming.c | 174 +++++++++++++++++++++ include/linux/pm_domain.h | 13 ++ 8 files changed, 285 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt create mode 100644 drivers/thermal/pwr_domain_warming.c