From patchwork Mon Dec 18 10:21:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 122205 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp2555354edb; Mon, 18 Dec 2017 02:22:09 -0800 (PST) X-Google-Smtp-Source: ACJfBos28df3DwEU2kj/szgWRJ9S5LcDVt3vs0XhH3t1eAu9iYKaycg47sExKs+M7ckz9GZD0Hie X-Received: by 10.84.214.2 with SMTP id h2mr22481402pli.142.1513592528893; Mon, 18 Dec 2017 02:22:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513592528; cv=none; d=google.com; s=arc-20160816; b=uzsGX5Alx4Ik6PZOQ9FAXnYVolho/e+OOOaARwJXv0uXAuzByVtB3Q6UMe5vYEeHfB BFuhDwTo14LPGrh9+bw3o7O4JDaQZ/a9kNN+krNcRegfOpzR+3aCT4Y/sFUGwL2F1sd3 CG1Evh7HD1n9/VLWFGTjckGzDdIAyLcpz8MlnazhQ6EzMvLFQVJ0UPD6F3pL66jmEsB6 KIr7EHXwWUOm5qYV5R09vClDOSXAth7WKA3sUESgbp9uM9J8rfZJAC2VLoEG14yRxPCh Ny2bFspzGyZnf1L6xLF1jQe532l8YKWMjaqJb30BDoqkAFCiEHq+A76uLAzywSMG9aIE N8dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vXpK/0iGg/zaJC5GqdUL39+CzDLfu+hK8FiJGYqCHLM=; b=EpyVOO/kTXS+8zkKNIR1DYcc7UsGSdhVSd3d/ck4GSXHcb6aDvpOLsUFX04KHGSBi0 Zc5kfpLEcb4tGa5Ct3q22udYVXgx8ANenOFlTZaJ4Pay5EzoJ/4E2aXaBI1e55Mg2Coj HCm6jppn6x727+OovsPWDDLAm/5VH1Pu7O+cIZ8RDyQDQ0szRXqnO39r24jheqau3pYv 85XTRFPUBiUGIkP9FIgmxkPf5UBZzGLA0Ctf9Ss2r4CKipyWxNOhSV9eQg8dBbalgjYx I+bYQVkXD8L0A/BJrgEfxhtEH4Q70OZHbpLy2F9KLDHgVbJGeemp2j6eGk2vuvCP6QmC 4ETQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bxebLnBh; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 y68si9276332pfd.104.2017.12.18.02.22.08; Mon, 18 Dec 2017 02:22:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bxebLnBh; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932764AbdLRKWH (ORCPT + 6 others); Mon, 18 Dec 2017 05:22:07 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:46889 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932677AbdLRKVm (ORCPT ); Mon, 18 Dec 2017 05:21:42 -0500 Received: by mail-pl0-f65.google.com with SMTP id i6so4546328plt.13 for ; Mon, 18 Dec 2017 02:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=WZ9ZCn+719Md2DGcTZ1Z1cnGabc+BanlbsR7bsSLCRQ=; b=bxebLnBh+NlJO8fPIuEDL9a1vhQ2il8I2uVCffBfrtehOGkKOghSOV/Plz0GDSLHu7 S5MYCblZDuQwv/Z5vr/1xR2vEYaobyrlnqE3TQBsV0KyIvwt8eSHGvEYPKJkpLfgXg8G U/T9EzwWNoWdYCI13XCz2I3kQxCjaI3HWc3gM= 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:in-reply-to :references:in-reply-to:references; bh=WZ9ZCn+719Md2DGcTZ1Z1cnGabc+BanlbsR7bsSLCRQ=; b=ruQz0UrI9p4S8CanlZb+b+zlY/mpXpiJVmEjFyIPR7smpNx1dbAj/Uo8Fcd5yWMZAb DlCI9N0iPOjd2Y15AwUzdtVCg1ldBLLna48vrgIryK514sAM/VoBW8wOtgjqjCwDHgyO N7n634nn9L/HOP4FEh8ou5bNHBaCDvQ08q0reNuumrJaXsh0t7H5isGosjK+Whqr1EDU yv4YP3QaZE5aiBEjMMjL26pGB4M6dMJRcAWAEpuyaLDfOdJUUSNkf3IY+TElilkjWp5g QbAbplvM/wdYjqGd2Qa/wwDpqb1yyZ6gfaAVq0g+CKLhPiyL+CckprKRXmVD/VNaOnhz fmQA== X-Gm-Message-State: AKGB3mL9cyvjp7xmoAx4s4YiJ7ikW/hDYrTKRLhePIwqZClVY796Btp2 Rlx8rj4LcGPxpMQRYKyvelF7/w== X-Received: by 10.84.160.226 with SMTP id v31mr17535535plg.9.1513592501546; Mon, 18 Dec 2017 02:21:41 -0800 (PST) Received: from localhost ([122.172.99.7]) by smtp.gmail.com with ESMTPSA id k197sm19778824pga.42.2017.12.18.02.21.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 02:21:41 -0800 (PST) From: Viresh Kumar To: ulf.hansson@linaro.org, Kevin Hilman , robh+dt@kernel.org, Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , rnayak@codeaurora.org, sudeep.holla@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V8 2/3] OPP: Introduce "required-opp" property Date: Mon, 18 Dec 2017 15:51:29 +0530 Message-Id: <6615035f294a64a4c17e5b44ac6690d1c2ac127c.1513591822.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Devices have inter-dependencies some times. For example a device that needs to run at 800 MHz, needs another device (e.g. Its power domain) to be configured at a particular operating performance point. This patch introduces a new property "required-opp" which can be present directly in a device's node (if it doesn't need to change its OPPs), or in device's OPP nodes. More details on the property can be seen in the binding itself. Signed-off-by: Viresh Kumar --- Documentation/devicetree/bindings/opp/opp.txt | 8 +++ .../devicetree/bindings/power/power_domain.txt | 59 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) -- 2.15.0.194.g9af6a3dea062 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index a3953a1bb1a1..4e4f30288c8b 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -159,6 +159,14 @@ properties. - status: Marks the node enabled/disabled. +- required-opp: This contains phandle to an OPP node in another device's OPP + table. It may contain an array of phandles, where each phandle points to an + OPP of a different device. It should not contain multiple phandles to the OPP + nodes in the same OPP table. This specifies the minimum required OPP of the + device(s), whose OPP's phandle is present in this property, for the + functioning of the current device at the current OPP (where this property is + present). + Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. / { diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt index 61549840ab3b..f824763b202e 100644 --- a/Documentation/devicetree/bindings/power/power_domain.txt +++ b/Documentation/devicetree/bindings/power/power_domain.txt @@ -126,4 +126,63 @@ The node above defines a typical PM domain consumer device, which is located inside a PM domain with index 0 of a power controller represented by a node with the label "power". +Optional properties: +- required-opp: This contains phandle to an OPP node in another device's OPP + table. It may contain an array of phandles, where each phandle points to an + OPP of a different device. It should not contain multiple phandles to the OPP + nodes in the same OPP table. This specifies the minimum required OPP of the + device(s), whose OPP's phandle is present in this property, for the + functioning of the current device at the current OPP (where this property is + present). + +Example: +- OPP table for domain provider that provides two domains. + + domain0_opp_table: opp_table0 { + compatible = "operating-points-v2"; + + domain0_opp_0: opp-1000000000 { + opp-hz = /bits/ 64 <1000000000>; + opp-microvolt = <975000 970000 985000>; + }; + domain0_opp_1: opp-1100000000 { + opp-hz = /bits/ 64 <1100000000>; + opp-microvolt = <1000000 980000 1010000>; + }; + }; + + domain1_opp_table: opp_table1 { + compatible = "operating-points-v2"; + + domain1_opp_0: opp-1200000000 { + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <975000 970000 985000>; + }; + domain1_opp_1: opp-1300000000 { + opp-hz = /bits/ 64 <1300000000>; + opp-microvolt = <1000000 980000 1010000>; + }; + }; + + parent: power-controller@12340000 { + compatible = "foo,power-controller"; + reg = <0x12340000 0x1000>; + #power-domain-cells = <1>; + operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>; + }; + + leaky-device0@12350000 { + compatible = "foo,i-leak-current"; + reg = <0x12350000 0x1000>; + power-domains = <&parent 0>; + required-opp = <&domain0_opp_0>; + }; + + leaky-device1@12350000 { + compatible = "foo,i-leak-current"; + reg = <0x12350000 0x1000>; + power-domains = <&parent 1>; + required-opp = <&domain1_opp_1>; + }; + [1]. Documentation/devicetree/bindings/power/domain-idle-state.txt