diff mbox series

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

Message ID 1577421760-1174-2-git-send-email-tdas@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series Add modem Clock controller (MSS CC) driver for SC7180 | expand

Commit Message

Taniya Das Dec. 27, 2019, 4:42 a.m. UTC
The MSS 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        | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,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

Sibi Sankar Dec. 27, 2019, 7:01 a.m. UTC | #1
Hey Taniya,

On 2019-12-27 10:12, Taniya Das wrote:
> The MSS 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        | 41 
> ++++++++++++++++++++++
>  1 file changed, 41 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..05efe2b2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
> @@ -0,0 +1,41 @@
> +# 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
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +  additionalItems: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#clock-cells'
> +
> +examples:
> +  # Example of MSS with clock nodes properties for SC7180:
> +  - |
> +    clock-controller@41aa000 {
> +      compatible = "qcom,sc7180-mss";
> +      reg = <0x041aa000 0x100>;

Bjorn/me had a discussion about the size
a while back, we should use the entire
reg space instead of fragmenting it.

reg = <0x041a8000 0x8000>;

We should just use ^^ instead.

> +      #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.
Rob Herring (Arm) Jan. 4, 2020, 9:36 p.m. UTC | #2
On Fri, Dec 27, 2019 at 10:12:38AM +0530, Taniya Das wrote:
> The MSS 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        | 41 ++++++++++++++++++++++
>  1 file changed, 41 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..05efe2b2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
> @@ -0,0 +1,41 @@
> +# 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 :

drop space     ^

> +    enum:
> +       - qcom,sc7180-mss
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +  additionalItems: false

With the indentation here, you are defining a property. Should be no 
indent.

> +
> +required:
> +  - compatible
> +  - reg
> +  - '#clock-cells'
> +
> +examples:
> +  # Example of MSS with clock nodes properties for SC7180:
> +  - |
> +    clock-controller@41aa000 {
> +      compatible = "qcom,sc7180-mss";
> +      reg = <0x041aa000 0x100>;
> +      #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.
>
Taniya Das Jan. 13, 2020, 9:56 a.m. UTC | #3
Thanks Sibi, will take care of mapping the entire region.

+      reg = <0x041aa000 0x100>;
> 
> Bjorn/me had a discussion about the size
> a while back, we should use the entire
> reg space instead of fragmenting it.
> 
> reg = <0x041a8000 0x8000>;
> 
> We should just use ^^ instead.
> 
>> +      #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.
>
Taniya Das Jan. 13, 2020, 10 a.m. UTC | #4
Hi Rob,

Thanks for your review.

On 1/5/2020 3:06 AM, Rob Herring wrote:

>> +description: |
>> +  Qualcomm modem clock control module which supports the clocks.
>> +
>> +properties:
>> +  compatible :
> 
> drop space     ^
> 

Will take care in the next patch.

>> +    enum:
>> +       - qcom,sc7180-mss
>> +
>> +  '#clock-cells':
>> +    const: 1
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  additionalItems: false
> 
> With the indentation here, you are defining a property. Should be no
> indent.
> 

I tried removing the indent too, but I keep getting this error.
  Additional properties are not allowed ('additionalItems' was unexpected)

Please let me know if I am missing something?

>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - '#clock-cells'
>> +
>> +examples:
>> +  # Example of MSS with clock nodes properties for SC7180:
>> +  - |
>> +    clock-controller@41aa000 {
>> +      compatible = "qcom,sc7180-mss";
>> +      reg = <0x041aa000 0x100>;
>> +      #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.
>>
Rob Herring (Arm) Jan. 13, 2020, 4:21 p.m. UTC | #5
On Mon, Jan 13, 2020 at 4:00 AM Taniya Das <tdas@codeaurora.org> wrote:
>
> Hi Rob,
>
> Thanks for your review.
>
> On 1/5/2020 3:06 AM, Rob Herring wrote:
>
> >> +description: |
> >> +  Qualcomm modem clock control module which supports the clocks.
> >> +
> >> +properties:
> >> +  compatible :
> >
> > drop space     ^
> >
>
> Will take care in the next patch.
>
> >> +    enum:
> >> +       - qcom,sc7180-mss
> >> +
> >> +  '#clock-cells':
> >> +    const: 1
> >> +
> >> +  reg:
> >> +    maxItems: 1
> >> +
> >> +  additionalItems: false
> >
> > With the indentation here, you are defining a property. Should be no
> > indent.
> >
>
> I tried removing the indent too, but I keep getting this error.
>   Additional properties are not allowed ('additionalItems' was unexpected)
>
> Please let me know if I am missing something?

Sorry, I was reading that as 'additionalProperties' which is what you
want at the top level. Generally, 'additionalItems' is not needed.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/qcom,mss.yaml b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
new file mode 100644
index 0000000..05efe2b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,mss.yaml
@@ -0,0 +1,41 @@ 
+# 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
+
+  '#clock-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+  additionalItems: false
+
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+
+examples:
+  # Example of MSS with clock nodes properties for SC7180:
+  - |
+    clock-controller@41aa000 {
+      compatible = "qcom,sc7180-mss";
+      reg = <0x041aa000 0x100>;
+      #clock-cells = <1>;
+    };
+...