From patchwork Mon Jan 28 16:55:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Quentin Perret X-Patchwork-Id: 1032037 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k4KO4Fao"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43pG3K51QSz9sRh for ; Tue, 29 Jan 2019 03:55:41 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=D5OZEwk0yVpWSxJfioau6rPiRQIcvZkbchq39rOHtes=; b=k4KO4Fao8nOzJf 1a85CAq1LN/ZWyheMbOWBoDN2J53AbuUG3Mw5d23QhIJWsWBqFjp4agPpJ+H9EsFCeNjQPr7BM5gD FKbK4HYX6sNPWIAHozcU7N2lpw97gfsK3OsoRQARTVIERZJkBylKcWphTsirER3TvYl1s1dqDAc1U r+q5sXMI6F7PZo1WZSAMvQwRYmQEH+0vJaNluMbTpce+IiQan0kvB8iWFK5jgt6acfZmd8DHN6Chu 8A5SCopBgKs4C8ZAvFOI4iT7thi1ndzdNJpI1qJdXfaAbh46oKNOFvsyr9g7vGhrYIyTOqSl8xoAK 9Hdjic0Y+p/JkF2K5Fpg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goAC7-0007uI-Vs; Mon, 28 Jan 2019 16:55:35 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goAC4-0007t5-PX for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 16:55:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6FDBBEBD; Mon, 28 Jan 2019 08:55:30 -0800 (PST) Received: from queper01-lin.cambridge.arm.com (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C16DC3F59C; Mon, 28 Jan 2019 08:55:27 -0800 (PST) From: Quentin Perret To: rjw@rjwysocki.net, viresh.kumar@linaro.org, sudeep.holla@arm.com, liviu.dudau@arm.com, lorenzo.pieralisi@arm.com, robh+dt@kernel.org, mark.rutland@arm.com, nm@ti.com, sboyd@kernel.org Subject: [PATCH 0/7] Register an Energy Model for Arm reference platforms Date: Mon, 28 Jan 2019 16:55:15 +0000 Message-Id: <20190128165522.31749-1-quentin.perret@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_085532_885400_1264F869 X-CRM114-Status: GOOD ( 12.04 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, quentin.perret@arm.com, mka@chromium.org, dietmar.eggemann@arm.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org The Energy Model (EM) framework feeds interested subsystems (the scheduler/EAS as of now) with power costs provided by drivers. Yet, no driver is actually doing that upstream yet. This series updates a set of CPUFreq drivers and DT files in order to register power costs in the EM framework for some of the Arm reference platforms for EAS: Hikey960, Juno and TC2. The series is split as follows: * Patch 01 introduces in PM_OPP a helper function which estimates the CPU power using the P=CV²f equation also used by IPA. It should be noted that this introduces duplicate code with IPA, which will eventually be fixed by migrating IPA to using PM_EM. The ideal plan would be to do so later, in a separate patch series. I would indeed prefer to keep the thermal and CPUFreq discussion separate at this stage, if deemed acceptable. * Patches 02-04 make use of that PM_OPP helper function from the following CPUFreq drivers: cpufreq-dt, scpi-cpufreq and arm_big_little. * Patch 05 modifies the SCMI cpufreq driver to pass the power costs obtained from firmware to PM_EM. * Patches 06-07 provide the dynamic-power-coefficient values for Juno and TC2. Thanks, Quentin Dietmar Eggemann (3): cpufreq: arm_big_little: Register an Energy Model arm64: dts: juno: Add cpu dynamic-power-coefficient information arm: dts: vexpress-v2p-ca15_a7: Add cpu dynamic-power-coefficient information Quentin Perret (4): PM / OPP: Introduce a power estimation helper cpufreq: dt: Register an Energy Model cpufreq: scpi: Register an Energy Model cpufreq: scmi: Register an Energy Model arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 5 ++ arch/arm64/boot/dts/arm/juno-r2.dts | 6 +++ arch/arm64/boot/dts/arm/juno.dts | 6 +++ drivers/cpufreq/arm_big_little.c | 10 ++++ drivers/cpufreq/cpufreq-dt.c | 7 ++- drivers/cpufreq/scmi-cpufreq.c | 36 ++++++++++++- drivers/cpufreq/scpi-cpufreq.c | 8 ++- drivers/opp/of.c | 60 ++++++++++++++++++++++ include/linux/pm_opp.h | 5 ++ 9 files changed, 140 insertions(+), 3 deletions(-) Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke