From patchwork Thu Jan 9 14:00:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 23036 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C5690216DD for ; Thu, 9 Jan 2014 14:03:27 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id 5sf5157524qeb.11 for ; Thu, 09 Jan 2014 06:03:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=uBKULQYtylj8gMdLgnXxf34YwyN44hmJCKk+OT7EPO8=; b=THuyR/dCVgYatKkAUzspOqVmoGEzEdgs7t9oWn9qoivZ7p16BuBVcou8Ifup9WgO0s aeyyyyYonMuNqw2deHRYoxKnOxrNmV8ioADCIdahIVafHFRgBiR3oPkrsIeTjQlvC42K QJ6k+1bab6xbJaRIc2EmecV9PV6DsWQPTbEr0al3ftKRbrHxLLa24Gng2uQfi01DpVwD Uy25UUvQ/fHl/6b/uq0xWt8t4zUS1VPrr9ACIEY5GQifMdrKnqyF9XUuRBBTLo8POu9h Ia8uPXL2t5v+/UfySBlN0MwRwU73p3BQcT1YtzLgo6V+fT0Rgl9aGYvJDM7aeySdqfvb oFLg== X-Gm-Message-State: ALoCoQkKbDdT5a3/FgwjcAh+kvCo3vv6d/QUqrtvQHIpCL69L4a2RRzypFD420/DsI8K8DuT3ea9 X-Received: by 10.58.46.204 with SMTP id x12mr1227280vem.19.1389276206879; Thu, 09 Jan 2014 06:03:26 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.108 with SMTP id jv12ls1165474qeb.18.gmail; Thu, 09 Jan 2014 06:03:26 -0800 (PST) X-Received: by 10.58.85.133 with SMTP id h5mr2616886vez.4.1389276206766; Thu, 09 Jan 2014 06:03:26 -0800 (PST) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id go5si2895024vec.33.2014.01.09.06.03.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Jan 2014 06:03:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.47; Received: by mail-vb0-f47.google.com with SMTP id w8so2945vbj.6 for ; Thu, 09 Jan 2014 06:03:26 -0800 (PST) X-Received: by 10.58.152.130 with SMTP id uy2mr700132veb.71.1389276206639; Thu, 09 Jan 2014 06:03:26 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp14373ved; Thu, 9 Jan 2014 06:03:26 -0800 (PST) X-Received: by 10.68.134.130 with SMTP id pk2mr3721366pbb.167.1389276205701; Thu, 09 Jan 2014 06:03:25 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id eb3si4040550pbd.107.2014.01.09.06.03.25; Thu, 09 Jan 2014 06:03:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756060AbaAIODX (ORCPT + 5 others); Thu, 9 Jan 2014 09:03:23 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:46889 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755394AbaAIOCf (ORCPT ); Thu, 9 Jan 2014 09:02:35 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s09E1nFG020857; Thu, 9 Jan 2014 08:01:49 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s09E1n2T024722; Thu, 9 Jan 2014 08:01:49 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Thu, 9 Jan 2014 08:01:48 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s09E12WH030058; Thu, 9 Jan 2014 08:01:46 -0600 From: Tero Kristo To: , , , , , , CC: , , Roger Quadros Subject: [PATCHv13 13/40] CLK: TI: omap5: Initialize USB_DPLL at boot Date: Thu, 9 Jan 2014 16:00:24 +0200 Message-ID: <1389276051-1326-14-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1389276051-1326-1-git-send-email-t-kristo@ti.com> References: <1389276051-1326-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: t-kristo@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Roger Quadros USB_DPLL must be initialized and locked at boot so that USB modules can work. Signed-off-by: Roger Quadros Signed-off-by: Tero Kristo Tested-by: Nishanth Menon Acked-by: Tony Lindgren --- drivers/clk/ti/clk-54xx.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/clk/ti/clk-54xx.c b/drivers/clk/ti/clk-54xx.c index c876e6e..0ef9f58 100644 --- a/drivers/clk/ti/clk-54xx.c +++ b/drivers/clk/ti/clk-54xx.c @@ -19,6 +19,12 @@ #define OMAP5_DPLL_ABE_DEFFREQ 98304000 +/* + * OMAP543x TRM, section "3.6.3.9.5 DPLL_USB Preferred Settings" + * states it must be at 960MHz + */ +#define OMAP5_DPLL_USB_DEFFREQ 960000000 + static struct ti_dt_clk omap54xx_clks[] = { DT_CLK(NULL, "pad_clks_src_ck", "pad_clks_src_ck"), DT_CLK(NULL, "pad_clks_ck", "pad_clks_ck"), @@ -220,7 +226,7 @@ static struct ti_dt_clk omap54xx_clks[] = { int __init omap5xxx_dt_clk_init(void) { int rc; - struct clk *abe_dpll_ref, *abe_dpll, *sys_32k_ck; + struct clk *abe_dpll_ref, *abe_dpll, *sys_32k_ck, *usb_dpll; ti_dt_clocks_register(omap54xx_clks); @@ -235,5 +241,15 @@ int __init omap5xxx_dt_clk_init(void) if (rc) pr_err("%s: failed to configure ABE DPLL!\n", __func__); + usb_dpll = clk_get_sys(NULL, "dpll_usb_ck"); + rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ); + if (rc) + pr_err("%s: failed to configure USB DPLL!\n", __func__); + + usb_dpll = clk_get_sys(NULL, "dpll_usb_m2_ck"); + rc = clk_set_rate(usb_dpll, OMAP5_DPLL_USB_DEFFREQ/2); + if (rc) + pr_err("%s: failed to set USB_DPLL M2 OUT\n", __func__); + return 0; }