From patchwork Mon Nov 17 09:50:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Caesar X-Patchwork-Id: 5317041 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C2BBDC11AC for ; Mon, 17 Nov 2014 09:52:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC0B22012F for ; Mon, 17 Nov 2014 09:52:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F315F20123 for ; Mon, 17 Nov 2014 09:52:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XqIzJ-00033B-1g; Mon, 17 Nov 2014 09:52:49 +0000 Received: from regular1.263xmail.com ([211.150.99.130]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XqIxy-0001Bx-Kq; Mon, 17 Nov 2014 09:51:27 +0000 Received: from wxt?rock-chips.com (unknown [192.168.167.229]) by regular1.263xmail.com (Postfix) with SMTP id 4CAFD5BFE; Mon, 17 Nov 2014 17:51:00 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 5B15F465; Mon, 17 Nov 2014 17:50:55 +0800 (CST) X-RL-SENDER: wxt@rock-chips.com X-FST-TO: linus.walleij@linaro.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: wxt@rock-chips.com X-UNIQUE-TAG: <6af442b77bcfb24f386afd6ec94face1> X-ATTACHMENT-NUM: 0 X-SENDER: wxt@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 12770NUEJYJ; Mon, 17 Nov 2014 17:50:58 +0800 (CST) From: Caesar Wang To: linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Russell King Subject: [PATCH v12 1/3] dt-bindings: add document of Rockchip power domain Date: Mon, 17 Nov 2014 17:50:39 +0800 Message-Id: <1416217842-4716-2-git-send-email-caesar.wang@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416217842-4716-1-git-send-email-caesar.wang@rock-chips.com> References: <1416217842-4716-1-git-send-email-caesar.wang@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141117_015127_210145_FCE44757 X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: Mark Rutland , Ulf Hansson , Randy Dunlap , linux-doc@vger.kernel.org, djkurtz@chromium.org, dianders@chromium.org, caesar.wang@rock-chips.com, xxm@rock-chips.com, chris.zhong@rock-chips.com, linux-rockchip@lists.infradead.org, Grant Likely , Jack Dai , devicetree@vger.kernel.org, chm@rock-chips.com, Pawel Moll , Ian Campbell , "jinkun.hong" , Rob Herring , Dmitry Torokhov , linux-kernel@vger.kernel.org, fzf@rock-chips.com, Kumar Gala , cf@rock-chips.com X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This add the necessary binding documentation for the power domain found on Rockchip Socs. Signed-off-by: Jack Dai Signed-off-by: jinkun.hong Signed-off-by: Caesar Wang --- Changes in v12: None Changes in v11: None Changes in v10: None Changes in v9: - add document decription Changes in v8: - document go back to v2 Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: - DT structure has changed Changes in v2: - move clocks to "optional" .../bindings/arm/rockchip/power_domain.txt | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/rockchip/power_domain.txt diff --git a/Documentation/devicetree/bindings/arm/rockchip/power_domain.txt b/Documentation/devicetree/bindings/arm/rockchip/power_domain.txt new file mode 100644 index 0000000..3e74e6d --- /dev/null +++ b/Documentation/devicetree/bindings/arm/rockchip/power_domain.txt @@ -0,0 +1,48 @@ +* Rockchip Power Domains + +Rockchip processors include support for multiple power domains which can be +powered up/down by software based on different application scenes to save power. + +Required properties for power domain controller: +- compatible: should be one of the following. + * rockchip,rk3288-power-controller - for rk3288 type power domain. +- #power-domain-cells: Number of cells in a power-domain specifier. + should be 1. +- rockchip,pmu: phandle referencing a syscon providing the pmu registers +- #address-cells: should be 1. +- #size-cells: should be 0. + +Required properties for power domain sub nodes: +- reg: index of the power domain, should use macros in: + * include/dt-bindings/power-domain/rk3288.h - for rk3288 type power domain. +- clocks (optional): phandles to clocks which need to be enabled while power domain + switches state. + +Example: + + power: power-controller { + compatible = "rockchip,rk3288-power-controller"; + #power-domain-cells = <1>; + rockchip,pmu = <&pmu>; + #address-cells = <1>; + #size-cells = <0>; + + pd_gpu { + reg = ; + clocks = <&cru ACLK_GPU>; + }; + }; + +Node of a device using power domains must have a power-domains property, +containing a phandle to the power device node and an index specifying which +power domain to use. +The index should use macros in: + * include/dt-bindings/power-domain/rk3288.h - for rk3288 type power domain. + +Example of the node using power domain: + + node { + /* ... */ + power-domains = <&power RK3288_PD_GPU>; + /* ... */ + };