* [PATCH v1 1/3] dt-bindings: clock: Add YAML schemas for the QCOM RPMHCC clock bindings
2019-10-18 10:09 [PATCH v1 0/3] Add support for RPMHCC for SC7180 Taniya Das
@ 2019-10-18 10:09 ` Taniya Das
2019-10-29 2:04 ` Rob Herring
2019-10-18 10:09 ` [PATCH v1 2/3] dt-bindings: clock: Introduce RPMHCC bindings for SC7180 Taniya Das
2019-10-18 10:09 ` [PATCH v1 3/3] clk: qcom: clk-rpmh: Add support for RPMHCC " Taniya Das
2 siblings, 1 reply; 8+ messages in thread
From: Taniya Das @ 2019-10-18 10:09 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: Andy Gross, David Brown, Rajendra Nayak, linux-arm-msm,
linux-soc, linux-clk, linux-kernel, devicetree, robh, robh+dt,
Taniya Das
The RPMHCC 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,rpmh-clk.txt | 27 ------------
.../devicetree/bindings/clock/qcom,rpmhcc.yaml | 49 ++++++++++++++++++++++
2 files changed, 49 insertions(+), 27 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
create mode 100644 Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
deleted file mode 100644
index 365bbde..0000000
--- a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-Qualcomm Technologies, Inc. RPMh Clocks
--------------------------------------------------------
-
-Resource Power Manager Hardened (RPMh) manages shared resources on
-some Qualcomm Technologies Inc. SoCs. It accepts clock requests from
-other hardware subsystems via RSC to control clocks.
-
-Required properties :
-- compatible : must be one of:
- "qcom,sdm845-rpmh-clk"
- "qcom,sm8150-rpmh-clk"
-
-- #clock-cells : must contain 1
-- clocks: a list of phandles and clock-specifier pairs,
- one for each entry in clock-names.
-- clock-names: Parent board clock: "xo".
-
-Example :
-
-#include <dt-bindings/clock/qcom,rpmh.h>
-
- &apps_rsc {
- rpmhcc: clock-controller {
- compatible = "qcom,sdm845-rpmh-clk";
- #clock-cells = <1>;
- };
- };
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
new file mode 100644
index 0000000..326bfd7
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/qcom,rpmhcc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies, Inc. RPMh Clocks Bindings
+
+maintainers:
+ - Taniya Das <tdas@codeaurora.org>
+
+description: |
+ Resource Power Manager Hardened (RPMh) manages shared resources on
+ some Qualcomm Technologies Inc. SoCs. It accepts clock requests from
+ other hardware subsystems via RSC to control clocks.
+
+properties:
+ compatible :
+ enum:
+ - qcom,sdm845-rpmh-clk
+ - qcom,sm8150-rpmh-clk
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ maxItems: 1
+ items:
+ - const: xo
+
+ '#clock-cells':
+ const: 1
+
+required:
+ - compatible
+ - '#clock-cells'
+
+examples:
+ # Example for GCC for SDM845: The below node should be defined inside
+ # &apps_rsc node.
+ - |
+ #include <dt-bindings/clock/qcom,rpmh.h>
+ rpmhcc: clock-controller {
+ compatible = "qcom,sdm845-rpmh-clk";
+ clocks = <&xo_board>;
+ clock-names = "xo";
+ #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.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: clock: Add YAML schemas for the QCOM RPMHCC clock bindings
2019-10-18 10:09 ` [PATCH v1 1/3] dt-bindings: clock: Add YAML schemas for the QCOM RPMHCC clock bindings Taniya Das
@ 2019-10-29 2:04 ` Rob Herring
2019-10-29 17:48 ` Taniya Das
0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2019-10-29 2:04 UTC (permalink / raw)
To: Taniya Das
Cc: Stephen Boyd, Michael Turquette ,
Andy Gross, David Brown, Rajendra Nayak, linux-arm-msm,
linux-soc, linux-clk, linux-kernel, devicetree
On Fri, Oct 18, 2019 at 03:39:22PM +0530, Taniya Das wrote:
> The RPMHCC 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,rpmh-clk.txt | 27 ------------
> .../devicetree/bindings/clock/qcom,rpmhcc.yaml | 49 ++++++++++++++++++++++
> 2 files changed, 49 insertions(+), 27 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
> create mode 100644 Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
>
> diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
> deleted file mode 100644
> index 365bbde..0000000
> --- a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -Qualcomm Technologies, Inc. RPMh Clocks
> --------------------------------------------------------
> -
> -Resource Power Manager Hardened (RPMh) manages shared resources on
> -some Qualcomm Technologies Inc. SoCs. It accepts clock requests from
> -other hardware subsystems via RSC to control clocks.
> -
> -Required properties :
> -- compatible : must be one of:
> - "qcom,sdm845-rpmh-clk"
> - "qcom,sm8150-rpmh-clk"
> -
> -- #clock-cells : must contain 1
> -- clocks: a list of phandles and clock-specifier pairs,
> - one for each entry in clock-names.
> -- clock-names: Parent board clock: "xo".
> -
> -Example :
> -
> -#include <dt-bindings/clock/qcom,rpmh.h>
> -
> - &apps_rsc {
> - rpmhcc: clock-controller {
> - compatible = "qcom,sdm845-rpmh-clk";
> - #clock-cells = <1>;
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
> new file mode 100644
> index 0000000..326bfd7
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/bindings/clock/qcom,rpmhcc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Technologies, Inc. RPMh Clocks Bindings
> +
> +maintainers:
> + - Taniya Das <tdas@codeaurora.org>
> +
> +description: |
> + Resource Power Manager Hardened (RPMh) manages shared resources on
> + some Qualcomm Technologies Inc. SoCs. It accepts clock requests from
> + other hardware subsystems via RSC to control clocks.
> +
> +properties:
> + compatible :
drop space ^
> + enum:
> + - qcom,sdm845-rpmh-clk
> + - qcom,sm8150-rpmh-clk
Wrong indent (1 char too many).
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + maxItems: 1
Can drop this. Implied by items list.
> + items:
> + - const: xo
> +
> + '#clock-cells':
> + const: 1
> +
> +required:
> + - compatible
> + - '#clock-cells'
> +
> +examples:
> + # Example for GCC for SDM845: The below node should be defined inside
> + # &apps_rsc node.
> + - |
> + #include <dt-bindings/clock/qcom,rpmh.h>
> + rpmhcc: clock-controller {
> + compatible = "qcom,sdm845-rpmh-clk";
> + clocks = <&xo_board>;
> + clock-names = "xo";
> + #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.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: clock: Add YAML schemas for the QCOM RPMHCC clock bindings
2019-10-29 2:04 ` Rob Herring
@ 2019-10-29 17:48 ` Taniya Das
0 siblings, 0 replies; 8+ messages in thread
From: Taniya Das @ 2019-10-29 17:48 UTC (permalink / raw)
To: Rob Herring
Cc: Stephen Boyd, Michael Turquette, Andy Gross, David Brown,
Rajendra Nayak, linux-arm-msm, linux-soc, linux-clk,
linux-kernel, devicetree
Hello Rob,
Thanks for the review. I will fix the below in the next patch.
On 10/29/2019 7:34 AM, Rob Herring wrote:
>> +properties:
>> + compatible :
> drop space ^
>
>> + enum:
>> + - qcom,sdm845-rpmh-clk
>> + - qcom,sm8150-rpmh-clk
> Wrong indent (1 char too many).
>
>> +
>> + clocks:
>> + maxItems: 1
>> +
>> + clock-names:
>> + maxItems: 1
> Can drop this. Implied by items list.
>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1 2/3] dt-bindings: clock: Introduce RPMHCC bindings for SC7180
2019-10-18 10:09 [PATCH v1 0/3] Add support for RPMHCC for SC7180 Taniya Das
2019-10-18 10:09 ` [PATCH v1 1/3] dt-bindings: clock: Add YAML schemas for the QCOM RPMHCC clock bindings Taniya Das
@ 2019-10-18 10:09 ` Taniya Das
2019-10-29 12:27 ` Rob Herring
2019-10-18 10:09 ` [PATCH v1 3/3] clk: qcom: clk-rpmh: Add support for RPMHCC " Taniya Das
2 siblings, 1 reply; 8+ messages in thread
From: Taniya Das @ 2019-10-18 10:09 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: Andy Gross, David Brown, Rajendra Nayak, linux-arm-msm,
linux-soc, linux-clk, linux-kernel, devicetree, robh, robh+dt,
Taniya Das
Add compatible for SC7180 RPMHCC.
Signed-off-by: Taniya Das <tdas@codeaurora.org>
---
Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
index 326bfd7..e325c6e 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml
@@ -19,6 +19,7 @@ properties:
enum:
- qcom,sdm845-rpmh-clk
- qcom,sm8150-rpmh-clk
+ - qcom,sc7180-rpmh-clk
clocks:
maxItems: 1
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
of the Code Aurora Forum, hosted by the Linux Foundation.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/3] dt-bindings: clock: Introduce RPMHCC bindings for SC7180
2019-10-18 10:09 ` [PATCH v1 2/3] dt-bindings: clock: Introduce RPMHCC bindings for SC7180 Taniya Das
@ 2019-10-29 12:27 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2019-10-29 12:27 UTC (permalink / raw)
To: Taniya Das
Cc: Stephen Boyd, Michael Turquette ,
Andy Gross, David Brown, Rajendra Nayak, linux-arm-msm,
linux-soc, linux-clk, linux-kernel, devicetree, robh, robh+dt,
Taniya Das
On Fri, 18 Oct 2019 15:39:23 +0530, Taniya Das wrote:
> Add compatible for SC7180 RPMHCC.
>
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
> Documentation/devicetree/bindings/clock/qcom,rpmhcc.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1 3/3] clk: qcom: clk-rpmh: Add support for RPMHCC for SC7180
2019-10-18 10:09 [PATCH v1 0/3] Add support for RPMHCC for SC7180 Taniya Das
2019-10-18 10:09 ` [PATCH v1 1/3] dt-bindings: clock: Add YAML schemas for the QCOM RPMHCC clock bindings Taniya Das
2019-10-18 10:09 ` [PATCH v1 2/3] dt-bindings: clock: Introduce RPMHCC bindings for SC7180 Taniya Das
@ 2019-10-18 10:09 ` Taniya Das
2019-10-21 12:53 ` Vinod Koul
2 siblings, 1 reply; 8+ messages in thread
From: Taniya Das @ 2019-10-18 10:09 UTC (permalink / raw)
To: Stephen Boyd, Michael Turquette
Cc: Andy Gross, David Brown, Rajendra Nayak, linux-arm-msm,
linux-soc, linux-clk, linux-kernel, devicetree, robh, robh+dt,
Taniya Das
Add support for clock RPMh driver to vote for ARC and VRM managed
clock resources.
Signed-off-by: Taniya Das <tdas@codeaurora.org>
---
drivers/clk/qcom/clk-rpmh.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index 96a36f6..7301c77 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -391,6 +391,24 @@ static const struct clk_rpmh_desc clk_rpmh_sm8150 = {
.num_clks = ARRAY_SIZE(sm8150_rpmh_clocks),
};
+static struct clk_hw *sc7180_rpmh_clocks[] = {
+ [RPMH_CXO_CLK] = &sdm845_bi_tcxo.hw,
+ [RPMH_CXO_CLK_A] = &sdm845_bi_tcxo_ao.hw,
+ [RPMH_LN_BB_CLK2] = &sdm845_ln_bb_clk2.hw,
+ [RPMH_LN_BB_CLK2_A] = &sdm845_ln_bb_clk2_ao.hw,
+ [RPMH_LN_BB_CLK3] = &sdm845_ln_bb_clk3.hw,
+ [RPMH_LN_BB_CLK3_A] = &sdm845_ln_bb_clk3_ao.hw,
+ [RPMH_RF_CLK1] = &sdm845_rf_clk1.hw,
+ [RPMH_RF_CLK1_A] = &sdm845_rf_clk1_ao.hw,
+ [RPMH_RF_CLK2] = &sdm845_rf_clk2.hw,
+ [RPMH_RF_CLK2_A] = &sdm845_rf_clk2_ao.hw,
+};
+
+static const struct clk_rpmh_desc clk_rpmh_sc7180 = {
+ .clks = sc7180_rpmh_clocks,
+ .num_clks = ARRAY_SIZE(sc7180_rpmh_clocks),
+};
+
static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
void *data)
{
@@ -471,6 +489,7 @@ static int clk_rpmh_probe(struct platform_device *pdev)
static const struct of_device_id clk_rpmh_match_table[] = {
{ .compatible = "qcom,sdm845-rpmh-clk", .data = &clk_rpmh_sdm845},
{ .compatible = "qcom,sm8150-rpmh-clk", .data = &clk_rpmh_sm8150},
+ { .compatible = "qcom,sc7180-rpmh-clk", .data = &clk_rpmh_sc7180},
{ }
};
MODULE_DEVICE_TABLE(of, clk_rpmh_match_table);
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
of the Code Aurora Forum, hosted by the Linux Foundation.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 3/3] clk: qcom: clk-rpmh: Add support for RPMHCC for SC7180
2019-10-18 10:09 ` [PATCH v1 3/3] clk: qcom: clk-rpmh: Add support for RPMHCC " Taniya Das
@ 2019-10-21 12:53 ` Vinod Koul
0 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2019-10-21 12:53 UTC (permalink / raw)
To: Taniya Das
Cc: Stephen Boyd, Michael Turquette ,
Andy Gross, David Brown, Rajendra Nayak, linux-arm-msm,
linux-soc, linux-clk, linux-kernel, devicetree, robh, robh+dt
On 18-10-19, 15:39, Taniya Das wrote:
> Add support for clock RPMh driver to vote for ARC and VRM managed
> clock resources.
>
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
> drivers/clk/qcom/clk-rpmh.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
> index 96a36f6..7301c77 100644
> --- a/drivers/clk/qcom/clk-rpmh.c
> +++ b/drivers/clk/qcom/clk-rpmh.c
> @@ -391,6 +391,24 @@ static const struct clk_rpmh_desc clk_rpmh_sm8150 = {
> .num_clks = ARRAY_SIZE(sm8150_rpmh_clocks),
> };
>
> +static struct clk_hw *sc7180_rpmh_clocks[] = {
> + [RPMH_CXO_CLK] = &sdm845_bi_tcxo.hw,
> + [RPMH_CXO_CLK_A] = &sdm845_bi_tcxo_ao.hw,
> + [RPMH_LN_BB_CLK2] = &sdm845_ln_bb_clk2.hw,
> + [RPMH_LN_BB_CLK2_A] = &sdm845_ln_bb_clk2_ao.hw,
> + [RPMH_LN_BB_CLK3] = &sdm845_ln_bb_clk3.hw,
> + [RPMH_LN_BB_CLK3_A] = &sdm845_ln_bb_clk3_ao.hw,
> + [RPMH_RF_CLK1] = &sdm845_rf_clk1.hw,
> + [RPMH_RF_CLK1_A] = &sdm845_rf_clk1_ao.hw,
> + [RPMH_RF_CLK2] = &sdm845_rf_clk2.hw,
> + [RPMH_RF_CLK2_A] = &sdm845_rf_clk2_ao.hw,
> +};
> +
> +static const struct clk_rpmh_desc clk_rpmh_sc7180 = {
> + .clks = sc7180_rpmh_clocks,
> + .num_clks = ARRAY_SIZE(sc7180_rpmh_clocks),
> +};
> +
> static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
> void *data)
> {
> @@ -471,6 +489,7 @@ static int clk_rpmh_probe(struct platform_device *pdev)
> static const struct of_device_id clk_rpmh_match_table[] = {
> { .compatible = "qcom,sdm845-rpmh-clk", .data = &clk_rpmh_sdm845},
> { .compatible = "qcom,sm8150-rpmh-clk", .data = &clk_rpmh_sm8150},
> + { .compatible = "qcom,sc7180-rpmh-clk", .data = &clk_rpmh_sc7180},
Is the table above not same as sm8150, if so cant we reuse that for
sc7180?
> { }
> };
> MODULE_DEVICE_TABLE(of, clk_rpmh_match_table);
> --
> Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
> of the Code Aurora Forum, hosted by the Linux Foundation.
--
~Vinod
^ permalink raw reply [flat|nested] 8+ messages in thread