Skip to contentSkip to conversation

Add modem Clock controller (MSS CC) driver for SC7180

PATCH Superseded Taniya Das 3 participants 15 messages Feb 24, 2020 – Mar 15, 2020 1 message not in the archive

Subsystems (4)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Taniya Das

author
#0 lore raw

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

[v5]
* Update the clock ID for GCC_MSS_NAV_AXIS_CLK to GCC_MSS_NAV_AXI_CLK

[v4]
* Split the GCC MSS clocks and Modem clock driver.
* Update mss_regmap_config to const.
* Rename the Documentation binding as per the latest convention.
* Minor comments of clock-names/clocks properties updated.

[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 (5):
dt-bindings: clock: Add support for Modem clocks in GCC
clk: qcom: gcc: Add support for modem clocks in GCC
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,sc7180-mss.yaml |  62 +++++++++
 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, 302 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-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 v5 1/5 dt-bindings: clock: Add support for Modem clocks in GCC

Add clock ids for GCC MSS clocks which are required to bring the modem out of reset.

---
 include/dt-bindings/clock/qcom,gcc-sc7180.h | 5 +++++
 1 file changed, 5 insertions(+)
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

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

author
#2 lore raw

PATCH v5 2/5 clk: qcom: gcc: Add support for modem clocks in GCC

In reply to Taniya Das

Add the required modem clocks in global clock controller which are required to bring the modem out of reset.

---
 drivers/clk/qcom/gcc-sc7180.c | 70 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)
drivers/clk/qcom/gcc-sc7180.c +70 -0
index 7f59fb8..aa75e9b 100644
@@ -2165,6 +2165,71 @@ static struct clk_branch gcc_video_xo_clk = {
 	},
 };
 
+static struct clk_branch gcc_mss_cfg_ahb_clk = {
+	.halt_reg = 0x8a000,
+	.halt_check = BRANCH_HALT,
+	.clkr = {
+		.enable_reg = 0x8a000,
+		.enable_mask = BIT(0),
+		.hw.init = &(struct clk_init_data){
+			.name = "gcc_mss_cfg_ahb_clk",
+			.ops = &clk_branch2_ops,
+		},
+	},
+};
+
+static struct clk_branch gcc_mss_mfab_axis_clk = {
+	.halt_reg = 0x8a004,
+	.halt_check = BRANCH_HALT_VOTED,
+	.clkr = {
+		.enable_reg = 0x8a004,
+		.enable_mask = BIT(0),
+		.hw.init = &(struct clk_init_data){
+			.name = "gcc_mss_mfab_axis_clk",
+			.ops = &clk_branch2_ops,
+		},
+	},
+};
+
+static struct clk_branch gcc_mss_nav_axi_clk = {
+	.halt_reg = 0x8a00c,
+	.halt_check = BRANCH_HALT_VOTED,
+	.clkr = {
+		.enable_reg = 0x8a00c,
+		.enable_mask = BIT(0),
+		.hw.init = &(struct clk_init_data){
+			.name = "gcc_mss_nav_axi_clk",
+			.ops = &clk_branch2_ops,
+		},
+	},
+};
+
+static struct clk_branch gcc_mss_snoc_axi_clk = {
+	.halt_reg = 0x8a150,
+	.halt_check = BRANCH_HALT,
+	.clkr = {
+		.enable_reg = 0x8a150,
+		.enable_mask = BIT(0),
+		.hw.init = &(struct clk_init_data){
+			.name = "gcc_mss_snoc_axi_clk",
+			.ops = &clk_branch2_ops,
+		},
+	},
+};
+
+static struct clk_branch gcc_mss_q6_memnoc_axi_clk = {
+	.halt_reg = 0x8a154,
+	.halt_check = BRANCH_HALT,
+	.clkr = {
+		.enable_reg = 0x8a154,
+		.enable_mask = BIT(0),
+		.hw.init = &(struct clk_init_data){
+			.name = "gcc_mss_q6_memnoc_axi_clk",
+			.ops = &clk_branch2_ops,
+		},
+	},
+};
+
 static struct gdsc ufs_phy_gdsc = {
 	.gdscr = 0x77004,
 	.pd = {
@@ -2336,6 +2401,11 @@ static struct clk_regmap *gcc_sc7180_clocks[] = {
 	[GPLL7] = &gpll7.clkr,
 	[GPLL4] = &gpll4.clkr,
 	[GPLL1] = &gpll1.clkr,
+	[GCC_MSS_CFG_AHB_CLK] = &gcc_mss_cfg_ahb_clk.clkr,
+	[GCC_MSS_MFAB_AXIS_CLK] = &gcc_mss_mfab_axis_clk.clkr,
+	[GCC_MSS_NAV_AXI_CLK] = &gcc_mss_nav_axi_clk.clkr,
+	[GCC_MSS_Q6_MEMNOC_AXI_CLK] = &gcc_mss_q6_memnoc_axi_clk.clkr,
+	[GCC_MSS_SNOC_AXI_CLK] = &gcc_mss_snoc_axi_clk.clkr,
 };
 
 static const struct qcom_reset_map gcc_sc7180_resets[] = {

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

author
#3 lore raw

PATCH v5 3/5 dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings

In reply to 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,sc7180-mss.yaml | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml new file +62 -0
new file mode 100644
index 0000000..72493dd
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/qcom,sc7180-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.
+
+  See also dt-bindings/clock/qcom,mss-sc7180.h.
+
+properties:
+  compatible:
+    enum:
+       - qcom,sc7180-mss
+
+  clocks:
+    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
+      - const: gcc_mss_nav_axi
+      - const: cfg_ahb
+
+  '#clock-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sc7180.h>
+    clock-controller@41a8000 {
+      compatible = "qcom,sc7180-mss";
+      reg = <0 0x041a8000 0 0x8000>;
+      clocks = <&gcc GCC_MSS_MFAB_AXIS_CLK>,
+               <&gcc GCC_MSS_NAV_AXI_CLK>,
+               <&gcc GCC_MSS_CFG_AHB_CLK>;
+      clock-names = "gcc_mss_mfab_axis",
+                    "gcc_mss_nav_axi",
+                    "cfg_ahb";
+      #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
#4 lore raw

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

Quoted 9 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,sc7180-mss.yaml | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
Error: Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dts:21.26-27 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1242999
Please check and re-submit.

author
#5 lore raw

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

Hi Rob,

Quoted 11 lines · Rob Herring

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
Error: Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dts:21.26-27 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

Quoted 3 lines

See https://patchwork.ozlabs.org/patch/1242999
Please check and re-submit.

The error shows syntax error at line 21, below is the example.dts from my tree and would compile for me as I have the dependency of the include file when I compile.

Please guide how to go about.

+#define GCC_MSS_MFAB_AXIS_CLK 126

17 #include <dt-bindings/clock/qcom,gcc-sc7180.h>
18 clock-controller@41a8000 {

 19           compatible = "qcom,sc7180-mss";
 20           reg = <0 0x041a8000 0 0x8000>;
 21           clocks = <&gcc GCC_MSS_MFAB_AXIS_CLK>,
Signature · 4 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.

--
maintainer
#6 lore raw

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

Quoted 16 lines · Taniya Das

Hi Rob,

Quoted 11 lines · Rob Herring

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
Error: Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dts:21.26-27 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

Quoted 7 lines
Quoted 3 lines

See https://patchwork.ozlabs.org/patch/1242999
Please check and re-submit.

The error shows syntax error at line 21, below is the example.dts from my tree and would compile for me as I have the dependency of the include file when I compile.

The header should be part of this patch if possible.

Rob

A message that is not in the archive (sent off-list or not yet received): 158267707817.177367.4165827948994155128@swboyd.mtv.corp.google.com

maintainer
#8 lore raw

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

Quoted 27 lines · Stephen Boyd

Quoting Rob Herring (2020-02-25 05:58:19)

Quoted 25 lines · Taniya Das
Quoted 23 lines

Hi Rob,

Quoted 11 lines · Rob Herring

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
Error: Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dts:21.26-27 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

Quoted 3 lines

See https://patchwork.ozlabs.org/patch/1242999
Please check and re-submit.

The error shows syntax error at line 21, below is the example.dts from my tree and would compile for me as I have the dependency of the include file when I compile.

Quoted 7 lines
Quoted 2 lines

The header should be part of this patch if possible.

Are patches tested in isolation instead of in series? I see this define in the first patch in this series so it seems like automated checkers should be able to apply the patches in series and see if they still work, unless that is broken somehow.

The series should be applied, but it's all very fragile. It's going to stay that way until someone else writes and maintains the applying patches to git logic.

In any case, the header is part of the binding (being an ABI) not the driver, so it belongs in the binding patch.

However, in this case, the problem was pointed out in v4 to be a typo in GCC_MSS_MFAB_AXIS_CLK.

Rob

author
#9 lore raw

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

I have combined all the bindings in the same patch to avoid any YAML dependency.

Quoted 49 lines · Rob Herring
Quoted 27 lines · Stephen Boyd

Quoting Rob Herring (2020-02-25 05:58:19)

Quoted 25 lines · Taniya Das
Quoted 23 lines

Hi Rob,

Quoted 11 lines · Rob Herring

My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
Error: Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dts:21.26-27 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/clock/qcom,sc7180-mss.example.dt.yaml] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

Quoted 3 lines

See https://patchwork.ozlabs.org/patch/1242999
Please check and re-submit.

The error shows syntax error at line 21, below is the example.dts from my tree and would compile for me as I have the dependency of the include file when I compile.

Quoted 7 lines
Quoted 2 lines

The header should be part of this patch if possible.

Are patches tested in isolation instead of in series? I see this define in the first patch in this series so it seems like automated checkers should be able to apply the patches in series and see if they still work, unless that is broken somehow.

The series should be applied, but it's all very fragile. It's going to stay that way until someone else writes and maintains the applying patches to git logic.

In any case, the header is part of the binding (being an ABI) not the driver, so it belongs in the binding patch.

However, in this case, the problem was pointed out in v4 to be a typo in GCC_MSS_MFAB_AXIS_CLK.

Rob

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
#10 lore raw

PATCH v5 4/5 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,mss-sc7180.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h
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
#11 lore raw

Re: [PATCH v5 4/5] dt-bindings: clock: Introduce QCOM Modem clock bindings

Quoting Taniya Das (2020-02-24 02:38:22)

Quoted 8 lines

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

---
 include/dt-bindings/clock/qcom,mss-sc7180.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h

I think this is typically squashed with the binding patch.

author
#12 lore raw

PATCH v5 5/5 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/mss-sc7180.c | 143 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 153 insertions(+)
 create mode 100644 drivers/clk/qcom/mss-sc7180.c
drivers/clk/qcom/Kconfig +9 -0
index 15cdcdc..4225f86 100644
@@ -280,6 +280,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 656a87e..9135592 100644
@@ -50,6 +50,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/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
#13 lore raw

Re: [PATCH v5 5/5] clk: qcom: Add modem clock controller driver for SC7180

Quoting Taniya Das (2020-02-24 02:38:23)

Quoted 6 lines
drivers/clk/qcom/mss-sc7180.c new file +0 -0
new file mode 100644
index 0000000..993749e

drivers/clk/qcom/mss-sc7180.c line 9

Quoted 9 lines
drivers/clk/qcom/mss-sc7180.c new file +9 -0
@@ -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>

Is this used?

Quoted 39 lines
drivers/clk/qcom/mss-sc7180.c new file +39 -0
+#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"
+
+static struct clk_branch mss_axi_nav_clk = {
+       .halt_reg = 0x20bc,
+       .halt_check = BRANCH_HALT,
+       .clkr = {
+               .enable_reg = 0x20bc,
+               .enable_mask = BIT(0),
+               .hw.init = &(struct clk_init_data){
+                       .name = "mss_axi_nav_clk",
+                       .parent_data = &(const struct clk_parent_data){
+                               .fw_name = "gcc_mss_nav_axi_clk",
+                       },
+                       .num_parents = 1,
+                       .ops = &clk_branch2_ops,
+               },
+       },
+};
+
+static struct clk_branch mss_axi_crypto_clk = {
+       .halt_reg = 0x20cc,
+       .halt_check = BRANCH_HALT,
+       .clkr = {
+               .enable_reg = 0x20cc,
+               .enable_mask = BIT(0),
+               .hw.init = &(struct clk_init_data){
+                       .name = "mss_axi_crypto_clk",
+                       .parent_data = &(const struct clk_parent_data){
+                               .fw_name = "gcc_mss_mfab_axis_clk",
+                       },
+                       .num_parents = 1,

drivers/clk/qcom/mss-sc7180.c line 58

Quoted 10 lines
drivers/clk/qcom/mss-sc7180.c new file +10 -0
+                       .ops = &clk_branch2_ops,
+               },
+       },
+};
+
+static const struct regmap_config mss_regmap_config = {
+       .reg_bits       = 32,
+       .reg_stride     = 4,
+       .val_bits       = 32,
+       .fast_io        = true,

What is the max register?

Quoted 6 lines
drivers/clk/qcom/mss-sc7180.c new file +6 -0
+};
+
+static struct clk_regmap *mss_sc7180_clocks[] = {
+       [MSS_AXI_CRYPTO_CLK] = &mss_axi_crypto_clk.clkr,
+       [MSS_AXI_NAV_CLK] = &mss_axi_nav_clk.clkr,
+};
maintainer
#14 lore raw

Re: [PATCH v5 5/5] clk: qcom: Add modem clock controller driver for SC7180

In reply to Taniya Das

Quoting Taniya Das (2020-02-24 02:38:23)

Quoted 25 lines
drivers/clk/qcom/mss-sc7180.c new file +19 -0
new file mode 100644
index 0000000..993749e
@@ -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 line 29

Quoted 10 lines
drivers/clk/qcom/mss-sc7180.c new file +10 -0
+static struct clk_branch mss_axi_nav_clk = {
+       .halt_reg = 0x20bc,
+       .halt_check = BRANCH_HALT,
+       .clkr = {
+               .enable_reg = 0x20bc,
+               .enable_mask = BIT(0),
+               .hw.init = &(struct clk_init_data){
+                       .name = "mss_axi_nav_clk",
+                       .parent_data = &(const struct clk_parent_data){
+                               .fw_name = "gcc_mss_nav_axi_clk",

Drop _clk from here.

Quoted 7 lines
drivers/clk/qcom/mss-sc7180.c new file +7 -0
+                       },
+                       .num_parents = 1,
+                       .ops = &clk_branch2_ops,
+               },
+       },
+};
+

drivers/clk/qcom/mss-sc7180.c line 46

Quoted 10 lines
drivers/clk/qcom/mss-sc7180.c new file +10 -0
+static struct clk_branch mss_axi_crypto_clk = {
+       .halt_reg = 0x20cc,
+       .halt_check = BRANCH_HALT,
+       .clkr = {
+               .enable_reg = 0x20cc,
+               .enable_mask = BIT(0),
+               .hw.init = &(struct clk_init_data){
+                       .name = "mss_axi_crypto_clk",
+                       .parent_data = &(const struct clk_parent_data){
+                               .fw_name = "gcc_mss_mfab_axis_clk",

And here, so that it matches the binding.

Quoted 7 lines
drivers/clk/qcom/mss-sc7180.c new file +7 -0
+                       },
+                       .num_parents = 1,
+                       .ops = &clk_branch2_ops,
+               },
+       },
+};
+
maintainer
#15 lore raw
In reply to Taniya Das

Quoting Taniya Das (2020-02-24 02:38:18)

Quoted 2 lines

[v5]
* Update the clock ID for GCC_MSS_NAV_AXIS_CLK to GCC_MSS_NAV_AXI_CLK

Has this been sent again?