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: 11109651 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 5EEFA112C 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 3CC8123402 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=1PtlOoPa0r4pGm5v7hWvwSybaK2RGKdAg/MxwZjqpH2SbHls0o/Zd3iE+2hRet2nW SSqVTPiaIMKLpP0f/S/Lqusp19ulJjekU3wrtL59+VRgB0WQeh65qBXnMBZ7S5hCSk 4dpJLRjHJtoMLlznrVAMEP1OMThIS5HJcsxMiwWU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387708AbfHVRDH (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-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 --- 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: 11109655 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 97B1813A4 for ; Thu, 22 Aug 2019 17:03:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D1BE23405 for ; Thu, 22 Aug 2019 17:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493392; bh=G20B2Sj+t5RLI31yQu/iPrpehHHuQshNQDtv8ZsXKG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=B7Ws2U7/LtD/tt+7kN160IKwMSDp+JzPqmMzALNA9WEcnAxYQojeCanxWfacKdvS/ fRsNkhII2nftTnFt/jtPnTLlpo61zKXu6KpGwa36xomsHWDc17Eq2IuvtefqdMS+rQ MJtp31khMBiDDyYt8BrXHeiRHv3uXnL/ak3uNxAo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387965AbfHVRDL (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-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 --- 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: 11109659 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 F0B4C112C for ; Thu, 22 Aug 2019 17:03:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF2B323405 for ; Thu, 22 Aug 2019 17:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493399; bh=hnznFt9S7TVw1/KfY6zUnuJXYTwixNogOEE40VUowrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zHLLK+Z2ijkNdYTj5VI5MqpWGKCiVOb7gVUv7El/y1jLQmslf3b5tRMgHni6XGMT5 +mw4ut0BUYWHP2WeRQpIjx32kjSmtT7RjHSQF/qeX0SF1aDvdZGFziPlUTPaSxdx1C nVTLxAPJhBu4hl24Wys1SyTiAHZvaQlRDlafsGeg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388637AbfHVRDP (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-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 --- 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: 11109663 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 6F461112C for ; Thu, 22 Aug 2019 17:03:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D2F623406 for ; Thu, 22 Aug 2019 17:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493401; bh=eWhlNJrVn2WWDv1wyTndsKzporKdSdo/ivD6WTF+MaQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=M1yrQX9k28aSssajDqxpuR2tv1EhwrmejNCoEWgfNyB9cmNW4nGjm0654TZj23HXl CX2SiAfkJrKfBNwgejxYVQIUtEJRfdN2q09peZxyv6BKJQ57Ub+HeORsmfI7pcBxQN HhB91VaaHACOYAmnwUi0fohapzrLtr27E2srIm5U= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389975AbfHVRDU (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-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(+) 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);