From patchwork Mon Aug 26 17:31:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 172193 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp4654564ily; Mon, 26 Aug 2019 10:33:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwYR6mcnyDEx62EwnGNeUpVEHwiWSnM/2b2yfE1w47k7tU5Q+9Aojq4DSu0mDPfHXdHNG8 X-Received: by 2002:a62:5207:: with SMTP id g7mr21771948pfb.152.1566840784610; Mon, 26 Aug 2019 10:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566840784; cv=none; d=google.com; s=arc-20160816; b=C2gkIwUxnxtj7qApzNQlvXeM5vprMNoZwyFZOLAiMg/RugVzcy70hkwn7cVD2ZdcOh QbxbTAxwuLUeNXmZE1fERZ0KEDl9weCSlR63W6qSfDJXhJZ+r7iTgDpLhr/oRxPaPxa3 qSCk8z9E1zSo7oFJEszD7nQIvnw/72LVYkqNTYDSdTj4sR09EhpZV4THATjbIsSH24IL DnACBDdO9iIoMbd8ZSfZQbm8lCN7IJIo6Uniuw9Lre1y7i9LQ7Cc8/qr35tcgtdDPyxh xVUjsI3uELX2Lf7twLkxkqzJBkRJY1xuWlGIl6nuwNDfq6Cf6URA+FigNJXONZ6cdOIc XBiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VhsAlXwqmItrDS/ineGROdywVHv4ndZACLFnOyxiMy4=; b=YJZIFwAXhaIZue+0WkeoIjVdI7t3x7CLq56JoXZtXjC3rYMM+C2jIigx+5Of0EfSXV R8fMITVl/eGwUn0xu51MpI1QBuA4wXEk+fyvhj1n5rDU5ecrb4MRWLQzGMZJfZGCNDDa 1TflyK+g/rGSHFrT4U4H59RfWrvdBZUQ69cxD7I+97s/cC10T8wjwJpSsi4IBIgCeWLd ZGuiLZ90cJkPHFI9w6GwEzyPD1uf25FerJ19piMKTfcux8r7ACUv5r5JdaiN3nwR0qF6 T/XEqiFmjJg4zDEsUblnYy+Nr3s6+X7+8STIwKvSr//PpX3rhpAqnSpHQk6FN3cpQH7D T+8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Eg3Ijfi7; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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. [209.132.180.67]) by mx.google.com with ESMTP id e10si4127127pfi.282.2019.08.26.10.33.04; Mon, 26 Aug 2019 10:33:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Eg3Ijfi7; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1733134AbfHZRdD (ORCPT + 16 others); Mon, 26 Aug 2019 13:33:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:53580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733129AbfHZRdC (ORCPT ); Mon, 26 Aug 2019 13:33:02 -0400 Received: from localhost.localdomain (unknown [122.178.200.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 433F22186A; Mon, 26 Aug 2019 17:32:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566840781; bh=4wFu03Ac/Jjd2z/fTVgXD079XnLR7S29H7ylY2f171Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eg3Ijfi7eUHBdltdQHGVDDDVEn0JHoBDBxfZ8H3pIBPQaNqWJOXFsIZFUzJVp8Wkn 3tV/Hg6KcT6yEGLXEGuIimZtJBj6PRyg4bQmjFTaw4O9l87OmXKFWGse81UQhxkbjl t/dOTdGk0YpTlH1lN9aXBoe6o+1lSB/BnBhqUP3c= From: Vinod Koul To: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, Bjorn Andersson , Vinod Koul , Andy Gross , Michael Turquette , Rob Herring , Mark Rutland , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 4/4] clk: qcom: clk-rpmh: Add support for SM8150 Date: Mon, 26 Aug 2019 23:01:20 +0530 Message-Id: <20190826173120.2971-5-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190826173120.2971-1-vkoul@kernel.org> References: <20190826173120.2971-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for rpmh clocks found in SM8150 Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson --- drivers/clk/qcom/clk-rpmh.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) -- 2.20.1 diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index 35d55aee6a01..49694082e9ec 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -374,6 +374,33 @@ static const struct clk_rpmh_desc clk_rpmh_sdm845 = { .num_clks = ARRAY_SIZE(sdm845_rpmh_clocks), }; +DEFINE_CLK_RPMH_ARC(sm8150, bi_tcxo, bi_tcxo_ao, "xo.lvl", 0x3, 2); +DEFINE_CLK_RPMH_VRM(sm8150, ln_bb_clk2, ln_bb_clk2_ao, "lnbclka2", 2); +DEFINE_CLK_RPMH_VRM(sm8150, ln_bb_clk3, ln_bb_clk3_ao, "lnbclka3", 2); +DEFINE_CLK_RPMH_VRM(sm8150, rf_clk1, rf_clk1_ao, "rfclka1", 1); +DEFINE_CLK_RPMH_VRM(sm8150, rf_clk2, rf_clk2_ao, "rfclka2", 1); +DEFINE_CLK_RPMH_VRM(sm8150, rf_clk3, rf_clk3_ao, "rfclka3", 1); + +static struct clk_hw *sm8150_rpmh_clocks[] = { + [RPMH_CXO_CLK] = &sm8150_bi_tcxo.hw, + [RPMH_CXO_CLK_A] = &sm8150_bi_tcxo_ao.hw, + [RPMH_LN_BB_CLK2] = &sm8150_ln_bb_clk2.hw, + [RPMH_LN_BB_CLK2_A] = &sm8150_ln_bb_clk2_ao.hw, + [RPMH_LN_BB_CLK3] = &sm8150_ln_bb_clk3.hw, + [RPMH_LN_BB_CLK3_A] = &sm8150_ln_bb_clk3_ao.hw, + [RPMH_RF_CLK1] = &sm8150_rf_clk1.hw, + [RPMH_RF_CLK1_A] = &sm8150_rf_clk1_ao.hw, + [RPMH_RF_CLK2] = &sm8150_rf_clk2.hw, + [RPMH_RF_CLK2_A] = &sm8150_rf_clk2_ao.hw, + [RPMH_RF_CLK3] = &sm8150_rf_clk3.hw, + [RPMH_RF_CLK3_A] = &sm8150_rf_clk3_ao.hw, +}; + +static const struct clk_rpmh_desc clk_rpmh_sm8150 = { + .clks = sm8150_rpmh_clocks, + .num_clks = ARRAY_SIZE(sm8150_rpmh_clocks), +}; + static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec, void *data) { @@ -453,6 +480,7 @@ static int clk_rpmh_probe(struct platform_device *pdev) 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}, { } }; MODULE_DEVICE_TABLE(of, clk_rpmh_match_table);