2023-04-14 11:07:27

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH v2 0/2] QCM2290 dispcc fixups

v1 -> v2:
- Drop the merged "remove inexistent dsi1phy clk"
- Reword the commit messages to hopefully make them clearer

Rebased on qcom/for-next (see base-commit) for ease of merging

v1: https://lore.kernel.org/r/[email protected]

I noticed some very msm-downstream-y bugs in the QCM2290 dispcc..
Let's fix them up..

Signed-off-by: Konrad Dybcio <[email protected]>
---
Konrad Dybcio (2):
clk: qcom: dispcc-qcm2290: Fix BI_TCXO_AO handling
clk: qcom: dispcc-qcm2290: Fix GPLL0_OUT_DIV handling

drivers/clk/qcom/dispcc-qcm2290.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
base-commit: 8358703a007eacc48b007284f29c0df2b694b513
change-id: 20230412-topic-qcm_dispcc-f46cbdeaeb90

Best regards,
--
Konrad Dybcio <[email protected]>


2023-04-14 11:08:23

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH v2 2/2] clk: qcom: dispcc-qcm2290: Fix GPLL0_OUT_DIV handling

GPLL0_OUT_DIV (.fw_name = "gcc_disp_gpll0_div_clk_src") was previously
made to reuse the same parent enum entry as GPLL0_OUT_MAIN
(.fw_name = "gcc_disp_gpll0_clk_src") in parent_map_2.

Resolve it by introducing its own entry in the parent enum and
correctly assigning it in disp_cc_parent_map_2[].

Fixes: cc517ea3333f ("clk: qcom: Add display clock controller driver for QCM2290")
Signed-off-by: Konrad Dybcio <[email protected]>
---
drivers/clk/qcom/dispcc-qcm2290.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
index ee62aca4e5bb..44dd5cfcc150 100644
--- a/drivers/clk/qcom/dispcc-qcm2290.c
+++ b/drivers/clk/qcom/dispcc-qcm2290.c
@@ -28,6 +28,7 @@ enum {
P_DISP_CC_PLL0_OUT_MAIN,
P_DSI0_PHY_PLL_OUT_BYTECLK,
P_DSI0_PHY_PLL_OUT_DSICLK,
+ P_GPLL0_OUT_DIV,
P_GPLL0_OUT_MAIN,
P_SLEEP_CLK,
};
@@ -84,7 +85,7 @@ static const struct clk_parent_data disp_cc_parent_data_1[] = {

static const struct parent_map disp_cc_parent_map_2[] = {
{ P_BI_TCXO_AO, 0 },
- { P_GPLL0_OUT_MAIN, 4 },
+ { P_GPLL0_OUT_DIV, 4 },
};

static const struct clk_parent_data disp_cc_parent_data_2[] = {
@@ -153,8 +154,8 @@ static struct clk_regmap_div disp_cc_mdss_byte0_div_clk_src = {

static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = {
F(19200000, P_BI_TCXO_AO, 1, 0, 0),
- F(37500000, P_GPLL0_OUT_MAIN, 8, 0, 0),
- F(75000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
+ F(37500000, P_GPLL0_OUT_DIV, 8, 0, 0),
+ F(75000000, P_GPLL0_OUT_DIV, 4, 0, 0),
{ }
};


--
2.40.0

2023-04-14 11:08:48

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH v2 1/2] clk: qcom: dispcc-qcm2290: Fix BI_TCXO_AO handling

BI_TCXO_AO (.fw_name = "bi_tcxo_ao") was previously made to reuse the
same parent enum entry as BI_TCXO (.fw_name = "bi_tcxo") in parent_map_2.

Resolve it by introducing its own entry in the parent enum and
correctly assigning it in disp_cc_parent_map_2[].

Fixes: cc517ea3333f ("clk: qcom: Add display clock controller driver for QCM2290")
Signed-off-by: Konrad Dybcio <[email protected]>
---
drivers/clk/qcom/dispcc-qcm2290.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/qcom/dispcc-qcm2290.c b/drivers/clk/qcom/dispcc-qcm2290.c
index e9cfe41c0442..ee62aca4e5bb 100644
--- a/drivers/clk/qcom/dispcc-qcm2290.c
+++ b/drivers/clk/qcom/dispcc-qcm2290.c
@@ -24,6 +24,7 @@

enum {
P_BI_TCXO,
+ P_BI_TCXO_AO,
P_DISP_CC_PLL0_OUT_MAIN,
P_DSI0_PHY_PLL_OUT_BYTECLK,
P_DSI0_PHY_PLL_OUT_DSICLK,
@@ -82,7 +83,7 @@ static const struct clk_parent_data disp_cc_parent_data_1[] = {
};

static const struct parent_map disp_cc_parent_map_2[] = {
- { P_BI_TCXO, 0 },
+ { P_BI_TCXO_AO, 0 },
{ P_GPLL0_OUT_MAIN, 4 },
};

@@ -151,7 +152,7 @@ static struct clk_regmap_div disp_cc_mdss_byte0_div_clk_src = {
};

static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = {
- F(19200000, P_BI_TCXO, 1, 0, 0),
+ F(19200000, P_BI_TCXO_AO, 1, 0, 0),
F(37500000, P_GPLL0_OUT_MAIN, 8, 0, 0),
F(75000000, P_GPLL0_OUT_MAIN, 4, 0, 0),
{ }

--
2.40.0

2023-05-27 01:09:43

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] QCM2290 dispcc fixups

On Fri, 14 Apr 2023 13:06:34 +0200, Konrad Dybcio wrote:
> v1 -> v2:
> - Drop the merged "remove inexistent dsi1phy clk"
> - Reword the commit messages to hopefully make them clearer
>
> Rebased on qcom/for-next (see base-commit) for ease of merging
>
> v1: https://lore.kernel.org/r/[email protected]
>
> [...]

Applied, thanks!

[1/2] clk: qcom: dispcc-qcm2290: Fix BI_TCXO_AO handling
commit: 92dfee0fc889b5b00ffb6b1de87ce64c483bcb7b
[2/2] clk: qcom: dispcc-qcm2290: Fix GPLL0_OUT_DIV handling
commit: 63d56adf04b5795e54440dc5b7afddecb2966863

Best regards,
--
Bjorn Andersson <[email protected]>