diff mbox series

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

Message ID 1582540703-6328-4-git-send-email-tdas@codeaurora.org
State Changes Requested
Headers show
Series Add modem Clock controller (MSS CC) driver for SC7180 | expand

Checks

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

Commit Message

Taniya Das Feb. 24, 2020, 10:38 a.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.

Signed-off-by: Taniya Das <tdas@codeaurora.org>
---
 .../devicetree/bindings/clock/qcom,sc7180-mss.yaml | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml

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

Comments

Rob Herring Feb. 24, 2020, 6:42 p.m. UTC | #1
On Mon, 24 Feb 2020 16:08:21 +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.
> 
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
>  .../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.
Taniya Das Feb. 25, 2020, 5:49 a.m. UTC | #2
Hi Rob,

On 2/25/2020 12:12 AM, Rob Herring wrote:

> 
> 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.
> 

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>,
Rob Herring Feb. 25, 2020, 1:58 p.m. UTC | #3
On Mon, Feb 24, 2020 at 11:49 PM Taniya Das <tdas@codeaurora.org> wrote:
>
> Hi Rob,
>
> On 2/25/2020 12:12 AM, Rob Herring wrote:
>
> >
> > 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.
> >
>
> 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
Rob Herring Feb. 26, 2020, 2:10 p.m. UTC | #4
On Tue, Feb 25, 2020 at 6:31 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Rob Herring (2020-02-25 05:58:19)
> > On Mon, Feb 24, 2020 at 11:49 PM Taniya Das <tdas@codeaurora.org> wrote:
> > >
> > > Hi Rob,
> > >
> > > On 2/25/2020 12:12 AM, Rob Herring wrote:
> > >
> > > >
> > > > 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.
> > > >
> > >
> > > 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.
> >
>
> 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
Taniya Das March 14, 2020, 6:46 p.m. UTC | #5
I have combined all the bindings in the same patch to avoid any YAML 
dependency.

On 2/26/2020 7:40 PM, Rob Herring wrote:
> On Tue, Feb 25, 2020 at 6:31 PM Stephen Boyd <sboyd@kernel.org> wrote:
>>
>> Quoting Rob Herring (2020-02-25 05:58:19)
>>> On Mon, Feb 24, 2020 at 11:49 PM Taniya Das <tdas@codeaurora.org> wrote:
>>>>
>>>> Hi Rob,
>>>>
>>>> On 2/25/2020 12:12 AM, Rob Herring wrote:
>>>>
>>>>>
>>>>> 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.
>>>>>
>>>>
>>>> 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.
>>>
>>
>> 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
>
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>;
+    };
+...