From patchwork Fri Mar 16 03:02:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huang lin X-Patchwork-Id: 10286239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7253760621 for ; Fri, 16 Mar 2018 03:08:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 665A828C8F for ; Fri, 16 Mar 2018 03:08:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58C5828C95; Fri, 16 Mar 2018 03:08:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F06DE28C8F for ; Fri, 16 Mar 2018 03:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QW+Q44+mdF7dBa0fa2irF6ztDxHbZoiSsRCH2b04G0Q=; b=RiFHAwXH/d2zEsKXgjlLAFCfG0 Im+Id8BQ1f17RGXomKjfUjHX3EV+OJvTDqYuHvC1K0+SYshMetmV3xsiMzt8Gd7+woZ6AdyWMVXin h7rMENB20YnVEcFnBg+hRIq48cjN4I75PXhRZkyeUV3ofYUYQjwjEYK7Ezz/Aiaz48Xn7YJ+UNJyE XYhSVVcopWRx5fORV2WY/+PLmS283qDMITDBg68GgQpr8pJnGm6ZJrCRFEl98E8aR3CIbaZfDEjYl NdDIDcufMPzTNONz5kZhdRxZh4JhQeE4ZramMCjpVVOvxXSYkykCe/++5gDsDFZWPt/wmRE+c4Uiw GcRqKZaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewfjL-0003Tq-Qr; Fri, 16 Mar 2018 03:08:31 +0000 Received: from mail-pg0-f65.google.com ([74.125.83.65]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewfdq-0006kA-I8 for linux-rockchip@lists.infradead.org; Fri, 16 Mar 2018 03:04:24 +0000 Received: by mail-pg0-f65.google.com with SMTP id g8so3574849pgv.7 for ; Thu, 15 Mar 2018 20:02:40 -0700 (PDT) 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; bh=SoEDup1nHyHQgmrpv6dW2ZdY0hmNVpuAYjCnnuRlpMM=; b=sLHGMYv8JPFaikI/cc1K68b82o/oh6FZ9t46P4AQHKGcVFy+i7TFfUSWDiwGkQIysN XjxPp8ElBeXhx/uhNtSks95syLbj5YvWehJqtWp+aECrM5WISF4Yl1G4QHCtLAp5CfZ5 y75pl5yH8CPc7hz5hpU4E2WuHW8OgBnmCbSXLrmTQQU+KwUpFlM1KbG4OCFCQgOvHmQ8 iaHgpfuZCLZ4O1YqXdJrAU9faO8ja0T0NKkiY73e+hQLbg5OKE0E/f1j5vwUG91MgX6d a0/BuicMQkoI8RGO9Yr8l7IXcy6LH2j2LMFoqB8VCKJzkiLcW9Ifhey3XTEtuK4Kmenb QOwg== X-Gm-Message-State: AElRT7E/fwryUdwfCVoPV9M/BkJPkxksW3aE7N+WMNo4zrN3ZQRaYySa BRY5rrQzKPcwoVMV1SvbNWs= X-Google-Smtp-Source: AG47ELvL3jHY0DS3u/IEW7uZBHOpaYfdAVwCfaaRuH4CoI2PHVhP1eYDRMFkE4d+9IO0xHRkd1rdkQ== X-Received: by 10.98.50.130 with SMTP id y124mr178362pfy.147.1521169359584; Thu, 15 Mar 2018 20:02:39 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id p71sm5920358pfl.89.2018.03.15.20.02.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Mar 2018 20:02:38 -0700 (PDT) From: Lin Huang To: heiko@sntech.de Subject: [PATCH v2 2/2] arm64: dts: rockchip: assign clock rate for some cpll child clock Date: Fri, 16 Mar 2018 11:02:28 +0800 Message-Id: <1521169348-8552-2-git-send-email-hl@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521169348-8552-1-git-send-email-hl@rock-chips.com> References: <1521169348-8552-1-git-send-email-hl@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180315_200251_367714_42B85DE4 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dbasehore@chromium.org, Lin Huang , shawn.lin@rock-chips.com, briannorris@chromium.org, linux-rockchip@lists.infradead.org, diander@chromium.org, linux-clk@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP These clocks do not assign default clock frequency, and use the default cru register value to get frequency, so if cpll increase frequency, these clocks also increase their frequency, that may exceed their signed off frequency. So assign default clock for them to avoid it. Change-Id: If79368aeda5c51dbf2a3b6659f17052a2ae4a401 Signed-off-by: Lin Huang --- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 8 +++++++- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi index 18f546f..84e367b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi @@ -588,7 +588,10 @@ <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>, <&cru PCLK_PERILP0>, <&cru ACLK_CCI>, <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>, - <&cru ACLK_VIO>; + <&cru ACLK_VIO>, + <&cru ACLK_GIC_PRE>, + <&cru PCLK_DDR>, + <&cru ACLK_HDCP>; assigned-clock-rates = <600000000>, <800000000>, <1000000000>, @@ -597,6 +600,9 @@ <100000000>, <100000000>, <50000000>, <800000000>, <100000000>, <50000000>, + <400000000>, + <200000000>, + <200000000>, <400000000>; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 4550c0f..b358533 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -315,6 +315,8 @@ clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>, <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>; clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + assigned-clocks = <&cru HCLK_SD>; + assigned-clock-rates = <200000000>; fifo-depth = <0x100>; power-domains = <&power RK3399_PD_SD>; resets = <&cru SRST_SDMMC>; @@ -466,8 +468,10 @@ clocks = <&cru SCLK_DP_CORE>, <&cru PCLK_DP_CTRL>, <&cru SCLK_SPDIF_REC_DPTX>, <&cru PCLK_VIO_GRF>; clock-names = "core-clk", "pclk", "spdif", "grf"; - phys = <&tcphy0_dp>, <&tcphy1_dp>; + assigned-clocks = <&cru SCLK_DP_CORE>, <&cru SCLK_SPDIF_REC_DPTX>; + assigned-clock-rates = <100000000>, <200000000>; power-domains = <&power RK3399_PD_HDCP>; + phys = <&tcphy0_dp>, <&tcphy1_dp>; resets = <&cru SRST_DPTX_SPDIF_REC>, <&cru SRST_P_UPHY0_DPTX>, <&cru SRST_P_UPHY0_APB>, <&cru SRST_DP_CORE>; reset-names = "spdif", "dptx", "apb", "core"; @@ -1323,7 +1327,10 @@ <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>, <&cru PCLK_PERILP0>, <&cru ACLK_CCI>, <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>, - <&cru ACLK_VIO>; + <&cru ACLK_VIO>, + <&cru ACLK_GIC_PRE>, + <&cru PCLK_DDR>, + <&cru ACLK_HDCP>; assigned-clock-rates = <594000000>, <800000000>, <1000000000>, @@ -1332,6 +1339,9 @@ <100000000>, <100000000>, <50000000>, <600000000>, <100000000>, <50000000>, + <400000000>, + <200000000>, + <200000000>, <400000000>; };