diff mbox series

[1/9] dt-bindings: clk: qcom: Add bindings for MSM8994 GCC driver

Message ID 20210313021919.435332-1-konrad.dybcio@somainline.org
State New
Headers show
Series [1/9] dt-bindings: clk: qcom: Add bindings for MSM8994 GCC driver | expand

Commit Message

Konrad Dybcio March 13, 2021, 2:19 a.m. UTC
Add documentation for the MSM8994 GCC driver.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 .../bindings/clock/qcom,gcc-msm8994.yaml      | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml

Comments

Rob Herring March 15, 2021, 2:22 p.m. UTC | #1
On Sat, 13 Mar 2021 03:19:10 +0100, Konrad Dybcio wrote:
> Add documentation for the MSM8994 GCC driver.

> 

> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>

> ---

>  .../bindings/clock/qcom,gcc-msm8994.yaml      | 72 +++++++++++++++++++

>  1 file changed, 72 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml

> 


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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.example.dt.yaml: clock-controller@300000: 'clock-names', 'clocks' do not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/clock/qcom,gcc.yaml

See https://patchwork.ozlabs.org/patch/1452446

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Rob Herring March 15, 2021, 3:54 p.m. UTC | #2
On Sat, Mar 13, 2021 at 03:19:10AM +0100, Konrad Dybcio wrote:
> Add documentation for the MSM8994 GCC driver.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> ---
>  .../bindings/clock/qcom,gcc-msm8994.yaml      | 72 +++++++++++++++++++
>  1 file changed, 72 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml
> new file mode 100644
> index 000000000000..f8067fb1bbd6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/clock/qcom,gcc-msm8994.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Qualcomm Global Clock & Reset Controller Binding for MSM8994
> +
> +description: |
> +  Qualcomm global clock control module which supports the clocks, resets and
> +  power domains on MSM8994 and MSM8992.
> +
> +  See also:
> +  - dt-bindings/clock/qcom,gcc-msm8994.h
> +
> +maintainers:
> +  - Stephen Boyd <sboyd@kernel.org>
> +  - Taniya Das <tdas@codeaurora.org>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,gcc-msm8992
> +      - qcom,gcc-msm8994

qcom,msm8994-gcc

> +
> +  clocks:
> +    items:
> +      - description: XO source
> +      - description: Sleep clock source
> +
> +  clock-names:
> +    items:
> +      - const: xo
> +      - const: sleep
> +
> +  '#clock-cells':
> +    const: 1
> +
> +  '#reset-cells':
> +    const: 1
> +
> +  '#power-domain-cells':
> +    const: 1
> +
> +  reg:
> +    maxItems: 1
> +
> +  protected-clocks:
> +    description:
> +      Protected clock specifier list as per common clock binding.
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#clock-cells'
> +  - '#reset-cells'
> +  - '#power-domain-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    clock-controller@300000 {
> +      compatible = "qcom,gcc-msm8994";
> +      reg = <0x300000 0x90000>;
> +      #clock-cells = <1>;
> +      #reset-cells = <1>;
> +      #power-domain-cells = <1>;
> +      clocks = <&xo_board>, <&sleep_clk>;
> +      clock-names = "xo", "sleep";
> +    };
> +...
> -- 
> 2.30.2
>
Stephen Boyd April 1, 2021, 7:39 p.m. UTC | #3
Quoting Konrad Dybcio (2021-03-12 18:19:10)
> Add documentation for the MSM8994 GCC driver.

> 

> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>

> ---

>  .../bindings/clock/qcom,gcc-msm8994.yaml      | 72 +++++++++++++++++++

>  1 file changed, 72 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml

> 

> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml

> new file mode 100644

> index 000000000000..f8067fb1bbd6

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml

> @@ -0,0 +1,72 @@

> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2

> +---

> +$id: "http://devicetree.org/schemas/clock/qcom,gcc-msm8994.yaml#"

> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

> +

> +title: Qualcomm Global Clock & Reset Controller Binding for MSM8994

> +

> +description: |

> +  Qualcomm global clock control module which supports the clocks, resets and

> +  power domains on MSM8994 and MSM8992.


Isn't this already documented in
Documentation/devicetree/bindings/clock/qcom,gcc.yaml
Stephen Boyd April 1, 2021, 7:56 p.m. UTC | #4
Quoting Konrad Dybcio (2021-03-12 18:19:17)
> diff --git a/drivers/clk/qcom/gcc-msm8994.c b/drivers/clk/qcom/gcc-msm8994.c
> index fae784b4242f..a5b9db7678d1 100644
> --- a/drivers/clk/qcom/gcc-msm8994.c
> +++ b/drivers/clk/qcom/gcc-msm8994.c
> @@ -2718,13 +2742,57 @@ static const struct qcom_cc_desc gcc_msm8994_desc = {
>  };
>  
>  static const struct of_device_id gcc_msm8994_match_table[] = {
> -       { .compatible = "qcom,gcc-msm8994" },
> +       { .compatible = "qcom,gcc-msm8992" },
> +       { .compatible = "qcom,gcc-msm8994" }, /* V2 and V2.1 */
>         {}
>  };
>  MODULE_DEVICE_TABLE(of, gcc_msm8994_match_table);
>  
>  static int gcc_msm8994_probe(struct platform_device *pdev)
>  {
> +       struct device *dev = &pdev->dev;
> +       bool is_msm8992;
> +
> +       is_msm8992 = of_device_is_compatible(pdev->dev.of_node, "qcom,gcc-msm8992");
> +
> +       if (is_msm8992) {

Drop the bool please

	if (of_device_is_compatible(pdev->dev.of_node, "qcom,gcc-msm8992")) {

> +               /* MSM8992 features less clocks and some have different freq tables */
> +               gcc_msm8994_desc.clks[GCC_LPASS_Q6_AXI_CLK] = 0;

Use NULL please.

> +               gcc_msm8994_desc.clks[GCC_PCIE_1_AUX_CLK] = 0;
> +               gcc_msm8994_desc.clks[GCC_PCIE_1_CFG_AHB_CLK] = 0;
> +               gcc_msm8994_desc.clks[GCC_PCIE_1_MSTR_AXI_CLK] = 0;
Konrad Dybcio April 1, 2021, 8:17 p.m. UTC | #5
> Isn't this already documented in

> Documentation/devicetree/bindings/clock/qcom,gcc.yaml



I wanted to document the custom property for the SONY SDHCI quirk, but if it's not necessary, we can just omit this patch.


Konrad
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml
new file mode 100644
index 000000000000..f8067fb1bbd6
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-msm8994.yaml
@@ -0,0 +1,72 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/clock/qcom,gcc-msm8994.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Global Clock & Reset Controller Binding for MSM8994
+
+description: |
+  Qualcomm global clock control module which supports the clocks, resets and
+  power domains on MSM8994 and MSM8992.
+
+  See also:
+  - dt-bindings/clock/qcom,gcc-msm8994.h
+
+maintainers:
+  - Stephen Boyd <sboyd@kernel.org>
+  - Taniya Das <tdas@codeaurora.org>
+
+properties:
+  compatible:
+    enum:
+      - qcom,gcc-msm8992
+      - qcom,gcc-msm8994
+
+  clocks:
+    items:
+      - description: XO source
+      - description: Sleep clock source
+
+  clock-names:
+    items:
+      - const: xo
+      - const: sleep
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  '#power-domain-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+  protected-clocks:
+    description:
+      Protected clock specifier list as per common clock binding.
+
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+  - '#reset-cells'
+  - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    clock-controller@300000 {
+      compatible = "qcom,gcc-msm8994";
+      reg = <0x300000 0x90000>;
+      #clock-cells = <1>;
+      #reset-cells = <1>;
+      #power-domain-cells = <1>;
+      clocks = <&xo_board>, <&sleep_clk>;
+      clock-names = "xo", "sleep";
+    };
+...