linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Fixup clocks for venus on sm8250
@ 2021-02-04 15:01 Bryan O'Donoghue
  2021-02-04 15:01 ` [PATCH v2 1/4] dt-bindings: clock: Add missing SM8250 videoc clock indices Bryan O'Donoghue
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Bryan O'Donoghue @ 2021-02-04 15:01 UTC (permalink / raw)
  To: linux-clk, linux-arm-msm, mturquette, sboyd, bjorn.andersson,
	robh+dt, agross
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

V2:
- Adds tested-by/reviewed-by as indicated - Dmitry
- Fixes commit log copy/paste typo in patch #3 - Dmitry

V1:
- Adds some missing indices to the videocc index
- Adds videocc clock tree hirearchy for msv0
- Adds a regulator to power the videocc consistent with downstream

Once done we can move on to enabling these clocks in the DTS and switch on
the venus.

Bryan O'Donoghue (4):
  dt-bindings: clock: Add missing SM8250 videoc clock indices
  clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_DIV_CLK_SRC
  clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_CLK
  clk: qcom: videocc: Add gdsc mmcx-reg supply hook

 drivers/clk/qcom/videocc-sm8250.c             | 39 +++++++++++++++++++
 .../dt-bindings/clock/qcom,videocc-sm8250.h   |  2 +
 2 files changed, 41 insertions(+)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/4] dt-bindings: clock: Add missing SM8250 videoc clock indices
  2021-02-04 15:01 [PATCH v2 0/4] Fixup clocks for venus on sm8250 Bryan O'Donoghue
@ 2021-02-04 15:01 ` Bryan O'Donoghue
  2021-02-08 18:13   ` Stephen Boyd
  2021-02-04 15:01 ` [PATCH v2 2/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_DIV_CLK_SRC Bryan O'Donoghue
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Bryan O'Donoghue @ 2021-02-04 15:01 UTC (permalink / raw)
  To: linux-clk, linux-arm-msm, mturquette, sboyd, bjorn.andersson,
	robh+dt, agross
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

Two indexes need to be added to videocc-sm8250.h for venus to function
properly. Rather than adding the missing indexes when used we add them
separately here to keep checkpatch.pl happy.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 include/dt-bindings/clock/qcom,videocc-sm8250.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/dt-bindings/clock/qcom,videocc-sm8250.h b/include/dt-bindings/clock/qcom,videocc-sm8250.h
index 2b2b3867af25..8d321ac3b1fa 100644
--- a/include/dt-bindings/clock/qcom,videocc-sm8250.h
+++ b/include/dt-bindings/clock/qcom,videocc-sm8250.h
@@ -16,6 +16,8 @@
 #define VIDEO_CC_MVS1C_DIV2_DIV_CLK_SRC	6
 #define VIDEO_CC_PLL0			7
 #define VIDEO_CC_PLL1			8
+#define VIDEO_CC_MVS0_DIV_CLK_SRC	9
+#define VIDEO_CC_MVS0_CLK		10
 
 /* VIDEO_CC resets */
 #define VIDEO_CC_CVP_INTERFACE_BCR	0
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_DIV_CLK_SRC
  2021-02-04 15:01 [PATCH v2 0/4] Fixup clocks for venus on sm8250 Bryan O'Donoghue
  2021-02-04 15:01 ` [PATCH v2 1/4] dt-bindings: clock: Add missing SM8250 videoc clock indices Bryan O'Donoghue
@ 2021-02-04 15:01 ` Bryan O'Donoghue
  2021-02-08 18:13   ` Stephen Boyd
  2021-02-04 15:01 ` [PATCH v2 3/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_CLK Bryan O'Donoghue
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Bryan O'Donoghue @ 2021-02-04 15:01 UTC (permalink / raw)
  To: linux-clk, linux-arm-msm, mturquette, sboyd, bjorn.andersson,
	robh+dt, agross
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

This patch adds the missing video_cc_mvs0_div_clk_src entry to
videocc-sm8250 replicating in upstream the explicit entry for this clock in
downstream.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sm8250.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/clk/qcom/videocc-sm8250.c b/drivers/clk/qcom/videocc-sm8250.c
index 2797c61f5938..cc84963ced40 100644
--- a/drivers/clk/qcom/videocc-sm8250.c
+++ b/drivers/clk/qcom/videocc-sm8250.c
@@ -169,6 +169,21 @@ static struct clk_regmap_div video_cc_mvs0c_div2_div_clk_src = {
 	},
 };
 
+static struct clk_regmap_div video_cc_mvs0_div_clk_src = {
+	.reg = 0xd54,
+	.shift = 0,
+	.width = 2,
+	.clkr.hw.init = &(struct clk_init_data) {
+		.name = "video_cc_mvs0_div_clk_src",
+		.parent_data = &(const struct clk_parent_data){
+			.hw = &video_cc_mvs0_clk_src.clkr.hw,
+		},
+		.num_parents = 1,
+		.flags = CLK_SET_RATE_PARENT,
+		.ops = &clk_regmap_div_ro_ops,
+	},
+};
+
 static struct clk_regmap_div video_cc_mvs1c_div2_div_clk_src = {
 	.reg = 0xcf4,
 	.shift = 0,
@@ -276,6 +291,7 @@ static struct gdsc mvs1_gdsc = {
 
 static struct clk_regmap *video_cc_sm8250_clocks[] = {
 	[VIDEO_CC_MVS0_CLK_SRC] = &video_cc_mvs0_clk_src.clkr,
+	[VIDEO_CC_MVS0_DIV_CLK_SRC] = &video_cc_mvs0_div_clk_src.clkr,
 	[VIDEO_CC_MVS0C_CLK] = &video_cc_mvs0c_clk.clkr,
 	[VIDEO_CC_MVS0C_DIV2_DIV_CLK_SRC] = &video_cc_mvs0c_div2_div_clk_src.clkr,
 	[VIDEO_CC_MVS1_CLK_SRC] = &video_cc_mvs1_clk_src.clkr,
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_CLK
  2021-02-04 15:01 [PATCH v2 0/4] Fixup clocks for venus on sm8250 Bryan O'Donoghue
  2021-02-04 15:01 ` [PATCH v2 1/4] dt-bindings: clock: Add missing SM8250 videoc clock indices Bryan O'Donoghue
  2021-02-04 15:01 ` [PATCH v2 2/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_DIV_CLK_SRC Bryan O'Donoghue
@ 2021-02-04 15:01 ` Bryan O'Donoghue
  2021-02-08 18:13   ` Stephen Boyd
  2021-02-04 15:01 ` [PATCH v2 4/4] clk: qcom: videocc: Add gdsc mmcx-reg supply hook Bryan O'Donoghue
  2021-03-01 19:59 ` [PATCH v2 0/4] Fixup clocks for venus on sm8250 patchwork-bot+linux-arm-msm
  4 siblings, 1 reply; 10+ messages in thread
From: Bryan O'Donoghue @ 2021-02-04 15:01 UTC (permalink / raw)
  To: linux-clk, linux-arm-msm, mturquette, sboyd, bjorn.andersson,
	robh+dt, agross
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

This patch adds the missing video_cc_mvs0_clk entry to
videocc-sm8250 replicating in upstream the explicit entry for this clock in
downstream.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sm8250.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/clk/qcom/videocc-sm8250.c b/drivers/clk/qcom/videocc-sm8250.c
index cc84963ced40..3ade240bd49c 100644
--- a/drivers/clk/qcom/videocc-sm8250.c
+++ b/drivers/clk/qcom/videocc-sm8250.c
@@ -217,6 +217,24 @@ static struct clk_branch video_cc_mvs0c_clk = {
 	},
 };
 
+static struct clk_branch video_cc_mvs0_clk = {
+	.halt_reg = 0xd34,
+	.halt_check = BRANCH_HALT_VOTED,
+	.clkr = {
+		.enable_reg = 0xd34,
+		.enable_mask = BIT(0),
+		.hw.init = &(struct clk_init_data){
+			.name = "video_cc_mvs0_clk",
+			.parent_data = &(const struct clk_parent_data){
+				.hw = &video_cc_mvs0_div_clk_src.clkr.hw,
+			},
+			.num_parents = 1,
+			.flags = CLK_SET_RATE_PARENT,
+			.ops = &clk_branch2_ops,
+		},
+	},
+};
+
 static struct clk_branch video_cc_mvs1_div2_clk = {
 	.halt_reg = 0xdf4,
 	.halt_check = BRANCH_HALT_VOTED,
@@ -290,6 +308,7 @@ static struct gdsc mvs1_gdsc = {
 };
 
 static struct clk_regmap *video_cc_sm8250_clocks[] = {
+	[VIDEO_CC_MVS0_CLK] = &video_cc_mvs0_clk.clkr,
 	[VIDEO_CC_MVS0_CLK_SRC] = &video_cc_mvs0_clk_src.clkr,
 	[VIDEO_CC_MVS0_DIV_CLK_SRC] = &video_cc_mvs0_div_clk_src.clkr,
 	[VIDEO_CC_MVS0C_CLK] = &video_cc_mvs0c_clk.clkr,
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 4/4] clk: qcom: videocc: Add gdsc mmcx-reg supply hook
  2021-02-04 15:01 [PATCH v2 0/4] Fixup clocks for venus on sm8250 Bryan O'Donoghue
                   ` (2 preceding siblings ...)
  2021-02-04 15:01 ` [PATCH v2 3/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_CLK Bryan O'Donoghue
@ 2021-02-04 15:01 ` Bryan O'Donoghue
  2021-02-08 18:13   ` Stephen Boyd
  2021-03-01 19:59 ` [PATCH v2 0/4] Fixup clocks for venus on sm8250 patchwork-bot+linux-arm-msm
  4 siblings, 1 reply; 10+ messages in thread
From: Bryan O'Donoghue @ 2021-02-04 15:01 UTC (permalink / raw)
  To: linux-clk, linux-arm-msm, mturquette, sboyd, bjorn.andersson,
	robh+dt, agross
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

This commit adds a regulator supply hook to mmcx-reg missing from

- mvs0c_gdsc
- mvs1c_gdsc
- mvs0_gdsc
- mvs1_gdsc

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/clk/qcom/videocc-sm8250.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/clk/qcom/videocc-sm8250.c b/drivers/clk/qcom/videocc-sm8250.c
index 3ade240bd49c..b0efadc19634 100644
--- a/drivers/clk/qcom/videocc-sm8250.c
+++ b/drivers/clk/qcom/videocc-sm8250.c
@@ -278,6 +278,7 @@ static struct gdsc mvs0c_gdsc = {
 	},
 	.flags = 0,
 	.pwrsts = PWRSTS_OFF_ON,
+	.supply = "mmcx",
 };
 
 static struct gdsc mvs1c_gdsc = {
@@ -287,6 +288,7 @@ static struct gdsc mvs1c_gdsc = {
 	},
 	.flags = 0,
 	.pwrsts = PWRSTS_OFF_ON,
+	.supply = "mmcx",
 };
 
 static struct gdsc mvs0_gdsc = {
@@ -296,6 +298,7 @@ static struct gdsc mvs0_gdsc = {
 	},
 	.flags = HW_CTRL,
 	.pwrsts = PWRSTS_OFF_ON,
+	.supply = "mmcx",
 };
 
 static struct gdsc mvs1_gdsc = {
@@ -305,6 +308,7 @@ static struct gdsc mvs1_gdsc = {
 	},
 	.flags = HW_CTRL,
 	.pwrsts = PWRSTS_OFF_ON,
+	.supply = "mmcx",
 };
 
 static struct clk_regmap *video_cc_sm8250_clocks[] = {
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/4] dt-bindings: clock: Add missing SM8250 videoc clock indices
  2021-02-04 15:01 ` [PATCH v2 1/4] dt-bindings: clock: Add missing SM8250 videoc clock indices Bryan O'Donoghue
@ 2021-02-08 18:13   ` Stephen Boyd
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Boyd @ 2021-02-08 18:13 UTC (permalink / raw)
  To: Bryan O'Donoghue, agross, bjorn.andersson, linux-arm-msm,
	linux-clk, mturquette, robh+dt
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

Quoting Bryan O'Donoghue (2021-02-04 07:01:17)
> Two indexes need to be added to videocc-sm8250.h for venus to function
> properly. Rather than adding the missing indexes when used we add them
> separately here to keep checkpatch.pl happy.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 2/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_DIV_CLK_SRC
  2021-02-04 15:01 ` [PATCH v2 2/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_DIV_CLK_SRC Bryan O'Donoghue
@ 2021-02-08 18:13   ` Stephen Boyd
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Boyd @ 2021-02-08 18:13 UTC (permalink / raw)
  To: Bryan O'Donoghue, agross, bjorn.andersson, linux-arm-msm,
	linux-clk, mturquette, robh+dt
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

Quoting Bryan O'Donoghue (2021-02-04 07:01:18)
> This patch adds the missing video_cc_mvs0_div_clk_src entry to
> videocc-sm8250 replicating in upstream the explicit entry for this clock in
> downstream.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_CLK
  2021-02-04 15:01 ` [PATCH v2 3/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_CLK Bryan O'Donoghue
@ 2021-02-08 18:13   ` Stephen Boyd
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Boyd @ 2021-02-08 18:13 UTC (permalink / raw)
  To: Bryan O'Donoghue, agross, bjorn.andersson, linux-arm-msm,
	linux-clk, mturquette, robh+dt
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

Quoting Bryan O'Donoghue (2021-02-04 07:01:19)
> This patch adds the missing video_cc_mvs0_clk entry to
> videocc-sm8250 replicating in upstream the explicit entry for this clock in
> downstream.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 4/4] clk: qcom: videocc: Add gdsc mmcx-reg supply hook
  2021-02-04 15:01 ` [PATCH v2 4/4] clk: qcom: videocc: Add gdsc mmcx-reg supply hook Bryan O'Donoghue
@ 2021-02-08 18:13   ` Stephen Boyd
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Boyd @ 2021-02-08 18:13 UTC (permalink / raw)
  To: Bryan O'Donoghue, agross, bjorn.andersson, linux-arm-msm,
	linux-clk, mturquette, robh+dt
  Cc: bryan.odonoghue, jonathan, dikshita, dmitry.baryshkov, stanimir.varbanov

Quoting Bryan O'Donoghue (2021-02-04 07:01:20)
> This commit adds a regulator supply hook to mmcx-reg missing from
> 
> - mvs0c_gdsc
> - mvs1c_gdsc
> - mvs0_gdsc
> - mvs1_gdsc
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/4] Fixup clocks for venus on sm8250
  2021-02-04 15:01 [PATCH v2 0/4] Fixup clocks for venus on sm8250 Bryan O'Donoghue
                   ` (3 preceding siblings ...)
  2021-02-04 15:01 ` [PATCH v2 4/4] clk: qcom: videocc: Add gdsc mmcx-reg supply hook Bryan O'Donoghue
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  4 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
  To: Bryan O'Donoghue; +Cc: linux-arm-msm

Hello:

This series was applied to qcom/linux.git (refs/heads/for-next):

On Thu,  4 Feb 2021 15:01:16 +0000 you wrote:
> V2:
> - Adds tested-by/reviewed-by as indicated - Dmitry
> - Fixes commit log copy/paste typo in patch #3 - Dmitry
> 
> V1:
> - Adds some missing indices to the videocc index
> - Adds videocc clock tree hirearchy for msv0
> - Adds a regulator to power the videocc consistent with downstream
> 
> [...]

Here is the summary with links:
  - [v2,1/4] dt-bindings: clock: Add missing SM8250 videoc clock indices
    https://git.kernel.org/qcom/c/9ba80d849c83
  - [v2,2/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_DIV_CLK_SRC
    https://git.kernel.org/qcom/c/2334032f00af
  - [v2,3/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_CLK
    https://git.kernel.org/qcom/c/c80a4285a36e
  - [v2,4/4] clk: qcom: videocc: Add gdsc mmcx-reg supply hook
    https://git.kernel.org/qcom/c/fe8e6d554705

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-01 20:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 15:01 [PATCH v2 0/4] Fixup clocks for venus on sm8250 Bryan O'Donoghue
2021-02-04 15:01 ` [PATCH v2 1/4] dt-bindings: clock: Add missing SM8250 videoc clock indices Bryan O'Donoghue
2021-02-08 18:13   ` Stephen Boyd
2021-02-04 15:01 ` [PATCH v2 2/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_DIV_CLK_SRC Bryan O'Donoghue
2021-02-08 18:13   ` Stephen Boyd
2021-02-04 15:01 ` [PATCH v2 3/4] clk: qcom: videocc: Add sm8250 VIDEO_CC_MVS0_CLK Bryan O'Donoghue
2021-02-08 18:13   ` Stephen Boyd
2021-02-04 15:01 ` [PATCH v2 4/4] clk: qcom: videocc: Add gdsc mmcx-reg supply hook Bryan O'Donoghue
2021-02-08 18:13   ` Stephen Boyd
2021-03-01 19:59 ` [PATCH v2 0/4] Fixup clocks for venus on sm8250 patchwork-bot+linux-arm-msm

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).