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: 172164 Delivered-To: patch@linaro.org Received: by 2002:ac9:5c4b:0:0:0:0:0 with SMTP id r11csp4069484ocp; Mon, 26 Aug 2019 05:16:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6gngN+cfayMFJEO8HlDKxAMp2NTbL6WaM9fkuEdVIKqmQX3V+z4A0+VXn3+8jKNjgRSN0 X-Received: by 2002:a17:902:1027:: with SMTP id b36mr17097962pla.203.1566821797630; Mon, 26 Aug 2019 05:16:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566821797; cv=none; d=google.com; s=arc-20160816; b=JlnShDT/TJfL0gYvBxHvGobZhtVG0hXNCDv/E3McA0VCvKsAUjr0d9WmNoFuB0ZkMY nTq1kdjqQMtelqoXzWufVs3GWVMFv4ssJsDye+LlrI1sB0z2Gjs+IfquxWch8erbq06h MsH4OwutfKUk+updHu6IZ+QFWZdxkXZOQvqPyzz52+W0gXFuwuu9kEVj5PPRz/NyWxDE 2ITYmU7V+yy1jlVG9TDTUs5VD2fcEbGUh6Tj6386lkjNFogGDVczN4mDLP3d2fR97sm6 p8mBbN7SqB2jGfL6WB9A0bMjxa2BnRUjHyjyaKJp5Fm65X0NwX2Ixh9v8ic+2eGaXzM2 oiww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E8MDKjvn//cEOCrkFwxgPuSp1J2YSe393/8h4yTQcmk=; b=TOeNf5G+pU2WnXLVUQ24AIwBCgmLh8cnGgYrM9Wc85FCeDsZ1ru3PxVgbynxkpitvA D+CEUu96GfRriCfb5qeSRlSXvCOOgPqgFaE7UfYmXkQumIzX4SZw+4lJtYBDuXInrvM+ b4Q+ORDM8Djp3HA1AGhjefBHk9dpqQpgk3HxBvkzoLVpa3Rjw/TV4v20urmLgi9HdEjI pdLp/h8ZY/gLvcYNO+4wys0kjVqWjQL9UvLEClyfW5IbWxi6tfLf5/hx2Va4QUenlrFd qx3SQk197ttHH2sUGGxjqVteNrg7Zvx6TjgK1wbzsO8z2ZOttS4PeoJMP68JCKJD3zQ6 esrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KR1SGY6L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si2454327plo.47.2019.08.26.05.16.37; Mon, 26 Aug 2019 05:16:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KR1SGY6L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731708AbfHZMQf (ORCPT + 28 others); Mon, 26 Aug 2019 08:16:35 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) -- 2.20.1 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: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: 172167 Delivered-To: patch@linaro.org Received: by 2002:ac9:5c4b:0:0:0:0:0 with SMTP id r11csp4069768ocp; Mon, 26 Aug 2019 05:16:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa/W0Tx9ndPpH4fSUNpPj+wvBBGK1pAzAtfcHZTMFwxRqicXjQTjhvLqApTcOViws7R0UE X-Received: by 2002:a63:db45:: with SMTP id x5mr16026554pgi.293.1566821809735; Mon, 26 Aug 2019 05:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566821809; cv=none; d=google.com; s=arc-20160816; b=UuMCsmE0mXxTubu6BAqy+k+tC8gZNNAvTeJ8NaFm3fiT5YVkgkC9K856xZA6pQJiJi b1erBiFqt6vyGZsJPxpC8XjazkqfUBP423Hj4XpF6RH5a378ALVgrCLH6B/fWdaBzEyz 9SLBxs5EE1OnhKQrHWXexD+VApYinm2t9Y/xEgFlZXG+vvykxRrrTy4Cul2bzuMsESSf +ASUWTO4MdLK65WC4RWDKU4tyrLhOFneUAgXWxxTb756R4DYSa75pWcc9pCZ7oWp83Ri yjnwLuNK/6P+2xTxAp1biXbXWbnTEcAr3t31azByFcpbpZrgmJyy89olAfD4Ye46/eqM P83w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nX+WL2+uU+cCJtt+Z0wM741G8ItOukDR3RUUrDiilZk=; b=woAGL0JA/XTjPY4SSLl19dFzqvEcYYc5BbJA2hq2zJXg3wYwNQbv4O+7P496+OO9K0 NhL1w6gQa7PfCl7pRe6MVgHWH2Cd9aS4/hLPmx/ovEfJOlaI9qnftFIIskWMaPnTFzHd ujTFlA9+hSDdFbtvr6z26qF2R9CiK4crsIDnnLK5Iu/pkX8RwZsDORFpYxChZPwjgkKz pgPpsVfCzYqAf+1ieJzmnqKs7a14YtCt0Yinf/HcGAEz7ppSwu0+GnrjS6By/2huVetI 0pZZgMt38fJoRNlvKKmIn0YvWS1Tyj7IEqwkMUePfiqHxGvLoZv+06aRzMuCWh1sv2L/ 3dKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W1UXCNaH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si9085176pgr.555.2019.08.26.05.16.49; Mon, 26 Aug 2019 05:16:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W1UXCNaH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731818AbfHZMQs (ORCPT + 28 others); Mon, 26 Aug 2019 08:16:48 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) -- 2.20.1 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);