From patchwork Wed Nov 16 10:47:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 20931 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp78195wru; Wed, 16 Nov 2022 03:05:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf4UlNSw8tAM3aJfQZiiDIo6lN6c2G63hDMq8hJ/3za7QD0HOSZ0wj9KocI9X4RYHSqR1ABc X-Received: by 2002:a05:6402:1caf:b0:461:eea0:514c with SMTP id cz15-20020a0564021caf00b00461eea0514cmr18900822edb.296.1668596735814; Wed, 16 Nov 2022 03:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668596735; cv=none; d=google.com; s=arc-20160816; b=u4ptWetIhgfMdL03ShDvwbzVbi84L91Z7s2LLtBkXPXuzk298V3rXLque+uCljyZs7 MrfV4flX0oLtnSXkxLj9Di98xRgx7J0s1btw2FEYZgnU1RARFsTeaJ8YJCuxo6Z5LjQp XMTxP/BZ3zo4Nsm6bQ93qVA4REIcrISqx9WocLpYRFKP10mD4Olz2wGT4u28RueIuDcn 6fMeohlDVyTFAOCb8k/JyLPE8hvBBJO/UTXo7JAOzRG9G7qiJ32+dgYp5pNj9R/J/oRi 808JV4SO3fzubOUBj/JpeamT+XUyWREmYbcVVkaQTSr0Npdo2dZMBj88QSZSHOb26B1J xETA== 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=/oGrpMNudChVVWokuKrKJ8fs3KmpnLeOml9fMB9Cjgk=; b=bXcSoOr/UxxC4AfrJeLZF6UNPDgkm5sSEdclDTezFZ61ocBmQq+8KQpLySYpeXJo1V YF2e9i982M37G45znJvg+5IRUu5NXynFrNb4uekoIifcm1BzAxBXr1euhrP2y8uShqtV YWzzIQIa5y0+m9Kydzx3fncr+pXQYc2T8F31piVIkrFt9kTngVegbR7GGsHtJHuA3vYC ieO2s7rij8/Y2HwN8lm1BsBJQ4t3x74bijWPd3Lj+68WBfsfHssZWR4i3K3iwfgx4LGP MnQ7JiABQgbQtU2eGU4BTSVyreEgBib16gaVAW7zmpHzDzp1Qijp2UGvjKmbcoLXjP+x 8ySw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UqnK/DTn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dk22-20020a170906f0d600b007aa8a5131a3si10311513ejb.181.2022.11.16.03.05.10; Wed, 16 Nov 2022 03:05:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UqnK/DTn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S238898AbiKPK7s (ORCPT + 99 others); Wed, 16 Nov 2022 05:59:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236947AbiKPK7S (ORCPT ); Wed, 16 Nov 2022 05:59:18 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4431E3F07C for ; Wed, 16 Nov 2022 02:47:45 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id w14so29220683wru.8 for ; Wed, 16 Nov 2022 02:47:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/oGrpMNudChVVWokuKrKJ8fs3KmpnLeOml9fMB9Cjgk=; b=UqnK/DTnUOLFTa/l2t61pdPoBW9QqdKs9MAuGJuyVtciTdaxyNrOqxn3Ir/o8/hFue JZuEeYOK7iT1ytzaIiP1kImICuRMkXz0TMx1S6snmUEMTp6usuZcCSr0u4rI2IYEkOsX ws5BgDgQrmVdGtMdOE5SRINQ/KCTxeXh4ETCGlPpOCAyYt9wAWi96llmJTp+Nd42ZCtn pOWy+J1bdyDpxwkL2J9m6pRIia+PZyphYkVjfcOXLV4g4tVUJWZHsUVqHL7T/tyLLf2v wMefP8o9Ve/vAc2fjLxA7RaaFq2DJAO6T5UApe6NVo3oN+keOulFErnGJi4F9JmQswbR hHsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/oGrpMNudChVVWokuKrKJ8fs3KmpnLeOml9fMB9Cjgk=; b=kGWe9y4KnNyrNrLVj/R1TOzzmSiytOk5eyPC9IhcPwkNR99MF/l9YjgvLhEYaZUOl4 CeZIlg+G2pfylllcuCOyzJCJq87Q3WjzF4vR7efGy999kqOBqYxPittM8FydYQUHfaEZ BB7pfWNvUg1251wFS1PzkJfsBtjpXq+Z95+bokyneGWNXVFzuYaAAjHRu6ewx+1i2K31 qlcf99To0++ucS5sEhjh02oexdLusdxnmGEfkrRVpkuq2ZJsilyRrJoz1MMWGcLbDL0b f7j15FVFHBzit0al8hLnIqsSoPmPgGhlMn/DV3mqVZslMmz64wWYQOlGo7aHi91HLeRq vKlQ== X-Gm-Message-State: ANoB5pnAWoo9Uqp1p9/WVLT8H80x0Xpn1PwlmSDEKe6RshTP4Jjvdo7K gBHuZsMA7+MICCmbdeQO6etZWw== X-Received: by 2002:a5d:65c6:0:b0:236:80a8:485e with SMTP id e6-20020a5d65c6000000b0023680a8485emr13243203wrw.362.1668595663815; Wed, 16 Nov 2022 02:47:43 -0800 (PST) Received: from localhost.localdomain ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id b3-20020adff903000000b002366fb99cdasm14674206wrr.50.2022.11.16.02.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 02:47:43 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Mike Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski Cc: Linux Kernel Mailing List , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 3/9] clk: qcom: Add LUCID_OLE PLL type for SM8550 Date: Wed, 16 Nov 2022 12:47:10 +0200 Message-Id: <20221116104716.2583320-4-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221116104716.2583320-1-abel.vesa@linaro.org> References: <20221116104716.2583320-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749650490977375364?= X-GMAIL-MSGID: =?utf-8?q?1749650490977375364?= Add a LUCID_OLE PLL type for SM8550 SoC from Qualcomm. Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio --- drivers/clk/qcom/clk-alpha-pll.c | 16 ++++++++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 1973d79c9465..f9e4cfd7261c 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -155,6 +155,22 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = { [PLL_OFF_TEST_CTL_U] = 0x30, [PLL_OFF_TEST_CTL_U1] = 0x34, }, + [CLK_ALPHA_PLL_TYPE_LUCID_OLE] = { + [PLL_OFF_OPMODE] = 0x04, + [PLL_OFF_STATE] = 0x08, + [PLL_OFF_STATUS] = 0x0c, + [PLL_OFF_L_VAL] = 0x10, + [PLL_OFF_ALPHA_VAL] = 0x14, + [PLL_OFF_USER_CTL] = 0x18, + [PLL_OFF_USER_CTL_U] = 0x1c, + [PLL_OFF_CONFIG_CTL] = 0x20, + [PLL_OFF_CONFIG_CTL_U] = 0x24, + [PLL_OFF_CONFIG_CTL_U1] = 0x28, + [PLL_OFF_TEST_CTL] = 0x2c, + [PLL_OFF_TEST_CTL_U] = 0x30, + [PLL_OFF_TEST_CTL_U1] = 0x34, + [PLL_OFF_TEST_CTL_U2] = 0x38, + }, [CLK_ALPHA_PLL_TYPE_RIVIAN_EVO] = { [PLL_OFF_OPMODE] = 0x04, [PLL_OFF_STATUS] = 0x0c, diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h index f9524b3fce6b..2bdae362c827 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -18,6 +18,7 @@ enum { CLK_ALPHA_PLL_TYPE_AGERA, CLK_ALPHA_PLL_TYPE_ZONDA, CLK_ALPHA_PLL_TYPE_LUCID_EVO, + CLK_ALPHA_PLL_TYPE_LUCID_OLE, CLK_ALPHA_PLL_TYPE_RIVIAN_EVO, CLK_ALPHA_PLL_TYPE_DEFAULT_EVO, CLK_ALPHA_PLL_TYPE_BRAMMO_EVO, @@ -38,6 +39,8 @@ enum { PLL_OFF_TEST_CTL, PLL_OFF_TEST_CTL_U, PLL_OFF_TEST_CTL_U1, + PLL_OFF_TEST_CTL_U2, + PLL_OFF_STATE, PLL_OFF_STATUS, PLL_OFF_OPMODE, PLL_OFF_FRAC, @@ -160,7 +163,9 @@ extern const struct clk_ops clk_alpha_pll_zonda_ops; extern const struct clk_ops clk_alpha_pll_lucid_evo_ops; extern const struct clk_ops clk_alpha_pll_reset_lucid_evo_ops; extern const struct clk_ops clk_alpha_pll_fixed_lucid_evo_ops; +#define clk_alpha_pll_fixed_lucid_ole_ops clk_alpha_pll_fixed_lucid_evo_ops extern const struct clk_ops clk_alpha_pll_postdiv_lucid_evo_ops; +#define clk_alpha_pll_postdiv_lucid_ole_ops clk_alpha_pll_postdiv_lucid_evo_ops extern const struct clk_ops clk_alpha_pll_rivian_evo_ops; #define clk_alpha_pll_postdiv_rivian_evo_ops clk_alpha_pll_postdiv_fabia_ops