Skip to content

Commit 76346cf

Browse files
Imran Shaikandersson
authored andcommitted
clk: qcom: gcc-qdu1000: Add support for GDSCs
Add the GDSCs support for QDU1000 and QRU1000 SoCs. Co-developed-by: Taniya Das <[email protected]> Signed-off-by: Taniya Das <[email protected]> Signed-off-by: Imran Shaik <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 089aad8 commit 76346cf

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

drivers/clk/qcom/gcc-qdu1000.c

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "clk-regmap-divider.h"
1818
#include "clk-regmap-mux.h"
1919
#include "clk-regmap-phy-mux.h"
20+
#include "gdsc.h"
2021
#include "reset.h"
2122

2223
enum {
@@ -2409,6 +2410,39 @@ static struct clk_branch gcc_usb3_prim_phy_pipe_clk = {
24092410
},
24102411
};
24112412

2413+
static struct gdsc pcie_0_gdsc = {
2414+
.gdscr = 0x9d004,
2415+
.en_rest_wait_val = 0x2,
2416+
.en_few_wait_val = 0x2,
2417+
.clk_dis_wait_val = 0xf,
2418+
.pd = {
2419+
.name = "gcc_pcie_0_gdsc",
2420+
},
2421+
.pwrsts = PWRSTS_OFF_ON,
2422+
};
2423+
2424+
static struct gdsc pcie_0_phy_gdsc = {
2425+
.gdscr = 0x7c004,
2426+
.en_rest_wait_val = 0x2,
2427+
.en_few_wait_val = 0x2,
2428+
.clk_dis_wait_val = 0x2,
2429+
.pd = {
2430+
.name = "gcc_pcie_0_phy_gdsc",
2431+
},
2432+
.pwrsts = PWRSTS_OFF_ON,
2433+
};
2434+
2435+
static struct gdsc usb30_prim_gdsc = {
2436+
.gdscr = 0x49004,
2437+
.en_rest_wait_val = 0x2,
2438+
.en_few_wait_val = 0x2,
2439+
.clk_dis_wait_val = 0xf,
2440+
.pd = {
2441+
.name = "gcc_usb30_prim_gdsc",
2442+
},
2443+
.pwrsts = PWRSTS_OFF_ON,
2444+
};
2445+
24122446
static struct clk_regmap *gcc_qdu1000_clocks[] = {
24132447
[GCC_AGGRE_NOC_ECPRI_DMA_CLK] = &gcc_aggre_noc_ecpri_dma_clk.clkr,
24142448
[GCC_AGGRE_NOC_ECPRI_DMA_CLK_SRC] = &gcc_aggre_noc_ecpri_dma_clk_src.clkr,
@@ -2545,6 +2579,12 @@ static struct clk_regmap *gcc_qdu1000_clocks[] = {
25452579
[GCC_DDRSS_ECPRI_GSI_CLK] = &gcc_ddrss_ecpri_gsi_clk.clkr,
25462580
};
25472581

2582+
static struct gdsc *gcc_qdu1000_gdscs[] = {
2583+
[PCIE_0_GDSC] = &pcie_0_gdsc,
2584+
[PCIE_0_PHY_GDSC] = &pcie_0_phy_gdsc,
2585+
[USB30_PRIM_GDSC] = &usb30_prim_gdsc,
2586+
};
2587+
25482588
static const struct qcom_reset_map gcc_qdu1000_resets[] = {
25492589
[GCC_ECPRI_CC_BCR] = { 0x3e000 },
25502590
[GCC_ECPRI_SS_BCR] = { 0x3a000 },
@@ -2606,6 +2646,8 @@ static const struct qcom_cc_desc gcc_qdu1000_desc = {
26062646
.num_clks = ARRAY_SIZE(gcc_qdu1000_clocks),
26072647
.resets = gcc_qdu1000_resets,
26082648
.num_resets = ARRAY_SIZE(gcc_qdu1000_resets),
2649+
.gdscs = gcc_qdu1000_gdscs,
2650+
.num_gdscs = ARRAY_SIZE(gcc_qdu1000_gdscs),
26092651
};
26102652

26112653
static const struct of_device_id gcc_qdu1000_match_table[] = {

0 commit comments

Comments
 (0)