21
21
#include "clk-rcg.h"
22
22
#include "clk-regmap.h"
23
23
#include "reset.h"
24
+ #include "gdsc.h"
24
25
25
26
enum {
26
27
P_BI_TCXO ,
@@ -3171,6 +3172,18 @@ static struct clk_branch gcc_usb3_prim_phy_com_aux_clk = {
3171
3172
},
3172
3173
};
3173
3174
3175
+ static struct clk_branch gcc_usb3_prim_phy_pipe_clk = {
3176
+ .halt_check = BRANCH_HALT_SKIP ,
3177
+ .clkr = {
3178
+ .enable_reg = 0xf058 ,
3179
+ .enable_mask = BIT (0 ),
3180
+ .hw .init = & (struct clk_init_data ){
3181
+ .name = "gcc_usb3_prim_phy_pipe_clk" ,
3182
+ .ops = & clk_branch2_ops ,
3183
+ },
3184
+ },
3185
+ };
3186
+
3174
3187
static struct clk_branch gcc_usb3_sec_clkref_clk = {
3175
3188
.halt_reg = 0x8c028 ,
3176
3189
.halt_check = BRANCH_HALT ,
@@ -3218,6 +3231,18 @@ static struct clk_branch gcc_usb3_sec_phy_com_aux_clk = {
3218
3231
},
3219
3232
};
3220
3233
3234
+ static struct clk_branch gcc_usb3_sec_phy_pipe_clk = {
3235
+ .halt_check = BRANCH_HALT_SKIP ,
3236
+ .clkr = {
3237
+ .enable_reg = 0x10058 ,
3238
+ .enable_mask = BIT (0 ),
3239
+ .hw .init = & (struct clk_init_data ){
3240
+ .name = "gcc_usb3_sec_phy_pipe_clk" ,
3241
+ .ops = & clk_branch2_ops ,
3242
+ },
3243
+ },
3244
+ };
3245
+
3221
3246
/*
3222
3247
* Clock ON depends on external parent 'config noc', so cant poll
3223
3248
* delay and also mark as crtitical for video boot
@@ -3292,6 +3317,24 @@ static struct clk_branch gcc_video_xo_clk = {
3292
3317
},
3293
3318
};
3294
3319
3320
+ static struct gdsc usb30_prim_gdsc = {
3321
+ .gdscr = 0xf004 ,
3322
+ .pd = {
3323
+ .name = "usb30_prim_gdsc" ,
3324
+ },
3325
+ .pwrsts = PWRSTS_OFF_ON ,
3326
+ .flags = POLL_CFG_GDSCR ,
3327
+ };
3328
+
3329
+ static struct gdsc usb30_sec_gdsc = {
3330
+ .gdscr = 0x10004 ,
3331
+ .pd = {
3332
+ .name = "usb30_sec_gdsc" ,
3333
+ },
3334
+ .pwrsts = PWRSTS_OFF_ON ,
3335
+ .flags = POLL_CFG_GDSCR ,
3336
+ };
3337
+
3295
3338
static struct clk_regmap * gcc_sm8150_clocks [] = {
3296
3339
[GCC_AGGRE_NOC_PCIE_TBU_CLK ] = & gcc_aggre_noc_pcie_tbu_clk .clkr ,
3297
3340
[GCC_AGGRE_UFS_CARD_AXI_CLK ] = & gcc_aggre_ufs_card_axi_clk .clkr ,
@@ -3480,10 +3523,12 @@ static struct clk_regmap *gcc_sm8150_clocks[] = {
3480
3523
[GCC_USB3_PRIM_PHY_AUX_CLK ] = & gcc_usb3_prim_phy_aux_clk .clkr ,
3481
3524
[GCC_USB3_PRIM_PHY_AUX_CLK_SRC ] = & gcc_usb3_prim_phy_aux_clk_src .clkr ,
3482
3525
[GCC_USB3_PRIM_PHY_COM_AUX_CLK ] = & gcc_usb3_prim_phy_com_aux_clk .clkr ,
3526
+ [GCC_USB3_PRIM_PHY_PIPE_CLK ] = & gcc_usb3_prim_phy_pipe_clk .clkr ,
3483
3527
[GCC_USB3_SEC_CLKREF_CLK ] = & gcc_usb3_sec_clkref_clk .clkr ,
3484
3528
[GCC_USB3_SEC_PHY_AUX_CLK ] = & gcc_usb3_sec_phy_aux_clk .clkr ,
3485
3529
[GCC_USB3_SEC_PHY_AUX_CLK_SRC ] = & gcc_usb3_sec_phy_aux_clk_src .clkr ,
3486
3530
[GCC_USB3_SEC_PHY_COM_AUX_CLK ] = & gcc_usb3_sec_phy_com_aux_clk .clkr ,
3531
+ [GCC_USB3_SEC_PHY_PIPE_CLK ] = & gcc_usb3_sec_phy_pipe_clk .clkr ,
3487
3532
[GCC_VIDEO_AHB_CLK ] = & gcc_video_ahb_clk .clkr ,
3488
3533
[GCC_VIDEO_AXI0_CLK ] = & gcc_video_axi0_clk .clkr ,
3489
3534
[GCC_VIDEO_AXI1_CLK ] = & gcc_video_axi1_clk .clkr ,
@@ -3527,6 +3572,11 @@ static const struct qcom_reset_map gcc_sm8150_resets[] = {
3527
3572
[GCC_USB_PHY_CFG_AHB2PHY_BCR ] = { 0x6a000 },
3528
3573
};
3529
3574
3575
+ static struct gdsc * gcc_sm8150_gdscs [] = {
3576
+ [USB30_PRIM_GDSC ] = & usb30_prim_gdsc ,
3577
+ [USB30_SEC_GDSC ] = & usb30_sec_gdsc ,
3578
+ };
3579
+
3530
3580
static const struct regmap_config gcc_sm8150_regmap_config = {
3531
3581
.reg_bits = 32 ,
3532
3582
.reg_stride = 4 ,
@@ -3541,6 +3591,8 @@ static const struct qcom_cc_desc gcc_sm8150_desc = {
3541
3591
.num_clks = ARRAY_SIZE (gcc_sm8150_clocks ),
3542
3592
.resets = gcc_sm8150_resets ,
3543
3593
.num_resets = ARRAY_SIZE (gcc_sm8150_resets ),
3594
+ .gdscs = gcc_sm8150_gdscs ,
3595
+ .num_gdscs = ARRAY_SIZE (gcc_sm8150_gdscs ),
3544
3596
};
3545
3597
3546
3598
static const struct of_device_id gcc_sm8150_match_table [] = {
0 commit comments