Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755201AbbHYH0R (ORCPT ); Tue, 25 Aug 2015 03:26:17 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:34138 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754217AbbHYH0M (ORCPT ); Tue, 25 Aug 2015 03:26:12 -0400 From: Caesar Wang To: heiko@sntech.de, khilman@linaro.org Cc: ulf.hansson@linaro.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, dianders@chromium.org, tomasz.figa@gmail.com, dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org, galak@codeaurora.org, linux@arm.linux.org.uk, robh+dt@kernel.org, arnd@arndb.de, linus.walleij@linaro.org, ijc+devicetree@hellion.org.uk, devicetree@vger.kernel.org, wxt@rock-chips.com, "jinkun.hong" Subject: [RESEND PATCH v16 4/4] ARM: dts: add the support power-domain node on RK3288 SoCs Date: Tue, 25 Aug 2015 15:24:46 +0800 Message-Id: <1440487486-6154-5-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440487486-6154-1-git-send-email-wxt@rock-chips.com> References: <1440487486-6154-1-git-send-email-wxt@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4480 Lines: 156 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. Someone wish was to get the clocks by reading the clocks from the device nodes, We can do that but we can solve the above issues. Anyway, the best ideas we can fix it in the future SoCs. Signed-off-by: jinkun.hong Signed-off-by: Caesar Wang --- 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 | 60 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 22316d0..161931d 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" / { @@ -590,8 +591,65 @@ }; 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_HDMI_CEC>, + <&cru SCLK_HDMI_HDCP>, + <&cru SCLK_ISP_JPE>, + <&cru SCLK_ISP>, + <&cru SCLK_RGA>; + }; + + pd_video { + reg = ; + clocks = <&cru ACLK_VCODEC>, + <&cru HCLK_VCODEC>; + }; + }; }; sgrf: syscon@ff740000 { -- 1.9.1 -- 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/