* [PATCH v5 0/4] clk: qcom: Add support for SM8150 rpmh
@ 2019-08-26 17:31 Vinod Koul
2019-08-26 17:31 ` [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks Vinod Koul
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Vinod Koul @ 2019-08-26 17:31 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
Add support for rpm clock controller found in SM8150 and while at it update
the driver to support parent data clock scheme as suggested by Stephen.
Changes since v4:
- Fix the .fw_name as xo instead of xo_board (v4 erroneously did for
.name)
Changes since v3:
- Make clock parent name as xo instead of xo_board
Changes since v2:
- Add reviewed-by from Bjorn
- Update the parent name as xo_board
- Fix style issue
Changes since v1:
- Describe parent clocks for rpmhcc
- Add support for parent data scheme for rpmhcc
Vinod Koul (4):
dt-bindings: clock: Document the parent clocks
clk: qcom: clk-rpmh: Convert to parent data scheme
dt-bindings: clock: Document SM8150 rpmh-clock compatible
clk: qcom: clk-rpmh: Add support for SM8150
.../bindings/clock/qcom,rpmh-clk.txt | 7 +++-
drivers/clk/qcom/clk-rpmh.c | 38 ++++++++++++++++++-
2 files changed, 42 insertions(+), 3 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks
2019-08-26 17:31 [PATCH v5 0/4] clk: qcom: Add support for SM8150 rpmh Vinod Koul
@ 2019-08-26 17:31 ` Vinod Koul
2019-08-27 18:50 ` Rob Herring
2019-09-09 11:41 ` Stephen Boyd
2019-08-26 17:31 ` [PATCH v5 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme Vinod Koul
` (2 subsequent siblings)
3 siblings, 2 replies; 12+ messages in thread
From: Vinod Koul @ 2019-08-26 17:31 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
With clock parent data scheme we must specify the parent clocks for the
rpmhcc nodes. So describe the parent clock for rpmhcc in the bindings.
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
index 3c007653da31..8b97968f9c88 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
@@ -9,6 +9,9 @@ Required properties :
- compatible : shall contain "qcom,sdm845-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 :
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v5 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme
2019-08-26 17:31 [PATCH v5 0/4] clk: qcom: Add support for SM8150 rpmh Vinod Koul
2019-08-26 17:31 ` [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks Vinod Koul
@ 2019-08-26 17:31 ` Vinod Koul
2019-08-27 4:31 ` Bjorn Andersson
2019-09-09 11:42 ` Stephen Boyd
2019-08-26 17:31 ` [PATCH v5 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible Vinod Koul
2019-08-26 17:31 ` [PATCH v5 4/4] clk: qcom: clk-rpmh: Add support for SM8150 Vinod Koul
3 siblings, 2 replies; 12+ messages in thread
From: Vinod Koul @ 2019-08-26 17:31 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
Convert the rpmh clock driver to use the new parent data scheme by
specifying the parent data for board clock.
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/clk/qcom/clk-rpmh.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index c3fd632af119..35d55aee6a01 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -95,7 +95,10 @@ static DEFINE_MUTEX(rpmh_clk_lock);
.hw.init = &(struct clk_init_data){ \
.ops = &clk_rpmh_ops, \
.name = #_name, \
- .parent_names = (const char *[]){ "xo_board" }, \
+ .parent_data = &(const struct clk_parent_data){ \
+ .fw_name = "xo", \
+ .name = "xo_board", \
+ }, \
.num_parents = 1, \
}, \
}; \
@@ -110,7 +113,10 @@ static DEFINE_MUTEX(rpmh_clk_lock);
.hw.init = &(struct clk_init_data){ \
.ops = &clk_rpmh_ops, \
.name = #_name_active, \
- .parent_names = (const char *[]){ "xo_board" }, \
+ .parent_data = &(const struct clk_parent_data){ \
+ .fw_name = "xo", \
+ .name = "xo_board", \
+ }, \
.num_parents = 1, \
}, \
}
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v5 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible
2019-08-26 17:31 [PATCH v5 0/4] clk: qcom: Add support for SM8150 rpmh Vinod Koul
2019-08-26 17:31 ` [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks Vinod Koul
2019-08-26 17:31 ` [PATCH v5 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme Vinod Koul
@ 2019-08-26 17:31 ` Vinod Koul
2019-08-27 18:51 ` Rob Herring
2019-09-09 11:42 ` Stephen Boyd
2019-08-26 17:31 ` [PATCH v5 4/4] clk: qcom: clk-rpmh: Add support for SM8150 Vinod Koul
3 siblings, 2 replies; 12+ messages in thread
From: Vinod Koul @ 2019-08-26 17:31 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
Document the SM8150 rpmh-clock compatible for rpmh clock controller
found on SM8150 platforms.
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
index 8b97968f9c88..365bbde599b1 100644
--- a/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt
@@ -6,7 +6,9 @@ some Qualcomm Technologies Inc. SoCs. It accepts clock requests from
other hardware subsystems via RSC to control clocks.
Required properties :
-- compatible : shall contain "qcom,sdm845-rpmh-clk"
+- 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,
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v5 4/4] clk: qcom: clk-rpmh: Add support for SM8150
2019-08-26 17:31 [PATCH v5 0/4] clk: qcom: Add support for SM8150 rpmh Vinod Koul
` (2 preceding siblings ...)
2019-08-26 17:31 ` [PATCH v5 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible Vinod Koul
@ 2019-08-26 17:31 ` Vinod Koul
2019-09-09 11:42 ` Stephen Boyd
3 siblings, 1 reply; 12+ messages in thread
From: Vinod Koul @ 2019-08-26 17:31 UTC (permalink / raw)
To: Stephen Boyd
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
Add support for rpmh clocks found in SM8150
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
drivers/clk/qcom/clk-rpmh.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index 35d55aee6a01..49694082e9ec 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -374,6 +374,33 @@ static const struct clk_rpmh_desc clk_rpmh_sdm845 = {
.num_clks = ARRAY_SIZE(sdm845_rpmh_clocks),
};
+DEFINE_CLK_RPMH_ARC(sm8150, bi_tcxo, bi_tcxo_ao, "xo.lvl", 0x3, 2);
+DEFINE_CLK_RPMH_VRM(sm8150, ln_bb_clk2, ln_bb_clk2_ao, "lnbclka2", 2);
+DEFINE_CLK_RPMH_VRM(sm8150, ln_bb_clk3, ln_bb_clk3_ao, "lnbclka3", 2);
+DEFINE_CLK_RPMH_VRM(sm8150, rf_clk1, rf_clk1_ao, "rfclka1", 1);
+DEFINE_CLK_RPMH_VRM(sm8150, rf_clk2, rf_clk2_ao, "rfclka2", 1);
+DEFINE_CLK_RPMH_VRM(sm8150, rf_clk3, rf_clk3_ao, "rfclka3", 1);
+
+static struct clk_hw *sm8150_rpmh_clocks[] = {
+ [RPMH_CXO_CLK] = &sm8150_bi_tcxo.hw,
+ [RPMH_CXO_CLK_A] = &sm8150_bi_tcxo_ao.hw,
+ [RPMH_LN_BB_CLK2] = &sm8150_ln_bb_clk2.hw,
+ [RPMH_LN_BB_CLK2_A] = &sm8150_ln_bb_clk2_ao.hw,
+ [RPMH_LN_BB_CLK3] = &sm8150_ln_bb_clk3.hw,
+ [RPMH_LN_BB_CLK3_A] = &sm8150_ln_bb_clk3_ao.hw,
+ [RPMH_RF_CLK1] = &sm8150_rf_clk1.hw,
+ [RPMH_RF_CLK1_A] = &sm8150_rf_clk1_ao.hw,
+ [RPMH_RF_CLK2] = &sm8150_rf_clk2.hw,
+ [RPMH_RF_CLK2_A] = &sm8150_rf_clk2_ao.hw,
+ [RPMH_RF_CLK3] = &sm8150_rf_clk3.hw,
+ [RPMH_RF_CLK3_A] = &sm8150_rf_clk3_ao.hw,
+};
+
+static const struct clk_rpmh_desc clk_rpmh_sm8150 = {
+ .clks = sm8150_rpmh_clocks,
+ .num_clks = ARRAY_SIZE(sm8150_rpmh_clocks),
+};
+
static struct clk_hw *of_clk_rpmh_hw_get(struct of_phandle_args *clkspec,
void *data)
{
@@ -453,6 +480,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},
{ }
};
MODULE_DEVICE_TABLE(of, clk_rpmh_match_table);
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v5 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme
2019-08-26 17:31 ` [PATCH v5 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme Vinod Koul
@ 2019-08-27 4:31 ` Bjorn Andersson
2019-09-09 11:42 ` Stephen Boyd
1 sibling, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2019-08-27 4:31 UTC (permalink / raw)
To: Vinod Koul
Cc: Stephen Boyd, linux-arm-msm, Andy Gross, Michael Turquette,
Rob Herring, Mark Rutland, linux-clk, devicetree, linux-kernel
On Mon 26 Aug 10:31 PDT 2019, Vinod Koul wrote:
> Convert the rpmh clock driver to use the new parent data scheme by
> specifying the parent data for board clock.
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> drivers/clk/qcom/clk-rpmh.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
> index c3fd632af119..35d55aee6a01 100644
> --- a/drivers/clk/qcom/clk-rpmh.c
> +++ b/drivers/clk/qcom/clk-rpmh.c
> @@ -95,7 +95,10 @@ static DEFINE_MUTEX(rpmh_clk_lock);
> .hw.init = &(struct clk_init_data){ \
> .ops = &clk_rpmh_ops, \
> .name = #_name, \
> - .parent_names = (const char *[]){ "xo_board" }, \
> + .parent_data = &(const struct clk_parent_data){ \
> + .fw_name = "xo", \
> + .name = "xo_board", \
> + }, \
> .num_parents = 1, \
> }, \
> }; \
> @@ -110,7 +113,10 @@ static DEFINE_MUTEX(rpmh_clk_lock);
> .hw.init = &(struct clk_init_data){ \
> .ops = &clk_rpmh_ops, \
> .name = #_name_active, \
> - .parent_names = (const char *[]){ "xo_board" }, \
> + .parent_data = &(const struct clk_parent_data){ \
> + .fw_name = "xo", \
> + .name = "xo_board", \
> + }, \
> .num_parents = 1, \
> }, \
> }
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks
2019-08-26 17:31 ` [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks Vinod Koul
@ 2019-08-27 18:50 ` Rob Herring
2019-09-09 11:41 ` Stephen Boyd
1 sibling, 0 replies; 12+ messages in thread
From: Rob Herring @ 2019-08-27 18:50 UTC (permalink / raw)
To: Vinod Koul
Cc: Stephen Boyd, linux-arm-msm, Bjorn Andersson, Vinod Koul,
Andy Gross, Michael Turquette, Mark Rutland, linux-clk,
devicetree, linux-kernel
On Mon, 26 Aug 2019 23:01:17 +0530, Vinod Koul wrote:
> With clock parent data scheme we must specify the parent clocks for the
> rpmhcc nodes. So describe the parent clock for rpmhcc in the bindings.
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt | 3 +++
> 1 file changed, 3 insertions(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible
2019-08-26 17:31 ` [PATCH v5 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible Vinod Koul
@ 2019-08-27 18:51 ` Rob Herring
2019-09-09 11:42 ` Stephen Boyd
1 sibling, 0 replies; 12+ messages in thread
From: Rob Herring @ 2019-08-27 18:51 UTC (permalink / raw)
To: Vinod Koul
Cc: Stephen Boyd, linux-arm-msm, Bjorn Andersson, Vinod Koul,
Andy Gross, Michael Turquette, Mark Rutland, linux-clk,
devicetree, linux-kernel
On Mon, 26 Aug 2019 23:01:19 +0530, Vinod Koul wrote:
> Document the SM8150 rpmh-clock compatible for rpmh clock controller
> found on SM8150 platforms.
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> Documentation/devicetree/bindings/clock/qcom,rpmh-clk.txt | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks
2019-08-26 17:31 ` [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks Vinod Koul
2019-08-27 18:50 ` Rob Herring
@ 2019-09-09 11:41 ` Stephen Boyd
1 sibling, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2019-09-09 11:41 UTC (permalink / raw)
To: Vinod Koul
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
Quoting Vinod Koul (2019-08-26 10:31:17)
> With clock parent data scheme we must specify the parent clocks for the
> rpmhcc nodes. So describe the parent clock for rpmhcc in the bindings.
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme
2019-08-26 17:31 ` [PATCH v5 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme Vinod Koul
2019-08-27 4:31 ` Bjorn Andersson
@ 2019-09-09 11:42 ` Stephen Boyd
1 sibling, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2019-09-09 11:42 UTC (permalink / raw)
To: Vinod Koul
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
Quoting Vinod Koul (2019-08-26 10:31:18)
> Convert the rpmh clock driver to use the new parent data scheme by
> specifying the parent data for board clock.
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible
2019-08-26 17:31 ` [PATCH v5 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible Vinod Koul
2019-08-27 18:51 ` Rob Herring
@ 2019-09-09 11:42 ` Stephen Boyd
1 sibling, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2019-09-09 11:42 UTC (permalink / raw)
To: Vinod Koul
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
Quoting Vinod Koul (2019-08-26 10:31:19)
> Document the SM8150 rpmh-clock compatible for rpmh clock controller
> found on SM8150 platforms.
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v5 4/4] clk: qcom: clk-rpmh: Add support for SM8150
2019-08-26 17:31 ` [PATCH v5 4/4] clk: qcom: clk-rpmh: Add support for SM8150 Vinod Koul
@ 2019-09-09 11:42 ` Stephen Boyd
0 siblings, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2019-09-09 11:42 UTC (permalink / raw)
To: Vinod Koul
Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, Andy Gross,
Michael Turquette, Rob Herring, Mark Rutland, linux-clk,
devicetree, linux-kernel
Quoting Vinod Koul (2019-08-26 10:31:20)
> Add support for rpmh clocks found in SM8150
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-09-09 11:42 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-26 17:31 [PATCH v5 0/4] clk: qcom: Add support for SM8150 rpmh Vinod Koul
2019-08-26 17:31 ` [PATCH v5 1/4] dt-bindings: clock: Document the parent clocks Vinod Koul
2019-08-27 18:50 ` Rob Herring
2019-09-09 11:41 ` Stephen Boyd
2019-08-26 17:31 ` [PATCH v5 2/4] clk: qcom: clk-rpmh: Convert to parent data scheme Vinod Koul
2019-08-27 4:31 ` Bjorn Andersson
2019-09-09 11:42 ` Stephen Boyd
2019-08-26 17:31 ` [PATCH v5 3/4] dt-bindings: clock: Document SM8150 rpmh-clock compatible Vinod Koul
2019-08-27 18:51 ` Rob Herring
2019-09-09 11:42 ` Stephen Boyd
2019-08-26 17:31 ` [PATCH v5 4/4] clk: qcom: clk-rpmh: Add support for SM8150 Vinod Koul
2019-09-09 11:42 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).