diff mbox series

[1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller

Message ID 1582797318-26288-2-git-send-email-sivaprak@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series Add APSS clock controller support for IPQ6018 | expand

Commit Message

Sivaprakash Murugesan Feb. 27, 2020, 9:55 a.m. UTC
add dt-binding for ipq6018 apss clock controller

Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
---
 .../devicetree/bindings/clock/qcom,apsscc.yaml     | 58 ++++++++++++++++++++++
 include/dt-bindings/clock/qcom,apss-ipq6018.h      | 26 ++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
 create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h

Comments

Sibi Sankar Feb. 27, 2020, 10:38 a.m. UTC | #1
Hey Sivaprakash,

On 2020-02-27 15:25, Sivaprakash Murugesan wrote:
> add dt-binding for ipq6018 apss clock controller
> 
> Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
> ---
>  .../devicetree/bindings/clock/qcom,apsscc.yaml     | 58 
> ++++++++++++++++++++++
>  include/dt-bindings/clock/qcom,apss-ipq6018.h      | 26 ++++++++++
>  2 files changed, 84 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>  create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
> b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
> new file mode 100644
> index 0000000..7433721
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
> @@ -0,0 +1,58 @@
> +# SPDX-License-Identifier: GPL-2.0-only

Dual license

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/bindings/clock/qcom,apsscc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm IPQ6018 APSS Clock Controller Binding
> +
> +maintainers:
> +  - Stephen Boyd <sboyd@kernel.org>
> +
> +description: |
> +  Qualcomm IPQ6018 APSS clock control module which supports the clocks 
> with
> +  frequencies above 800Mhz.
> +
> +properties:
> +  compatible :
> +    const: qcom,apss-ipq6018

Please use qcom,<chip>-<device>
instead.

> +
> +  clocks:
> +    description: clocks required for this controller.
> +    maxItems: 4
> +
> +  clock-names:
> +    description: clock output names of required clocks.
> +    maxItems: 4
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  '#reset-cells':
> +    const: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#clock-cells'
> +  - '#reset-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +      #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
> +      apss_clk: qcom,apss_clk@b111000 {
> +            compatible = "qcom,apss-ipq6018";
> +            clocks = <&xo>, <&gcc GPLL0>,
> +                        <&gcc GPLL2>, <&gcc GPLL4>;
> +            clock-names = "xo", "gpll0",
> +                         "gpll2", "gpll4";
> +            reg = <0xb11100c 0x5ff4>;
> +            #clock-cells = <1>;
> +            #reset-cells = <1>;
> +      };
> +...
> diff --git a/include/dt-bindings/clock/qcom,apss-ipq6018.h
> b/include/dt-bindings/clock/qcom,apss-ipq6018.h
> new file mode 100644
> index 0000000..ed9d7d8
> --- /dev/null
> +++ b/include/dt-bindings/clock/qcom,apss-ipq6018.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
> + *
> + * Permission to use, copy, modify, and/or distribute this software 
> for any
> + * purpose with or without fee is hereby granted, provided that the 
> above
> + * copyright notice and this permission notice appear in all copies.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
> WARRANTIES
> + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE 
> FOR
> + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY 
> DAMAGES
> + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 
> AN
> + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 
> OUT OF
> + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

^^ is not needed just the SPDX
license identifier is enough.

> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_QCA_APSS_IPQ6018_H
> +#define _DT_BINDINGS_CLOCK_QCA_APSS_IPQ6018_H
> +
> +#define APSS_PLL_EARLY				0
> +#define APSS_PLL				1
> +#define APCS_ALIAS0_CLK_SRC			2
> +#define APCS_ALIAS0_CORE_CLK			3
> +
> +#endif
Sivaprakash Murugesan Feb. 27, 2020, 10:55 a.m. UTC | #2
Hi Sibi,

Thanks for the review.

On 2/27/2020 4:08 PM, Sibi Sankar wrote:
> Hey Sivaprakash,
>
> On 2020-02-27 15:25, Sivaprakash Murugesan wrote:
>> add dt-binding for ipq6018 apss clock controller
>>
>> Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
>> ---
>>  .../devicetree/bindings/clock/qcom,apsscc.yaml     | 58 
>> ++++++++++++++++++++++
>>  include/dt-bindings/clock/qcom,apss-ipq6018.h      | 26 ++++++++++
>>  2 files changed, 84 insertions(+)
>>  create mode 100644 
>> Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>>  create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h
>>
>> diff --git a/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>> b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>> new file mode 100644
>> index 0000000..7433721
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>> @@ -0,0 +1,58 @@
>> +# SPDX-License-Identifier: GPL-2.0-only
>
> Dual license
missed it. will add in next series.
>
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/bindings/clock/qcom,apsscc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm IPQ6018 APSS Clock Controller Binding
>> +
>> +maintainers:
>> +  - Stephen Boyd <sboyd@kernel.org>
>> +
>> +description: |
>> +  Qualcomm IPQ6018 APSS clock control module which supports the 
>> clocks with
>> +  frequencies above 800Mhz.
>> +
>> +properties:
>> +  compatible :
>> +    const: qcom,apss-ipq6018
>
> Please use qcom,<chip>-<device>
> instead.
ok.
>
>> +
>> +  clocks:
>> +    description: clocks required for this controller.
>> +    maxItems: 4
>> +
>> +  clock-names:
>> +    description: clock output names of required clocks.
>> +    maxItems: 4
>> +
>> +  '#clock-cells':
>> +    const: 1
>> +
>> +  '#reset-cells':
>> +    const: 1
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - '#clock-cells'
>> +  - '#reset-cells'
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +      #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
>> +      apss_clk: qcom,apss_clk@b111000 {
>> +            compatible = "qcom,apss-ipq6018";
>> +            clocks = <&xo>, <&gcc GPLL0>,
>> +                        <&gcc GPLL2>, <&gcc GPLL4>;
>> +            clock-names = "xo", "gpll0",
>> +                         "gpll2", "gpll4";
>> +            reg = <0xb11100c 0x5ff4>;
>> +            #clock-cells = <1>;
>> +            #reset-cells = <1>;
>> +      };
>> +...
>> diff --git a/include/dt-bindings/clock/qcom,apss-ipq6018.h
>> b/include/dt-bindings/clock/qcom,apss-ipq6018.h
>> new file mode 100644
>> index 0000000..ed9d7d8
>> --- /dev/null
>> +++ b/include/dt-bindings/clock/qcom,apss-ipq6018.h
>> @@ -0,0 +1,26 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
>> + *
>> + * Permission to use, copy, modify, and/or distribute this software 
>> for any
>> + * purpose with or without fee is hereby granted, provided that the 
>> above
>> + * copyright notice and this permission notice appear in all copies.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
>> WARRANTIES
>> + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
>> + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE 
>> LIABLE FOR
>> + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY 
>> DAMAGES
>> + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 
>> IN AN
>> + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 
>> OUT OF
>> + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>
> ^^ is not needed just the SPDX
> license identifier is enough.
>
ok.

Thanks,

Siva
Rob Herring Feb. 27, 2020, 5:14 p.m. UTC | #3
On Thu, 27 Feb 2020 15:25:17 +0530, Sivaprakash Murugesan wrote:
> add dt-binding for ipq6018 apss clock controller
> 
> Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
> ---
>  .../devicetree/bindings/clock/qcom,apsscc.yaml     | 58 ++++++++++++++++++++++
>  include/dt-bindings/clock/qcom,apss-ipq6018.h      | 26 ++++++++++
>  2 files changed, 84 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>  create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h
> 

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
Documentation/devicetree/bindings/clock/qcom,apsscc.example.dts:17:10: fatal error: dt-bindings/clock/qcom,gcc-ipq6018.h: No such file or directory
 #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/clock/qcom,apsscc.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/clock/qcom,apsscc.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/1245691
Please check and re-submit.
Sivaprakash Murugesan March 4, 2020, 5:24 a.m. UTC | #4
Hi Rob,

I ran make dt_binding_check and dtbs_check both on mainline(5.6-rc4) and 
linux-next both are successful.

The file qcom,gcc-ipq6018.h is merged in 5.6, not sure what is going wrong.

Could you please help?

Thanks,

Siva

On 2/27/2020 10:44 PM, Rob Herring wrote:
> On Thu, 27 Feb 2020 15:25:17 +0530, Sivaprakash Murugesan wrote:
>> add dt-binding for ipq6018 apss clock controller
>>
>> Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
>> ---
>>   .../devicetree/bindings/clock/qcom,apsscc.yaml     | 58 ++++++++++++++++++++++
>>   include/dt-bindings/clock/qcom,apss-ipq6018.h      | 26 ++++++++++
>>   2 files changed, 84 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>>   create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h
>>
> 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
> Documentation/devicetree/bindings/clock/qcom,apsscc.example.dts:17:10: fatal error: dt-bindings/clock/qcom,gcc-ipq6018.h: No such file or directory
>   #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/clock/qcom,apsscc.example.dt.yaml' failed
> make[1]: *** [Documentation/devicetree/bindings/clock/qcom,apsscc.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/1245691
> Please check and re-submit.
Rob Herring March 9, 2020, 9:07 p.m. UTC | #5
On Wed, Mar 04, 2020 at 10:54:56AM +0530, Sivaprakash Murugesan wrote:
> Hi Rob,
> 
> I ran make dt_binding_check and dtbs_check both on mainline(5.6-rc4) and
> linux-next both are successful.
> 
> The file qcom,gcc-ipq6018.h is merged in 5.6, not sure what is going wrong.
> 
> Could you please help?

Sorry, my fault there. The checks have to be warning free and that 
didn't happen til 5.6-rc5, so I was still based on 5.5.

Rob
Rob Herring March 9, 2020, 9:13 p.m. UTC | #6
On Thu, Feb 27, 2020 at 03:25:17PM +0530, Sivaprakash Murugesan wrote:
> add dt-binding for ipq6018 apss clock controller
> 
> Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
> ---
>  .../devicetree/bindings/clock/qcom,apsscc.yaml     | 58 ++++++++++++++++++++++
>  include/dt-bindings/clock/qcom,apss-ipq6018.h      | 26 ++++++++++
>  2 files changed, 84 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>  create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
> new file mode 100644
> index 0000000..7433721
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
> @@ -0,0 +1,58 @@
> +# SPDX-License-Identifier: GPL-2.0-only

Dual license new bindings please:

(GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/bindings/clock/qcom,apsscc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm IPQ6018 APSS Clock Controller Binding
> +
> +maintainers:
> +  - Stephen Boyd <sboyd@kernel.org>

I'd expect this to be a QCom person, not who is applying patches.

> +
> +description: |

You can drop '|'.

> +  Qualcomm IPQ6018 APSS clock control module which supports the clocks with
> +  frequencies above 800Mhz.
> +
> +properties:
> +  compatible :
> +    const: qcom,apss-ipq6018

Normal ordering is: qcom,ipq6018-apss

> +
> +  clocks:
> +    description: clocks required for this controller.
> +    maxItems: 4

Need to define what each clock is.

> +
> +  clock-names:
> +    description: clock output names of required clocks.
> +    maxItems: 4
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  '#reset-cells':
> +    const: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#clock-cells'
> +  - '#reset-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +      #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
> +      apss_clk: qcom,apss_clk@b111000 {

I thought I'd finally seen the last of these Qcom node names...

clock-controller@...

> +            compatible = "qcom,apss-ipq6018";
> +            clocks = <&xo>, <&gcc GPLL0>,
> +                        <&gcc GPLL2>, <&gcc GPLL4>;
> +            clock-names = "xo", "gpll0",
> +                         "gpll2", "gpll4";
> +            reg = <0xb11100c 0x5ff4>;
> +            #clock-cells = <1>;
> +            #reset-cells = <1>;
> +      };
> +...
> diff --git a/include/dt-bindings/clock/qcom,apss-ipq6018.h b/include/dt-bindings/clock/qcom,apss-ipq6018.h
> new file mode 100644
> index 0000000..ed9d7d8
> --- /dev/null
> +++ b/include/dt-bindings/clock/qcom,apss-ipq6018.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: GPL-2.0 */

I'm pretty sure your employer would like an additional license here.

> +/*
> + * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
> + *
> + * Permission to use, copy, modify, and/or distribute this software for any
> + * purpose with or without fee is hereby granted, provided that the above
> + * copyright notice and this permission notice appear in all copies.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
> + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
> + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
> + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_QCA_APSS_IPQ6018_H
> +#define _DT_BINDINGS_CLOCK_QCA_APSS_IPQ6018_H
> +
> +#define APSS_PLL_EARLY				0
> +#define APSS_PLL				1
> +#define APCS_ALIAS0_CLK_SRC			2
> +#define APCS_ALIAS0_CORE_CLK			3
> +
> +#endif
> -- 
> 2.7.4
>
Sivaprakash Murugesan April 5, 2020, 8:19 a.m. UTC | #7
Hi Sibi,

Thanks for the review.

On 2/27/2020 4:08 PM, Sibi Sankar wrote:
> Hey Sivaprakash,
>
> On 2020-02-27 15:25, Sivaprakash Murugesan wrote:
>> add dt-binding for ipq6018 apss clock controller
>>
>> Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
>> ---
>>  .../devicetree/bindings/clock/qcom,apsscc.yaml     | 58 
>> ++++++++++++++++++++++
>>  include/dt-bindings/clock/qcom,apss-ipq6018.h      | 26 ++++++++++
>>  2 files changed, 84 insertions(+)
>>  create mode 100644 
>> Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>>  create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h
>>
>> diff --git a/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>> b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>> new file mode 100644
>> index 0000000..7433721
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>> @@ -0,0 +1,58 @@
>> +# SPDX-License-Identifier: GPL-2.0-only
>
> Dual license
ok.
>
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/bindings/clock/qcom,apsscc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm IPQ6018 APSS Clock Controller Binding
>> +
>> +maintainers:
>> +  - Stephen Boyd <sboyd@kernel.org>
>> +
>> +description: |
>> +  Qualcomm IPQ6018 APSS clock control module which supports the 
>> clocks with
>> +  frequencies above 800Mhz.
>> +
>> +properties:
>> +  compatible :
>> +    const: qcom,apss-ipq6018
>
> Please use qcom,<chip>-<device>
> instead.
>
ok.
>> +
>> +  clocks:
>> +    description: clocks required for this controller.
>> +    maxItems: 4
>> +
>> +  clock-names:
>> +    description: clock output names of required clocks.
>> +    maxItems: 4
>> +
>> +  '#clock-cells':
>> +    const: 1
>> +
>> +  '#reset-cells':
>> +    const: 1
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - '#clock-cells'
>> +  - '#reset-cells'
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +      #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
>> +      apss_clk: qcom,apss_clk@b111000 {
>> +            compatible = "qcom,apss-ipq6018";
>> +            clocks = <&xo>, <&gcc GPLL0>,
>> +                        <&gcc GPLL2>, <&gcc GPLL4>;
>> +            clock-names = "xo", "gpll0",
>> +                         "gpll2", "gpll4";
>> +            reg = <0xb11100c 0x5ff4>;
>> +            #clock-cells = <1>;
>> +            #reset-cells = <1>;
>> +      };
>> +...
>> diff --git a/include/dt-bindings/clock/qcom,apss-ipq6018.h
>> b/include/dt-bindings/clock/qcom,apss-ipq6018.h
>> new file mode 100644
>> index 0000000..ed9d7d8
>> --- /dev/null
>> +++ b/include/dt-bindings/clock/qcom,apss-ipq6018.h
>> @@ -0,0 +1,26 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
>> + *
>> + * Permission to use, copy, modify, and/or distribute this software 
>> for any
>> + * purpose with or without fee is hereby granted, provided that the 
>> above
>> + * copyright notice and this permission notice appear in all copies.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
>> WARRANTIES
>> + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
>> + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE 
>> LIABLE FOR
>> + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY 
>> DAMAGES
>> + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 
>> IN AN
>> + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 
>> OUT OF
>> + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
>
> ^^ is not needed just the SPDX
> license identifier is enough.
ok.
>
>> + */
>> +
>> +#ifndef _DT_BINDINGS_CLOCK_QCA_APSS_IPQ6018_H
>> +#define _DT_BINDINGS_CLOCK_QCA_APSS_IPQ6018_H
>> +
>> +#define APSS_PLL_EARLY                0
>> +#define APSS_PLL                1
>> +#define APCS_ALIAS0_CLK_SRC            2
>> +#define APCS_ALIAS0_CORE_CLK            3
>> +
>> +#endif
>
Sivaprakash Murugesan April 5, 2020, 8:30 a.m. UTC | #8
Hi Rob,

Thanks for the review.

On 3/10/2020 2:43 AM, Rob Herring wrote:
> On Thu, Feb 27, 2020 at 03:25:17PM +0530, Sivaprakash Murugesan wrote:
>> add dt-binding for ipq6018 apss clock controller
>>
>> Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
>> ---
>>   .../devicetree/bindings/clock/qcom,apsscc.yaml     | 58 ++++++++++++++++++++++
>>   include/dt-bindings/clock/qcom,apss-ipq6018.h      | 26 ++++++++++
>>   2 files changed, 84 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>>   create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h
>>
>> diff --git a/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>> new file mode 100644
>> index 0000000..7433721
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
>> @@ -0,0 +1,58 @@
>> +# SPDX-License-Identifier: GPL-2.0-only
> Dual license new bindings please:
>
> (GPL-2.0-only OR BSD-2-Clause)
ok.
>
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/bindings/clock/qcom,apsscc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm IPQ6018 APSS Clock Controller Binding
>> +
>> +maintainers:
>> +  - Stephen Boyd <sboyd@kernel.org>
> I'd expect this to be a QCom person, not who is applying patches.
>
>> +
>> +description: |
> You can drop '|'.
ok.
>> +  Qualcomm IPQ6018 APSS clock control module which supports the clocks with
>> +  frequencies above 800Mhz.
>> +
>> +properties:
>> +  compatible :
>> +    const: qcom,apss-ipq6018
> Normal ordering is: qcom,ipq6018-apss
ok.
>> +
>> +  clocks:
>> +    description: clocks required for this controller.
>> +    maxItems: 4
> Need to define what each clock is.
ok.
>> +
>> +  clock-names:
>> +    description: clock output names of required clocks.
>> +    maxItems: 4
>> +
>> +  '#clock-cells':
>> +    const: 1
>> +
>> +  '#reset-cells':
>> +    const: 1
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - '#clock-cells'
>> +  - '#reset-cells'
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +      #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
>> +      apss_clk: qcom,apss_clk@b111000 {
> I thought I'd finally seen the last of these Qcom node names...
>
> clock-controller@...
ok.
>> +            compatible = "qcom,apss-ipq6018";
>> +            clocks = <&xo>, <&gcc GPLL0>,
>> +                        <&gcc GPLL2>, <&gcc GPLL4>;
>> +            clock-names = "xo", "gpll0",
>> +                         "gpll2", "gpll4";
>> +            reg = <0xb11100c 0x5ff4>;
>> +            #clock-cells = <1>;
>> +            #reset-cells = <1>;
>> +      };
>> +...
>> diff --git a/include/dt-bindings/clock/qcom,apss-ipq6018.h b/include/dt-bindings/clock/qcom,apss-ipq6018.h
>> new file mode 100644
>> index 0000000..ed9d7d8
>> --- /dev/null
>> +++ b/include/dt-bindings/clock/qcom,apss-ipq6018.h
>> @@ -0,0 +1,26 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
> I'm pretty sure your employer would like an additional license here.
my bad. will correct it.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
new file mode 100644
index 0000000..7433721
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,apsscc.yaml
@@ -0,0 +1,58 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/qcom,apsscc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm IPQ6018 APSS Clock Controller Binding
+
+maintainers:
+  - Stephen Boyd <sboyd@kernel.org>
+
+description: |
+  Qualcomm IPQ6018 APSS clock control module which supports the clocks with
+  frequencies above 800Mhz.
+
+properties:
+  compatible :
+    const: qcom,apss-ipq6018
+
+  clocks:
+    description: clocks required for this controller.
+    maxItems: 4
+
+  clock-names:
+    description: clock output names of required clocks.
+    maxItems: 4
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+  - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+      #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
+      apss_clk: qcom,apss_clk@b111000 {
+            compatible = "qcom,apss-ipq6018";
+            clocks = <&xo>, <&gcc GPLL0>,
+                        <&gcc GPLL2>, <&gcc GPLL4>;
+            clock-names = "xo", "gpll0",
+                         "gpll2", "gpll4";
+            reg = <0xb11100c 0x5ff4>;
+            #clock-cells = <1>;
+            #reset-cells = <1>;
+      };
+...
diff --git a/include/dt-bindings/clock/qcom,apss-ipq6018.h b/include/dt-bindings/clock/qcom,apss-ipq6018.h
new file mode 100644
index 0000000..ed9d7d8
--- /dev/null
+++ b/include/dt-bindings/clock/qcom,apss-ipq6018.h
@@ -0,0 +1,26 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_QCA_APSS_IPQ6018_H
+#define _DT_BINDINGS_CLOCK_QCA_APSS_IPQ6018_H
+
+#define APSS_PLL_EARLY				0
+#define APSS_PLL				1
+#define APCS_ALIAS0_CLK_SRC			2
+#define APCS_ALIAS0_CORE_CLK			3
+
+#endif