diff mbox series

[v6,1/3] dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings

Message ID 1584211798-10332-2-git-send-email-tdas@codeaurora.org
State Changes Requested, archived
Headers show
Series Add modem Clock controller (MSS CC) driver for SC7180 | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Taniya Das March 14, 2020, 6:49 p.m. UTC
The Modem Subsystem clock provider have a bunch of generic properties
that are needed in a device tree. Add a YAML schemas for those.

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

Signed-off-by: Taniya Das <tdas@codeaurora.org>
---
 .../devicetree/bindings/clock/qcom,sc7180-mss.yaml | 62 ++++++++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-sc7180.h        |  7 ++-
 include/dt-bindings/clock/qcom,mss-sc7180.h        | 12 +++++
 3 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
 create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h

Comments

Rob Herring March 18, 2020, 10:04 p.m. UTC | #1
On Sun, 15 Mar 2020 00:19:56 +0530, 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.
> 
> Add clock ids for GCC MSS and MSS clocks which are required to bring
> the modem out of reset.
> 
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
>  .../devicetree/bindings/clock/qcom,sc7180-mss.yaml | 62 ++++++++++++++++++++++
>  include/dt-bindings/clock/qcom,gcc-sc7180.h        |  7 ++-
>  include/dt-bindings/clock/qcom,mss-sc7180.h        | 12 +++++
>  3 files changed, 80 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
>  create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h
> 

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

Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml: $id: relative path/filename doesn't match actual path or filename
	expected: http://devicetree.org/schemas/clock/qcom,sc7180-mss.yaml#

See https://patchwork.ozlabs.org/patch/1254940
Please check and re-submit.
Stephen Boyd March 19, 2020, 12:30 a.m. UTC | #2
Quoting Taniya Das (2020-03-14 11:49:56)
> The Modem Subsystem clock provider have a bunch of generic properties
> that are needed in a device tree. Add a YAML schemas for those.
> 
> Add clock ids for GCC MSS and MSS clocks which are required to bring
> the modem out of reset.
> 
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
>  .../devicetree/bindings/clock/qcom,sc7180-mss.yaml | 62 ++++++++++++++++++++++
>  include/dt-bindings/clock/qcom,gcc-sc7180.h        |  7 ++-
>  include/dt-bindings/clock/qcom,mss-sc7180.h        | 12 +++++
>  3 files changed, 80 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
>  create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml b/Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
> new file mode 100644
> index 0000000..72493dd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
> @@ -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#

remove 'bindings' above.

> +$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.
> +
> +  See also dt-bindings/clock/qcom,mss-sc7180.h.

Can you follow how for example gcc-sc7180 does this?

  See also:
  - dt-bindings/clock/qcom,mss-sc7180.h
Taniya Das March 19, 2020, 5:37 a.m. UTC | #3
On 3/19/2020 3:34 AM, Rob Herring wrote:
> On Sun, 15 Mar 2020 00:19:56 +0530, 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.
>>
>> Add clock ids for GCC MSS and MSS clocks which are required to bring
>> the modem out of reset.
>>
>> Signed-off-by: Taniya Das <tdas@codeaurora.org>
>> ---
>>   .../devicetree/bindings/clock/qcom,sc7180-mss.yaml | 62 ++++++++++++++++++++++
>>   include/dt-bindings/clock/qcom,gcc-sc7180.h        |  7 ++-
>>   include/dt-bindings/clock/qcom,mss-sc7180.h        | 12 +++++
>>   3 files changed, 80 insertions(+), 1 deletion(-)
>>   create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
>>   create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h
>>
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml: $id: relative path/filename doesn't match actual path or filename
> 	expected: http://devicetree.org/schemas/clock/qcom,sc7180-mss.yaml#
> 
> See https://patchwork.ozlabs.org/patch/1254940
> Please check and re-submit.
> 
Hi Rob,

Thanks, I have fixed it in the next patch series.

Is there a way to catch these before submitting? As I do not see these 
errors on my machine.
Rob Herring March 19, 2020, 5:21 p.m. UTC | #4
On Wed, Mar 18, 2020 at 11:37 PM Taniya Das <tdas@codeaurora.org> wrote:
>
>
>
> On 3/19/2020 3:34 AM, Rob Herring wrote:
> > On Sun, 15 Mar 2020 00:19:56 +0530, 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.
> >>
> >> Add clock ids for GCC MSS and MSS clocks which are required to bring
> >> the modem out of reset.
> >>
> >> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> >> ---
> >>   .../devicetree/bindings/clock/qcom,sc7180-mss.yaml | 62 ++++++++++++++++++++++
> >>   include/dt-bindings/clock/qcom,gcc-sc7180.h        |  7 ++-
> >>   include/dt-bindings/clock/qcom,mss-sc7180.h        | 12 +++++
> >>   3 files changed, 80 insertions(+), 1 deletion(-)
> >>   create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
> >>   create mode 100644 include/dt-bindings/clock/qcom,mss-sc7180.h
> >>
> >
> > My bot found errors running 'make dt_binding_check' on your patch:
> >
> > Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml: $id: relative path/filename doesn't match actual path or filename
> >       expected: http://devicetree.org/schemas/clock/qcom,sc7180-mss.yaml#
> >
> > See https://patchwork.ozlabs.org/patch/1254940
> > Please check and re-submit.
> >
> Hi Rob,
>
> Thanks, I have fixed it in the next patch series.
>
> Is there a way to catch these before submitting? As I do not see these
> errors on my machine.

If you ran 'make dt_binding_check' already, then update dt-schema with pip.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml b/Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
new file mode 100644
index 0000000..72493dd
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
@@ -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 <tdas@codeaurora.org>
+
+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>;
+    };
+...
diff --git a/include/dt-bindings/clock/qcom,gcc-sc7180.h b/include/dt-bindings/clock/qcom,gcc-sc7180.h
index e8029b2e..1258fd0 100644
--- a/include/dt-bindings/clock/qcom,gcc-sc7180.h
+++ b/include/dt-bindings/clock/qcom,gcc-sc7180.h
@@ -1,6 +1,6 @@ 
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
  */
 
 #ifndef _DT_BINDINGS_CLK_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..f15a9de
--- /dev/null
+++ b/include/dt-bindings/clock/qcom,mss-sc7180.h
@@ -0,0 +1,12 @@ 
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2020, 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