Skip to contentSkip to conversation

Add modem Clock controller (MSS CC) driver for SC7180

PATCH Superseded Taniya Das 3 participants 13 messages Jan 30, 2020 – Feb 18, 2020

Subsystems (4)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Taniya Das

author
#0 lore raw

v3 cover Add modem Clock controller (MSS CC) driver for SC7180

[v3]
* Add clocks/clock-names required for the MSS clock controller.
* Add pm_ops to enable/disable the required dependent clock.
* Add parent_data for the MSS clocks.
* Update the GCC MSS clocks from _CBCR to _CLK.

[v2]
* Update the license for the documentation and fix minor comments in the YAML bindings.

[v1]
* Add driver support for Modem clock controller for SC7180 and also update device tree bindings for the various clocks supported in the clock controller.

Taniya Das (3):
dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings
dt-bindings: clock: Introduce QCOM Modem clock bindings
clk: qcom: Add modem clock controller driver for SC7180

 .../devicetree/bindings/clock/qcom,mss.yaml        |  58 +++++++++
 drivers/clk/qcom/Kconfig                           |   9 ++
 drivers/clk/qcom/Makefile                          |   1 +
 drivers/clk/qcom/gcc-sc7180.c                      |  70 ++++++++++
 drivers/clk/qcom/mss-sc7180.c                      | 143 +++++++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-sc7180.h        |   5 +
 include/dt-bindings/clock/qcom,mss-sc7180.h        |  12 ++
 7 files changed, 298 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml
 create mode 100644 drivers/clk/qcom/mss-sc7180.c
 create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

author
#1 lore raw

PATCH v3 1/3 dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings

The Modem Subsystem clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those.

---
 .../devicetree/bindings/clock/qcom,mss.yaml        | 58 ++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +58 -0
new file mode 100644
index 0000000..ebb04e1
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/qcom,mss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Modem Clock Controller Binding
+
+maintainers:
+  - Taniya Das <[email protected]>
+
+description: |
+  Qualcomm modem clock control module which supports the clocks.
+
+properties:
+  compatible:
+    enum:
+       - qcom,sc7180-mss
+
+  clocks:
+    minItems: 1
+    maxItems: 3
+    items:
+      - description: gcc_mss_mfab_axi clock from GCC
+      - description: gcc_mss_nav_axi clock from GCC
+      - description: gcc_mss_cfg_ahb clock from GCC
+
+  clock-names:
+    items:
+      - const: gcc_mss_mfab_axis_clk
+      - const: gcc_mss_nav_axi_clk
+      - const: cfg_clk
+
+  '#clock-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  # Example of MSS with clock nodes properties for SC7180:
+  - |
+    clock-controller@41a8000 {
+      compatible = "qcom,sc7180-mss";
+      reg = <0x041a8000 0x8000>;
+      clocks = <&gcc 126>, <&gcc 127>, <&gcc 125>;
+      clock-names = "gcc_mss_mfab_axis_clk", "gcc_mss_nav_axi_clk", "cfg_clk";
+      #clock-cells = <1>;
+    };
+...

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

maintainer
#2 lore raw

Re: [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings

Quoting Taniya Das (2020-01-29 20:18:41)

Quoted 6 lines

The Modem Subsystem clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those.

---
 .../devicetree/bindings/clock/qcom,mss.yaml        | 58 ++++++++++++++++++++++

Please rename to qcom,sc7180-mss.yaml

Quoted 12 lines
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +3 -0
new file mode 100644
index 0000000..ebb04e1
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---

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

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +10 -0
+$id: http://devicetree.org/schemas/bindings/clock/qcom,mss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Modem Clock Controller Binding
+
+maintainers:
+  - Taniya Das <[email protected]>
+
+description: |
+  Qualcomm modem clock control module which supports the clocks.

Can you point to the header file from here? include/dt-bindings/clock/qcom,sc7180-mss.h I guess.

Documentation/devicetree/bindings/clock/qcom,mss.yaml line 22

Quoted 9 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +9 -0
+
+properties:
+  compatible:
+    enum:
+       - qcom,sc7180-mss
+
+  clocks:
+    minItems: 1
+    maxItems: 3

Why is it optional? Don't these all go there?

Documentation/devicetree/bindings/clock/qcom,mss.yaml line 32

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +10 -0
+    items:
+      - description: gcc_mss_mfab_axi clock from GCC
+      - description: gcc_mss_nav_axi clock from GCC
+      - description: gcc_mss_cfg_ahb clock from GCC
+
+  clock-names:
+    items:
+      - const: gcc_mss_mfab_axis_clk
+      - const: gcc_mss_nav_axi_clk
+      - const: cfg_clk

Do these really need _clk at the end? Seems redundant.

Quoted 4 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +4 -0
+
+  '#clock-cells':
+    const: 1
+
author
#3 lore raw

Re: [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings

Thanks Stephen.
Will address the comments in the next patch series.

Quoted 27 lines · Stephen Boyd

Quoting Taniya Das (2020-01-29 20:18:41)

Quoted 6 lines

The Modem Subsystem clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those.

---
  .../devicetree/bindings/clock/qcom,mss.yaml        | 58 ++++++++++++++++++++++

Please rename to qcom,sc7180-mss.yaml

Quoted 17 lines
  1 file changed, 58 insertions(+)

create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml

Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +8 -0
new file mode 100644
index 0000000..ebb04e1
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/qcom,mss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Modem Clock Controller Binding
+
Quoted 9 lines

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

Quoted 5 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +5 -0
+maintainers:
+  - Taniya Das <[email protected]>
+
+description: |
+  Qualcomm modem clock control module which supports the clocks.

Can you point to the header file from here? include/dt-bindings/clock/qcom,sc7180-mss.h I guess.

will add the same.

Quoted 12 lines

Documentation/devicetree/bindings/clock/qcom,mss.yaml line 22

Quoted 9 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +9 -0
+
+properties:
+  compatible:
+    enum:
+       - qcom,sc7180-mss
+
+  clocks:
+    minItems: 1
+    maxItems: 3

Why is it optional? Don't these all go there?

Yes, moved them to required.

Quoted 11 lines

Documentation/devicetree/bindings/clock/qcom,mss.yaml line 32

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +10 -0
+    items:
+      - description: gcc_mss_mfab_axi clock from GCC
+      - description: gcc_mss_nav_axi clock from GCC
+      - description: gcc_mss_cfg_ahb clock from GCC
+
+  clock-names:
+    items:
+      - const: gcc_mss_mfab_axis_clk
+      - const: gcc_mss_nav_axi_clk
+      - const: cfg_clk
Quoted 2 lines

Do these really need _clk at the end? Seems redundant.

Removed _clk.

Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +4 -0
+
+  '#clock-cells':
+    const: 1
+
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--
#4 lore raw

Re: [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings

In reply to Taniya Das

Hey Taniya,

Quoted 33 lines · Taniya Das

The Modem Subsystem clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those.

---
 .../devicetree/bindings/clock/qcom,mss.yaml        | 58 
++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 

Documentation/devicetree/bindings/clock/qcom,mss.yaml

Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +15 -0
new file mode 100644
index 0000000..ebb04e1
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/qcom,mss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Modem Clock Controller Binding
+
+maintainers:
+  - Taniya Das <[email protected]>
+
+description: |
+  Qualcomm modem clock control module which supports the clocks.
+
+properties:

Documentation/devicetree/bindings/clock/qcom,mss.yaml line 25

Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +10 -0
+  compatible:
+    enum:
+       - qcom,sc7180-mss
+
+  clocks:
+    minItems: 1
+    maxItems: 3
+    items:
+      - description: gcc_mss_mfab_axi clock from GCC
+      - description: gcc_mss_nav_axi clock from GCC

we don't seem to be referencing the
mss_mfab_axi and mss_nav_axi in the
mss clk driver though, do we really
need them in bindings? If we dont
can we drop the clock-names as well.

Quoted 37 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +30 -0
+      - description: gcc_mss_cfg_ahb clock from GCC
+
+  clock-names:
+    items:
+      - const: gcc_mss_mfab_axis_clk
+      - const: gcc_mss_nav_axi_clk
+      - const: cfg_clk
+
+  '#clock-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  # Example of MSS with clock nodes properties for SC7180:
+  - |
+    clock-controller@41a8000 {
+      compatible = "qcom,sc7180-mss";
+      reg = <0x041a8000 0x8000>;
+      clocks = <&gcc 126>, <&gcc 127>, <&gcc 125>;
+      clock-names = "gcc_mss_mfab_axis_clk", "gcc_mss_nav_axi_clk", 

"cfg_clk";

Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +3 -1
+      #clock-cells = <1>;
+    };
+...
--

Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
author
#5 lore raw

Re: [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings

Quoted 43 lines · Sibi Sankar

Hey Taniya,

Quoted 40 lines · Taniya Das

The Modem Subsystem clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those.

---
 .../devicetree/bindings/clock/qcom,mss.yaml        | 58
++++++++++++++++++++++

 1 file changed, 58 insertions(+)

 create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml

Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +23 -0
new file mode 100644
index 0000000..ebb04e1
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/qcom,mss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Modem Clock Controller Binding
+
+maintainers:
+  - Taniya Das <[email protected]>
+
+description: |
+  Qualcomm modem clock control module which supports the clocks.
+
+properties:
+  compatible:
+    enum:
+       - qcom,sc7180-mss
+
+  clocks:
+    minItems: 1
+    maxItems: 3
+    items:
Quoted 9 lines

Documentation/devicetree/bindings/clock/qcom,mss.yaml line 25

Quoted 2 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +2 -0
+      - description: gcc_mss_mfab_axi clock from GCC
+      - description: gcc_mss_nav_axi clock from GCC

we don't seem to be referencing the mss_mfab_axi and mss_nav_axi in the mss clk driver though, do we really need them in bindings? If we dont can we drop the clock-names as well.

They are linked as parent for the clocks. So we need them.
+ .parent_data = &(const struct clk_parent_data){
+ .fw_name = "gcc_mss_nav_axi_clk",
+ },

Quoted 38 lines
Quoted 37 lines
Documentation/devicetree/bindings/clock/qcom,mss.yaml new file +30 -0
+      - description: gcc_mss_cfg_ahb clock from GCC
+
+  clock-names:
+    items:
+      - const: gcc_mss_mfab_axis_clk
+      - const: gcc_mss_nav_axi_clk
+      - const: cfg_clk
+
+  '#clock-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  # Example of MSS with clock nodes properties for SC7180:
+  - |
+    clock-controller@41a8000 {
+      compatible = "qcom,sc7180-mss";
+      reg = <0x041a8000 0x8000>;
+      clocks = <&gcc 126>, <&gcc 127>, <&gcc 125>;
+      clock-names = "gcc_mss_mfab_axis_clk", "gcc_mss_nav_axi_clk", 

"cfg_clk";
+      #clock-cells = <1>;
+    };
+...

Signature · 2 lines
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
of the Code Aurora Forum, hosted by the  Linux Foundation.
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--
author
#6 lore raw

PATCH v3 2/3 dt-bindings: clock: Introduce QCOM Modem clock bindings

In reply to Taniya Das

Add device tree bindings for modem clock controller for Qualcomm Technology Inc's SC7180 SoCs.

---
 include/dt-bindings/clock/qcom,gcc-sc7180.h |  5 +++++
 include/dt-bindings/clock/qcom,mss-sc7180.h | 12 ++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h
include/dt-bindings/clock/qcom,gcc-sc7180.h +5 -0
index e8029b2e..64909ec 100644
@@ -132,6 +132,11 @@
 #define GCC_VIDEO_GPLL0_DIV_CLK_SRC				122
 #define GCC_VIDEO_THROTTLE_AXI_CLK				123
 #define GCC_VIDEO_XO_CLK					124
+#define GCC_MSS_CFG_AHB_CLK					125
+#define GCC_MSS_MFAB_AXIS_CLK					126
+#define GCC_MSS_NAV_AXI_CLK					127
+#define GCC_MSS_Q6_MEMNOC_AXI_CLK				128
+#define GCC_MSS_SNOC_AXI_CLK					129
 
 /* GCC resets */
 #define GCC_QUSB2PHY_PRIM_BCR					0
include/dt-bindings/clock/qcom,mss-sc7180.h new file +12 -0
new file mode 100644
index 0000000..8ad63ed
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_MSS_SC7180_H
+#define _DT_BINDINGS_CLK_QCOM_MSS_SC7180_H
+
+#define MSS_AXI_CRYPTO_CLK	0
+#define MSS_AXI_NAV_CLK		1
+
+#endif

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

maintainer
#7 lore raw

Re: [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem clock bindings

Quoting Taniya Das (2020-01-29 20:18:42)

Quoted 7 lines

Add device tree bindings for modem clock controller for Qualcomm Technology Inc's SC7180 SoCs.

---
 include/dt-bindings/clock/qcom,gcc-sc7180.h |  5 +++++
 include/dt-bindings/clock/qcom,mss-sc7180.h | 12 ++++++++++++

Split this into two as well.

author
#8 lore raw

Re: [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem clock bindings

Quoted 11 lines · Stephen Boyd

Quoting Taniya Das (2020-01-29 20:18:42)

Quoted 7 lines

Add device tree bindings for modem clock controller for Qualcomm Technology Inc's SC7180 SoCs.

---
  include/dt-bindings/clock/qcom,gcc-sc7180.h |  5 +++++
  include/dt-bindings/clock/qcom,mss-sc7180.h | 12 ++++++++++++

Split this into two as well.

I have taken care of this in the next patch series.

Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--
author
#9 lore raw

PATCH v3 3/3 clk: qcom: Add modem clock controller driver for SC7180

In reply to Taniya Das

Add support for the modem clock controller found on SC7180 based devices. This would allow modem drivers to probe and control their clocks.

---
 drivers/clk/qcom/Kconfig      |   9 +++
 drivers/clk/qcom/Makefile     |   1 +
 drivers/clk/qcom/gcc-sc7180.c |  70 +++++++++++++++++++++
 drivers/clk/qcom/mss-sc7180.c | 143 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 223 insertions(+)
 create mode 100644 drivers/clk/qcom/mss-sc7180.c
drivers/clk/qcom/Kconfig +9 -0
index b6bd58dd..19f48af 100644
@@ -272,6 +272,15 @@ config SC_GPUCC_7180
 	  Say Y if you want to support graphics controller devices and
 	  functionality such as 3D graphics.
 
+config SC_MSS_7180
+	tristate "SC7180 Modem Clock Controller"
+	select SC_GCC_7180
+	help
+	  Support for the Modem Subsystem clock controller on Qualcomm
+	  Technologies, Inc on SC7180 devices.
+	  Say Y if you want to use the Modem branch clocks of the Modem
+	  subsystem clock controller to reset the MSS subsystem.
+
 config SC_VIDEOCC_7180
 	tristate "SC7180 Video Clock Controller"
 	select SC_GCC_7180
drivers/clk/qcom/Makefile +1 -0
index 2eda59a..f8dbfeb 100644
@@ -49,6 +49,7 @@ obj-$(CONFIG_QCS_TURING_404) += turingcc-qcs404.o
 obj-$(CONFIG_SC_DISPCC_7180) += dispcc-sc7180.o
 obj-$(CONFIG_SC_GCC_7180) += gcc-sc7180.o
 obj-$(CONFIG_SC_GPUCC_7180) += gpucc-sc7180.o
+obj-$(CONFIG_SC_MSS_7180) += mss-sc7180.o
 obj-$(CONFIG_SC_VIDEOCC_7180) += videocc-sc7180.o
 obj-$(CONFIG_SDM_CAMCC_845) += camcc-sdm845.o
 obj-$(CONFIG_SDM_DISPCC_845) += dispcc-sdm845.o
drivers/clk/qcom/gcc-sc7180.c +70 -0

82 lines not on this page · raw message

drivers/clk/qcom/mss-sc7180.c new file +143 -0

143 lines not on this page · raw message

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

maintainer
#10 lore raw

Re: [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180

Quoting Taniya Das (2020-01-29 20:18:43)

Quoted 10 lines

Add support for the modem clock controller found on SC7180 based devices. This would allow modem drivers to probe and control their clocks.

---
 drivers/clk/qcom/Kconfig      |   9 +++
 drivers/clk/qcom/Makefile     |   1 +
 drivers/clk/qcom/gcc-sc7180.c |  70 +++++++++++++++++++++
 drivers/clk/qcom/mss-sc7180.c | 143 ++++++++++++++++++++++++++++++++++++++++++

Please split this patch into two, one for gcc and one for mss.

Quoted 28 lines
 4 files changed, 223 insertions(+)
 create mode 100644 drivers/clk/qcom/mss-sc7180.c
drivers/clk/qcom/mss-sc7180.c new file +19 -0
new file mode 100644
index 0000000..d82600e
@@ -0,0 +1,143 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/clk-provider.h>
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/of_address.h>
+#include <linux/pm_clock.h>
+#include <linux/pm_runtime.h>
+#include <linux/regmap.h>
+
+#include <dt-bindings/clock/qcom,mss-sc7180.h>
+
+#include "clk-regmap.h"
+#include "clk-branch.h"
+#include "common.h"
+

[...]

drivers/clk/qcom/mss-sc7180.c

Quoted 2 lines
drivers/clk/qcom/mss-sc7180.c new file +2 -0
+
+static struct regmap_config mss_regmap_config = {

Can this be const?

Quoted 6 lines
drivers/clk/qcom/mss-sc7180.c new file +6 -0
+       .reg_bits       = 32,
+       .reg_stride     = 4,
+       .val_bits       = 32,
+       .fast_io        = true,
+};
+
author
#11 lore raw

Re: [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180

Quoted 5 lines · Stephen Boyd

Quoting Taniya Das (2020-01-29 20:18:43)

Quoted 4 lines

Add support for the modem clock controller found on SC7180 based devices. This would allow modem drivers to probe and control their clocks.

Quoted 9 lines
Quoted 6 lines
---
  drivers/clk/qcom/Kconfig      |   9 +++
  drivers/clk/qcom/Makefile     |   1 +
  drivers/clk/qcom/gcc-sc7180.c |  70 +++++++++++++++++++++
  drivers/clk/qcom/mss-sc7180.c | 143 ++++++++++++++++++++++++++++++++++++++++++

Please split this patch into two, one for gcc and one for mss.

Taken care in the next patch series.

Quoted 29 lines
Quoted 28 lines
  4 files changed, 223 insertions(+)

create mode 100644 drivers/clk/qcom/mss-sc7180.c

drivers/clk/qcom/mss-sc7180.c new file +19 -0
new file mode 100644
index 0000000..d82600e
@@ -0,0 +1,143 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/clk-provider.h>
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/of_address.h>
+#include <linux/pm_clock.h>
+#include <linux/pm_runtime.h>
+#include <linux/regmap.h>
+
+#include <dt-bindings/clock/qcom,mss-sc7180.h>
+
+#include "clk-regmap.h"
+#include "clk-branch.h"
+#include "common.h"
+

[...]

Quoted 5 lines

drivers/clk/qcom/mss-sc7180.c

Quoted 2 lines
drivers/clk/qcom/mss-sc7180.c new file +2 -0
+
+static struct regmap_config mss_regmap_config = {

Can this be const?

Yes, next series is updated with the above.

Quoted 6 lines
Quoted 6 lines
drivers/clk/qcom/mss-sc7180.c new file +6 -0
+       .reg_bits       = 32,
+       .reg_stride     = 4,
+       .val_bits       = 32,
+       .fast_io        = true,
+};
+
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--
Tested-by on the v3 series
#12 lore raw
In reply to Taniya Das
Quoted 16 lines · Taniya Das

[v3]
* Add clocks/clock-names required for the MSS clock controller.
* Add pm_ops to enable/disable the required dependent clock.
* Add parent_data for the MSS clocks.
* Update the GCC MSS clocks from _CBCR to _CLK.

[v2]
* Update the license for the documentation and fix minor comments in
the
YAML bindings.

[v1]
* Add driver support for Modem clock controller for SC7180 and also update device tree bindings for the various clocks supported in the clock controller.

Quoted 4 lines

Taniya Das (3):
dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings
dt-bindings: clock: Introduce QCOM Modem clock bindings
clk: qcom: Add modem clock controller driver for SC7180

Quoted 18 lines
 .../devicetree/bindings/clock/qcom,mss.yaml        |  58 +++++++++
 drivers/clk/qcom/Kconfig                           |   9 ++
 drivers/clk/qcom/Makefile                          |   1 +
 drivers/clk/qcom/gcc-sc7180.c                      |  70 ++++++++++
 drivers/clk/qcom/mss-sc7180.c                      | 143 
+++++++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-sc7180.h        |   5 +
 include/dt-bindings/clock/qcom,mss-sc7180.h        |  12 ++
 7 files changed, 298 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/clock/qcom,mss.yaml
 create mode 100644 drivers/clk/qcom/mss-sc7180.c
 create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.