Skip to content

Commit c51a37f

Browse files
Michal Wilczynskipdp7
authored andcommitted
clk: thead: Correct parent for DPU pixel clocks
The dpu0_pixelclk and dpu1_pixelclk gates were incorrectly parented to the video_pll_clk. According to the TH1520 TRM, the "dpu0_pixelclk" should be sourced from "DPU0 PLL DIV CLK". In this driver, "DPU0 PLL DIV CLK" corresponds to the `dpu0_clk` clock, which is a divider whose parent is the `dpu0_pll_clk`. This patch corrects the clock hierarchy by reparenting `dpu0_pixelclk` to `dpu0_clk`. By symmetry, `dpu1_pixelclk` is also reparented to its correct source, `dpu1_clk`. Fixes: 50d4b15 ("clk: thead: Add clock support for VO subsystem in T-HEAD TH1520 SoC") Reported-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> [Icenowy: add Drew's R-b and rebased atop ccu_gate refactor] Reviewed-by: Drew Fustini <fustini@kernel.org> Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Drew Fustini <fustini@kernel.org>
1 parent 9e99b99 commit c51a37f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

drivers/clk/thead/clk-th1520-ap.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,10 @@ static struct ccu_div dpu0_clk = {
761761
},
762762
};
763763

764+
static const struct clk_parent_data dpu0_clk_pd[] = {
765+
{ .hw = &dpu0_clk.common.hw }
766+
};
767+
764768
static struct ccu_div dpu1_clk = {
765769
.div = TH_CCU_DIV_FLAGS(0, 8, CLK_DIVIDER_ONE_BASED),
766770
.common = {
@@ -773,6 +777,10 @@ static struct ccu_div dpu1_clk = {
773777
},
774778
};
775779

780+
static const struct clk_parent_data dpu1_clk_pd[] = {
781+
{ .hw = &dpu1_clk.common.hw }
782+
};
783+
776784
static CLK_FIXED_FACTOR_HW(emmc_sdio_ref_clk, "emmc-sdio-ref",
777785
&video_pll_clk.common.hw, 4, 1, 0);
778786

@@ -853,9 +861,9 @@ static CCU_GATE(CLK_GPU_CORE, gpu_core_clk, "gpu-core-clk", video_pll_clk_pd,
853861
static CCU_GATE(CLK_GPU_CFG_ACLK, gpu_cfg_aclk, "gpu-cfg-aclk",
854862
video_pll_clk_pd, 0x0, 4, 0);
855863
static CCU_GATE(CLK_DPU_PIXELCLK0, dpu0_pixelclk, "dpu0-pixelclk",
856-
video_pll_clk_pd, 0x0, 5, 0);
864+
dpu0_clk_pd, 0x0, 5, 0);
857865
static CCU_GATE(CLK_DPU_PIXELCLK1, dpu1_pixelclk, "dpu1-pixelclk",
858-
video_pll_clk_pd, 0x0, 6, 0);
866+
dpu1_clk_pd, 0x0, 6, 0);
859867
static CCU_GATE(CLK_DPU_HCLK, dpu_hclk, "dpu-hclk", video_pll_clk_pd, 0x0,
860868
7, 0);
861869
static CCU_GATE(CLK_DPU_ACLK, dpu_aclk, "dpu-aclk", video_pll_clk_pd, 0x0,

0 commit comments

Comments
 (0)