From patchwork Mon Aug 26 12:14:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11114487 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 49CB91800 for ; Mon, 26 Aug 2019 12:16:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27ED621872 for ; Mon, 26 Aug 2019 12:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821799; bh=Q7kiEkSXrf3gA7puG/o7zAZMeX+4Qx+gMA0f7vCks6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JiPv8vhzuqAbkW5DokmKRIyUw4MTFj0uKzDALJl70i/k5B8XhPngbX0SPGgwltM47 pLK2pakEMgrfWjUPX4OiW0YkyAWgg7tsFVgA+AXKm2CiHkT9KbsusElFp3XYKYUKmw ayy6ZNM7sLvBckg5aiRR183dbxNhup0AfA4gRWAw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731672AbfHZMQe (ORCPT ); Mon, 26 Aug 2019 08:16:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:37912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731592AbfHZMQd (ORCPT ); Mon, 26 Aug 2019 08:16:33 -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 645B62184D; Mon, 26 Aug 2019 12:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821793; bh=Q7kiEkSXrf3gA7puG/o7zAZMeX+4Qx+gMA0f7vCks6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KR1SGY6LYpLMg8NyMcu6nDx1CFdoBfef/yI9Ym3im5O/Q+MolbGw0Deq0TSwVt5Cu jthMgNuRXOylqkimoMO+/KeBfRjcaQUDFNgLfpgN4/SX98OjRDts+o1YDfYth3Fl5M U4d+fyba7gsQ9I7WNMVFb4tE7kMf0JjOSlMaJeis= 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 v4 1/4] dt-bindings: clock: Document the parent clocks Date: Mon, 26 Aug 2019 17:44:50 +0530 Message-Id: <20190826121453.21732-2-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190826121453.21732-1-vkoul@kernel.org> References: <20190826121453.21732-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". Example : From patchwork Mon Aug 26 12:14:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11114489 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 B26C918B7 for ; Mon, 26 Aug 2019 12:16:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 870EA2184D for ; Mon, 26 Aug 2019 12:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821799; bh=iwOFBOI7Gq5ajYrPylzZLoZNnSQjqr85990hVj91PIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=V4QgbyrRIlJO1I0KnZMIyw7kFiSDaQu3FqK9U9NDMOAd4dLq9676UaL7m2F1ToPh3 z2tC2z2mrt6fpppIj1VGLWQZ4/YwiJ+ocUiPfA6/6CKov7kgAtNk71qzBSrkuofSYN jWJkETlJZH7w1oaU9G8pYKrRwHfPe9KXHXmyGjvU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731712AbfHZMQi (ORCPT ); Mon, 26 Aug 2019 08:16:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:38060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731709AbfHZMQi (ORCPT ); Mon, 26 Aug 2019 08:16:38 -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 A9EED217F5; Mon, 26 Aug 2019 12:16:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821797; bh=iwOFBOI7Gq5ajYrPylzZLoZNnSQjqr85990hVj91PIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0p8Lp2aLQ4s0kJ2E1MbwWM0Obc5HqtoInRtyiIcxCCH07yLNekuwJqQXnGtmd7K4I 3s6ClIZK6Bf8ehUqGv4+q6Q31QtfZdNn9Rfx8rEvxEEG0KkPtQ/Pze64XSpqi735rA GhJ1yEAWi+Zol2W8IdVPRLRA9nupPqlaHUaEbibQ= 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 v4 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme Date: Mon, 26 Aug 2019 17:44:51 +0530 Message-Id: <20190826121453.21732-3-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190826121453.21732-1-vkoul@kernel.org> References: <20190826121453.21732-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..97aa092f5f40 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", \ + }, \ .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", \ + }, \ .num_parents = 1, \ }, \ } From patchwork Mon Aug 26 12:14:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11114495 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 06CCC1800 for ; Mon, 26 Aug 2019 12:16:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9B452186A for ; Mon, 26 Aug 2019 12:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821807; bh=hnznFt9S7TVw1/KfY6zUnuJXYTwixNogOEE40VUowrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=bcwVcE88P1vWXEG7+ssx4MOY7fDNXizvRZ+bB0Juvu+6xIlJOtOVDT2N1jxwSPkgG VXR0bVw+uSvTOK4FdyGNyHWb+tvZR7n2Ctxjh9KCAr11qx8ez2tHZSKPvfNIHhXFMl SEFN0jK1ZZ38Q89pf+z6pFOwDHNz1JeqvBfyPot4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731631AbfHZMQn (ORCPT ); Mon, 26 Aug 2019 08:16:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:38216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731709AbfHZMQm (ORCPT ); Mon, 26 Aug 2019 08:16:42 -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 F03FC2186A; Mon, 26 Aug 2019 12:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821801; bh=hnznFt9S7TVw1/KfY6zUnuJXYTwixNogOEE40VUowrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0sXyZYigBh4TrJe6smGL37q+Ee/L9BzKwt9ObXenB8R9ItN0fP72Ya6im9Af78p1s eETHxBqaG0Zfq9c/rseZUACBZl/EqNi0e1MgAXf/YTMusk5oZt+CenH1qI5hzeOd3V p8WImPQnWrqKNAalY9GfLWv5JZdXZNdEawioIaXY= 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 v4 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible Date: Mon, 26 Aug 2019 17:44:52 +0530 Message-Id: <20190826121453.21732-4-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190826121453.21732-1-vkoul@kernel.org> References: <20190826121453.21732-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 Mon Aug 26 12:14:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 11114499 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 0198A1398 for ; Mon, 26 Aug 2019 12:16:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2EAE22CBB for ; Mon, 26 Aug 2019 12:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821811; bh=tXUqhiySfD6lPQAcB630z21XV3dVhvqoXjyurJHZJkc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=APUAyRuUN1GF9PSTLg/2Qm/+yIHlDTjLOoDq87djoIsXE+X1iJE4Y703naneWBR4u 9ukyaOPEwAnl9GdVVjpOby6npELNrEbaK4DfEPOEN1S/SBRGf5tnDaAbnMy4xZPmUc gSahwrAO/xc4oRlAhoL2jlSwliDLphEi/0BTIqks= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731780AbfHZMQr (ORCPT ); Mon, 26 Aug 2019 08:16:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:38350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731774AbfHZMQq (ORCPT ); Mon, 26 Aug 2019 08:16:46 -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 421282184D; Mon, 26 Aug 2019 12:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821805; bh=tXUqhiySfD6lPQAcB630z21XV3dVhvqoXjyurJHZJkc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W1UXCNaH526rfnt/Gnf1co3YeSkueiuxRQl7HqbnsZcc5wutcRJjFkv0tBX0SUfVJ 20qsRNy0ogWIc0TKIxHpEyUd0l8zJIemPwp/wu3H69xEpoHhbvysHS4+CWaXXZBPhg fyYHXhAR/tXpnxw6sbXLzEOuEZ8GekDeTwnroTu0= 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 v4 4/4] clk: qcom: clk-rpmh: Add support for SM8150 Date: Mon, 26 Aug 2019 17:44:53 +0530 Message-Id: <20190826121453.21732-5-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190826121453.21732-1-vkoul@kernel.org> References: <20190826121453.21732-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 97aa092f5f40..082d0b72fe1e 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);