From patchwork Thu Sep 28 17:50:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhishek Sahu X-Patchwork-Id: 9976541 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 1829360365 for ; Thu, 28 Sep 2017 17:52:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 091BE296D5 for ; Thu, 28 Sep 2017 17:52:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1B5A296D8; Thu, 28 Sep 2017 17:52:55 +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=unavailable 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 A7690296D5 for ; Thu, 28 Sep 2017 17:52:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752222AbdI1Rwm (ORCPT ); Thu, 28 Sep 2017 13:52:42 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51032 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752094AbdI1Rvl (ORCPT ); Thu, 28 Sep 2017 13:51:41 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4A7A560C17; Thu, 28 Sep 2017 17:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1506621100; bh=b/0cprv7pj+6yWKYb40VcnBWwmHAmKFfaZGHUVZSSz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IXEFiHvIi+Sl8jwCrAIx/sm8GjJlMVe5SdyZsJ2hyIcN5yakJxkiFffbSMuAXt33F fa8q0cgvugtFnhLZ8vNCSPiv+g85tlJZOx+zCd7GQ50Ubf4psiStZrElueCPJULMf1 7w8xGwfItgGymIcB3Ebvucz8zubCTB8vtEqvVbK0= Received: from absahu-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: absahu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6BB3360C16; Thu, 28 Sep 2017 17:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1506621099; bh=b/0cprv7pj+6yWKYb40VcnBWwmHAmKFfaZGHUVZSSz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Efr7SVUv52rFFoesbexyl5PyDJAep0LPinYLemF4apgcwWCtWyynnt+qOMltlaG+p 8Qah/lY4+VseSbpIItSuxK8aKA08uf1CYGkWSRUUH+RJZlrJb+2Xn0BShTEsTNQf/G mVCiKhA+pn07mX0RfQXXec46kZ/nP+boJalOxFRw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6BB3360C16 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=absahu@codeaurora.org From: Abhishek Sahu To: Stephen Boyd , Michael Turquette Cc: Andy Gross , David Brown , Rajendra Nayak , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Abhishek Sahu Subject: [PATCH 11/13] clk: qcom: support for Brammo PLL Date: Thu, 28 Sep 2017 23:20:48 +0530 Message-Id: <1506621050-10129-12-git-send-email-absahu@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506621050-10129-1-git-send-email-absahu@codeaurora.org> References: <1506621050-10129-1-git-send-email-absahu@codeaurora.org> 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 1. Brammo PLL does not allow configuration of VCO 2. Supports the dynamic update in which the frequency can be changed dynamically without turning off the PLL 3. The register offsets are different from normal Alpha PLL Signed-off-by: Abhishek Sahu --- drivers/clk/qcom/clk-alpha-pll.c | 24 ++++++++++++++++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 1 + 2 files changed, 25 insertions(+) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 4844e63..c682387 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -922,4 +922,28 @@ static int clk_alpha_pll_postdiv_set_rate(struct clk_hw *hw, unsigned long rate, .set_rate = alpha_pll_huayra_set_rate, }, }, + [CLK_ALPHA_PLL_TYPE_BRAMMO] = { + .reg_offsets = { + [PLL_L_VAL] = 0x04, + [PLL_ALPHA_VAL] = 0x08, + [PLL_ALPHA_VAL_U] = 0x0c, + [PLL_USER_CTL] = 0x10, + [PLL_CONFIG_CTL] = 0x18, + [PLL_TEST_CTL] = 0x1c, + [PLL_STATUS] = 0x24, + }, + .alpha_width = 40, + .flags = SUPPORTS_DYNAMIC_UPDATE, + .ops = { + .enable = alpha_pll_default_enable, + .disable = alpha_pll_default_disable, + .is_enabled = alpha_pll_default_is_enabled, + .hwfsm_enable = alpha_pll_default_hwfsm_enable, + .hwfsm_disable = alpha_pll_default_hwfsm_disable, + .hwfsm_is_enabled = alpha_pll_default_hwfsm_is_enabled, + .recalc_rate = alpha_pll_default_recalc_rate, + .round_rate = alpha_pll_default_round_rate, + .set_rate = alpha_pll_default_set_rate, + }, + }, }; diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h index fed783e..dee71b4 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -21,6 +21,7 @@ enum { CLK_ALPHA_PLL_TYPE_DEFAULT, CLK_ALPHA_PLL_TYPE_HUAYRA, + CLK_ALPHA_PLL_TYPE_BRAMMO, CLK_ALPHA_PLL_TYPE_MAX, };