From patchwork Wed Jun 7 21:27:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 103320 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp2140789qgd; Wed, 7 Jun 2017 14:28:13 -0700 (PDT) X-Received: by 10.99.100.135 with SMTP id y129mr4842199pgb.5.1496870893639; Wed, 07 Jun 2017 14:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496870893; cv=none; d=google.com; s=arc-20160816; b=QnPnpl+o23UpewyrL4Kh/ur8JxG6Waktwdl7a/AviPmjS1/gjJce/vs0HyEEh0eP+e W9/EnRbM9qvpZ1+eBDawB2HkjvKZFgtX1eAZtdCW2zOvLcTSuF690Q9GjZaUM8kmnHUB +jllKaooXjqve5dWZBsLzvH4nKPmi4DSBlT7qmqpjkaCxOXrqtLvmOdQJK0PKqavnr88 Qv1Tf6fLLdHGQ7U5AuyjKve1geVrZWpbOjZoM1HikwysyiykERfZZVE9oiMgTBdVz7hS MyGx7QJyXYiZ9FWXvSgCTnhpelBhLnGZrB6l2YwCSLvcocbS6Qle3po6FsO3beCBSGuv jgrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ayl2iEjQqAzNgd1hJm5MT8rv7i0wLX8bPQknUN0B61I=; b=Km1UrN5I4kIa//jwuBI8JIHXpI9TqeFt1Dv5PG7teJ/qCho5+BIkuXpd8iRchByllI Caw7DvDjOsVS3O/cJArkQKeQfCxhXcrieEzYMVbZ/VTlM8zW8JpYtkbyor7yCcHwbXjz DKWqTSxsh1stQYh7Sz05ccfHPQms7UIueN5GRzoxGZrlbYm83lrXKRmtTWst5HqaYhbH 94gQYMBJEkjUS3GXDgyLyVxfMRKqNNMf6oRGt0DUT7U79rzkdeQunJg1MgpOmihmyWCX QJplzQW4oMfUGqHiJJJv3iqksv3Co8GZ1ufCVX0SClKtVDjnUtbPm5KfTywgWFO2V/Ed NoSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h29si2737033pfa.290.2017.06.07.14.28.13; Wed, 07 Jun 2017 14:28:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751540AbdFGV2M (ORCPT + 7 others); Wed, 7 Jun 2017 17:28:12 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:62918 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbdFGV2L (ORCPT ); Wed, 7 Jun 2017 17:28:11 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v57LRXAU029833; Wed, 7 Jun 2017 16:27:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1496870853; bh=IqmstxIOnBTVQHj36jWgPcSrbwkKzwPPW8moivTOA9I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OE/E0gFyejzxBPPp3Ml2TVCp1rNd1N4oYbGt8O7mQxOes8UNsoNOYtBJVbxCYoUqF QWCMfb60Ou5PCqDHDnFd2AoyxJ0i8lnTZfmf2c/maILDMi0bTjoxJQNBXfgIA+JB1w xh5QvAJAtHDhxgSnxcfyS2akkRKcY0VoJ6tS1swU= Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v57LRXQc004001; Wed, 7 Jun 2017 16:27:33 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Wed, 7 Jun 2017 16:27:33 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v57LRXE2025580; Wed, 7 Jun 2017 16:27:33 -0500 Received: from localhost (irmo.dhcp.ti.com [128.247.58.167]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v57LRX307118; Wed, 7 Jun 2017 16:27:33 -0500 (CDT) From: Suman Anna To: Tony Lindgren CC: Tero Kristo , Lokesh Vutla , Subhajit Paul , , , , Suman Anna Subject: [PATCH 5/6] ARM: dts: dra7xx-clocks: Set IVA DPLL and its output clock rates Date: Wed, 7 Jun 2017 16:27:29 -0500 Message-ID: <20170607212730.33002-6-s-anna@ti.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170607212730.33002-1-s-anna@ti.com> References: <20170607212730.33002-1-s-anna@ti.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The IVA DPLL in DRA7xx provides the output clocks for only the IVAHD subsystem in DRA7xx as compared to previous OMAP generations when it provided the clocks for both DSP and IVAHD subsystems. This DPLL is currently not configured by older bootloaders. Use the DT standard properties "assigned-clocks" and "assigned-clock-rates" to set the IVA DPLL clock rate and the rates for its derivative clocks at boot time to properly initialize/lock this DPLL and be independent of the bootloader version. Newer u-boots (from 2017.01 onwards) reuse and can update these properties to choose an appropriate one-time fixed OPP configuration. The DPLL will automatically transition into a low-power stop mode when the associated output clocks are not utilized or gated automatically. The reset value of the divider M2 (that supplies the IVA_GFLCK, the functional clock for the IVAHD subsystem) does not match a specific OPP. So, the derived output clock from this IVA DPLL has to be initialized as well to avoid initializing these divider outputs to an incorrect frequencies. The OPP_NOM clock frequencies are defined in the AM572x SR2.0 Data Sheet vB, section 5.5.2 "Voltage And Core Clock Specifications". The clock rates are chosen based on these OPP_NOM values and defined as per a DRA7xx PLL spec document. The DPLL locked frequency is 2300 MHz, so the dpll_iva_ck clock rate used is half of this value. The value for the divider clock, dpll_iva_m2_ck, has to be set to 388.333334 MHz or more for the divider clk logic to compute the appropriate divider value for OPP_NOM. Signed-off-by: Suman Anna --- arch/arm/boot/dts/dra7xx-clocks.dtsi | 4 ++++ 1 file changed, 4 insertions(+) -- 2.12.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi index 8a82490035d9..76e2b7478141 100644 --- a/arch/arm/boot/dts/dra7xx-clocks.dtsi +++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi @@ -376,6 +376,8 @@ compatible = "ti,omap4-dpll-clock"; clocks = <&sys_clkin1>, <&dpll_iva_byp_mux>; reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; + assigned-clocks = <&dpll_iva_ck>; + assigned-clock-rates = <1165000000>; }; dpll_iva_m2_ck: dpll_iva_m2_ck@1b0 { @@ -387,6 +389,8 @@ reg = <0x01b0>; ti,index-starts-at-one; ti,invert-autoidle-bit; + assigned-clocks = <&dpll_iva_m2_ck>; + assigned-clock-rates = <388333334>; }; iva_dclk: iva_dclk {