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: 9620869 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 3279B60522 for ; Mon, 13 Mar 2017 13:28:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 254611FF8E for ; Mon, 13 Mar 2017 13:28:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19FE128497; Mon, 13 Mar 2017 13:28:30 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D18A92849D for ; Mon, 13 Mar 2017 13:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=nBYqe82IOY1Ba4xaY7Qe5YayTK+W6ssjA+CYt6zIK+I=; b=bdLiGKBHFfOtdJv6/oexTotbxa u5voFyZq68VF+UR5huUM6wcWq8oSmoZQsNScbfQQRR3VNeelKNHiv9xzPcVH5F/90hUnGFv8BrFcv /P9Q07Ch3pDISkN/kHjvk74FpqMAIJ59bO67wc3yIUH9SNMvLeaF1TIJ7fzmK87fsMplI2ooBn187 qxkV4qffyq195+2KXyzL9NmlhJ/AEFn0KHp4+FZu3WlpN1cnVPXKpczII7GMF/6f3A3d9o7r9cMVB E+2N4NoMN44pQ/ImtWgisDROsgRlBGPnfJ28V0lwHZjoombuhahehx3/tRZWHmxPn7Vtl7ZIccSR3 sa9MDuzA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cnQ1O-00033P-NT; Mon, 13 Mar 2017 13:28:22 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cnQ0K-0002JV-N7 for linux-amlogic@lists.infradead.org; Mon, 13 Mar 2017 13:27:20 +0000 Received: by mail-wm0-x235.google.com with SMTP id n11so40294900wma.1 for ; Mon, 13 Mar 2017 06:26:56 -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=StT93DPSKsxMkX7UBcG6Bl4PUS4378jPFsS1Kd2ZPmVMGmYex2m2LpNHPAjnUx8WpT Ez7kAVEIbZqsP5MgxXDfXb0mbJBD6GJna/mODkkWdQFe6rvfygiPKzgSX93mvn8fUgq5 ZaUjeNtI0rstnGG9j7hcQVThrIBrTtij6Tfug3Fa1qyUchjZehSTIdyRUz/XqX1X0fZK gPQCi+SBMnVw8pHGvLUW2wyUUgiLtpBy7UTL6hfrYBty1ZqE9VdrrcVTQ1wy4J/oC4bj Xh5YTWkeW3K9A6+xYmCaeTI1uZr24OqppMwNPj5nV8jmFNJ56sRt624eMbtwdv3CXZ4O PqTA== X-Gm-Message-State: AFeK/H11v4E1l/xRBH48MLfZUznuwLyt1RmRNcpQNNR8aHNHrr80xOx+Kk/d9pYRqWVYrdm7 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170313_062716_920717_BC45B36F X-CRM114-Status: UNSURE ( 7.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.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,