linux-remoteproc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Govind Singh <govinds@codeaurora.org>
To: bjorn.andersson@linaro.org, linux-remoteproc@vger.kernel.org,
	sboyd@kernel.org, linux-clk@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Cc: andy.gross@linaro.org, linux-soc@vger.kernel.org,
	devicetree@vger.kernel.org, Govind Singh <govinds@codeaurora.org>
Subject: [PATCH v5 1/7] clk: qcom: Add WCSS gcc clock control for QCS404
Date: Fri, 26 Jul 2019 14:53:26 +0530	[thread overview]
Message-ID: <20190726092332.25202-2-govinds@codeaurora.org> (raw)
In-Reply-To: <20190726092332.25202-1-govinds@codeaurora.org>

Add support for the WCSS QDSP gcc clock control used on qcs404
based devices. This would allow wcss remoteproc driver to control
the required gcc clocks to bring the subsystem out of reset.

Signed-off-by: Govind Singh <govinds@codeaurora.org>
---
 drivers/clk/qcom/gcc-qcs404.c               | 30 +++++++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-qcs404.h |  3 +++
 2 files changed, 33 insertions(+)

diff --git a/drivers/clk/qcom/gcc-qcs404.c b/drivers/clk/qcom/gcc-qcs404.c
index 29cf464dd2c8..e12c04c09a6a 100644
--- a/drivers/clk/qcom/gcc-qcs404.c
+++ b/drivers/clk/qcom/gcc-qcs404.c
@@ -2604,6 +2604,32 @@ static struct clk_branch gcc_usb_hs_system_clk = {
 	},
 };
 
+static struct clk_branch gcc_wdsp_q6ss_ahbs_clk = {
+	.halt_reg = 0x1e004,
+	.halt_check = BRANCH_HALT,
+	.clkr = {
+		.enable_reg = 0x1e004,
+		.enable_mask = BIT(0),
+		.hw.init = &(struct clk_init_data){
+			.name = "gcc_wdsp_q6ss_ahbs_clk",
+			.ops = &clk_branch2_ops,
+		},
+	},
+};
+
+static struct clk_branch gcc_wdsp_q6ss_axim_clk = {
+	.halt_reg = 0x1e008,
+	.halt_check = BRANCH_HALT,
+	.clkr = {
+		.enable_reg = 0x1e008,
+		.enable_mask = BIT(0),
+		.hw.init = &(struct clk_init_data){
+			.name = "gcc_wdsp_q6ss_axim_clk",
+			.ops = &clk_branch2_ops,
+		},
+	},
+};
+
 static struct clk_hw *gcc_qcs404_hws[] = {
 	&cxo.hw,
 };
@@ -2749,6 +2775,9 @@ static struct clk_regmap *gcc_qcs404_clocks[] = {
 	[GCC_QDSS_DAP_CLK] = &gcc_qdss_dap_clk.clkr,
 	[GCC_DCC_CLK] = &gcc_dcc_clk.clkr,
 	[GCC_DCC_XO_CLK] = &gcc_dcc_xo_clk.clkr,
+	[GCC_WCSS_Q6_AHB_CLK] = &gcc_wdsp_q6ss_ahbs_clk.clkr,
+	[GCC_WCSS_Q6_AXIM_CLK] =  &gcc_wdsp_q6ss_axim_clk.clkr,
+
 };
 
 static const struct qcom_reset_map gcc_qcs404_resets[] = {
@@ -2774,6 +2803,7 @@ static const struct qcom_reset_map gcc_qcs404_resets[] = {
 	[GCC_PCIE_0_SLEEP_ARES] = { 0x3e040, 1 },
 	[GCC_PCIE_0_PIPE_ARES] = { 0x3e040, 0 },
 	[GCC_EMAC_BCR] = { 0x4e000 },
+	[GCC_WDSP_RESTART] = {0x19000},
 };
 
 static const struct regmap_config gcc_qcs404_regmap_config = {
diff --git a/include/dt-bindings/clock/qcom,gcc-qcs404.h b/include/dt-bindings/clock/qcom,gcc-qcs404.h
index 2cd62c98561f..bc3051543347 100644
--- a/include/dt-bindings/clock/qcom,gcc-qcs404.h
+++ b/include/dt-bindings/clock/qcom,gcc-qcs404.h
@@ -146,6 +146,8 @@
 #define GCC_MDP_TBU_CLK					138
 #define GCC_QDSS_DAP_CLK				139
 #define GCC_DCC_XO_CLK					140
+#define GCC_WCSS_Q6_AHB_CLK				141
+#define GCC_WCSS_Q6_AXIM_CLK				142
 #define GCC_CDSP_CFG_AHB_CLK				143
 #define GCC_BIMC_CDSP_CLK				144
 #define GCC_CDSP_TBU_CLK				145
@@ -173,5 +175,6 @@
 #define GCC_PCIE_0_CORE_STICKY_ARES			19
 #define GCC_PCIE_0_SLEEP_ARES				20
 #define GCC_PCIE_0_PIPE_ARES				21
+#define GCC_WDSP_RESTART				22
 
 #endif
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2019-07-26  9:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  9:23 [PATCH v5 0/7] Add non PAS wcss Q6 support for QCS404 Govind Singh
2019-07-26  9:23 ` Govind Singh [this message]
2019-08-08 15:10   ` [PATCH v5 1/7] clk: qcom: Add WCSS gcc clock control " Stephen Boyd
2019-07-26  9:23 ` [PATCH v5 2/7] dt-bindings: clock: qcom: Add QCOM Q6SSTOP clock controller bindings Govind Singh
2019-07-26 19:43   ` Stephen Boyd
2019-07-26  9:23 ` [PATCH v5 3/7] clk: qcom: define probe by index API as common API Govind Singh
2019-08-08 15:20   ` Stephen Boyd
2019-07-26  9:23 ` [PATCH v5 4/7] clk: qcom: Add Q6SSTOP clock controller for QCS404 Govind Singh
2019-08-08 15:09   ` Stephen Boyd
2019-08-13 13:14     ` Govind Singh
2019-07-26  9:23 ` [PATCH v5 5/7] remoteproc: qcom: wcss: populate hardcoded param using driver data Govind Singh
2019-07-26  9:23 ` [PATCH v5 6/7] remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404 Govind Singh
2019-07-26  9:23 ` [PATCH v5 7/7] remoteproc: qcom: wcss: explicitly request exclusive reset control Govind Singh
2020-07-03  8:12 ` [v6 0/4] Add non PAS wcss Q6 support for QCS404 Gokul Sriram Palanisamy
2020-07-03  8:12   ` [v6 1/4] remoteproc: qcom: wcss: populate hardcoded param using driver data Gokul Sriram Palanisamy
2020-07-03  8:12   ` [v6 2/4] dt-bindings: remoteproc: qcom: Add Q6V5 Modem PIL binding for QCS404 Gokul Sriram Palanisamy
2020-07-03  8:12   ` [v6 3/4] remoteproc: qcom: wcss: Add non pas wcss Q6 support " Gokul Sriram Palanisamy
2020-07-03  8:12   ` [v6 4/4] remoteproc: qcom: wcss: explicitly request exclusive reset control Gokul Sriram Palanisamy
2020-07-03  8:58 ` [v7 0/4] Add non PAS wcss Q6 support for QCS404 Gokul Sriram Palanisamy
2020-07-03  8:58   ` [v7 1/4] remoteproc: qcom: wcss: populate hardcoded param using driver data Gokul Sriram Palanisamy
2020-07-10 23:44     ` Stephen Boyd
2020-07-28 10:45       ` gokulsri
2020-07-03  8:58   ` [v7 2/4] dt-bindings: remoteproc: qcom: Add Q6V5 Modem PIL binding for QCS404 Gokul Sriram Palanisamy
2020-07-09 20:38     ` Rob Herring
2020-07-03  8:58   ` [v7 3/4] remoteproc: qcom: wcss: Add non pas wcss Q6 support " Gokul Sriram Palanisamy
2020-07-03  8:58   ` [v7 4/4] remoteproc: qcom: wcss: explicitly request exclusive reset control Gokul Sriram Palanisamy
2020-07-10 23:40   ` [v7 0/4] Add non PAS wcss Q6 support for QCS404 Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190726092332.25202-2-govinds@codeaurora.org \
    --to=govinds@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).