Skip to contentSkip to conversation

Add Q6SSTOP clock controller for QCS404

PATCH In review Govind Singh 3 participants 6 messages Aug 23, 2019 – Oct 11, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Add Q6SSTOP clock controller for QCS404

Add support for the Q6SSTOP clock control used on qcs404 based devices. This would allow wcss remoteproc driver to control the required WCSS Q6SSTOP clock/reset controls to bring the subsystem out of reset and shutdown the WCSS Q6DSP.

Changes in v3:
- Fixed dt binding errors.

Changes in v2:
- changed binding doc to yaml format.
- Fixed alignment in q6sstop cc driver.

Govind Singh (2):
dt-bindings: clock: qcom: Add QCOM Q6SSTOP clock controller bindings
clk: qcom: Add Q6SSTOP clock controller for QCS404

 .../bindings/clock/qcom,q6sstopcc.yaml        |  47 ++++
 drivers/clk/qcom/Kconfig                      |   8 +
 drivers/clk/qcom/Makefile                     |   1 +
 drivers/clk/qcom/q6sstop-qcs404.c             | 223 ++++++++++++++++++
 .../dt-bindings/clock/qcom,q6sstopcc-qcs404.h |  18 ++
 5 files changed, 297 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml
 create mode 100644 drivers/clk/qcom/q6sstop-qcs404.c
 create mode 100644 include/dt-bindings/clock/qcom,q6sstopcc-qcs404.h
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw

PATCH 1/2 dt-bindings: clock: qcom: Add QCOM Q6SSTOP clock controller bindings

Add devicetree binding for the Q6SSTOP clock controller found in QCS404.

---
 .../bindings/clock/qcom,q6sstopcc.yaml        | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml
Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml new file +47 -0
new file mode 100644
index 000000000000..39621e2e2f4e
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,q6sstopcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Q6SSTOP clock Controller
+
+maintainers:
+  - Govind Singh <[email protected]>
+
+description:
+   Q6SSTOP clock controller is used by WCSS remoteproc driver
+   to bring WDSP out of reset.
+
+properties:
+  compatible:
+    const: "qcom,qcs404-q6sstopcc"
+
+  reg:
+    items:
+      - description: Q6SSTOP clocks register region
+      - description: Q6SSTOP_TCSR register region
+
+  clocks:
+    items:
+      - description: ahb clock for the q6sstopCC
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    q6sstopcc: clock-controller@7500000 {
+      compatible = "qcom,qcs404-q6sstopcc";
+      reg = <0x07500000 0x4e000>, <0x07550000 0x10000>;
+      clocks = <&gcc 141>;
+      #clock-cells = <1>;
+    };
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
maintainer
#2 lore raw

Re: [PATCH_v3 1/2] dt-bindings: clock: qcom: Add QCOM Q6SSTOP clock controller bindings

Quoted 15 lines · Govind Singh

Add devicetree binding for the Q6SSTOP clock controller found in QCS404.

---
 .../bindings/clock/qcom,q6sstopcc.yaml        | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml
Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml new file +0 -0
new file mode 100644
index 000000000000..39621e2e2f4e

Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml line 1

Quoted 1 line
Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml new file +1 -0
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: BSD-2-Clause

Dual license please.

Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml line 13

Quoted 12 lines
Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml new file +12 -0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,q6sstopcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Q6SSTOP clock Controller
+
+maintainers:
+  - Govind Singh <[email protected]>
+
+description:
+   Q6SSTOP clock controller is used by WCSS remoteproc driver

What driver for some OS is not relevant to the binding.

Quoted 38 lines
Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml new file +34 -1
+   to bring WDSP out of reset.
+
+properties:
+  compatible:
+    const: "qcom,qcs404-q6sstopcc"
+
+  reg:
+    items:
+      - description: Q6SSTOP clocks register region
+      - description: Q6SSTOP_TCSR register region
+
+  clocks:
+    items:
+      - description: ahb clock for the q6sstopCC
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    q6sstopcc: clock-controller@7500000 {
+      compatible = "qcom,qcs404-q6sstopcc";
+      reg = <0x07500000 0x4e000>, <0x07550000 0x10000>;
+      clocks = <&gcc 141>;
+      #clock-cells = <1>;
+    };
--

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

maintainer
#3 lore raw

Re: [PATCH_v3 1/2] dt-bindings: clock: qcom: Add QCOM Q6SSTOP clock controller bindings

Quoting Rob Herring (2019-08-27 05:27:19)

Quoted 10 lines · Govind Singh
Quoted 9 lines

Add devicetree binding for the Q6SSTOP clock controller found in QCS404.

---
 .../bindings/clock/qcom,q6sstopcc.yaml        | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml
Quoted 10 lines

Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml line 1

Quoted 7 lines
Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml new file +1 -0
new file mode 100644
index 000000000000..39621e2e2f4e
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: BSD-2-Clause

Dual license please.

Yes, please fix the binding.

#4 lore raw

Re: [PATCH_v3 1/2] dt-bindings: clock: qcom: Add QCOM Q6SSTOP clock controller bindings

Quoted 22 lines · Stephen Boyd

Quoting Rob Herring (2019-08-27 05:27:19)

Quoted 10 lines · Govind Singh
Quoted 9 lines

Add devicetree binding for the Q6SSTOP clock controller found in QCS404.

---
 .../bindings/clock/qcom,q6sstopcc.yaml        | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml
Quoted 10 lines

Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml line 1

Quoted 7 lines
Documentation/devicetree/bindings/clock/qcom,q6sstopcc.yaml new file +1 -0
new file mode 100644
index 000000000000..39621e2e2f4e
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: BSD-2-Clause

Dual license please.

Quoted 1 line

Yes, please fix the binding.

fixed in v4.

Thanks,
Govind

#5 lore raw

PATCH 2/2 clk: qcom: Add Q6SSTOP clock controller for QCS404

In reply to Govind Singh

Add support for the Q6SSTOP clock control used on qcs404 based devices. This would allow wcss remoteproc driver to control the required WCSS Q6SSTOP clock/reset controls to bring the subsystem out of reset and shutdown the WCSS Q6DSP.

---
 drivers/clk/qcom/Kconfig                      |   8 +
 drivers/clk/qcom/Makefile                     |   1 +
 drivers/clk/qcom/q6sstop-qcs404.c             | 223 ++++++++++++++++++
 .../dt-bindings/clock/qcom,q6sstopcc-qcs404.h |  18 ++
 4 files changed, 250 insertions(+)
 create mode 100644 drivers/clk/qcom/q6sstop-qcs404.c
 create mode 100644 include/dt-bindings/clock/qcom,q6sstopcc-qcs404.h
drivers/clk/qcom/Kconfig +8 -0
index e1ff83cc361e..1b3c87a97521 100644
@@ -250,6 +250,14 @@ config QCS_TURING_404
 	  Support for the Turing Clock Controller on QCS404, provides clocks
 	  and resets for the Turing subsystem.
 
+config QCS_Q6SSTOP_404
+	tristate "QCS404 Q6SSTOP Clock Controller"
+	select QCS_GCC_404
+	help
+	  Support for the Q6SSTOP clock controller on QCS404 devices.
+	  Say Y if you want to use the Q6SSTOP branch clocks of the WCSS clock
+	  controller to reset the Q6SSTOP subsystem.
+
 config SDM_GCC_845
 	tristate "SDM845 Global Clock Controller"
 	select QCOM_GDSC
drivers/clk/qcom/Makefile +1 -0
index f0768fb1f037..086c053e0e03 100644
@@ -43,6 +43,7 @@ obj-$(CONFIG_QCOM_CLK_RPMH) += clk-rpmh.o
 obj-$(CONFIG_QCOM_CLK_SMD_RPM) += clk-smd-rpm.o
 obj-$(CONFIG_QCS_GCC_404) += gcc-qcs404.o
 obj-$(CONFIG_QCS_TURING_404) += turingcc-qcs404.o
+obj-$(CONFIG_QCS_Q6SSTOP_404) += q6sstop-qcs404.o
 obj-$(CONFIG_SDM_CAMCC_845) += camcc-sdm845.o
 obj-$(CONFIG_SDM_DISPCC_845) += dispcc-sdm845.o
 obj-$(CONFIG_SDM_GCC_660) += gcc-sdm660.o
drivers/clk/qcom/q6sstop-qcs404.c new file +223 -0

223 lines not on this page · raw message

include/dt-bindings/clock/qcom,q6sstopcc-qcs404.h new file +18 -0
new file mode 100644
index 000000000000..c6f5290f0914
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_Q6SSTOP_QCS404_H
+#define _DT_BINDINGS_CLK_Q6SSTOP_QCS404_H
+
+#define LCC_AHBFABRIC_CBC_CLK			0
+#define LCC_Q6SS_AHBS_CBC_CLK			1
+#define LCC_Q6SS_TCM_SLAVE_CBC_CLK		2
+#define LCC_Q6SS_AHBM_CBC_CLK			3
+#define LCC_Q6SS_AXIM_CBC_CLK			4
+#define LCC_Q6SS_BCR_SLEEP_CLK			5
+#define TCSR_Q6SS_LCC_CBCR_CLK			6
+
+#define Q6SSTOP_BCR_RESET			1
+#endif
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project