* [PATCH v3 0/3] Add modem Clock controller (MSS CC) driver for SC7180
@ 2020-01-30 4:18 Taniya Das
2020-01-30 4:18 ` [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings Taniya Das
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Taniya Das @ 2020-01-30 4:18 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt, 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.
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings
2020-01-30 4:18 [PATCH v3 0/3] Add modem Clock controller (MSS CC) driver for SC7180 Taniya Das
@ 2020-01-30 4:18 ` Taniya Das
2020-01-30 18:06 ` Stephen Boyd
2020-02-07 7:27 ` Sibi Sankar
2020-01-30 4:18 ` [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem " Taniya Das
` (2 subsequent siblings)
3 siblings, 2 replies; 13+ messages in thread
From: Taniya Das @ 2020-01-30 4:18 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt, 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.
Signed-off-by: Taniya Das <tdas@codeaurora.org>
---
.../devicetree/bindings/clock/qcom,mss.yaml | 58 ++++++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml
diff --git a/Documentation/devicetree/bindings/clock/qcom,mss.yaml b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
new file mode 100644
index 0000000..ebb04e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
@@ -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 <tdas@codeaurora.org>
+
+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.
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem clock bindings
2020-01-30 4:18 [PATCH v3 0/3] Add modem Clock controller (MSS CC) driver for SC7180 Taniya Das
2020-01-30 4:18 ` [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings Taniya Das
@ 2020-01-30 4:18 ` Taniya Das
2020-01-30 18:09 ` Stephen Boyd
2020-01-30 4:18 ` [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180 Taniya Das
2020-02-07 7:24 ` [PATCH v3 0/3] Add modem Clock controller (MSS CC) " Sibi Sankar
3 siblings, 1 reply; 13+ messages in thread
From: Taniya Das @ 2020-01-30 4:18 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt, Taniya Das
Add device tree bindings for modem clock controller for
Qualcomm Technology Inc's SC7180 SoCs.
Signed-off-by: Taniya Das <tdas@codeaurora.org>
---
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
diff --git a/include/dt-bindings/clock/qcom,gcc-sc7180.h b/include/dt-bindings/clock/qcom,gcc-sc7180.h
index e8029b2e..64909ec 100644
--- a/include/dt-bindings/clock/qcom,gcc-sc7180.h
+++ b/include/dt-bindings/clock/qcom,gcc-sc7180.h
@@ -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
diff --git a/include/dt-bindings/clock/qcom,mss-sc7180.h b/include/dt-bindings/clock/qcom,mss-sc7180.h
new file mode 100644
index 0000000..8ad63ed
--- /dev/null
+++ b/include/dt-bindings/clock/qcom,mss-sc7180.h
@@ -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.
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180
2020-01-30 4:18 [PATCH v3 0/3] Add modem Clock controller (MSS CC) driver for SC7180 Taniya Das
2020-01-30 4:18 ` [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings Taniya Das
2020-01-30 4:18 ` [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem " Taniya Das
@ 2020-01-30 4:18 ` Taniya Das
2020-01-30 18:08 ` Stephen Boyd
2020-02-07 7:24 ` [PATCH v3 0/3] Add modem Clock controller (MSS CC) " Sibi Sankar
3 siblings, 1 reply; 13+ messages in thread
From: Taniya Das @ 2020-01-30 4:18 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt, 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.
Signed-off-by: Taniya Das <tdas@codeaurora.org>
---
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
diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
index b6bd58dd..19f48af 100644
--- a/drivers/clk/qcom/Kconfig
+++ b/drivers/clk/qcom/Kconfig
@@ -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
diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile
index 2eda59a..f8dbfeb 100644
--- a/drivers/clk/qcom/Makefile
+++ b/drivers/clk/qcom/Makefile
@@ -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
diff --git a/drivers/clk/qcom/gcc-sc7180.c b/drivers/clk/qcom/gcc-sc7180.c
index 7f59fb8..aa75e9b 100644
--- a/drivers/clk/qcom/gcc-sc7180.c
+++ b/drivers/clk/qcom/gcc-sc7180.c
@@ -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[] = {
diff --git a/drivers/clk/qcom/mss-sc7180.c b/drivers/clk/qcom/mss-sc7180.c
new file mode 100644
index 0000000..d82600e
--- /dev/null
+++ b/drivers/clk/qcom/mss-sc7180.c
@@ -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"
+
+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,
+ .ops = &clk_branch2_ops,
+ },
+ },
+};
+
+static struct regmap_config mss_regmap_config = {
+ .reg_bits = 32,
+ .reg_stride = 4,
+ .val_bits = 32,
+ .fast_io = true,
+};
+
+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,
+};
+
+static const struct qcom_cc_desc mss_sc7180_desc = {
+ .config = &mss_regmap_config,
+ .clks = mss_sc7180_clocks,
+ .num_clks = ARRAY_SIZE(mss_sc7180_clocks),
+};
+
+static int mss_sc7180_probe(struct platform_device *pdev)
+{
+ int ret;
+
+ pm_runtime_enable(&pdev->dev);
+ ret = pm_clk_create(&pdev->dev);
+ if (ret)
+ goto disable_pm_runtime;
+
+ ret = pm_clk_add(&pdev->dev, "cfg_clk");
+ if (ret < 0) {
+ dev_err(&pdev->dev, "failed to acquire iface clock\n");
+ goto destroy_pm_clk;
+ }
+
+ ret = qcom_cc_probe(pdev, &mss_sc7180_desc);
+ if (ret < 0)
+ goto destroy_pm_clk;
+
+ return 0;
+
+destroy_pm_clk:
+ pm_clk_destroy(&pdev->dev);
+
+disable_pm_runtime:
+ pm_runtime_disable(&pdev->dev);
+
+ return ret;
+}
+
+static int mss_sc7180_remove(struct platform_device *pdev)
+{
+ pm_clk_destroy(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+
+ return 0;
+}
+
+static const struct dev_pm_ops mss_sc7180_pm_ops = {
+ SET_RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
+};
+
+static const struct of_device_id mss_sc7180_match_table[] = {
+ { .compatible = "qcom,sc7180-mss" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, mss_sc7180_match_table);
+
+static struct platform_driver mss_sc7180_driver = {
+ .probe = mss_sc7180_probe,
+ .remove = mss_sc7180_remove,
+ .driver = {
+ .name = "sc7180-mss",
+ .of_match_table = mss_sc7180_match_table,
+ .pm = &mss_sc7180_pm_ops,
+ },
+};
+
+static int __init mss_sc7180_init(void)
+{
+ return platform_driver_register(&mss_sc7180_driver);
+}
+subsys_initcall(mss_sc7180_init);
+
+static void __exit mss_sc7180_exit(void)
+{
+ platform_driver_unregister(&mss_sc7180_driver);
+}
+module_exit(mss_sc7180_exit);
+
+MODULE_DESCRIPTION("QTI MSS SC7180 Driver");
+MODULE_LICENSE("GPL v2");
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
of the Code Aurora Forum, hosted by the Linux Foundation.
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings
2020-01-30 4:18 ` [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings Taniya Das
@ 2020-01-30 18:06 ` Stephen Boyd
2020-02-18 18:12 ` Taniya Das
2020-02-07 7:27 ` Sibi Sankar
1 sibling, 1 reply; 13+ messages in thread
From: Stephen Boyd @ 2020-01-30 18:06 UTC (permalink / raw)
To: Michael Turquette, Taniya Das
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt, Taniya Das
Quoting Taniya Das (2020-01-29 20:18:41)
> The Modem Subsystem clock provider have a bunch of generic properties
> that are needed in a device tree. Add a YAML schemas for those.
>
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
> .../devicetree/bindings/clock/qcom,mss.yaml | 58 ++++++++++++++++++++++
Please rename to qcom,sc7180-mss.yaml
> 1 file changed, 58 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml
>
> diff --git a/Documentation/devicetree/bindings/clock/qcom,mss.yaml b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
> new file mode 100644
> index 0000000..ebb04e1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
> @@ -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 <tdas@codeaurora.org>
> +
> +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.
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,sc7180-mss
> +
> + clocks:
> + minItems: 1
> + maxItems: 3
Why is it optional? Don't these all go there?
> + 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.
> +
> + '#clock-cells':
> + const: 1
> +
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180
2020-01-30 4:18 ` [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180 Taniya Das
@ 2020-01-30 18:08 ` Stephen Boyd
2020-02-18 18:22 ` Taniya Das
0 siblings, 1 reply; 13+ messages in thread
From: Stephen Boyd @ 2020-01-30 18:08 UTC (permalink / raw)
To: Michael Turquette, Taniya Das
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt, Taniya Das
Quoting Taniya Das (2020-01-29 20:18:43)
> Add support for the modem clock controller found on SC7180
> based devices. This would allow modem drivers to probe and
> control their clocks.
>
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
> 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.
> 4 files changed, 223 insertions(+)
> create mode 100644 drivers/clk/qcom/mss-sc7180.c
>
> diff --git a/drivers/clk/qcom/mss-sc7180.c b/drivers/clk/qcom/mss-sc7180.c
> new file mode 100644
> index 0000000..d82600e
> --- /dev/null
> +++ b/drivers/clk/qcom/mss-sc7180.c
> @@ -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"
> +
[...]
> +
> +static struct regmap_config mss_regmap_config = {
Can this be const?
> + .reg_bits = 32,
> + .reg_stride = 4,
> + .val_bits = 32,
> + .fast_io = true,
> +};
> +
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem clock bindings
2020-01-30 4:18 ` [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem " Taniya Das
@ 2020-01-30 18:09 ` Stephen Boyd
2020-02-18 18:21 ` Taniya Das
0 siblings, 1 reply; 13+ messages in thread
From: Stephen Boyd @ 2020-01-30 18:09 UTC (permalink / raw)
To: Michael Turquette, Taniya Das
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt, Taniya Das
Quoting Taniya Das (2020-01-29 20:18:42)
> Add device tree bindings for modem clock controller for
> Qualcomm Technology Inc's SC7180 SoCs.
>
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
> include/dt-bindings/clock/qcom,gcc-sc7180.h | 5 +++++
> include/dt-bindings/clock/qcom,mss-sc7180.h | 12 ++++++++++++
Split this into two as well.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 0/3] Add modem Clock controller (MSS CC) driver for SC7180
2020-01-30 4:18 [PATCH v3 0/3] Add modem Clock controller (MSS CC) driver for SC7180 Taniya Das
` (2 preceding siblings ...)
2020-01-30 4:18 ` [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180 Taniya Das
@ 2020-02-07 7:24 ` Sibi Sankar
3 siblings, 0 replies; 13+ messages in thread
From: Sibi Sankar @ 2020-02-07 7:24 UTC (permalink / raw)
To: Taniya Das
Cc: Stephen Boyd, Michael Turquette ,
David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt,
linux-kernel-owner
On 2020-01-30 09:48, Taniya Das wrote:
> [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
Tested-by: Sibi Sankar <sibis@codeaurora.org>
>
> .../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.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings
2020-01-30 4:18 ` [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings Taniya Das
2020-01-30 18:06 ` Stephen Boyd
@ 2020-02-07 7:27 ` Sibi Sankar
2020-02-07 10:27 ` Taniya Das
1 sibling, 1 reply; 13+ messages in thread
From: Sibi Sankar @ 2020-02-07 7:27 UTC (permalink / raw)
To: Taniya Das
Cc: Stephen Boyd, Michael Turquette ,
David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt,
linux-kernel-owner
Hey Taniya,
On 2020-01-30 09:48, Taniya Das wrote:
> The Modem Subsystem clock provider have a bunch of generic properties
> that are needed in a device tree. Add a YAML schemas for those.
>
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
> .../devicetree/bindings/clock/qcom,mss.yaml | 58
> ++++++++++++++++++++++
> 1 file changed, 58 insertions(+)
> create mode 100644
> Documentation/devicetree/bindings/clock/qcom,mss.yaml
>
> diff --git a/Documentation/devicetree/bindings/clock/qcom,mss.yaml
> b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
> new file mode 100644
> index 0000000..ebb04e1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
> @@ -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 <tdas@codeaurora.org>
> +
> +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
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.
> + - 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.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings
2020-02-07 7:27 ` Sibi Sankar
@ 2020-02-07 10:27 ` Taniya Das
0 siblings, 0 replies; 13+ messages in thread
From: Taniya Das @ 2020-02-07 10:27 UTC (permalink / raw)
To: Sibi Sankar
Cc: Stephen Boyd, Michael Turquette, David Brown, Rajendra Nayak,
linux-arm-msm, linux-soc, linux-clk, linux-kernel, Andy Gross,
devicetree, robh, robh+dt, linux-kernel-owner
On 2/7/2020 12:57 PM, Sibi Sankar wrote:
> Hey Taniya,
>
> On 2020-01-30 09:48, Taniya Das wrote:
>> The Modem Subsystem clock provider have a bunch of generic properties
>> that are needed in a device tree. Add a YAML schemas for those.
>>
>> Signed-off-by: Taniya Das <tdas@codeaurora.org>
>> ---
>> .../devicetree/bindings/clock/qcom,mss.yaml | 58
>> ++++++++++++++++++++++
>> 1 file changed, 58 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/clock/qcom,mss.yaml
>> b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
>> new file mode 100644
>> index 0000000..ebb04e1
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
>> @@ -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 <tdas@codeaurora.org>
>> +
>> +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
>
> 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",
+ },
>> + - 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.
>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings
2020-01-30 18:06 ` Stephen Boyd
@ 2020-02-18 18:12 ` Taniya Das
0 siblings, 0 replies; 13+ messages in thread
From: Taniya Das @ 2020-02-18 18:12 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt
Thanks Stephen.
Will address the comments in the next patch series.
On 1/30/2020 11:36 PM, Stephen Boyd wrote:
> Quoting Taniya Das (2020-01-29 20:18:41)
>> The Modem Subsystem clock provider have a bunch of generic properties
>> that are needed in a device tree. Add a YAML schemas for those.
>>
>> Signed-off-by: Taniya Das <tdas@codeaurora.org>
>> ---
>> .../devicetree/bindings/clock/qcom,mss.yaml | 58 ++++++++++++++++++++++
>
> Please rename to qcom,sc7180-mss.yaml
>
>> 1 file changed, 58 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/clock/qcom,mss.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/clock/qcom,mss.yaml b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
>> new file mode 100644
>> index 0000000..ebb04e1
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
>> @@ -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 <tdas@codeaurora.org>
>> +
>> +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.
>> +
>> +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.
>> + 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.
>
Removed _clk.
>> +
>> + '#clock-cells':
>> + const: 1
>> +
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem clock bindings
2020-01-30 18:09 ` Stephen Boyd
@ 2020-02-18 18:21 ` Taniya Das
0 siblings, 0 replies; 13+ messages in thread
From: Taniya Das @ 2020-02-18 18:21 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt
On 1/30/2020 11:39 PM, Stephen Boyd wrote:
> Quoting Taniya Das (2020-01-29 20:18:42)
>> Add device tree bindings for modem clock controller for
>> Qualcomm Technology Inc's SC7180 SoCs.
>>
>> Signed-off-by: Taniya Das <tdas@codeaurora.org>
>> ---
>> 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.
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.
--
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180
2020-01-30 18:08 ` Stephen Boyd
@ 2020-02-18 18:22 ` Taniya Das
0 siblings, 0 replies; 13+ messages in thread
From: Taniya Das @ 2020-02-18 18:22 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: David Brown, Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, Andy Gross, devicetree, robh, robh+dt
On 1/30/2020 11:38 PM, Stephen Boyd wrote:
> Quoting Taniya Das (2020-01-29 20:18:43)
>> Add support for the modem clock controller found on SC7180
>> based devices. This would allow modem drivers to probe and
>> control their clocks.
>>
>> Signed-off-by: Taniya Das <tdas@codeaurora.org>
>> ---
>> 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.
>> 4 files changed, 223 insertions(+)
>> create mode 100644 drivers/clk/qcom/mss-sc7180.c
>>
>> diff --git a/drivers/clk/qcom/mss-sc7180.c b/drivers/clk/qcom/mss-sc7180.c
>> new file mode 100644
>> index 0000000..d82600e
>> --- /dev/null
>> +++ b/drivers/clk/qcom/mss-sc7180.c
>> @@ -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"
>> +
> [...]
>> +
>> +static struct regmap_config mss_regmap_config = {
>
> Can this be const?
>
Yes, next series is updated with the above.
>> + .reg_bits = 32,
>> + .reg_stride = 4,
>> + .val_bits = 32,
>> + .fast_io = true,
>> +};
>> +
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.
--
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-02-18 18:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 4:18 [PATCH v3 0/3] Add modem Clock controller (MSS CC) driver for SC7180 Taniya Das
2020-01-30 4:18 ` [PATCH v3 1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings Taniya Das
2020-01-30 18:06 ` Stephen Boyd
2020-02-18 18:12 ` Taniya Das
2020-02-07 7:27 ` Sibi Sankar
2020-02-07 10:27 ` Taniya Das
2020-01-30 4:18 ` [PATCH v3 2/3] dt-bindings: clock: Introduce QCOM Modem " Taniya Das
2020-01-30 18:09 ` Stephen Boyd
2020-02-18 18:21 ` Taniya Das
2020-01-30 4:18 ` [PATCH v3 3/3] clk: qcom: Add modem clock controller driver for SC7180 Taniya Das
2020-01-30 18:08 ` Stephen Boyd
2020-02-18 18:22 ` Taniya Das
2020-02-07 7:24 ` [PATCH v3 0/3] Add modem Clock controller (MSS CC) " Sibi Sankar
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).