From patchwork Wed Oct 28 14:08:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 11862793 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9300BC388F7 for ; Wed, 28 Oct 2020 14:11:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1243924726 for ; Wed, 28 Oct 2020 14:11:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mIUeA9jp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1243924726 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=OOaRY1zbjkuXWcas2HWiqQ+SSjmVEXM6YxYz+6yuKcU=; b=mIUeA9jpsYhz3rE/HP3BuuStfI r9zoSTmGQRzVs+bLhvxtsc6QxIQ5EVBhD5qOXLX10UCiPY8cz7NP43UFnrO7xTiXaK5Wz9DQsk9RM evf+xWAKilwi8tXqhlyhvH8xbZI4i6WNMy7XWJNWZcAJ8nSS59STXY3xzLiptU7Cict5Iw53YTfxf i/kfGrD0MiaanC6fpHmUE853J+S1F85g1ICs8IHvZh7XIKa9KjLUrTK4YczdQd9L/zGn+Dy6eDCAx pmjjqqJpzOG0vh8a+S0Ko8uXGoQyBxrA4EO72utLnCJDNW+MW7AqexSgKE6C1lzU/YFa2T//r5N8Q lQ4vGyAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXm8k-00083m-UW; Wed, 28 Oct 2020 14:09:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXm8e-00081l-PA for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2020 14:09:21 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A806D1766; Wed, 28 Oct 2020 07:09:16 -0700 (PDT) Received: from e123648.arm.com (unknown [10.57.12.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BBD423F66E; Wed, 28 Oct 2020 07:09:13 -0700 (PDT) From: Lukasz Luba To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, vireshk@kernel.org, robh+dt@kernel.org Subject: [PATCH 0/4] Add sustainable OPP concept Date: Wed, 28 Oct 2020 14:08:43 +0000 Message-Id: <20201028140847.1018-1-lukasz.luba@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201028_100920_873985_F460BDE6 X-CRM114-Status: GOOD ( 12.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nm@ti.com, rafael@kernel.org, sboyd@kernel.org, daniel.lezcano@linaro.org, sudeep.holla@arm.com, Dietmar.Eggemann@arm.com, lukasz.luba@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, This patch set introduces a concept of sustainable OPP, which then can be used by kernel frameworks or governors for estimating system sustainable system state. This kind of estimation is done e.g. in thermal governor Intelligent Power Allocation (IPA), which calculates sustainable power of the whole system and then derives some coefficients for internal algorithm. The patch set introduces a new DT bindings 'opp-sustainable', with parsing code. It also adds a function (in patch 3/4) which allows device drivers to set directly the sustainable OPP. This is helpful when the device drivers populate the OPP table by themself (example in patch 4/4). The patch set should apply on top of next-20201028. Regards, Lukasz Luba Lukasz Luba (4): dt-bindings: opp: Introduce opp-sustainable bindings OPP: Add support for parsing the 'opp-sustainable' property OPP: Add dev_pm_opp_set_sustainable_opp_freq() firmware: arm_scmi/perf: Mark sustainable OPP Documentation/devicetree/bindings/opp/opp.txt | 4 + drivers/firmware/arm_scmi/perf.c | 10 +++ drivers/opp/core.c | 75 +++++++++++++++++++ drivers/opp/of.c | 14 ++++ drivers/opp/opp.h | 3 + include/linux/pm_opp.h | 14 ++++ 6 files changed, 120 insertions(+)