From patchwork Mon Aug 26 17:31:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11115151 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EFFC1395 for ; Mon, 26 Aug 2019 17:32:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33E36206E0 for ; Mon, 26 Aug 2019 17:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566840772; bh=Q7kiEkSXrf3gA7puG/o7zAZMeX+4Qx+gMA0f7vCks6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RziesQfEOgRRxB3mOAWpAnMJ9QOnExcnK+04of3+LrZSZZsGbqPWSpZLCs9mTy3kx MF+cPnt9E7w92xeQV9aGZdOPXFKZpMqhrj/PqRsImLN/hoE/zWRCuiUtErnqrh08IM 9bpaAsXDw71OTHr5UxQ2tiERYr4zh6CkTEeMQHCk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732970AbfHZRcv (ORCPT ); Mon, 26 Aug 2019 13:32:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:53372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727211AbfHZRct (ORCPT ); Mon, 26 Aug 2019 13:32:49 -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 8CDD02186A; Mon, 26 Aug 2019 17:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566840769; bh=Q7kiEkSXrf3gA7puG/o7zAZMeX+4Qx+gMA0f7vCks6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mykDUBPXgguP2eO0Ndl8jUSCIEDDFJ9ajPgG+BH+wkFh2YBIa8pJ+57JS7ns9aekE /DKuc1DgxcB+1iqXFt8vCfQoicvdGb9U4CkRQ+IQ4Yq/U8hhLvTxtNMij+/C5MO6eE iu4dQ6fJErdP9Am4ZPCYofpjARUD/n6K3HUED5/I= 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 1/4] dt-bindings: clock: Document the parent clocks Date: Mon, 26 Aug 2019 23:01:17 +0530 Message-Id: <20190826173120.2971-2-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 With clock parent data scheme we must specify the parent clocks for the rpmhcc nodes. So describe the parent clock for rpmhcc in the bindings. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt index 3c007653da31..8b97968f9c88 100644 --- a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt +++ b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt @@ -9,6 +9,9 @@ Required properties : - compatible : shall contain "qcom,sdm845-rpmh-clk" - #clock-cells : must contain 1 +- clocks: a list of phandles and clock-specifier pairs, + one for each entry in clock-names. +- clock-names: Parent board clock: "xo". Example : From patchwork Mon Aug 26 17:31:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11115155 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 587FF184E for ; Mon, 26 Aug 2019 17:32:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2984D2186A for ; 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=1566840777; bh=/bpf7xC2H//gRGlYPbogjUfpowEtufJcXobWye4Cnlk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=DyBOcenoDBXNmsxs5B98hqi7dmMlg00IfLV9rKFsq9Flw03F47KKEwePrgFe/aUyL HTlH0hoQ1kJS9yfUY4n5OpqhaiSdDB+yzgj4Tbz3XV/E7ramAwCgQoZEmXOIOaPvJ5 w1GoCVE4ZXlmO0TR1ojXZxzzDc/oyklmZxGSw1NY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727211AbfHZRcz (ORCPT ); Mon, 26 Aug 2019 13:32:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:53430 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733008AbfHZRcy (ORCPT ); Mon, 26 Aug 2019 13:32:54 -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 C5AE021872; Mon, 26 Aug 2019 17:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566840773; bh=/bpf7xC2H//gRGlYPbogjUfpowEtufJcXobWye4Cnlk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ku/zyUq//J5sP5b/Jc4aUd/6Qs8Ci3Ac9uMLwlQI2K4DUTxDW1HXebjnTDhl1RB1S eUX9JmFeIGQjvCqit+C980G5SLh9DnmmZ8NjkBtNT86E7B9MMdTxTSZGTDA/HYJcWt cI+GHVXUB/KIWGVbVy72ZT4uZAtNFgagPaiU4Q0E= 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 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme Date: Mon, 26 Aug 2019 23:01:18 +0530 Message-Id: <20190826173120.2971-3-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 Convert the rpmh clock driver to use the new parent data scheme by specifying the parent data for board clock. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson --- drivers/clk/qcom/clk-rpmh.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index c3fd632af119..35d55aee6a01 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -95,7 +95,10 @@ static DEFINE_MUTEX(rpmh_clk_lock); .hw.init = &(struct clk_init_data){ \ .ops = &clk_rpmh_ops, \ .name = #_name, \ - .parent_names = (const char *[]){ "xo_board" }, \ + .parent_data = &(const struct clk_parent_data){ \ + .fw_name = "xo", \ + .name = "xo_board", \ + }, \ .num_parents = 1, \ }, \ }; \ @@ -110,7 +113,10 @@ static DEFINE_MUTEX(rpmh_clk_lock); .hw.init = &(struct clk_init_data){ \ .ops = &clk_rpmh_ops, \ .name = #_name_active, \ - .parent_names = (const char *[]){ "xo_board" }, \ + .parent_data = &(const struct clk_parent_data){ \ + .fw_name = "xo", \ + .name = "xo_board", \ + }, \ .num_parents = 1, \ }, \ } From patchwork Mon Aug 26 17:31:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11115163 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E8B11395 for ; Mon, 26 Aug 2019 17:33:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 526182070B for ; Mon, 26 Aug 2019 17:33:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566840789; bh=hnznFt9S7TVw1/KfY6zUnuJXYTwixNogOEE40VUowrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QnxHkDhHmQ+76/1HtGrF0oRFzBXfMrCip1niTXrTfVXxCBLWqtag0dQr+s/0bKNUn klsNp97+5d57OtLRpLa/0wxSsIYnWcP8iMjRaa3iiKuC6OKnI5F4Rfi26bXl1IIfuH crkHKD4L27mkBQbYvPsUGx4McUInw4Ijvyzbdleg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733095AbfHZRc7 (ORCPT ); Mon, 26 Aug 2019 13:32:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:53506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733051AbfHZRc6 (ORCPT ); Mon, 26 Aug 2019 13:32:58 -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 0A19D206E0; Mon, 26 Aug 2019 17:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566840777; bh=hnznFt9S7TVw1/KfY6zUnuJXYTwixNogOEE40VUowrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UvgMAvgVfzaACmtxCWN9m9/V+kLe9v9ciGMkFL8QoiFF+XOzNJwABTHTJEfPdG3db Lc5AhlOS7D0pCTju1ZGtL9WJzH1JCH0ZeuPi/RcBAp6d7ltJLx7bZy96hKLwCAF/vT aB56W89bUBpNgzbwY7ExH6Nh8wzlTL3acMu8Mk+o= 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 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible Date: Mon, 26 Aug 2019 23:01:19 +0530 Message-Id: <20190826173120.2971-4-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 Document the SM8150 rpmh-clock compatible for rpmh clock controller found on SM8150 platforms. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt index 8b97968f9c88..365bbde599b1 100644 --- a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt +++ b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt @@ -6,7 +6,9 @@ some Qualcomm Technologies Inc. SoCs. It accepts clock requests from other hardware subsystems via RSC to control clocks. Required properties : -- compatible : shall contain "qcom,sdm845-rpmh-clk" +- compatible : must be one of: + "qcom,sdm845-rpmh-clk" + "qcom,sm8150-rpmh-clk" - #clock-cells : must contain 1 - clocks: a list of phandles and clock-specifier pairs, 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: 11115157 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B9771395 for ; Mon, 26 Aug 2019 17:33:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 791B121872 for ; Mon, 26 Aug 2019 17:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566840784; bh=4wFu03Ac/Jjd2z/fTVgXD079XnLR7S29H7ylY2f171Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=by4v1I6tZHDylFL8DzjQxGrw6Jlt3Q8fq2Pc9wFndyC90lyVNk5MWuiVDnOQTCD2/ S14eyGfCTP2VG3ZEVNwXyfSfnRI8aFMw0pbFWmgjvVPg+xnE4wlUCXJtiC53hOQ05K sntURofEqeW3fnzgXXyLM0XAxiyJ9OQStgabwC0g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733134AbfHZRdD (ORCPT ); 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(+) 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);