From patchwork Wed Mar 13 09:00:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 160212 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp14061729jad; Wed, 13 Mar 2019 02:00:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTXpJr3JmZfVMzedjFBpBYveyLpTIGpXAnmzryrazErmWkmRycGETRHv9XLzNi1FiWrAco X-Received: by 2002:aa7:9099:: with SMTP id i25mr43312216pfa.102.1552467617180; Wed, 13 Mar 2019 02:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552467617; cv=none; d=google.com; s=arc-20160816; b=MWpaNkWDtaDGp+xquT9Fd67Mjl+V6Q3gPEv6o5JXVoGhjTF6AtqxZ+pC+YdorHu6dg YBQjeVRfOx7oHw4z6gvOc7kVAllGI+QYYEDbXsRSazkmsKUJUzu/5VHqN+6/9uKD9F62 jOKd5kqOGvUCekV1rp9F1DbTvI9cRLQKqj3oMJn14Gby68zPjkRimor0K2cxTKiPGwW9 5RIKqAK/Tz/XVFmgY6d4Bv0UWCba/htQZISbHdNmF5rzRPzY9+gLo5cXXaPvRi819uF9 fJ+DXXp/4DYIk6ZsMp8KJi0FSOkKPWw44Nd9SJmU5/Qhex0xou766+s3n6auPDjlWI+o SdiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=BDWo2E/IxyzUQjpn5J9mS8eOFQRMRegBPNLZgP9rh94=; b=Bzk+HEhMlll523aWQ+TQcnyoKlEquw7dcTJGkH8Q0ULU28BEyoUHnjTDhGI/oPTWD/ hfG6uQPi+CQD1/hC1y7U0DEsQsbpjtdoClNXqd2PwO3mb9PDxdtbGPXzNmuKwEuvZwaO zBGhDc3o91JZc0cgYUbbricTczf2RVtGU3BI6JTB4PiZlUjBH28zbYYlyxm56brMbE8N Rqmgkvi1E2Gm2X7X0yjudoCG5NtSsPsO35Lrs1McUlGUw0tLUCrTurQilGXRB4EK/40t mUgl+6Bp5LXHIX1eukYeS4/oqFhOy2t7ixLtE/MdJmU7aFQnfPObZfj2K1+BOgaI5gwW J/0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vGpnAGmH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h34si10620702pld.358.2019.03.13.02.00.16; Wed, 13 Mar 2019 02:00:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vGpnAGmH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727306AbfCMJAP (ORCPT + 31 others); Wed, 13 Mar 2019 05:00:15 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:34242 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726839AbfCMJAP (ORCPT ); Wed, 13 Mar 2019 05:00:15 -0400 Received: by mail-lf1-f67.google.com with SMTP id y18so869144lfe.1 for ; Wed, 13 Mar 2019 02:00:14 -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:mime-version :content-transfer-encoding; bh=BDWo2E/IxyzUQjpn5J9mS8eOFQRMRegBPNLZgP9rh94=; b=vGpnAGmHg1gzSr7JgjNs/r2n8diM7N9D4IsBkP2WfK4MqemtpQRKY3oT2aNhqIrpTJ ep1V8dhjGdccoBo33QuN7mkN/r0yf8bthUzEc8eljxlqYxSzNCMfookuOyq35sxN2kDq A1YVx/ZFHentnRc7We3uc1BVbxewHNiMm+rQYhh78Gj5IKkj/vlVarcOtDQQgwmUSie/ +H0QFWPXAgFHPROY9bYJ8Bxf2HQHQaSupYP9fZzbD3AyICZyf6MesdSrPAv+1676xtrr hynyA5RzhfkHIJrymp+/m9qtYzvw29MnpdGjEDkjaWfjp9ZgpK0Gaw1NanUKG25CFhmh 4GUQ== 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:mime-version :content-transfer-encoding; bh=BDWo2E/IxyzUQjpn5J9mS8eOFQRMRegBPNLZgP9rh94=; b=Xb5DBhr5ijRfEtl4NwpeOlD2OulYcdjmM5+F6VBJF3NHq4X6T+XozvIk1ds6xq3RQ6 s9I0Q1RdFNMUUbYaOKfJk6ejopL8WVoq6J8VKUS7SqlN/YJMqugkjOvEtESpm1d2c2CT lbk3F5eU7nJmu6xOM0mMgJ+r9nr5m+ucOVzmPop/UOblJT0jnW454GZ3Vf1Qrh3E9OUm t24wGWGgBQQoj8pPcpZ8SSHGAvn6dZEbsxK5MtgtrIUaFGi7BKx1Ipc9L33IbUcosZXD lLx2TskiyDl4wBzFW3E0LZ6XtNIIsW2oDiDESkrmkXhCLNFH4QU/keZHyg9IPhETMgXk C6CQ== X-Gm-Message-State: APjAAAV4oNWD5Ic9/lRy36vovu+AIjImzVk2pd8x6BvwUJFSch36lMqL xyd90lfLtEkZDA0nldWEpjluKQ== X-Received: by 2002:a19:7914:: with SMTP id u20mr8050229lfc.41.1552467613357; Wed, 13 Mar 2019 02:00:13 -0700 (PDT) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id u15sm1701986lja.73.2019.03.13.02.00.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Mar 2019 02:00:12 -0700 (PDT) From: Georgi Djakov To: vireshk@kernel.org, sboyd@kernel.org, nm@ti.com, robh+dt@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net Cc: jcrouse@codeaurora.org, vincent.guittot@linaro.org, bjorn.andersson@linaro.org, amit.kucheria@linaro.org, seansw@qti.qualcomm.com, daidavid1@codeaurora.org, evgreen@chromium.org, sibis@codeaurora.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH 0/4] Introduce OPP bandwidth bindings Date: Wed, 13 Mar 2019 11:00:06 +0200 Message-Id: <20190313090010.20534-1-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here is a proposal to extend the OPP bindings with bandwidth based on a previous discussion [1]. Every functional block on a SoC can contribute to the system power efficiency by expressing its own bandwidth needs (to memory or other SoC modules). This will allow the system to save power when high throughput is not required (and also provide maximum throughput when needed). There are at least three ways for a device to determine its bandwidth needs: 1. The device can dynamically calculate the needed bandwidth based on some known variable. For example: UART (baud rate), I2C (fast mode, high-speed mode, etc), USB (specification version, data transfer type), SDHC (SD standard, clock rate, bus-width), Video Encoder/Decoder (video format, resolution, frame-rate) 2. There is a hardware specific value. For example: hardware specific constant value (e.g. for PRNG) or use-case specific value that is hard-coded. 3. Predefined SoC/board specific bandwidth values. For example: CPU or GPU bandwidth is related to the current core frequency and both bandwidth and frequency are scaled together. This patchset is trying to address point 3 above by extending the OPP bindings to support predefined SoC/board bandwidth values and adds support in cpufreq-dt to scale the interconnect between the CPU and the DDR together with frequency and voltage. [1] https://patchwork.kernel.org/patch/10577315/ Georgi Djakov (4): dt-bindings: opp: Introduce opp-bw-MBs bindings OPP: Add support for parsing the interconnect bandwidth OPP: Update the bandwidth on OPP frequency changes cpufreq: dt: Add support for interconnect bandwidth scaling Documentation/devicetree/bindings/opp/opp.txt | 45 ++++++++++++ drivers/cpufreq/cpufreq-dt.c | 27 ++++++- drivers/opp/core.c | 71 +++++++++++++++++++ drivers/opp/of.c | 44 ++++++++++++ drivers/opp/opp.h | 6 ++ include/linux/pm_opp.h | 14 ++++ 6 files changed, 206 insertions(+), 1 deletion(-)