Add APSS clock controller support for IPQ6018
cover Add APSS clock controller support for IPQ6018
The APSS clock controller in ipq6018 based devices supports cpu with frequencies above 800Mhz.
This patch series adds the support for the same.
Sivaprakash Murugesan (2):
clk: qcom: Add DT bindings for ipq6018 apss clock controller
clk: qcom: Add ipq6018 apss clock controller
.../devicetree/bindings/clock/qcom,apsscc.yaml | 58 ++++++ drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/apss-ipq6018.c | 210 +++++++++++++++++++++ include/dt-bindings/clock/qcom,apss-ipq6018.h | 26 +++ 5 files changed, 303 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,apsscc.yaml create mode 100644 drivers/clk/qcom/apss-ipq6018.c create mode 100644 include/dt-bindings/clock/qcom,apss-ipq6018.h
Signature · 1 line
2.7.4
PATCH 1/2 clk: qcom: Add DT bindings for ipq6018 apss clock controller
add dt-binding for ipq6018 apss clock controller
--- .../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
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +58 -0
@@ -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 <[email protected]> + +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>; + }; +...
include/dt-bindings/clock/qcom,apss-ipq6018.h new file +26 -0
@@ -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
Signature · 1 line
2.7.4
Re: [PATCH 1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller
Hey Sivaprakash,
Quoted 19 lines · Sivaprakash Murugesan
add dt-binding for ipq6018 apss clock controller
Signed-off-by Sivaprakash Murugesan <[email protected]>--- .../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.hDocumentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +0
-0
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 1
Quoted 1 line
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +1
-0@@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0-only
Dual license
Quoted 13 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +12
-0+%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 <[email protected]> + +description: | + Qualcomm IPQ6018 APSS clock control module which supports the clockswith
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 18
Quoted 5 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +5
-0+ frequencies above 800Mhz. + +properties: + compatible : + const: qcom,apss-ipq6018
Please use qcom,<chip>-<device>
instead.
Quoted 61 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +40
-0+ + 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>; + }; +...include/dt-bindings/clock/qcom,apss-ipq6018.h new file +5
-0@@ -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
Quoted 8 lines
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.
Quoted 11 lines
+ */
include/dt-bindings/clock/qcom,apss-ipq6018.h new file +10
-0+ +#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
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH 1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller
Hi Sibi,
Thanks for the review.
Quoted 14 lines · Sibi Sankar
Hey Sivaprakash,
Quoted 11 lines · Sivaprakash Murugesan
add dt-binding for ipq6018 apss clock controller
Signed-off-by Sivaprakash Murugesan <[email protected]>---
.../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.yamlcreate mode 100644include/dt-bindings/clock/qcom,apss-ipq6018.h
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 1
Quoted 8 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +1
-0@@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0-onlyDual license
missed it. will add in next series.
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +12
-0+%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 <[email protected]> + +description: | + Qualcomm IPQ6018 APSS clock control module which supports theclocks with
Quoted 8 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 18
Quoted 5 lines
+ frequencies above 800Mhz.
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +4
-0+ +properties: + compatible : + const: qcom,apss-ipq6018Please use qcom,<chip>-<device>
instead.
ok.
Quoted 65 lines
Quoted 65 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +40
-0+ + 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>; + }; +...include/dt-bindings/clock/qcom,apss-ipq6018.h new file +5
-0@@ -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
Quoted 9 lines
Quoted 5 lines
+ * 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
Re: [PATCH 1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller
In reply to Sibi SankarHi Sibi,
Thanks for the review.
Quoted 14 lines · Sibi Sankar
Hey Sivaprakash,
Quoted 11 lines · Sivaprakash Murugesan
add dt-binding for ipq6018 apss clock controller
Signed-off-by Sivaprakash Murugesan <[email protected]>---
.../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.yamlcreate mode 100644include/dt-bindings/clock/qcom,apss-ipq6018.h
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 1
Quoted 8 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +1
-0@@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0-onlyDual license
ok.
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +12
-0+%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 <[email protected]> + +description: | + Qualcomm IPQ6018 APSS clock control module which supports theclocks with
Quoted 9 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 18
Quoted 5 lines
+ frequencies above 800Mhz.
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +4
-0+ +properties: + compatible : + const: qcom,apss-ipq6018Please use qcom,<chip>-<device>
instead.
ok.
Quoted 64 lines
Quoted 64 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +40
-0+ + 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>; + }; +...include/dt-bindings/clock/qcom,apss-ipq6018.h new file +5
-0@@ -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
Quoted 8 lines
Quoted 5 lines
+ * 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.
Quoted 13 lines
Quoted 12 lines
+ */
include/dt-bindings/clock/qcom,apss-ipq6018.h new file +10
-0+ +#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
Rob Herring
maintainerRe: [PATCH 1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller
In reply to Sivaprakash MurugesanQuoted 10 lines · Sivaprakash Murugesan
add dt-binding for ipq6018 apss clock controller
Signed-off-by Sivaprakash Murugesan <[email protected]>--- .../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.
Re: [PATCH 1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller
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
Quoted 25 lines · Rob Herring
Quoted 10 lines · Sivaprakash Murugesan
add dt-binding for ipq6018 apss clock controller
Signed-off-by Sivaprakash Murugesan <[email protected]>--- .../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.yamlcreate mode 100644include/dt-bindings/clock/qcom,apss-ipq6018.hMy 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 nodeDocumentation/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 2See https://patchwork.ozlabs.org/patch/1245691
Please check and re-submit.
Rob Herring
maintainerRe: [PATCH 1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller
Quoted 8 lines · Sivaprakash Murugesan
Hi Rob,
I ran make
dt_binding_checkanddtbs_checkboth 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
maintainerRe: [PATCH 1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller
In reply to Sivaprakash MurugesanQuoted 16 lines · Sivaprakash Murugesan
add dt-binding for ipq6018 apss clock controller
Signed-off-by Sivaprakash Murugesan <[email protected]>--- .../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.hDocumentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +0
-0
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 1
Quoted 1 line
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +1
-0@@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0-only
Dual license new bindings please:
(GPL-2.0-only OR BSD-2-Clause)
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 10
Quoted 9 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +9
-0+%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 <[email protected]>
I'd expect this to be a QCom person, not who is applying patches.
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 12
Quoted 2 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +2
-0+ +description: |
You can drop '|'.
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 18
Quoted 6 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +6
-0+ 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
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 22
Quoted 4 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +4
-0+ + clocks: + description: clocks required for this controller. + maxItems: 4
Need to define what each clock is.
Quoted 16 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +16
-0+ + clock-names: + description: clock output names of required clocks. + maxItems: 4 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + + reg: + maxItems: 1 + +required: + - compatible
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 48
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +10
-0+ - 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@...
Quoted 16 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +10
-0+ 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>; + }; +...include/dt-bindings/clock/qcom,apss-ipq6018.h new file +0
-0
include/dt-bindings/clock/qcom,apss-ipq6018.h line 1
Quoted 1 line
include/dt-bindings/clock/qcom,apss-ipq6018.h new file +1
-0@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */
I'm pretty sure your employer would like an additional license here.
Quoted 28 lines
include/dt-bindings/clock/qcom,apss-ipq6018.h new file +25
-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 Signature · 1 line
2.7.4
Re: [PATCH 1/2] clk: qcom: Add DT bindings for ipq6018 apss clock controller
Hi Rob,
Thanks for the review.
Quoted 20 lines · Rob Herring
Quoted 16 lines · Sivaprakash Murugesan
add dt-binding for ipq6018 apss clock controller
Signed-off-by Sivaprakash Murugesan <[email protected]>--- .../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.yamlcreate mode 100644include/dt-bindings/clock/qcom,apss-ipq6018.hDocumentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +0
-0Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 1
Quoted 1 line
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +1
-0@@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0-onlyDual license new bindings please:
Quoted 1 line
(GPL-2.0-only OR BSD-2-Clause)
ok.
Quoted 12 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 10
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +9
-0+%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 <[email protected]>I'd expect this to be a QCom person, not who is applying patches.
Quoted 3 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 12
Quoted 2 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +2
-0+ +description: |You can drop '|'.
ok.
Quoted 7 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 18
Quoted 6 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +6
-0+ Qualcomm IPQ6018 APSS clock control module which supports the clocks with + frequencies above 800Mhz. + +properties: + compatible : + const: qcom,apss-ipq6018Normal ordering is: qcom,ipq6018-apss
ok.
Quoted 5 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml line 22
Quoted 4 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +4
-0+ + clocks: + description: clocks required for this controller. + maxItems: 4Need to define what each clock is.
ok.
Quoted 28 lines
Quoted 16 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +16
-0+ + clock-names: + description: clock output names of required clocks. + maxItems: 4 + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + + reg: + maxItems: 1 + +required: + - compatibleDocumentation/devicetree/bindings/clock/qcom,apsscc.yaml line 48
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +10
-0+ - 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...
Quoted 1 line
clock-controller@...
ok.
Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/clock/qcom,apsscc.yaml new file +10
-0+ 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>; + }; +...
Quoted 8 lines
include/dt-bindings/clock/qcom,apss-ipq6018.h line 1
Quoted 7 lines
include/dt-bindings/clock/qcom,apss-ipq6018.h new file +1
-0@@ -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.
PATCH 2/2 clk: qcom: Add ipq6018 apss clock controller
In reply to Sivaprakash MurugesanThis patch adds the support for apss clock controller found on ipq6018 devices.
--- drivers/clk/qcom/Kconfig | 8 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/apss-ipq6018.c | 210 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+) create mode 100644 drivers/clk/qcom/apss-ipq6018.c
drivers/clk/qcom/Kconfig +8 -0
@@ -89,6 +89,14 @@ config APQ_MMCC_8084 Say Y if you want to support multimedia devices such as display, graphics, video encode/decode, camera, etc. +config IPQ_APSS_6018 + tristate "IPQ6018 APSS Clock Controller" + select IPQ_GCC_6018 + help + Support for APSS clock controller on ipq6018 devices. The + APSS clock controller supports frequencies higher than 800Mhz. + Say Y if you want to support higher frequencies on ipq6018 devices. + config IPQ_GCC_4019 tristate "IPQ4019 Global Clock Controller" help
drivers/clk/qcom/Makefile +1 -0
@@ -19,6 +19,7 @@ clk-qcom-$(CONFIG_QCOM_GDSC) += gdsc.o # Keep alphabetically sorted by config obj-$(CONFIG_APQ_GCC_8084) += gcc-apq8084.o obj-$(CONFIG_APQ_MMCC_8084) += mmcc-apq8084.o +obj-$(CONFIG_IPQ_APSS_6018) += apss-ipq6018.o obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o obj-$(CONFIG_IPQ_GCC_6018) += gcc-ipq6018.o obj-$(CONFIG_IPQ_GCC_806X) += gcc-ipq806x.o
drivers/clk/qcom/apss-ipq6018.c new file +210 -0
210 lines not on this page · raw message
Signature · 1 line
2.7.4
kbuild test robot
build botRe: [PATCH 2/2] clk: qcom: Add ipq6018 apss clock controller
Thank you for the patch! Perhaps something to improve:
Hi Sivaprakash,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on clk/clk-next]
[also build test WARNING on v5.6-rc3 next-20200227]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sivaprakash-Murugesan/Add-APSS-clock-controller-support-for-IPQ6018/20200227-185847 base: https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next reproduce: # apt-get install sparse # sparse version: v0.6.1-173-ge0787745-dirty make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
sparse warnings: (new ones prefixed by >>)
>> drivers/clk/qcom/apss-ipq6018.c:39:10: sparse: sparse: symbol 'apss_pll_offsets' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kbuild test robot
build bot[RFC PATCH] clk: qcom: apss_pll_offsets[] can be static
In reply to Sivaprakash MurugesanFixes: bfce07143090 ("clk: qcom: Add ipq6018 apss clock controller")
--- apss-ipq6018.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/apss-ipq6018.c +1 -1
@@ -36,7 +36,7 @@ enum {P_APSS_PLL }; -const u8 apss_pll_offsets[] = { +static const u8 apss_pll_offsets[] = { [PLL_OFF_L_VAL ] =0x08 , [PLL_OFF_ALPHA_VAL ] =0x10 , [PLL_OFF_USER_CTL ] =0x18 ,
Stephen Boyd
maintainerRe: [PATCH 2/2] clk: qcom: Add ipq6018 apss clock controller
In reply to Sivaprakash MurugesanQuoting Sivaprakash Murugesan (2020-02-27 01:55:18)
Quoted 5 lines
drivers/clk/qcom/Kconfig +0
-0
drivers/clk/qcom/Kconfig config APQ_MMCC_8084 · line 97
Quoted 9 lines
drivers/clk/qcom/Kconfig +6
-0@@ -89,6 +89,14 @@ config APQ_MMCC_8084 Say Y if you want to support multimedia devices such as display, graphics, video encode/decode, camera, etc. +config IPQ_APSS_6018 + tristate "IPQ6018 APSS Clock Controller" + select IPQ_GCC_6018 + help + Support for APSS clock controller on ipq6018 devices. The + APSS clock controller supports frequencies higher than 800Mhz.
supports CPU frequencies? It's not clear what APSS is to a lot of people out there.
drivers/clk/qcom/Kconfig config APQ_MMCC_8084 · line 98
Quoted 1 line
drivers/clk/qcom/Kconfig +1
-0+ Say Y if you want to support higher frequencies on ipq6018 devices.
support CPU frequency scaling on ipq6018?
Quoted 12 lines
drivers/clk/qcom/Kconfig +1
-0+ config IPQ_GCC_4019 tristate "IPQ4019 Global Clock Controller" helpdrivers/clk/qcom/apss-ipq6018.c new file +2
-0@@ -0,0 +1,210 @@ +// SPDX-License-Identifier: GPL-2.0 +/*
drivers/clk/qcom/apss-ipq6018.c line 11
Quoted 10 lines
drivers/clk/qcom/apss-ipq6018.c new file +9
-0+* Copyright (c) 2018, The Linux Foundation. All rights reserved. +*/ + +#include <linux/kernel.h> +#include <linux/err.h> +#include <linux/platform_device.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/of_device.h>
Are these two includes needed at all?
Quoted 7 lines
drivers/clk/qcom/apss-ipq6018.c new file +7
-0+#include <linux/clk-provider.h> +#include <linux/regmap.h> + +#include <linux/reset-controller.h> +#include <dt-bindings/clock/qcom,apss-ipq6018.h> + +#include "common.h"
drivers/clk/qcom/apss-ipq6018.c line 28
Quoted 10 lines
drivers/clk/qcom/apss-ipq6018.c new file +10
-0+#include "clk-regmap.h" +#include "clk-pll.h" +#include "clk-rcg.h" +#include "clk-branch.h" +#include "clk-alpha-pll.h" +#include "clk-regmap-divider.h" +#include "clk-regmap-mux.h" +#include "reset.h" + +#define F (f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
This can be removed. It's common in clk-rcg.h now
drivers/clk/qcom/apss-ipq6018.c line 135
Quoted 12 lines
drivers/clk/qcom/apss-ipq6018.c new file +12
-0+ +static struct clk_branch apcs_alias0_core_clk = { + .halt_reg =0x004c , + .clkr = { + .enable_reg =0x004c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="apcs_alias0_core_clk" , + .parent_hws = (const struct clk_hw *[]){ + &apcs_alias0_clk_src.clkr.hw }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT |CLK_IS_CRITICAL ,
Please add a comment about why CLK_IS_CRITICAL is here. Presumably in the case that a cpufreq driver doesn't probe and claim this clk?
Quoted 6 lines
drivers/clk/qcom/apss-ipq6018.c new file +6
-0+ .ops = &clk_branch2_ops, + }, + }, +}; + +
[...]
drivers/clk/qcom/apss-ipq6018.c line 207
Quoted 12 lines
drivers/clk/qcom/apss-ipq6018.c new file +12
-0+ +static int __init apss_ipq6018_init (void ) +{ +return platform_driver_register (&apss_ipq6018_driver); +} +core_initcall (apss_ipq6018_init); + +static void __exit apss_ipq6018_exit(void) +{ +platform_driver_unregister (&apss_ipq6018_driver); +} +module_exit (apss_ipq6018_exit);
Any reason this can't just be module_platform_driver()?
Re: [PATCH 2/2] clk: qcom: Add ipq6018 apss clock controller
Hi Stephen,
Thanks for the review.
Quoted 9 lines · Stephen Boyd
Quoting Sivaprakash Murugesan (2020-02-27 01:55:18)
Quoted 8 lines
drivers/clk/qcom/Kconfig +0
-0@@ -89,6 +89,14 @@ config APQ_MMCC_8084 Say Y if you want to support multimedia devices such as display, graphics, video encode/decode, camera, etc.
Quoted 8 lines
drivers/clk/qcom/Kconfig config APQ_MMCC_8084 · line 97
Quoted 6 lines
drivers/clk/qcom/Kconfig +6
-0+config IPQ_APSS_6018 + tristate "IPQ6018 APSS Clock Controller" + select IPQ_GCC_6018 + help + Support for APSS clock controller on ipq6018 devices. The + APSS clock controller supports frequencies higher than 800Mhz.supports CPU frequencies? It's not clear what APSS is to a lot of people out there.
ok. Will try to elaborate.
Quoted 3 lines
drivers/clk/qcom/Kconfig config APQ_MMCC_8084 · line 98
Quoted 2 lines
drivers/clk/qcom/Kconfig +1
-0+ Say Y if you want to support higher frequencies on ipq6018 devices.support CPU frequency scaling on ipq6018?
ok.
Quoted 15 lines
Quoted 15 lines
drivers/clk/qcom/Kconfig +1
-0+ config IPQ_GCC_4019 tristate "IPQ4019 Global Clock Controller" helpdrivers/clk/qcom/apss-ipq6018.c new file +4
-0@@ -0,0 +1,210 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2018, The Linux Foundation. All rights reserved. +*/
Quoted 8 lines
drivers/clk/qcom/apss-ipq6018.c line 11
Quoted 7 lines
drivers/clk/qcom/apss-ipq6018.c new file +7
-0+ +#include <linux/kernel.h> +#include <linux/err.h> +#include <linux/platform_device.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/of_device.h> Are these two includes needed at all?
No they're not. will remove it.
Quoted 10 lines
Quoted 10 lines
drivers/clk/qcom/apss-ipq6018.c new file +10
-0+#include <linux/clk-provider.h> +#include <linux/regmap.h> + +#include <linux/reset-controller.h> +#include <dt-bindings/clock/qcom,apss-ipq6018.h> + +#include "common.h" +#include "clk-regmap.h" +#include "clk-pll.h" +#include "clk-rcg.h"
Quoted 8 lines
drivers/clk/qcom/apss-ipq6018.c line 28
Quoted 7 lines
drivers/clk/qcom/apss-ipq6018.c new file +7
-0+#include "clk-branch.h" +#include "clk-alpha-pll.h" +#include "clk-regmap-divider.h" +#include "clk-regmap-mux.h" +#include "reset.h" + +#define F (f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }This can be removed. It's common in
clk-rcg.hnow
ok.
Quoted 15 lines
drivers/clk/qcom/apss-ipq6018.c line 135
Quoted 13 lines
drivers/clk/qcom/apss-ipq6018.c new file +12
-0+ +static struct clk_branch apcs_alias0_core_clk = { + .halt_reg =0x004c , + .clkr = { + .enable_reg =0x004c , + .enable_mask =BIT (0 ), + .hw.init = &(struct clk_init_data ){ + .name ="apcs_alias0_core_clk" , + .parent_hws = (const struct clk_hw *[]){ + &apcs_alias0_clk_src.clkr.hw }, + .num_parents =1 , + .flags =CLK_SET_RATE_PARENT |CLK_IS_CRITICAL ,Please add a comment about why
CLK_IS_CRITICALis here. Presumably in the case that a cpufreq driver doesn't probe and claim this clk?
ok.
Quoted 7 lines
Quoted 6 lines
drivers/clk/qcom/apss-ipq6018.c new file +6
-0+ .ops = &clk_branch2_ops, + }, + }, +}; + +[...]
Quoted 13 lines
drivers/clk/qcom/apss-ipq6018.c line 207
Quoted 12 lines
drivers/clk/qcom/apss-ipq6018.c new file +12
-0+ +static int __init apss_ipq6018_init (void ) +{ +return platform_driver_register (&apss_ipq6018_driver); +} +core_initcall (apss_ipq6018_init); + +static void __exit apss_ipq6018_exit(void) +{ +platform_driver_unregister (&apss_ipq6018_driver); +} +module_exit (apss_ipq6018_exit);Any reason this can't just be
module_platform_driver()?
yeah it can be. will fix it.