From patchwork Wed Oct 25 07:32:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 737985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C02FC25B47 for ; Wed, 25 Oct 2023 07:34:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233886AbjJYHef (ORCPT ); Wed, 25 Oct 2023 03:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233938AbjJYHdl (ORCPT ); Wed, 25 Oct 2023 03:33:41 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 950391B3 for ; Wed, 25 Oct 2023 00:33:00 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-507c78d258fso7717984e87.2 for ; Wed, 25 Oct 2023 00:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698219178; x=1698823978; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qJrpI5nxU9cuMaUw8OFL5m5bwnYY8HlXt1mNtFEQ7qs=; b=cGwa4yLrax9JCF7uwgvAUwljUxL0RfgOsRMQtcXg+MJGo+CheJCA7T/4ybAoFgAjOf qXio/a+2tQG1g6PSRmBBcXTNGsPqcoxJPNiCLnFxZUwZrAsKhTel60TI7Oy42l2rCuy6 WE3wh0Z2S74dDsNBsMrcl4WAN5xJ9CUY5lxzQHrmiDq0YK/hCyrTmRZhLPJWLcLGFtqW bmx3s7Z0QDGMGbEcmP/IcvJEVKFb2moiG9SrCuh4MSPWzK3RYv8ZIT9neR7LKw1X5N5E teg/duO4fOaU6zNzPbhW0NOsw6M4VMYVEXtMJW5hXcF0yHpWE5EkKjfYG1EneXeAiy6K wK/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698219178; x=1698823978; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qJrpI5nxU9cuMaUw8OFL5m5bwnYY8HlXt1mNtFEQ7qs=; b=vtJAYWKcb2rjgsvNIwU54zLmpDrZQ/Nda3pgSq9WYL63VEkYDY48oJ9HwMWHTv2/+L TH6DsLrkgU5YUs499JeRtb83nb8yoePXFqmSmmWRSgKF8a74H0KEftGihLYZGqd/hjoY ZRt2cSMVpdRezQ3uW5lzkerBN5NoJZbME0cTkJG9ndZ3htRjTQuvVWdw96Fx7liANQzL TKhoRubDB5TMAO6WM1/27sV7qi2J3dssSmc5AnWRmkKFzrHp+gnNxD4pEvknpyJXBgrn Dm65brZD2ThY1BJqToFgiABYPG3mR+D+dC2q1Q8nwwhRUBsiv1odu89g2J4c3+ZTetY1 ks7Q== X-Gm-Message-State: AOJu0Yyfj+JePMjS1S9IMJD4+5XE5DpVvkCbAtFXjk+TDWMcLIdGba5x OmuhLe4ndXZox8ufiPCq4tYZlw== X-Google-Smtp-Source: AGHT+IGQru0I6swlvWecY5IFJ4i/mUG98Dt9NIfG6wTfZk3h2OCz/KTBa6Yk9Xak/rAc3xmwJaSZtg== X-Received: by 2002:a05:6512:376c:b0:507:9a66:3577 with SMTP id z12-20020a056512376c00b005079a663577mr8841092lft.5.1698219178262; Wed, 25 Oct 2023 00:32:58 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id v18-20020a05600c15d200b004063d8b43e7sm18422239wmf.48.2023.10.25.00.32.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 00:32:57 -0700 (PDT) From: Neil Armstrong Date: Wed, 25 Oct 2023 09:32:47 +0200 Subject: [PATCH 10/10] clk: qcom: rpmh: add clocks for SM8650 MIME-Version: 1.0 Message-Id: <20231025-topic-sm8650-upstream-clocks-v1-10-c89b59594caf@linaro.org> References: <20231025-topic-sm8650-upstream-clocks-v1-0-c89b59594caf@linaro.org> In-Reply-To: <20231025-topic-sm8650-upstream-clocks-v1-0-c89b59594caf@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Taniya Das Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2560; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=dzJGDHfO/28v2dj9L1hevUwNj64Z2rtH0Uclrax74CI=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlOMSdRHggDfIH29o/ZTdDCnof+6DWZi0IbldORgwu as+H+ZKJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZTjEnQAKCRB33NvayMhJ0XdVEA DPVaHsPGZJOkKLWN/6cGFWw4JvXJc856xk7jR6OBpZKhCCLLbnEGcxZgKoSIxivdYlBeaIhQCXdkHA kPTYgavGQ1T61SAv0eh94+109a/AL+I5WjigdR/SkoYBwtgLmeabpfQCpiXttANvcZfKh+ydhQdvkU wzokRJh6DDp/wKZ/1dqGH5qMhblm5Yk6a3US1MjRcK7b+Xd/NfzOFMdL1vBnCZgC0SLWCFN2IObHxb xQ0ggldzm3+46tFt0mO3ORJtoqvtsSYvxMwM964cw9u6t2Ufb1MvXCBR6xOokbxMjQ3S2lWJCoxnh3 vyX1gbnr/ei1qKlLLPVG3HVS2Jb+1KK7VsVaIaHNOdqtj/VWoCbdbD+iu1BzOpY3mXQ7c3UFgxS3hl rnkhkNy10FYBiCpspIXxIcV+jwRGl1F0fs0IY3olGzw3+zmwlf/tck032XyWPfn5NOPm6GTIkWrkMz 7ZRdJKoqbsyTMiCFFm6bRBzL0VcSszJvlrRYKlXmQhV4/t7PkhvcKL/MWkiYVYhekHRTb4cPqacgvD wPTLi0eZ0S6GS0xu8BS5FD9/vb8IOlXmpcrWTxGw7K4PHcTsyRR9KO+jqIgfGQ4YFrV4M7e71Qtvkb zQwddYTnn6ABsyG/TIKai6eoUlKLw4gmkg+R7OyYrV+NMbsbdAyYv1YcSqeA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add RPMH Clocks for the SM8650 platform. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov --- drivers/clk/qcom/clk-rpmh.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index 5d853fd43294..ea175c2dae95 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -372,6 +372,8 @@ DEFINE_CLK_RPMH_VRM(clk3, _a1, "clka3", 1); DEFINE_CLK_RPMH_VRM(clk4, _a1, "clka4", 1); DEFINE_CLK_RPMH_VRM(clk5, _a1, "clka5", 1); +DEFINE_CLK_RPMH_VRM(clk4, _a2, "clka4", 2); +DEFINE_CLK_RPMH_VRM(clk5, _a2, "clka5", 2); DEFINE_CLK_RPMH_VRM(clk6, _a2, "clka6", 2); DEFINE_CLK_RPMH_VRM(clk7, _a2, "clka7", 2); DEFINE_CLK_RPMH_VRM(clk8, _a2, "clka8", 2); @@ -630,6 +632,32 @@ static const struct clk_rpmh_desc clk_rpmh_sm8550 = { .num_clks = ARRAY_SIZE(sm8550_rpmh_clocks), }; +static struct clk_hw *sm8650_rpmh_clocks[] = { + [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div2.hw, + [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div2_ao.hw, + [RPMH_LN_BB_CLK1] = &clk_rpmh_clk6_a2.hw, + [RPMH_LN_BB_CLK1_A] = &clk_rpmh_clk6_a2_ao.hw, + [RPMH_LN_BB_CLK2] = &clk_rpmh_clk7_a2.hw, + [RPMH_LN_BB_CLK2_A] = &clk_rpmh_clk7_a2_ao.hw, + [RPMH_LN_BB_CLK3] = &clk_rpmh_clk8_a2.hw, + [RPMH_LN_BB_CLK3_A] = &clk_rpmh_clk8_a2_ao.hw, + [RPMH_RF_CLK1] = &clk_rpmh_clk1_a1.hw, + [RPMH_RF_CLK1_A] = &clk_rpmh_clk1_a1_ao.hw, + [RPMH_RF_CLK2] = &clk_rpmh_clk2_a1.hw, + [RPMH_RF_CLK2_A] = &clk_rpmh_clk2_a1_ao.hw, + /* missing RPMh resource address for clka3 */ + [RPMH_RF_CLK4] = &clk_rpmh_clk4_a2.hw, + [RPMH_RF_CLK4_A] = &clk_rpmh_clk4_a2_ao.hw, + [RPMH_RF_CLK5] = &clk_rpmh_clk5_a2.hw, + [RPMH_RF_CLK5_A] = &clk_rpmh_clk5_a2_ao.hw, + [RPMH_IPA_CLK] = &clk_rpmh_ipa.hw, +}; + +static const struct clk_rpmh_desc clk_rpmh_sm8650 = { + .clks = sm8650_rpmh_clocks, + .num_clks = ARRAY_SIZE(sm8650_rpmh_clocks), +}; + static struct clk_hw *sc7280_rpmh_clocks[] = { [RPMH_CXO_CLK] = &clk_rpmh_bi_tcxo_div4.hw, [RPMH_CXO_CLK_A] = &clk_rpmh_bi_tcxo_div4_ao.hw, @@ -837,6 +865,7 @@ static const struct of_device_id clk_rpmh_match_table[] = { { .compatible = "qcom,sm8350-rpmh-clk", .data = &clk_rpmh_sm8350}, { .compatible = "qcom,sm8450-rpmh-clk", .data = &clk_rpmh_sm8450}, { .compatible = "qcom,sm8550-rpmh-clk", .data = &clk_rpmh_sm8550}, + { .compatible = "qcom,sm8650-rpmh-clk", .data = &clk_rpmh_sm8650}, { .compatible = "qcom,sc7280-rpmh-clk", .data = &clk_rpmh_sc7280}, { } };