From patchwork Thu Aug 22 17:01:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 172037 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1164339ily; Thu, 22 Aug 2019 10:03:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqza16JibZzrKl5Cn0qXrbJRTKqWTpCa8eh4YIKUsrTI1kI0E2IgyOpOhC04UYPiauXxZRVr X-Received: by 2002:a65:638c:: with SMTP id h12mr221434pgv.436.1566493417842; Thu, 22 Aug 2019 10:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566493417; cv=none; d=google.com; s=arc-20160816; b=qiw+ABDh7wIAPREgNACNLr4b/uV6697CEbFeHQqaF90DulYQcAUXph8GyrSsL83xW4 qKiRRpewPgEVjmH22J1EvWFRfBJyEzMddbbfT7+/tNQGOzH5ywFm73xv/yjQOYiyeG+S haECmmP0c7VlS+/0im5Pm2Fy9im9mGbr0VeG02jzH6THPmZnwtwBKjXwpiJCDg+y3PJ/ W96UU9KZHhd7n4LDOESReQuKL2ansJ6hO7oMJtp6WPFwQpBEq7E8hzPUh2HiYtCwfAZL tANBiX4TJTpWV+UN1ljEZKpyxCY9pv5GEliv4bEgIaE8OR0aq/BEQQsGdYPxFLqbyDsI HtDg== 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=RnXz2GskQU82XR+i1x1gJW3ylcVVtds8blXaBccDm2A=; b=Ndf1gJlDVBL3J46I3ZpfxgXPvCQun+qV6tnfxsl9c38PgTtQGsabDeg+S7cBX40WUe d7mqDR/KoPk2EuxPjQwgp4i9SXs+OncAxlMtxK6XvYKhv5LP9ceoargGUHfzgcS8HqQ2 VWUt/haHJNYzhczOSCf/Czp3LBMO1H2YQufwGSJjRL77dFl/uuY5toV0B5a7zWM2duVC OaFmhbEyN9xy8akfVRJbObdMD55bOzwSpfmtXbywWr8o2/USkJ3ZZJS27MuSriE0sMTO R4n1utU0hzLv4aFwVEFAlPM25I43zfl3/eCkQoiqwT/KlKRfm7E1Cmsn4BGvY/JyW7ou LwjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KxSIc4xt; 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 d75si138187pfd.233.2019.08.22.10.03.37; Thu, 22 Aug 2019 10:03:37 -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=KxSIc4xt; 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 S2389975AbfHVRDU (ORCPT + 16 others); Thu, 22 Aug 2019 13:03:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:55740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729506AbfHVRDU (ORCPT ); Thu, 22 Aug 2019 13:03:20 -0400 Received: from localhost.localdomain (unknown [171.61.89.145]) (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 A852220870; Thu, 22 Aug 2019 17:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493399; bh=eWhlNJrVn2WWDv1wyTndsKzporKdSdo/ivD6WTF+MaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KxSIc4xtCbm+/h88YjlhfuP6n7x8r3kMHQvlNXvbXobqZH+tXOgFfIUsX5GUdDIYD d2hoZbCetSRoK4Rvz/kJphaE6p4ulaoDsVUoFuwhSVOBpgrH/BOwSRglACj3g5NvJ9 XYlopgGEfzGZgJVkXVZfCfTsP2owKhYn6xRKMbbw= 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 v3 4/4] clk: qcom: clk-rpmh: Add support for SM8150 Date: Thu, 22 Aug 2019 22:31:40 +0530 Message-Id: <20190822170140.7615-5-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190822170140.7615-1-vkoul@kernel.org> References: <20190822170140.7615-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 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) -- 2.20.1 diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index 0bced7326a20..5da1ef58dcc4 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -374,6 +374,32 @@ 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 +479,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);