From patchwork Thu Nov 26 07:21:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 332921 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp1091483ilb; Wed, 25 Nov 2020 23:24:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLEcHq7G7GjgfytiQxvfeZ4+hI8j3a3OPf5FZW2wuM97SnGaXBcvJt1aLK1OSqnRqRHF+j X-Received: by 2002:a50:9e05:: with SMTP id z5mr1256213ede.231.1606375480574; Wed, 25 Nov 2020 23:24:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606375480; cv=none; d=google.com; s=arc-20160816; b=iNTA5WyGnvYgARdCVKCK+iEq6GPefJeiYuF92RBTC93NkTyRxe7k/Bh0bh3Xww7dZ9 /kh/LzPFg+YwM3/rEquH4L9NMNBJLF/yd3YQu2QYpt0MTo/K/MZC/7RBeaxdK5zE+Oyn 6NKtPaK2Te4/SCqdWmRPxY+yVyQNCuePEk/KUGdy/ndDyMK7fKGoSCU98F+sC5DV5l1n mDJ4LcuwRbIWLKlsqYoIvZa8kCJQR/VdoyRDpvezK7trtJGhy1Xf9BTMeOFR95CMkUfF sMm10aZmVdvcIVPdBuL4fEU2aMPOtInUqMk9RumEXAFLcg0nVoQCrfAR11a9NXQUVtIY lLaw== 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=R1hYq6kEbx0/AP4j3UyJLMHKTGWiCK0VeyCBcdhowVA=; b=wbNbU7yWHPNpVLHBU+z/Jb98I64cUwhGPumatMYORm1IwZGvpS8mUHbZaJ/i4s9mML LwFwh0WeDeG8MmcRWbMK9FIMc7qxC4Lkl6ZbK5w/h7IGmvW7xpJ6OgYlenCxFIuqraRn xXFHJ65exaLrN+cz9vwRy5fWLxIJGlgPXZqQlxj36GFiyQXOzSbMUcjXgjotVO3Fo3xU NVD+nfz2uyGwCAHPYoaeQ+bXWO3WIFkpbVNKFuSbT4SV9rg8v2Qzait3ppfmvdsqz18Y 2c5IGeLPOYUs5ZR7ki6JlWhizeDtgt0hvoBWBaeoh+m3GOZt9kP46FsXUnAM4bBCktjA 1TuQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 y11si2875812edp.494.2020.11.25.23.24.40; Wed, 25 Nov 2020 23:24:40 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388478AbgKZHX4 (ORCPT + 15 others); Thu, 26 Nov 2020 02:23:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:41808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388477AbgKZHX4 (ORCPT ); Thu, 26 Nov 2020 02:23:56 -0500 Received: from localhost.localdomain (unknown [157.49.218.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DA4CC2068D; Thu, 26 Nov 2020 07:23:38 +0000 (UTC) From: Manivannan Sadhasivam To: sboyd@kernel.org, mturquette@baylibre.com, robh+dt@kernel.org Cc: bjorn.andersson@linaro.org, vkoul@kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH v4 4/6] clk: qcom: Add support for SDX55 RPMh clocks Date: Thu, 26 Nov 2020 12:51:44 +0530 Message-Id: <20201126072146.34842-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201126072146.34842-1-manivannan.sadhasivam@linaro.org> References: <20201126072146.34842-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for following clocks maintained by RPMh in SDX55 SoCs. * BI TCXO * RF_CLK1 * RF_CLK1_AO * RF_CLK2 * RF_CLK2_AO * QPIC (Qualcomm Technologies, Inc. Parallel Interface Controller) Signed-off-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Reviewed-by: Bjorn Andersson --- drivers/clk/qcom/clk-rpmh.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -- 2.25.1 diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index e2c669b08aff..fb72db957721 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -432,6 +432,25 @@ static const struct clk_rpmh_desc clk_rpmh_sm8250 = { .num_clks = ARRAY_SIZE(sm8250_rpmh_clocks), }; +DEFINE_CLK_RPMH_VRM(sdx55, rf_clk1, rf_clk1_ao, "rfclkd1", 1); +DEFINE_CLK_RPMH_VRM(sdx55, rf_clk2, rf_clk2_ao, "rfclkd2", 1); +DEFINE_CLK_RPMH_BCM(sdx55, qpic_clk, "QP0"); + +static struct clk_hw *sdx55_rpmh_clocks[] = { + [RPMH_CXO_CLK] = &sdm845_bi_tcxo.hw, + [RPMH_CXO_CLK_A] = &sdm845_bi_tcxo_ao.hw, + [RPMH_RF_CLK1] = &sdx55_rf_clk1.hw, + [RPMH_RF_CLK1_A] = &sdx55_rf_clk1_ao.hw, + [RPMH_RF_CLK2] = &sdx55_rf_clk2.hw, + [RPMH_RF_CLK2_A] = &sdx55_rf_clk2_ao.hw, + [RPMH_QPIC_CLK] = &sdx55_qpic_clk.hw, +}; + +static const struct clk_rpmh_desc clk_rpmh_sdx55 = { + .clks = sdx55_rpmh_clocks, + .num_clks = ARRAY_SIZE(sdx55_rpmh_clocks), +}; + static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec, void *data) { @@ -517,6 +536,7 @@ static int clk_rpmh_probe(struct platform_device *pdev) static const struct of_device_id clk_rpmh_match_table[] = { { .compatible = "qcom,sc7180-rpmh-clk", .data = &clk_rpmh_sc7180}, { .compatible = "qcom,sdm845-rpmh-clk", .data = &clk_rpmh_sdm845}, + { .compatible = "qcom,sdx55-rpmh-clk", .data = &clk_rpmh_sdx55}, { .compatible = "qcom,sm8150-rpmh-clk", .data = &clk_rpmh_sm8150}, { .compatible = "qcom,sm8250-rpmh-clk", .data = &clk_rpmh_sm8250}, { }