From patchwork Wed Mar 22 10:32:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9638437 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 1FA4E60327 for ; Wed, 22 Mar 2017 10:33:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3612272F9 for ; Wed, 22 Mar 2017 10:33:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E78522840E; Wed, 22 Mar 2017 10:33:01 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 DA94A28306 for ; Wed, 22 Mar 2017 10:33:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933495AbdCVKdA (ORCPT ); Wed, 22 Mar 2017 06:33:00 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:34282 "EHLO mail-wr0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758895AbdCVKc7 (ORCPT ); Wed, 22 Mar 2017 06:32:59 -0400 Received: by mail-wr0-f174.google.com with SMTP id l37so127426118wrc.1 for ; Wed, 22 Mar 2017 03:32:38 -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=El7v+qc6OTtGp8yc49VWvVql+Sf+nZ4glB7imcuFDt4=; b=T/71RrBBJBUjnEeJd4Xnb4CWlGD51gXnkmiYWW9ZX4/nCljRYIgcwq4UKgQHsFe+ie cu2RQUDIm+ba9iiCdgPHa0xPm9xHwj+H7TdFaLj5dHe4h8aXu3EyAEVbb35XDsPG02J6 zEroVdsMjymOOGAUttWsKCt0mpxBQOcvxHsPLHHRpT8CAN1f+jc0IjvDzLsslhfcmuM+ Ke0GrJU7T6YQRKi82gdVJnBHKLEM89EKFgWJ1d8i7rhRA8ozaiVgDcfb+KfionONeEJP fPumX7n9uSRNzcLORlwBWfjq+EMdi035j6XwfL+Lrmudc3Q1c+RwPkzyFPcNRES7nIas jpxQ== 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=El7v+qc6OTtGp8yc49VWvVql+Sf+nZ4glB7imcuFDt4=; b=XPdjeh7J8Xa3LTgGsR3mU8FJPX/Jw8gxFBsEFsYrCKrVxQSn4ptiEpbZLfUhX7AY1H hPZuh+Q4Bc/DjJfhNUf/05i9R7XAd97O2ERqrQqXOpSc7QZDGDgrvsMI4c1DVAJLCSde 0ZS7cmBs7W0gJx8OcWfgKt+grZtq2Kv11b8b3/j+YmYKOvopSIJum6YK3LTQmJs6Xfwj giuk5I09D2uLFvcQg+wxio6wZVJVblouSPBlqk92UCxS2Ebb0u5MYkWgeQOuroLRr0gk 1HD0HL62k9CxChww+I0sU7aYUEPM/IWR/lYpIDH7XDXJHZMztbeEhFIqqVLOpqG5RtyC HRgw== X-Gm-Message-State: AFeK/H1iuNG0GaT4g3Hemq7hQfE+uo/3YlDO6mBI4ChVoQ99RW37VAkHH4xWjEYd0wMgzoaZ X-Received: by 10.223.157.37 with SMTP id k37mr34191848wre.148.1490178757390; Wed, 22 Mar 2017 03:32:37 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 53sm1285309wrt.52.2017.03.22.03.32.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Mar 2017 03:32:36 -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 v2 2/5] clk: meson-gxbb: Add GP0 PLL init parameters Date: Wed, 22 Mar 2017 11:32:24 +0100 Message-Id: <1490178747-14837-3-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1490178747-14837-1-git-send-email-narmstrong@baylibre.com> References: <1490178747-14837-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 d07dc22..db95038 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, + .clear_reset_for_lock = true, + }, .rate_table = gp0_pll_rate_table, .rate_count = ARRAY_SIZE(gp0_pll_rate_table), .lock = &clk_lock,