From patchwork Wed Jun 16 14:11:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foss X-Patchwork-Id: 461403 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp680209jae; Wed, 16 Jun 2021 07:11:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4IW8K6U0e4Uxe5MKaLbDBe2dzT6T3llXirCAQslOUxpJvOroaqTW4KdOR3aTvN1fn5D1L X-Received: by 2002:a6b:e60f:: with SMTP id g15mr183080ioh.52.1623852695661; Wed, 16 Jun 2021 07:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623852695; cv=none; d=google.com; s=arc-20160816; b=EAbrGJTgKenuw0UhR1V8gnjotMgDjaRvt2BgdueqigtvbK4Z+5BsQuKPr16EaEcm8V bPQa0ZK3T9ILvqTgAA3SeEEQxTpi66dpoi1tFSoxT8FkPCCAv1vLKw8J6e+lzjeQsTFx ronAjQpTb/Gjt1ELKk/QmvZsE+VkZnkAR3PYEr3ge6euImRLKt9y1nsDPgCUw6UtBkn8 JLmBYfBnIqsrVgy/662fSYN0Gmmy5BhQJFiBph0av3c7fv3/r1JTx+aQy7eRHdipzkQb pxlSHFIhZs9BldhunDhRJxNzh1/BOFXideFycehwX3ZaeHhvG1ml03TOJ60zjVFO4tx3 j/hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Xsn7+Lsp9NGdCiqtkjavVEDgvQSXhZBR2aAMSk2h6M4=; b=QKH9gGvuGpx/iPUIOl9ojVYZ3pD0HxNFGsBuvLGm7gNku7K5niS6LfMSOjRhRIvNHm RytAlDE06zEi2uTrsuX5oFQ1MhvrWEw+zuUI8C4CVMeFYDdyv5ZtnliAQYo49d3bL/D2 9qKeKjxtwBt+WPdBiEBCL/Vvuh9crkiCIrSEueZzvDLi8sW13Gn/eFFE53B5C995tnRz WxnhDjFoBmj++ecopNHdHv+gIA1geZq+YWpfN539Xs6gvzsYVfthW+96IuilYt1Int7l Gt6kmHusVfeLi9xd5AtjIM/Tk9dvDFSiiPylnl625mRu9Cgam7TduRxNycWlrvQK4Nz0 vcvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AnHj7RoS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m6si2534594iol.83.2021.06.16.07.11.35; Wed, 16 Jun 2021 07:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AnHj7RoS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233892AbhFPONg (ORCPT + 17 others); Wed, 16 Jun 2021 10:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233851AbhFPONe (ORCPT ); Wed, 16 Jun 2021 10:13:34 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89FFFC0617AD for ; Wed, 16 Jun 2021 07:11:27 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id i94so2864995wri.4 for ; Wed, 16 Jun 2021 07:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xsn7+Lsp9NGdCiqtkjavVEDgvQSXhZBR2aAMSk2h6M4=; b=AnHj7RoSOlzMjAE3O1GUyGBfuS688F5iiC4eV01XSE1Gy+uC5pLxY8uv3b7JlDvLSZ ugznEp0TSBKX3aL0tZ71/34ec/JcffIxcCQxJlvvKrwvt5+Ufq++uTbyfGah9gNUlSlL WT4YNvtfnwLpUlVyLVlPiLgiW/fAhjHcN4P6v3NqQUa3ymWa0h+j1H0l4dFoGl4vkiwF /pIIbUR0H7c3OHOjdBRLNgD4JAnL/QlTNC3d+s3azQNrRY8TDsvBJMoj21oNwsheu/RG l6tw3OiFHk1bIrhWohwSEiCTELJRSOyqOF31MshLuE04PNlqf2gI7MdCa+Qw/WfWFphz VC8w== 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:mime-version:content-transfer-encoding; bh=Xsn7+Lsp9NGdCiqtkjavVEDgvQSXhZBR2aAMSk2h6M4=; b=DzLUK0aC6xsXZAq/xw9FJHwAd0+Vy80NBFlFk4YxcK4mpLfdTls04JvI1UHj2pT6CT MXHw8pmiUoK9C8Q0uSrS+ZWOMUMk799IETBVG1aX32V/1Gw/XEG2zoTO03Mmlucaa8u+ a6U+UPqRoVc0gewtdfKXAgHQhnKvrBQfR1LNdhswMQfQmDzY+7vTuHso4OjAS5W5BKVi e2Aep/WSkdItYU76As/70jy6id4D55EwX1gqMHPmoVv0EIhufCMFyYwSnJHmDjDX3Xu8 m6/dTm0d6BIn1fTBYipRs+Kv5gmUPv1AsYdIt/++a6SaQkOhlr5yHrSf1Uu+RZlru2rL tjHg== X-Gm-Message-State: AOAM531bIMmNOvNrvhBjGaPnDVtqvJJT0IwVfWAYli+HtYM9xnKptWrs aA8gErwouqGGljDZt4VxXysB2Q== X-Received: by 2002:a5d:4f8f:: with SMTP id d15mr5576503wru.85.1623852686174; Wed, 16 Jun 2021 07:11:26 -0700 (PDT) Received: from xps7590.fritz.box ([2a02:2454:3e5:b700:9df7:76e5:7e94:bf1e]) by smtp.gmail.com with ESMTPSA id g83sm1968375wma.10.2021.06.16.07.11.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jun 2021 07:11:25 -0700 (PDT) From: Robert Foss To: agross@kernel.org, bjorn.andersson@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, jonathan@marek.ca, tdas@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vinod Koul Cc: Robert Foss Subject: [RFC v1 04/11] clk: qcom: clk-alpha-pll: Add configuration support for LUCID 5LPE Date: Wed, 16 Jun 2021 16:11:00 +0200 Message-Id: <20210616141107.291430-5-robert.foss@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210616141107.291430-1-robert.foss@linaro.org> References: <20210616141107.291430-1-robert.foss@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Ported from the downstream driver. Used on SM8350 for DISPCC & VIDEOCC. Signed-off-by: Robert Foss --- drivers/clk/qcom/clk-alpha-pll.c | 3 +++ drivers/clk/qcom/clk-alpha-pll.h | 5 +++++ 2 files changed, 8 insertions(+) -- 2.30.2 diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 01090852ea76..71040d53d7d8 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -115,6 +115,9 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = { [PLL_OFF_STATUS] = 0x30, [PLL_OFF_OPMODE] = 0x38, [PLL_OFF_ALPHA_VAL] = 0x40, + [PLL_OFF_SSC_DELTA_ALPHA] = 0x48, + [PLL_OFF_SSC_NUM_STEPS] = 0x4c, + [PLL_OFF_SSC_UPDATE_RATE] = 0x50, }, [CLK_ALPHA_PLL_TYPE_AGERA] = { [PLL_OFF_L_VAL] = 0x04, diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h index 6943e933be0f..9eb4589b6a02 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -37,6 +37,9 @@ enum { PLL_OFF_OPMODE, PLL_OFF_FRAC, PLL_OFF_CAL_VAL, + PLL_OFF_SSC_DELTA_ALPHA, + PLL_OFF_SSC_NUM_STEPS, + PLL_OFF_SSC_UPDATE_RATE, PLL_OFF_MAX_REGS }; @@ -158,6 +161,8 @@ void clk_agera_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, const struct alpha_pll_config *config); #define clk_lucid_pll_configure(pll, regmap, config) \ clk_trion_pll_configure(pll, regmap, config) +#define clk_lucid_5lpe_pll_configure(pll, regmap, config) \ + clk_trion_pll_configure(pll, regmap, config)