Skip to content

Commit 3dfe6e1

Browse files
pablosunwens
authored andcommitted
clk: mediatek: add VDOSYS1 clock
Add the clock gate definition for the DPI1 hardware in VDOSYS1. The parent clock "hdmi_txpll" is already defined in `mt8195.dtsi`. Signed-off-by: Pablo Sun <[email protected]> Signed-off-by: Guillaume Ranquet <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Chen-Yu Tsai <[email protected]>
1 parent 879b752 commit 3dfe6e1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/clk/mediatek/clk-mt8195-vdo1.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ static const struct mtk_gate_regs vdo1_3_cg_regs = {
3434
.sta_ofs = 0x140,
3535
};
3636

37+
static const struct mtk_gate_regs vdo1_4_cg_regs = {
38+
.set_ofs = 0x400,
39+
.clr_ofs = 0x400,
40+
.sta_ofs = 0x400,
41+
};
42+
3743
#define GATE_VDO1_0(_id, _name, _parent, _shift) \
3844
GATE_MTK(_id, _name, _parent, &vdo1_0_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
3945

@@ -50,6 +56,9 @@ static const struct mtk_gate_regs vdo1_3_cg_regs = {
5056
#define GATE_VDO1_3(_id, _name, _parent, _shift) \
5157
GATE_MTK(_id, _name, _parent, &vdo1_3_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
5258

59+
#define GATE_VDO1_4(_id, _name, _parent, _shift) \
60+
GATE_MTK(_id, _name, _parent, &vdo1_4_cg_regs, _shift, &mtk_clk_gate_ops_no_setclr_inv)
61+
5362
static const struct mtk_gate vdo1_clks[] = {
5463
/* VDO1_0 */
5564
GATE_VDO1_0(CLK_VDO1_SMI_LARB2, "vdo1_smi_larb2", "top_vpp", 0),
@@ -107,6 +116,8 @@ static const struct mtk_gate vdo1_clks[] = {
107116
GATE_VDO1_2(CLK_VDO1_DISP_MONITOR_DPINTF, "vdo1_disp_monitor_dpintf", "top_vpp", 17),
108117
/* VDO1_3 */
109118
GATE_VDO1_3(CLK_VDO1_26M_SLOW, "vdo1_26m_slow", "clk26m", 8),
119+
/* VDO1_4 */
120+
GATE_VDO1_4(CLK_VDO1_DPI1_HDMI, "vdo1_dpi1_hdmi", "hdmi_txpll", 0),
110121
};
111122

112123
static int clk_mt8195_vdo1_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)