From patchwork Wed Apr 26 10:57:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 98239 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp261448qgf; Wed, 26 Apr 2017 03:58:06 -0700 (PDT) X-Received: by 10.84.194.37 with SMTP id g34mr11319991pld.182.1493204286242; Wed, 26 Apr 2017 03:58:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w28si25058184pfk.227.2017.04.26.03.58.05; Wed, 26 Apr 2017 03:58:06 -0700 (PDT) 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; 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 S2998837AbdDZK6C (ORCPT + 7 others); Wed, 26 Apr 2017 06:58:02 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:35533 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2998886AbdDZK5b (ORCPT ); Wed, 26 Apr 2017 06:57:31 -0400 Received: by mail-pf0-f172.google.com with SMTP id v14so36979589pfd.2 for ; Wed, 26 Apr 2017 03:57:31 -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:in-reply-to:references :in-reply-to:references; bh=M9xboe2gk3K0vC/KLtsDxjRIgZFexrq3cJ7j/l2m6wY=; b=RhKV6rV0LrnMAUxqJUcKBVXOarc9WP9dHAHkERyiH7kLza2B0F65yLacVXyp8Mo2rV s8oIUdOyaG6cMvjHf6PnD1GIuf3ECjJKj81Q/wqv7V2hVVSC0fouTeMM7EgQpZ5Frow3 guBZJvzqsZRGEV5lKNKrtGJJmtFjCNhM/MM10= 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=M9xboe2gk3K0vC/KLtsDxjRIgZFexrq3cJ7j/l2m6wY=; b=AyaAhCkLBhLhggYytc8kEmxCaKKWpiOHRRojapjyPuDxC3SmM4skykspcsT6X/nOQs /uYXUdeyKpD+3D7m734m7cVUM4BfSFvfo5VylNha29XDQh4xl2Bqj8y/WUA72XHMXSHo YyhySYUhGl3nG0tJoT8UGH+spwp/S7oEB4IAyUbHbEtt/Q+CMigcpS68sd9YcHz8gU1h 3205unkTVNdU889KMG6hxNTUrlJf53/9hLjjYzwZCLen6btgnwQhgF3Y9cq6AZWelWbX 6ic44SKVUCHWqVjEUs74nvPR3Pb4dL0Vfto+1Ruhr65PhW4QX1t2WtWir1sJ91J70yKt 3FgA== X-Gm-Message-State: AN3rC/7atWPVdLNaDNO1POsBYgnI0/fmPqVZjsS/VK3Uel1+PX5tybLx kRDou5PIbqXjDmgx X-Received: by 10.99.56.90 with SMTP id h26mr31661157pgn.43.1493204250250; Wed, 26 Apr 2017 03:57:30 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id b8sm41999855pgn.51.2017.04.26.03.57.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Apr 2017 03:57:29 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , ulf.hansson@linaro.org, Kevin Hilman Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Stephen Boyd , Nishanth Menon , robh+dt@kernel.org, lina.iyer@linaro.org, rnayak@codeaurora.org, sudeep.holla@arm.com, Viresh Kumar , devicetree@vger.kernel.org Subject: [PATCH V6 2/9] PM / Domains: Allow OPP table to be used for power-domains Date: Wed, 26 Apr 2017 16:27:06 +0530 Message-Id: X-Mailer: git-send-email 2.12.0.432.g71c3a4f4ba37 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 Update the power-domain bindings to allow "operating-points-v2" to be present within the power-domain's provider node. Also allow consumer devices that don't use OPP tables, to specify the parent power-domain's OPP node in their "power-domain-opp" property. Also note that the "operating-points-v2" property is extended to support an array for the power domain providers. Signed-off-by: Viresh Kumar --- .../devicetree/bindings/power/power_domain.txt | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) -- 2.12.0.432.g71c3a4f4ba37 -- 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 diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt index 14bd9e945ff6..730af0afc09a 100644 --- a/Documentation/devicetree/bindings/power/power_domain.txt +++ b/Documentation/devicetree/bindings/power/power_domain.txt @@ -40,6 +40,10 @@ phandle arguments (so called PM domain specifiers) of length specified by the domain's idle states. In the absence of this property, the domain would be considered as capable of being powered-on or powered-off. +- operating-points-v2 : Phandles to the OPP tables for a power domain provider. + If the provider provides a single power domain, then this shall contain a + single phandle. Refer to ../opp/opp.txt for more information. + Example: power: power-controller@12340000 { @@ -120,4 +124,106 @@ 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: +- power-domain-opp: Phandle to the OPP node of the parent power-domain. The + parent power-domain should be configured to the OPP whose node is pointed by + the phandle, in order to use the device that contains this property. + + +Example: +- Device with parent power domain with two active states represented by OPP + table. + + domain_opp_table: opp_table { + compatible = "operating-points-v2"; + + /* + * NOTE: Actual frequency is managed by firmware and is hidden + * from HLOS, so we simply use index in the opp-hz field to + * select the OPP. + */ + domain_opp_1: opp-1 { + opp-hz = /bits/ 64 <1>; + opp-microvolt = <975000 970000 985000>; + }; + domain_opp_2: opp-2 { + opp-hz = /bits/ 64 <2>; + opp-microvolt = <1075000 1000000 1085000>; + }; + }; + + + parent: power-controller@12340000 { + compatible = "foo,power-controller"; + reg = <0x12340000 0x1000>; + #power-domain-cells = <0>; + operating-points-v2 = <&domain_opp_table>; + }; + + leaky-device@12350000 { + compatible = "foo,i-leak-current"; + reg = <0x12350000 0x1000>; + power-domains = <&parent>; + power-domain-opp = <&domain_opp_2>; + }; + +- OPP table for domain provider that provides two domains. + + domain0_opp_table: opp_table0 { + compatible = "operating-points-v2"; + + /* + * NOTE: Actual frequency is managed by firmware and is hidden + * from HLOS, so we simply use index in the opp-hz field to + * select the OPP. + */ + domain0_opp_1: opp-1 { + opp-hz = /bits/ 64 <1>; + opp-microvolt = <975000 970000 985000>; + }; + domain0_opp_2: opp-2 { + opp-hz = /bits/ 64 <2>; + opp-microvolt = <1075000 1000000 1085000>; + }; + }; + + domain1_opp_table: opp_table1 { + compatible = "operating-points-v2"; + + /* + * NOTE: Actual frequency is managed by firmware and is hidden + * from HLOS, so we simply use index in the opp-hz field to + * select the OPP. + */ + domain1_opp_1: opp-1 { + opp-hz = /bits/ 64 <1>; + opp-microvolt = <975000 970000 985000>; + }; + domain1_opp_2: opp-2 { + opp-hz = /bits/ 64 <2>; + opp-microvolt = <1075000 1000000 1085000>; + }; + }; + + 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>; + power-domain-opp = <&domain0_opp_2>; + }; + + leaky-device1@12350000 { + compatible = "foo,i-leak-current"; + reg = <0x12350000 0x1000>; + power-domains = <&parent 1>; + power-domain-opp = <&domain1_opp_2>; + }; + [1]. Documentation/devicetree/bindings/power/domain-idle-state.txt