From patchwork Thu Aug 22 17:01:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11109653 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 9396C184E for ; Thu, 22 Aug 2019 17:03:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68A2D2341A for ; Thu, 22 Aug 2019 17:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493391; bh=lfVAKHj16esEkAReE/E5C9vGoxgfsaQfWvgRGQLgrNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=t5+Sh4W6/l6wvdE5bh4/KY1tcQ0I5EZiinDbhTmMQgX85OtqvBsBSVwZgooSkhOjT O/7ctLOLO22LNNDPJUiir3bFTMSR+wF/68rYh6lLR8oitBSk6McpXUR76ti6ky7f0P K2tWL46ra1xndevKxWcVEK+Gwp5DN+VxFW1E0ywY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387686AbfHVRDH (ORCPT ); Thu, 22 Aug 2019 13:03:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:55426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729506AbfHVRDH (ORCPT ); Thu, 22 Aug 2019 13:03:07 -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 E5B31233FE; Thu, 22 Aug 2019 17:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493386; bh=lfVAKHj16esEkAReE/E5C9vGoxgfsaQfWvgRGQLgrNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X8V+1z0ERRWQQ8HZ2RqqG0asDkIfuExM3QN3BZ4LFaVwBfiC+BrFmXkTkhTI1HRrG SGRT/wfPpYq0yDoCGyJVKnoyk2Xadqrv4JDYM02ArZL4K4wlZdEQYmE1uh5OVk+4xL uflDm/X68EGoXnW+kr3u0Me0G0yf9bLRm4nPwpAI= 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 1/4] dt-bindings: clock: Document the parent clocks Date: Thu, 22 Aug 2019 22:31:37 +0530 Message-Id: <20190822170140.7615-2-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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@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 --- 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_board". Example : From patchwork Thu Aug 22 17:01:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11109657 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 D70F813A4 for ; Thu, 22 Aug 2019 17:03:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B457023405 for ; 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=1566493395; bh=G20B2Sj+t5RLI31yQu/iPrpehHHuQshNQDtv8ZsXKG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=D3YyrDt8GeF/uuAZoH9gn3/wl9F8h7Np1c38g2vCHHGoCCe/hBph8nxWMK5E7AS0E 5CMMi14S4Fs79QIqq21jXvoayauDTerOkIlVQQTlYu9NSkZ7W5I85XjI+daIu7zKt9 vzVqyCgr5BVK5pIu360+R/eejKqMWLk5g9hKO+uU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387958AbfHVRDL (ORCPT ); Thu, 22 Aug 2019 13:03:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:55518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729506AbfHVRDL (ORCPT ); Thu, 22 Aug 2019 13:03:11 -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 2FD9E20870; Thu, 22 Aug 2019 17:03:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493390; bh=G20B2Sj+t5RLI31yQu/iPrpehHHuQshNQDtv8ZsXKG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TjJs0ipqr4j0e1Sd+2YOe+ViVKB/HVmU+vQ7RwkFxPogKe+Pu7AwHB/2JkNNQ8MnY TSF7R+advtsCOTZTXNeYeFHHO9kyIAuDzMsmnftVeCNQS+WPdTLW5R6aGmD4fU6VKN DIx4+790TbUrJ0rPRYDotdr8ClUgtXyiEYF9pua0= 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 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme Date: Thu, 22 Aug 2019 22:31:38 +0530 Message-Id: <20190822170140.7615-3-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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@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 --- 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..0bced7326a20 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_board", \ + .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_board", \ + .name = "xo_board", \ + }, \ .num_parents = 1, \ }, \ } From patchwork Thu Aug 22 17:01:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11109661 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 322281864 for ; Thu, 22 Aug 2019 17:03:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0669123406 for ; Thu, 22 Aug 2019 17:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493400; bh=hnznFt9S7TVw1/KfY6zUnuJXYTwixNogOEE40VUowrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kxG94QwivJeJzq8eDaZRlKJI4qFT/hlpnFNC/SZAGX9DBHeedEaHNfSusmDZeA4NA vDHuqURtopMUziF8zBuPZnv9hdyWjgX3F8nRCWTTu0w5N7y4RoTCtTL++zXDv3lLRt dJxJyft5psBhNk5CLJb3oSFpZ4mE5znoNYW3dXis= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388636AbfHVRDP (ORCPT ); Thu, 22 Aug 2019 13:03:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:55636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729506AbfHVRDP (ORCPT ); Thu, 22 Aug 2019 13:03:15 -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 687B123402; Thu, 22 Aug 2019 17:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493395; bh=hnznFt9S7TVw1/KfY6zUnuJXYTwixNogOEE40VUowrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EW1fqkENZQU4BenZGhzb+7Fa/dOlhEeE6BT/8K2N1+hMXZ5qvUk09TGaKoS6Yj9nz 93uBdl8y617hbqQi6QrWyL5Tb3seXPnfqJNdGSMcAgGcWSz6Y6h3J5+BcUBhdtnjwP 1L8e0UEsCV8CyU32sRPK/5KWFEGNNkqGOTXIiosk= 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 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible Date: Thu, 22 Aug 2019 22:31:39 +0530 Message-Id: <20190822170140.7615-4-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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@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 --- 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 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: 11109665 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 15382112C for ; Thu, 22 Aug 2019 17:03:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E751A20870 for ; Thu, 22 Aug 2019 17:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493405; bh=eWhlNJrVn2WWDv1wyTndsKzporKdSdo/ivD6WTF+MaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=DRawFJaiiPEV6aieAoZ1ooMfENk/qj33FmaI4WpFwBCmqp754XmVkSO6zeWizt57O 1v3pGDFmCeQ+wvPzNKWPmMpliM3WQCZFXvaXOy2vTmtZod0B0uOGxer7PTrbfu0czu wTtXZcw6eyYzLtgsdlRCfsR2dA/ZpbYGL1XWZayo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389984AbfHVRDU (ORCPT ); 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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@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(+) 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);