Skip to content

Commit 75ec9f9

Browse files
FROMLIST: clk: qcom: camcc-x1e80100: Add support for camera QDSS debug clocks
Add support for camera QDSS debug clocks on X1E80100 platform which are required to be voted for camera icp and cpas usecases. This change aligns the camcc driver to the new ABI exposed from X1E80100 camcc bindings that supports these camcc QDSS debug clocks. Link: https://lore.kernel.org/all/20260331-purwa-videocc-camcc-v3-4-6daca180a4b1@oss.qualcomm.com/ Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Jagadeesh Kona <jagadeesh.kona@oss.qualcomm.com>
1 parent 4e516df commit 75ec9f9

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

drivers/clk/qcom/camcc-x1e80100.c

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,31 @@ static struct clk_rcg2 cam_cc_mclk7_clk_src = {
10521052
},
10531053
};
10541054

1055+
static const struct freq_tbl ftbl_cam_cc_qdss_debug_clk_src[] = {
1056+
F(19200000, P_BI_TCXO, 1, 0, 0),
1057+
F(60000000, P_CAM_CC_PLL8_OUT_EVEN, 8, 0, 0),
1058+
F(75000000, P_CAM_CC_PLL0_OUT_EVEN, 8, 0, 0),
1059+
F(150000000, P_CAM_CC_PLL0_OUT_EVEN, 4, 0, 0),
1060+
F(300000000, P_CAM_CC_PLL0_OUT_MAIN, 4, 0, 0),
1061+
{ }
1062+
};
1063+
1064+
static struct clk_rcg2 cam_cc_qdss_debug_clk_src = {
1065+
.cmd_rcgr = 0x13938,
1066+
.mnd_width = 0,
1067+
.hid_width = 5,
1068+
.parent_map = cam_cc_parent_map_0,
1069+
.freq_tbl = ftbl_cam_cc_qdss_debug_clk_src,
1070+
.hw_clk_ctrl = true,
1071+
.clkr.hw.init = &(const struct clk_init_data) {
1072+
.name = "cam_cc_qdss_debug_clk_src",
1073+
.parent_data = cam_cc_parent_data_0,
1074+
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
1075+
.flags = CLK_SET_RATE_PARENT,
1076+
.ops = &clk_rcg2_shared_ops,
1077+
},
1078+
};
1079+
10551080
static const struct freq_tbl ftbl_cam_cc_sfe_0_clk_src[] = {
10561081
F(345600000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
10571082
F(432000000, P_CAM_CC_PLL6_OUT_EVEN, 1, 0, 0),
@@ -2182,6 +2207,42 @@ static struct clk_branch cam_cc_mclk7_clk = {
21822207
},
21832208
};
21842209

2210+
static struct clk_branch cam_cc_qdss_debug_clk = {
2211+
.halt_reg = 0x13a64,
2212+
.halt_check = BRANCH_HALT,
2213+
.clkr = {
2214+
.enable_reg = 0x13a64,
2215+
.enable_mask = BIT(0),
2216+
.hw.init = &(const struct clk_init_data) {
2217+
.name = "cam_cc_qdss_debug_clk",
2218+
.parent_hws = (const struct clk_hw*[]) {
2219+
&cam_cc_qdss_debug_clk_src.clkr.hw,
2220+
},
2221+
.num_parents = 1,
2222+
.flags = CLK_SET_RATE_PARENT,
2223+
.ops = &clk_branch2_ops,
2224+
},
2225+
},
2226+
};
2227+
2228+
static struct clk_branch cam_cc_qdss_debug_xo_clk = {
2229+
.halt_reg = 0x13a68,
2230+
.halt_check = BRANCH_HALT,
2231+
.clkr = {
2232+
.enable_reg = 0x13a68,
2233+
.enable_mask = BIT(0),
2234+
.hw.init = &(const struct clk_init_data) {
2235+
.name = "cam_cc_qdss_debug_xo_clk",
2236+
.parent_hws = (const struct clk_hw*[]) {
2237+
&cam_cc_xo_clk_src.clkr.hw,
2238+
},
2239+
.num_parents = 1,
2240+
.flags = CLK_SET_RATE_PARENT,
2241+
.ops = &clk_branch2_ops,
2242+
},
2243+
},
2244+
};
2245+
21852246
static struct clk_branch cam_cc_sfe_0_clk = {
21862247
.halt_reg = 0x133c0,
21872248
.halt_check = BRANCH_HALT,
@@ -2398,6 +2459,9 @@ static struct clk_regmap *cam_cc_x1e80100_clocks[] = {
23982459
[CAM_CC_PLL6_OUT_EVEN] = &cam_cc_pll6_out_even.clkr,
23992460
[CAM_CC_PLL8] = &cam_cc_pll8.clkr,
24002461
[CAM_CC_PLL8_OUT_EVEN] = &cam_cc_pll8_out_even.clkr,
2462+
[CAM_CC_QDSS_DEBUG_CLK] = &cam_cc_qdss_debug_clk.clkr,
2463+
[CAM_CC_QDSS_DEBUG_CLK_SRC] = &cam_cc_qdss_debug_clk_src.clkr,
2464+
[CAM_CC_QDSS_DEBUG_XO_CLK] = &cam_cc_qdss_debug_xo_clk.clkr,
24012465
[CAM_CC_SFE_0_CLK] = &cam_cc_sfe_0_clk.clkr,
24022466
[CAM_CC_SFE_0_CLK_SRC] = &cam_cc_sfe_0_clk_src.clkr,
24032467
[CAM_CC_SFE_0_FAST_AHB_CLK] = &cam_cc_sfe_0_fast_ahb_clk.clkr,

0 commit comments

Comments
 (0)