From patchwork Wed Nov 11 02:40:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 56365 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1116482lbb; Tue, 10 Nov 2015 18:41:26 -0800 (PST) X-Received: by 10.66.122.105 with SMTP id lr9mr1235653pab.8.1447209686037; Tue, 10 Nov 2015 18:41:26 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ia2si9175668pbb.85.2015.11.10.18.41.25; Tue, 10 Nov 2015 18:41:25 -0800 (PST) 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; 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; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752280AbbKKClV (ORCPT + 28 others); Tue, 10 Nov 2015 21:41:21 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34941 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752219AbbKKClR (ORCPT ); Tue, 10 Nov 2015 21:41:17 -0500 Received: by pasz6 with SMTP id z6so16925634pas.2 for ; Tue, 10 Nov 2015 18:41:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=8K22vH9F1Kq0427ZHPK2/KsHmoQiET8GqxzspLZqGHE=; b=or5Qb+D0gcdncDqqMwM8oq9y3mdkR8+g187gmJiajc91Bhnu5XjM1J/PU36mOilJk0 2Ca4gapGuChoc3vYgYLpMqjzXZhXEKLhSOhQgr7/InGWZJr+SW6hJVnAIsd3B16Q0nZi MteHz5F1MOuScYO07FUYTKFSzk3plujAHnZZRTD0sI6RrEtTUDo1VRYeR3T6jCoXDSQQ XUMy8bx4i7+B6SMmgTnDQIq4rzaz886oTqO1+4trxE+aw9FjTAbahhRtslINX6IPOM9W /Xfa48/KpTCOsk4qwbo71IL/dMaXlz35+O0YM2HctPw2sHpbDFQM8nz0J7EyeZD3K3fj blgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=8K22vH9F1Kq0427ZHPK2/KsHmoQiET8GqxzspLZqGHE=; b=MHpveSz7mItAKafuPqSxMM1agrcQE3Rs3eL51aVtoU8Mzw+/WMySWS8hjbSPhhTczn 1aPWgr2EvT9kNp4khdISE6MSJD4hRmqPNQF2J9Kx0wo8VR5zcmrNSASZ26n3b4C0YKFA fzRAXxrWl/sfIEC6ITa1mdajnY6Fa3ODF6wYUR7qeN/9PYZsUkscUq+evv4iYO73yoGj hlon5UW5K2TETESynMY729GzKMkvDdVGxZNBClxlT4FvkzgoSUQzsHkAIyQPPxmLn4Da UPrBFqJVz2kzFh2rGhNfyKdtrobq4ZLBisdg1z1roRPm++VtbXki3iC3xz/DzslJuAS9 tp6Q== X-Gm-Message-State: ALoCoQnuz7CxmFK4lTwwJyGstNjNpC8aJmQsqJWEX9t78ItwrXGXtTmKM73gpRXXT2fx+16ChmSx X-Received: by 10.68.129.40 with SMTP id nt8mr10825150pbb.118.1447209676659; Tue, 10 Nov 2015 18:41:16 -0800 (PST) Received: from localhost ([122.167.29.19]) by smtp.gmail.com with ESMTPSA id by6sm6683432pab.25.2015.11.10.18.41.15 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 10 Nov 2015 18:41:16 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , robh+dt@kernel.org, sboyd@codeaurora.org, lee.jones@linaro.org Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, mark.rutland@arm.com, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, nm@ti.com, devicetree@vger.kernel.org, b.zolnierkie@samsung.com, m.szyprowski@samsung.com, Viresh Kumar , linux-kernel@vger.kernel.org (open list), "Rafael J. Wysocki" Subject: [PATCH V3 2/5] PM / OPP: Add {opp-microvolt|opp-microamp}- binding Date: Wed, 11 Nov 2015 08:10:55 +0530 Message-Id: <1f1d9dd73ff629504f3c730e4100dba800c6132a.1447209519.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.6.2.198.g614a2ac In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Depending on the version of hardware or its properties, which are only known at runtime, various properties of the OPP can change. For example, an OPP with frequency 1.2 GHz, may have different voltage/current requirements based on the version of the hardware it is running on. In order to not replicate the same OPP tables for varying values of all such fields, this commit introduces the concept of opp-property-. The can be chosen by the platform at runtime, and OPPs will be initialized depending on that name string. Currently support is extended for the following properties: - opp-microvolt- - opp-microamp- If the name string isn't provided by the platform, or if it is provided but doesn't match the properties present in the OPP node, we will fall back to the original properties without the - string, if they are available. Reviewed-by: Stephen Boyd Signed-off-by: Viresh Kumar --- Documentation/devicetree/bindings/opp/opp.txt | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) -- 2.6.2.198.g614a2ac -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index d072fa0ffbd4..a3e7f0d5e1fb 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -100,6 +100,14 @@ properties. Entries for multiple regulators must be present in the same order as regulators are specified in device's DT node. +- opp-microvolt-: Named opp-microvolt property. This is exactly similar to + the above opp-microvolt property, but allows multiple voltage ranges to be + provided for the same OPP. At runtime, the platform can pick a and + matching opp-microvolt- property will be enabled for all OPPs. If the + platform doesn't pick a specific or the doesn't match with any + opp-microvolt- properties, then opp-microvolt property shall be used, if + present. + - opp-microamp: The maximum current drawn by the device in microamperes considering system specific parameters (such as transients, process, aging, maximum operating temperature range etc.) as necessary. This may be used to @@ -112,6 +120,9 @@ properties. for few regulators, then this should be marked as zero for them. If it isn't required for any regulator, then this property need not be present. +- opp-microamp-: Named opp-microamp property. Similar to + opp-microvolt- property, but for microamp instead. + - clock-latency-ns: Specifies the maximum possible transition latency (in nanoseconds) for switching to this OPP from any other OPP. @@ -528,3 +539,39 @@ Example 6: opp-supported-hw }; }; }; + +Example 7: opp-microvolt-, opp-microamp-: +(example: device with two possible microvolt ranges: slow and fast) + +/ { + cpus { + cpu@0 { + compatible = "arm,cortex-a7"; + ... + + operating-points-v2 = <&cpu0_opp_table>; + }; + }; + + cpu0_opp_table: opp_table0 { + compatible = "operating-points-v2"; + opp-shared; + + opp00 { + opp-hz = /bits/ 64 <1000000000>; + opp-microvolt-slow = <900000 915000 925000>; + opp-microvolt-fast = <970000 975000 985000>; + opp-microamp-slow = <70000>; + opp-microamp-fast = <71000>; + }; + + opp01 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt-slow = <900000 915000 925000>, /* Supply vcc0 */ + <910000 925000 935000>; /* Supply vcc1 */ + opp-microvolt-fast = <970000 975000 985000>, /* Supply vcc0 */ + <960000 965000 975000>; /* Supply vcc1 */ + opp-microamp = <70000>; /* Will be used for both slow/fast */ + }; + }; +};