From patchwork Tue Mar 20 02:06:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huang lin X-Patchwork-Id: 10295917 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 55846602BD for ; Tue, 20 Mar 2018 02:06:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45386287A6 for ; Tue, 20 Mar 2018 02:06:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39E7B29590; Tue, 20 Mar 2018 02:06:57 +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 E2193287A6 for ; Tue, 20 Mar 2018 02:06:56 +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=rM0JT8vD2BrNT44lWUigVTeFBRjWNxkDiPIdvIbGVVU=; b=b5MlbC+fpEsHOAl6+PDmVUyErt Uzk/ejE6mHbXEF+j1e50X/0HVqsuCVrfz09uT/CTrgX1UTDszwZ+sK2F1oww4dnan3ExAjADMBHQX IYK0V56HJBkMGmCTySps0YD2Hhv+jqI5LO0UUm0h4TuFVUWrj1UNMZoKLY6KTHLtJYrR25+KQunDY Rpb+HI3IKpCUSFVX6anV5m+NFuGGDfJ0n81WywQ0syhRv7OhWWeuU/WyqMiiWVhLk1/XtdaXqeEZE Vzc319ue/5Vao8/ZoOFe/mB4TAAGjU8Tj5GMCSLs7lrLMYm/bLI++RMK0ftlvMIlfuXCICCz0gGOI hk/0zSdA==; 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 1ey6fu-0001jf-IK; Tue, 20 Mar 2018 02:06:54 +0000 Received: from mail-pl0-f66.google.com ([209.85.160.66]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ey6fr-0001hM-CC for linux-rockchip@lists.infradead.org; Tue, 20 Mar 2018 02:06:53 +0000 Received: by mail-pl0-f66.google.com with SMTP id x4-v6so61372pln.7 for ; Mon, 19 Mar 2018 19:06:41 -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=8adkEwikAcUqXrAhzk1/zSzgi6i0QZNeH5HMuvXEiUs=; b=bPS553ECsbcs1FpbBtxnV2IH1anQPlM+lqY1dVFyB99RnDIeCz/PgkRMRFzK4T2hey kj0hNsnUz0AXXNCJ1LWaF6oq6tHyDAOx/RpAqdW1SP+Z/il8XYhadLPB22slqo75duPn 9jWkDnneUoK3JC0zYBknid8WWSjbOXRAWSyCzetp/RHgvAPucDh9ERBkmfV25gB2GRW7 jJigHnNJ0Txh9gkI0eqdg7k05marmFJ4ECBXlga8O5QEgIEym9rR4fyD3VM1BjS3I95X IVr3ceybShhYGKVOmb7QGtR3R41S0IuUcPmsTG8RlWufLNjKgFDCGGXq5GUOVvedGhL+ vRpQ== X-Gm-Message-State: AElRT7Eita9rIS0yQme7gXbRGQjcHYxGgerTJODHyOTHmytTp+cxSc95 1pDaikqtfM1zlhHouaaHHAcK7g== X-Google-Smtp-Source: AG47ELsos9NAYwOraJJVkWAQXfBRdnlWnVgX5q8Q38jDLwwioL3kQ3j0SAQzAcZpm/JzCq/8U48wjQ== X-Received: by 2002:a17:902:c1:: with SMTP id a59-v6mr14475790pla.284.1521511600703; Mon, 19 Mar 2018 19:06:40 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id s89sm648330pfk.54.2018.03.19.19.06.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Mar 2018 19:06:39 -0700 (PDT) From: Lin Huang To: heiko@sntech.de Subject: [PATCH v3 2/2] arm64: dts: rockchip: assign clock rate for some cpll child clock Date: Tue, 20 Mar 2018 10:06:29 +0800 Message-Id: <1521511589-17844-2-git-send-email-hl@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521511589-17844-1-git-send-email-hl@rock-chips.com> References: <1521511589-17844-1-git-send-email-hl@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180319_190651_424118_FE805D82 X-CRM114-Status: GOOD ( 13.39 ) 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, dianders@chromium.org, linux-rockchip@lists.infradead.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. NOTE: on none of the boards currently in mainline do we expect CPLL to be anything other than 800 MHz, but some future boards might have it. It's still good to be explicit about the clock rates to make diffing against future boards easier and also to rely less on BIOS muxing. Change-Id: If79368aeda5c51dbf2a3b6659f17052a2ae4a401 Signed-off-by: Lin Huang Reviewed-by: Douglas Anderson Reviewed-by: Shawn Lin --- Changes in v2: - None Changes in v3: - Update commit message 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>; };