From patchwork Wed Sep 2 08:59:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 7110031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 50F349F46A for ; Wed, 2 Sep 2015 09:04:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50BC920666 for ; Wed, 2 Sep 2015 09:04:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 541332065A for ; Wed, 2 Sep 2015 09:04:07 +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 1ZX3vt-00080t-08; Wed, 02 Sep 2015 09:02:17 +0000 Received: from mail-yk0-f175.google.com ([209.85.160.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZX3vn-0007cd-Ez; Wed, 02 Sep 2015 09:02:12 +0000 Received: by ykdg206 with SMTP id g206so3123419ykd.1; Wed, 02 Sep 2015 02:01:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jTH1JvO2EOaCG4fB4Dt/bp21zS2mVc6X4JXbV16BUrI=; b=hyCh/Snf7Qb+IOzGZNPE05yRdls3t53IMOec1WgGoEuFFDGqb9jHBczbc2nAV5MiRF 5Z4CML/P/4AqAYR0unyOWadjH6yNYOkUy9b96p6vXWXgk9LQXNwaWYZ/X5KWgXdlo9gU tLZxEzswNm72faFNd465dimCyZY2GAJ11SSfVYl0tFG6VQgroSHucI8V3/HbZatdJ3n3 uheS1bF2kdVV81NFAa5KdsfuXp4X1Cd/Ct6Kd5l6irUUQYXQOQGgLZ1TvbdsDeg6Bb3I 7aVc/HNqtJBKHprQ5EHC6e+N2rSVIn+aXaBbguih9QjcywgG7muCzJsAdGce0lM9uAN0 oweg== X-Received: by 10.170.161.85 with SMTP id c82mr2500608ykd.13.1441184510711; Wed, 02 Sep 2015 02:01:50 -0700 (PDT) Received: from localhost.localdomain ([173.239.41.18]) by smtp.gmail.com with ESMTPSA id g197sm20208259ywe.4.2015.09.02.02.01.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Sep 2015 02:01:49 -0700 (PDT) From: Caesar Wang To: heiko@sntech.de, khilman@linaro.org Subject: [PATCH v17 4/4] ARM: dts: add the support power-domain node on RK3288 SoCs Date: Wed, 2 Sep 2015 16:59:40 +0800 Message-Id: <1441184380-13827-5-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441184380-13827-1-git-send-email-wxt@rock-chips.com> References: <1441184380-13827-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150902_020211_599739_9DC02F30 X-CRM114-Status: GOOD ( 16.23 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, ulf.hansson@linaro.org, linux@arm.linux.org.uk, arnd@arndb.de, ijc+devicetree@hellion.org.uk, "jinkun.hong" , linus.walleij@linaro.org, dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org, dianders@chromium.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, galak@codeaurora.org, tomasz.figa@gmail.com, mturquette@baylibre.com, linux-arm-kernel@lists.infradead.org, wxt@rock-chips.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 We can add more domains node in the future. This patch add the needed clocks into power-controller. As the discuess about all the device clocks being listed in the power-domains itself. There are several reasons as follows: Firstly, the clocks need be turned off to save power when the system enter the suspend state. So we need to enumerate the clocks in the dts. In order to power domain can turn on and off. Secondly, the reset-circuit should reset be synchronous on RK3288, then sync revoked. So we need to enable clocks of all devices. In other words, we have to enable the clocks before you operate them if all the device clocks are included in someone domians. Thirdly, as the chip designs for PM hardhare. we need turn on the noc clocks, if we are operating the "pd_vio" domain to enter the idle status. The device's clock be included in domains that needed turn on if do that. The clocks in the dts are needed to enable before you want to happy work. At the moment, This patch is very good work for PM hardware. Also, we can add it in the future if we have some hidden clocks. Signed-off-by: jinkun.hong Signed-off-by: Caesar Wang Reviewed-by: Michael Turquette --- Changes in v17: - remove clocks of the HDMI ctrl. - update the description. - add Reviewed-by: Michale. Changes in v16: - Manually copy the problem in patch v15. - rebase the description. Changes in v15: - As Tomasz remarked previously the dts should represent the hardware and the power-domains are part of the pmu. Changes in v14: - Remove essential clocks from rk3288 PD_VIO domain, Some clocks are essential for the system health and should not be turned down. However there is no owner for them so if they listed as belonging to power domain we'll try toggling them up and down during power domain transition. As a result we either fail to suspend or resume the system. Changes in v13: None Changes in v12: None Changes in v11: None Changes in v10: - fix missing the #include . - remove the notes. Changes in v9: - add decription for power-doamin node. Changes in v8: - DTS go back to v2. Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: - Decomposition power-controller, changed to multiple controller (gpu-power-controller, hevc-power-controller). Changes in v2: - make pd_vio clocks all one entry per line and alphabetize. - power: power-controller move back to pinctrl: pinctrl. arch/arm/boot/dts/rk3288.dtsi | 58 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 906e938..4ce3099 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -44,6 +44,7 @@ #include #include #include +#include #include "skeleton.dtsi" / { @@ -613,8 +614,63 @@ }; pmu: power-management@ff730000 { - compatible = "rockchip,rk3288-pmu", "syscon"; + compatible = "rockchip,rk3288-pmu", "syscon", "simple-mfd"; reg = <0xff730000 0x100>; + + power: power-controller { + compatible = "rockchip,rk3288-power-controller"; + #power-domain-cells = <1>; + #address-cells = <1>; + #size-cells = <0>; + + pd_gpu { + reg = ; + clocks = <&cru ACLK_GPU>; + }; + + pd_hevc { + reg = ; + clocks = <&cru ACLK_HEVC>, + <&cru SCLK_HEVC_CABAC>, + <&cru SCLK_HEVC_CORE>, + <&cru HCLK_HEVC>; + }; + + pd_vio { + reg = ; + clocks = <&cru ACLK_IEP>, + <&cru ACLK_ISP>, + <&cru ACLK_RGA>, + <&cru ACLK_VIP>, + <&cru ACLK_VOP0>, + <&cru ACLK_VOP1>, + <&cru DCLK_VOP0>, + <&cru DCLK_VOP1>, + <&cru HCLK_IEP>, + <&cru HCLK_ISP>, + <&cru HCLK_RGA>, + <&cru HCLK_VIP>, + <&cru HCLK_VOP0>, + <&cru HCLK_VOP1>, + <&cru PCLK_EDP_CTRL>, + <&cru PCLK_HDMI_CTRL>, + <&cru PCLK_LVDS_PHY>, + <&cru PCLK_MIPI_CSI>, + <&cru PCLK_MIPI_DSI0>, + <&cru PCLK_MIPI_DSI1>, + <&cru SCLK_EDP_24M>, + <&cru SCLK_EDP>, + <&cru SCLK_ISP_JPE>, + <&cru SCLK_ISP>, + <&cru SCLK_RGA>; + }; + + pd_video { + reg = ; + clocks = <&cru ACLK_VCODEC>, + <&cru HCLK_VCODEC>; + }; + }; }; sgrf: syscon@ff740000 {