From patchwork Wed Jun 7 21:27:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 103321 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp2140853qgd; Wed, 7 Jun 2017 14:28:26 -0700 (PDT) X-Received: by 10.99.142.201 with SMTP id k192mr19509530pge.161.1496870906463; Wed, 07 Jun 2017 14:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496870906; cv=none; d=google.com; s=arc-20160816; b=GHtzuiGOYEYaDkTT3iVqEZ2njgFJMmZyfdCSMF6+sEqbI0q/21HbZpCdDG91hkK61F QzG8ACZW+u90o7djaIjaEsBS8RZsAjLg/1/WIdiGiD/nQIO0W/LmaJlLep6NQKeX9L/U +03ZvqgCot3LfBVeQF5bXRkFEl6hLscAMNZOh+hXE+2dNUmZciQyZTUng9EGhhiuWP5D whaHJimOGNZFqRMaVXyBRt5TkraicSrrlVGO6qSzrtxoWLvPjLx2r9K78vVpa8HVmat7 iIVgSPa71YABt9RIoCtMcA7kZP8cTrVPhY9bKner4sdY6MlKg095Ug84yfaeWSiAo7Df y9Rg== 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=aVTJ48/u7ZpUT0RTfUXtOlxprJs9Mm8D2JRDBzG+hxw=; b=cdTJtvkmkIeP2pV1Admc+AJdqK6IQLvB5AFGdoBuxnBKlUpBSj4pqg/oEaAyZTWYr6 fSKlBijKzgIRptaOLPQb3vNwtVehBR3u1xnJOpOpYdaOxNvHAHVilZNyCAflpoZuyg3J cCYkuKh6MTRJTGLmmoKiNlQUgUImsp+5UJujZL9PMKs9KzPCkGOo/tm8DEpJaXcvWe0l 2lMy1RYkvJnComs58B9IA4lZ2JAGXh890LzOBmo7ZKyJl/CftlhVHYFO62HcaNfSOicn FQlPebflof9nKSzQ+hL5dx9b160FSBHojk2FEWt2/aak4raLjMLPQ3XYuGngd8BcN9qP PBew== 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.26; Wed, 07 Jun 2017 14:28:26 -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 S1751505AbdFGV2Z (ORCPT + 7 others); Wed, 7 Jun 2017 17:28:25 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:62921 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbdFGV2Y (ORCPT ); Wed, 7 Jun 2017 17:28:24 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v57LRWuR029821; Wed, 7 Jun 2017 16:27:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1496870852; bh=1iCIXb75oKeQRapxphKQviFjYcpH1gUgxoEICpAHD3s=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rEt5UBgV5EVYUbb6Vvperr2geoqgGi/gMXYPpa14nMdcN/0U1fS82MCZfahiDkFdz 1CT/em+vC8FmAZl46Wp3TnVMuKmvDBPkigrPrAQ6PRg8XGlVXuXeG/kqq2V1Fp0Yvs r7tB5z4dirGkawvGkBr1U90aV8hBGlzJUJozBwRQ= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v57LRWee010064; Wed, 7 Jun 2017 16:27:32 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Wed, 7 Jun 2017 16:27:32 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v57LRWB9017174; Wed, 7 Jun 2017 16:27:32 -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 v57LRW307102; Wed, 7 Jun 2017 16:27:32 -0500 (CDT) From: Suman Anna To: Tony Lindgren CC: Tero Kristo , Lokesh Vutla , Subhajit Paul , , , , Suman Anna Subject: [PATCH 1/6] ARM: dts: omap44xx-clocks: Set IVA DPLL and its output clock rates Date: Wed, 7 Jun 2017 16:27:25 -0500 Message-ID: <20170607212730.33002-2-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 is not an essential DPLL for the functionality of a bootloader and is usually not configured (e.g. older u-boots configure it only if CONFIG_SYS_CLOCKS_ENABLE_ALL is enabled and u-boots newer than 2014.01 do not even have an option), and this results in incorrect operating frequencies when trying to use a DSP or IVAHD, whose root clocks are derived from this DPLL. 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. The DPLL will automatically transition into a low-power stop mode when the associated output clocks are not utilized or gated automatically. The reset values of the dividers M4 & M5 (functional clocks for DSP and IVAHD respectively) are identical to each other, but are different at each OPP. The reset values also do not match a specific OPP. So, the derived output clocks from the IVA DPLL have to be initialized as well to avoid initializing these divider outputs to incorrect frequencies. The clock rates are chosen based on the OPP100 values as defined in the OMAP4430 ES2.x Public TRM vAP, section "3.6.3.8.7 DPLL_IVA Preferred Settings". The DPLL locked frequency is 1862.4 MHz (value for DPLL_IVA_X2_CLK), so the dpll_iva_ck clock rate used is half of this value. Signed-off-by: Suman Anna --- arch/arm/boot/dts/omap44xx-clocks.dtsi | 6 ++++++ 1 file changed, 6 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/omap44xx-clocks.dtsi b/arch/arm/boot/dts/omap44xx-clocks.dtsi index 9573b37fbaa7..9cb205b87835 100644 --- a/arch/arm/boot/dts/omap44xx-clocks.dtsi +++ b/arch/arm/boot/dts/omap44xx-clocks.dtsi @@ -357,6 +357,8 @@ compatible = "ti,omap4-dpll-clock"; clocks = <&sys_clkin_ck>, <&iva_hsd_byp_clk_mux_ck>; reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; + assigned-clocks = <&dpll_iva_ck>; + assigned-clock-rates = <931200000>; }; dpll_iva_x2_ck: dpll_iva_x2_ck { @@ -374,6 +376,8 @@ reg = <0x01b8>; ti,index-starts-at-one; ti,invert-autoidle-bit; + assigned-clocks = <&dpll_iva_m4x2_ck>; + assigned-clock-rates = <465600000>; }; dpll_iva_m5x2_ck: dpll_iva_m5x2_ck@1bc { @@ -385,6 +389,8 @@ reg = <0x01bc>; ti,index-starts-at-one; ti,invert-autoidle-bit; + assigned-clocks = <&dpll_iva_m5x2_ck>; + assigned-clock-rates = <266100000>; }; dpll_mpu_ck: dpll_mpu_ck@160 {