From patchwork Mon Mar 13 13:26:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9620857 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 E5AF260522 for ; Mon, 13 Mar 2017 13:28:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D936B28497 for ; Mon, 13 Mar 2017 13:28:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE2C328498; Mon, 13 Mar 2017 13:28:07 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 754E228497 for ; Mon, 13 Mar 2017 13:28:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752967AbdCMN2F (ORCPT ); Mon, 13 Mar 2017 09:28:05 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35835 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbdCMN04 (ORCPT ); Mon, 13 Mar 2017 09:26:56 -0400 Received: by mail-wm0-f53.google.com with SMTP id v186so40326770wmd.0 for ; Mon, 13 Mar 2017 06:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lCLFzGsW+iAtQprb9jE2gHmyAtk2Y/eEP4kdrnRVZrU=; b=BAEH3F8y5j4A6G1ujgtKVowsMiXtIROhu6ieR4kH0XtEEjdZLnavRBvA6+ZZPUV419 7rTev3gXhhn1DrSEIZK+KkRVRlFwVd6PM65d6cfCp4KxikT4nZISNbutri3EeBRmeVRy Ay9WHkzkDJNuJGuS3mWqbbi8bvYtbd550dWKHqgETDf/kIrX50ELPQHF/iBQHFJkc5md 5/3HsWPSwqmpF7z2R1DDrF3IdRi3angfn/AL26hMw3S+WZFubZ3m3K1ERYuxJHl4zH52 5dt0qIjcDPKFAXlwv4k5Gt8ao9JZqus9JPU+myzcPLUI96CCEn9qXH8sNuPix3z2d+ss 3ZZQ== 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=lCLFzGsW+iAtQprb9jE2gHmyAtk2Y/eEP4kdrnRVZrU=; b=Ig1fET261LWJAmpL43tFmkU4KvWJXabGVmh0KXmAZxDuJ1+V2yitxVn/q4nyuixKui fXuMxKDRadQGKePE8Nm55wmV3BUlmXVCPyMQeZybdGEfQt/NKm8yCJGMOrdb0uGq+Ly1 oK7IrefcpHAjTjDuQAf0grvCf8HDvyzmraxSv98LK0Dysa42xz4G/MTp1jEmJsgY1EFR W1+b9ol+3ulFUYd/0y5xrFa6jbXbLNyCSKkPat38JNVgbc/OPjQLpRBf4YEyr+0/DS0e ySpRj2wJfEKgcly7ezkKwK5Sw6vqZ3Q1pmkU+0EMmtkRy7hKKZYvnLCwejfwnP0c0ld4 yfyw== X-Gm-Message-State: AFeK/H1q9aIeQgqIHQHTLjBagNWCVZj6mqwcDAaRAl4vRAOZuGqnx1BBu55NEAy2d9Ja35VK X-Received: by 10.28.51.140 with SMTP id z134mr10678896wmz.55.1489411614819; Mon, 13 Mar 2017 06:26:54 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 5sm24968931wrd.58.2017.03.13.06.26.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Mar 2017 06:26:54 -0700 (PDT) From: Neil Armstrong To: mturquette@baylibre.com, sboyd@codeaurora.org, carlo@caione.org, khilman@baylibre.com Cc: Neil Armstrong , linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] clk: meson-gxbb: Add GP0 PLL init parameters Date: Mon, 13 Mar 2017 14:26:41 +0100 Message-Id: <1489411604-18700-3-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489411604-18700-1-git-send-email-narmstrong@baylibre.com> References: <1489411604-18700-1-git-send-email-narmstrong@baylibre.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Tha Amlogic GXBB SoC GP0 PLL needs some vendor provided parameters to be initializated in the the GP0 control registers before configuring the rate with the rate table provided parameters. GXBB GP0 PLL tweaks are also selected to respect the vendor init procedure. Signed-off-by: Neil Armstrong --- drivers/clk/meson/gxbb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 1c1ec13..5e1a7dc4 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -352,6 +352,13 @@ }, }; +struct pll_params_table gxbb_gp0_params_table[] = { + PLL_PARAM(HHI_GP0_PLL_CNTL, 0x6a000228), + PLL_PARAM(HHI_GP0_PLL_CNTL2, 0x69c80000), + PLL_PARAM(HHI_GP0_PLL_CNTL3, 0x0a5590c4), + PLL_PARAM(HHI_GP0_PLL_CNTL4, 0x0000500d), +}; + static struct meson_clk_pll gxbb_gp0_pll = { .m = { .reg_off = HHI_GP0_PLL_CNTL, @@ -368,6 +375,12 @@ .shift = 16, .width = 2, }, + .params = { + .params_table = gxbb_gp0_params_table, + .params_count = ARRAY_SIZE(gxbb_gp0_params_table), + .no_init_reset = true, + .unreset_for_lock = true, + }, .rate_table = gp0_pll_rate_table, .rate_count = ARRAY_SIZE(gp0_pll_rate_table), .lock = &clk_lock,