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: 11114493 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 9B67418B7 for ; Mon, 26 Aug 2019 12:16:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E2CA217F5 for ; Mon, 26 Aug 2019 12:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821803; bh=Q7kiEkSXrf3gA7puG/o7zAZMeX+4Qx+gMA0f7vCks6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=001i0vPesH7NgL+WG7NVkVezfn4xRTxP4xZsa4f5L0YePF22tU8zoi/VkdiVkTNK3 awF4RlIyYnZnH78vapLMCNqwf39bU9z4EL1uNHpyynPkeznnOxeYraNFdpHTJM1+qY WRzz5q6ZEZ9k7ms9QqzX3lHLIxh+65yt9e/MF5yE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731684AbfHZMQe (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-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". 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: 11114491 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 5F46A1398 for ; Mon, 26 Aug 2019 12:16:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E14722CBB for ; Mon, 26 Aug 2019 12:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821803; bh=iwOFBOI7Gq5ajYrPylzZLoZNnSQjqr85990hVj91PIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=yZhnO0V/pnrBOrKJqaC3WskQ3D0/g7fK9Zznhygt3waNn3VtmUgLm3l7spydlTbFD Tpg+un+4rnReJm+4vYdWLQUiD7PmzVSGJ3Bdv7E4m3Sdt22YRu75tffWF8lnkvTIuu dQUNACNQXQR5f0gKpxfHohhZriSDIe8cE2dT6JQE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731710AbfHZMQi (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-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..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: 11114501 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 5E19318B7 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 3281A217F5 for ; Mon, 26 Aug 2019 12:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566821812; bh=hnznFt9S7TVw1/KfY6zUnuJXYTwixNogOEE40VUowrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KpJdpXCJh6yZaKmWlQh4i8qwQk46Q5rgfD3pysqAhDp8YkmUfAarj4j3gXvklnSwV 8biEYxdtT0kAdNSDueYX1ZJZyjtoz1/bc2ifmH0N0qXus9i2ixL3xxGwJwOF0ZAn1y J5v2kp6U+/KJ+YtrwOKGCJUPr+CbTylYCCZuF+n4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731751AbfHZMQn (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-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 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: 11114497 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 85304184E for ; Mon, 26 Aug 2019 12:16:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60C762184D 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=KfV0t7nXEYwGDRJPZ6BIcSwTkEq9sexz9KHOm1j/RvL07Rh41F6Fl8Yuq2Ns11g4k 8ig6V+hNKW62AwLatJ8Kdo1Keb2yAeUsO2GGKrT52luzRC2ImTic3tzUnkEUsUgZOH 3XusL7AnGA9Rhx4pYns9H0Gew92aq3bvdfdc7vr0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731784AbfHZMQr (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-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 | 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);