Skip to content

Commit f0cfcf1

Browse files
Sivaprakash Murugesanbebarino
authored andcommitted
clk: qcom: ipq8074: Add missing clocks for pcie
Add missing clocks and resets for pcie port0 of ipq8074 devices. Co-developed-by: Selvam Sathappan Periakaruppan <[email protected]> Signed-off-by: Selvam Sathappan Periakaruppan <[email protected]> Signed-off-by: Sivaprakash Murugesan <[email protected]> Link: https://lore.kernel.org/r/[email protected] [[email protected]: Make freq table static const] Signed-off-by: Stephen Boyd <[email protected]>
1 parent e7fb524 commit f0cfcf1

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

drivers/clk/qcom/gcc-ipq8074.c

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4316,6 +4316,62 @@ static struct clk_branch gcc_gp3_clk = {
43164316
},
43174317
};
43184318

4319+
static const struct freq_tbl ftbl_pcie_rchng_clk_src[] = {
4320+
F(19200000, P_XO, 1, 0, 0),
4321+
F(100000000, P_GPLL0, 8, 0, 0),
4322+
{ }
4323+
};
4324+
4325+
struct clk_rcg2 pcie0_rchng_clk_src = {
4326+
.cmd_rcgr = 0x75070,
4327+
.freq_tbl = ftbl_pcie_rchng_clk_src,
4328+
.hid_width = 5,
4329+
.parent_map = gcc_xo_gpll0_map,
4330+
.clkr.hw.init = &(struct clk_init_data){
4331+
.name = "pcie0_rchng_clk_src",
4332+
.parent_hws = (const struct clk_hw *[]) {
4333+
&gpll0.clkr.hw },
4334+
.num_parents = 2,
4335+
.ops = &clk_rcg2_ops,
4336+
},
4337+
};
4338+
4339+
static struct clk_branch gcc_pcie0_rchng_clk = {
4340+
.halt_reg = 0x75070,
4341+
.halt_bit = 31,
4342+
.clkr = {
4343+
.enable_reg = 0x75070,
4344+
.enable_mask = BIT(1),
4345+
.hw.init = &(struct clk_init_data){
4346+
.name = "gcc_pcie0_rchng_clk",
4347+
.parent_hws = (const struct clk_hw *[]){
4348+
&pcie0_rchng_clk_src.clkr.hw,
4349+
},
4350+
.num_parents = 1,
4351+
.flags = CLK_SET_RATE_PARENT,
4352+
.ops = &clk_branch2_ops,
4353+
},
4354+
},
4355+
};
4356+
4357+
static struct clk_branch gcc_pcie0_axi_s_bridge_clk = {
4358+
.halt_reg = 0x75048,
4359+
.halt_bit = 31,
4360+
.clkr = {
4361+
.enable_reg = 0x75048,
4362+
.enable_mask = BIT(0),
4363+
.hw.init = &(struct clk_init_data){
4364+
.name = "gcc_pcie0_axi_s_bridge_clk",
4365+
.parent_hws = (const struct clk_hw *[]){
4366+
&pcie0_axi_clk_src.clkr.hw,
4367+
},
4368+
.num_parents = 1,
4369+
.flags = CLK_SET_RATE_PARENT,
4370+
.ops = &clk_branch2_ops,
4371+
},
4372+
},
4373+
};
4374+
43194375
static struct clk_hw *gcc_ipq8074_hws[] = {
43204376
&gpll0_out_main_div2.hw,
43214377
&gpll6_out_main_div2.hw,
@@ -4551,6 +4607,9 @@ static struct clk_regmap *gcc_ipq8074_clks[] = {
45514607
[GCC_GP1_CLK] = &gcc_gp1_clk.clkr,
45524608
[GCC_GP2_CLK] = &gcc_gp2_clk.clkr,
45534609
[GCC_GP3_CLK] = &gcc_gp3_clk.clkr,
4610+
[GCC_PCIE0_RCHNG_CLK_SRC] = &pcie0_rchng_clk_src.clkr,
4611+
[GCC_PCIE0_RCHNG_CLK] = &gcc_pcie0_rchng_clk.clkr,
4612+
[GCC_PCIE0_AXI_S_BRIDGE_CLK] = &gcc_pcie0_axi_s_bridge_clk.clkr,
45544613
};
45554614

45564615
static const struct qcom_reset_map gcc_ipq8074_resets[] = {
@@ -4678,6 +4737,7 @@ static const struct qcom_reset_map gcc_ipq8074_resets[] = {
46784737
[GCC_PCIE0_AXI_SLAVE_ARES] = { 0x75040, 4 },
46794738
[GCC_PCIE0_AHB_ARES] = { 0x75040, 5 },
46804739
[GCC_PCIE0_AXI_MASTER_STICKY_ARES] = { 0x75040, 6 },
4740+
[GCC_PCIE0_AXI_SLAVE_STICKY_ARES] = { 0x75040, 7 },
46814741
[GCC_PCIE1_PIPE_ARES] = { 0x76040, 0 },
46824742
[GCC_PCIE1_SLEEP_ARES] = { 0x76040, 1 },
46834743
[GCC_PCIE1_CORE_STICKY_ARES] = { 0x76040, 2 },

0 commit comments

Comments
 (0)