Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp279041pxu; Wed, 2 Dec 2020 23:06:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsIZD9HOVlp41/DcF+JUp/mEFuQG+pQx6Vd/61Mcbn9HZxFhivfCj8Vx4e6cW/mX8hLVoo X-Received: by 2002:a17:906:6713:: with SMTP id a19mr1338977ejp.468.1606979168508; Wed, 02 Dec 2020 23:06:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606979168; cv=none; d=google.com; s=arc-20160816; b=NgWxq45gd2uRlczrT9c2SN5RZUU6eaM0HxQ7yBkDqTmyX+JI8S/23Xl02JmCGH4sGX TScT9Sy1bQQ0srrG//wkKE0fOu5wpC3BpiGzd8BaJeSE00I7ims3eNQ9pN0QvW38r6CZ UmELLr3JZR3zgrut/EwN1JftOCNK2/on+82zbytCzmJwVrZNBhVSoqzpz/MFuKcSxd4i wxvNZi1Vy8uOsdBMuBaVrbY2Ea1b5aG4+MpgWinWENLntMpcmc6W8LgOgm7R90iE8iii u0y+I2ZhsYXb6gYYvZJI2SFH21OoR9dJpx/g3Y1ojVSOnlY8TrLeQQZHHIDwFenW6CVH Ogew== 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; bh=wRMVRo6f54gvIw5H46d0U11yso6jsJM8lDlN63MxM+Y=; b=VCYQVhKa7W096B3lWNsePo9lEMvwFON9e8DBfBe+j+gkOp4YwYTuN7d/9ph9xtAHiK kDV6m1h1Vjtb2lhwoG5vssuA8HVZkUuPO3EvIUiwFEy2FfaJxX8uKeh5tqusos6EtsyS 9mAJ6p46kUImkg37Uq7Q44GC2ArRXr2H5PD0UztEHOHM7295rJQjv6zbUVmv8L6kU8Sk A8yCePYV6D+r3T/t3hHpVVv6VD3u7PjbniwvoiQvzV8a0JtFY9zCNZS3VbO00mU/hLlu 2L8julxbhOt0aNxiS2DKPVF1N+xw63eED5BFr4VoV5uTfsuPtEz0EVP1S2S+D817ZDgb B+Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz8si609899ejb.182.2020.12.02.23.05.46; Wed, 02 Dec 2020 23:06:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387702AbgLCHEV (ORCPT + 99 others); Thu, 3 Dec 2020 02:04:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:50828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387420AbgLCHEV (ORCPT ); Thu, 3 Dec 2020 02:04:21 -0500 From: Vinod Koul Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Stephen Boyd Cc: Vinod Koul , Andy Gross , Bjorn Andersson , Michael Turquette , Rob Herring , Taniya Das , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] clk: qcom: rpmh: add support for SM8350 rpmh clocks Date: Thu, 3 Dec 2020 12:32:38 +0530 Message-Id: <20201203070241.2648874-3-vkoul@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201203070241.2648874-1-vkoul@kernel.org> References: <20201203070241.2648874-1-vkoul@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds the RPMH clocks present in SM8350 SoC Signed-off-by: Vinod Koul --- drivers/clk/qcom/clk-rpmh.c | 34 +++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,rpmh.h | 8 +++++++ 2 files changed, 42 insertions(+) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index e2c669b08aff..64cab4403a17 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -432,6 +432,39 @@ static const struct clk_rpmh_desc clk_rpmh_sm8250 = { .num_clks = ARRAY_SIZE(sm8250_rpmh_clocks), }; +DEFINE_CLK_RPMH_VRM(sm8350, div_clk1, div_clk1_ao, "divclka1", 2); +DEFINE_CLK_RPMH_VRM(sm8350, rf_clk4, rf_clk4_ao, "rfclka4", 1); +DEFINE_CLK_RPMH_VRM(sm8350, rf_clk5, rf_clk5_ao, "rfclka5", 1); +DEFINE_CLK_RPMH_BCM(sm8350, pka, "PKA0"); +DEFINE_CLK_RPMH_BCM(sm8350, hwkm, "HK0"); + +static struct clk_hw *sm8350_rpmh_clocks[] = { + [RPMH_CXO_CLK] = &sdm845_bi_tcxo.hw, + [RPMH_CXO_CLK_A] = &sdm845_bi_tcxo_ao.hw, + [RPMH_DIV_CLK1] = &sm8350_div_clk1.hw, + [RPMH_DIV_CLK1_A] = &sm8350_div_clk1_ao.hw, + [RPMH_LN_BB_CLK1] = &sm8250_ln_bb_clk1.hw, + [RPMH_LN_BB_CLK1_A] = &sm8250_ln_bb_clk1_ao.hw, + [RPMH_LN_BB_CLK2] = &sdm845_ln_bb_clk2.hw, + [RPMH_LN_BB_CLK2_A] = &sdm845_ln_bb_clk2_ao.hw, + [RPMH_RF_CLK1] = &sdm845_rf_clk1.hw, + [RPMH_RF_CLK1_A] = &sdm845_rf_clk1_ao.hw, + [RPMH_RF_CLK3] = &sdm845_rf_clk3.hw, + [RPMH_RF_CLK3_A] = &sdm845_rf_clk3_ao.hw, + [RPMH_RF_CLK4] = &sm8350_rf_clk4.hw, + [RPMH_RF_CLK4_A] = &sm8350_rf_clk4_ao.hw, + [RPMH_RF_CLK5] = &sm8350_rf_clk5.hw, + [RPMH_RF_CLK5_A] = &sm8350_rf_clk5_ao.hw, + [RPMH_IPA_CLK] = &sdm845_ipa.hw, + [RPMH_PKA_CLK] = &sm8350_pka.hw, + [RPMH_HWKM_CLK] = &sm8350_hwkm.hw, +}; + +static const struct clk_rpmh_desc clk_rpmh_sm8350 = { + .clks = sm8350_rpmh_clocks, + .num_clks = ARRAY_SIZE(sm8350_rpmh_clocks), +}; + static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec, void *data) { @@ -519,6 +552,7 @@ static const struct of_device_id clk_rpmh_match_table[] = { { .compatible = "qcom,sdm845-rpmh-clk", .data = &clk_rpmh_sdm845}, { .compatible = "qcom,sm8150-rpmh-clk", .data = &clk_rpmh_sm8150}, { .compatible = "qcom,sm8250-rpmh-clk", .data = &clk_rpmh_sm8250}, + { .compatible = "qcom,sm8350-rpmh-clk", .data = &clk_rpmh_sm8350}, { } }; MODULE_DEVICE_TABLE(of, clk_rpmh_match_table); diff --git a/include/dt-bindings/clock/qcom,rpmh.h b/include/dt-bindings/clock/qcom,rpmh.h index 2e6c54e65455..6dbe5d398bf0 100644 --- a/include/dt-bindings/clock/qcom,rpmh.h +++ b/include/dt-bindings/clock/qcom,rpmh.h @@ -21,5 +21,13 @@ #define RPMH_IPA_CLK 12 #define RPMH_LN_BB_CLK1 13 #define RPMH_LN_BB_CLK1_A 14 +#define RPMH_DIV_CLK1 15 +#define RPMH_DIV_CLK1_A 16 +#define RPMH_RF_CLK4 17 +#define RPMH_RF_CLK4_A 18 +#define RPMH_RF_CLK5 19 +#define RPMH_RF_CLK5_A 20 +#define RPMH_PKA_CLK 21 +#define RPMH_HWKM_CLK 22 #endif -- 2.26.2