@@ -3754,6 +3754,66 @@ static struct clk_regmap g12a_mipi_dsi_pxclk = {
3754
3754
},
3755
3755
};
3756
3756
3757
+ /* MIPI ISP Clocks */
3758
+
3759
+ static const struct clk_parent_data g12b_mipi_isp_parent_data [] = {
3760
+ { .fw_name = "xtal" , },
3761
+ { .hw = & g12a_gp0_pll .hw },
3762
+ { .hw = & g12a_hifi_pll .hw },
3763
+ { .hw = & g12a_fclk_div2p5 .hw },
3764
+ { .hw = & g12a_fclk_div3 .hw },
3765
+ { .hw = & g12a_fclk_div4 .hw },
3766
+ { .hw = & g12a_fclk_div5 .hw },
3767
+ { .hw = & g12a_fclk_div7 .hw },
3768
+ };
3769
+
3770
+ static struct clk_regmap g12b_mipi_isp_sel = {
3771
+ .data = & (struct clk_regmap_mux_data ){
3772
+ .offset = HHI_ISP_CLK_CNTL ,
3773
+ .mask = 7 ,
3774
+ .shift = 9 ,
3775
+ },
3776
+ .hw .init = & (struct clk_init_data ){
3777
+ .name = "mipi_isp_sel" ,
3778
+ .ops = & clk_regmap_mux_ops ,
3779
+ .parent_data = g12b_mipi_isp_parent_data ,
3780
+ .num_parents = ARRAY_SIZE (g12b_mipi_isp_parent_data ),
3781
+ },
3782
+ };
3783
+
3784
+ static struct clk_regmap g12b_mipi_isp_div = {
3785
+ .data = & (struct clk_regmap_div_data ){
3786
+ .offset = HHI_ISP_CLK_CNTL ,
3787
+ .shift = 0 ,
3788
+ .width = 7 ,
3789
+ },
3790
+ .hw .init = & (struct clk_init_data ){
3791
+ .name = "mipi_isp_div" ,
3792
+ .ops = & clk_regmap_divider_ops ,
3793
+ .parent_hws = (const struct clk_hw * []) {
3794
+ & g12b_mipi_isp_sel .hw
3795
+ },
3796
+ .num_parents = 1 ,
3797
+ .flags = CLK_SET_RATE_PARENT ,
3798
+ },
3799
+ };
3800
+
3801
+ static struct clk_regmap g12b_mipi_isp = {
3802
+ .data = & (struct clk_regmap_gate_data ){
3803
+ .offset = HHI_ISP_CLK_CNTL ,
3804
+ .bit_idx = 8 ,
3805
+ },
3806
+ .hw .init = & (struct clk_init_data ) {
3807
+ .name = "mipi_isp" ,
3808
+ .ops = & clk_regmap_gate_ops ,
3809
+ .parent_hws = (const struct clk_hw * []) {
3810
+ & g12b_mipi_isp_div .hw
3811
+ },
3812
+ .num_parents = 1 ,
3813
+ .flags = CLK_SET_RATE_PARENT ,
3814
+ },
3815
+ };
3816
+
3757
3817
/* HDMI Clocks */
3758
3818
3759
3819
static const struct clk_parent_data g12a_hdmi_parent_data [] = {
@@ -4765,6 +4825,9 @@ static struct clk_hw *g12b_hw_clks[] = {
4765
4825
[CLKID_MIPI_DSI_PXCLK_SEL ] = & g12a_mipi_dsi_pxclk_sel .hw ,
4766
4826
[CLKID_MIPI_DSI_PXCLK_DIV ] = & g12a_mipi_dsi_pxclk_div .hw ,
4767
4827
[CLKID_MIPI_DSI_PXCLK ] = & g12a_mipi_dsi_pxclk .hw ,
4828
+ [CLKID_MIPI_ISP_SEL ] = & g12b_mipi_isp_sel .hw ,
4829
+ [CLKID_MIPI_ISP_DIV ] = & g12b_mipi_isp_div .hw ,
4830
+ [CLKID_MIPI_ISP ] = & g12b_mipi_isp .hw ,
4768
4831
};
4769
4832
4770
4833
static struct clk_hw * sm1_hw_clks [] = {
@@ -5261,6 +5324,9 @@ static struct clk_regmap *const g12a_clk_regmaps[] = {
5261
5324
& g12a_mipi_dsi_pxclk_sel ,
5262
5325
& g12a_mipi_dsi_pxclk_div ,
5263
5326
& g12a_mipi_dsi_pxclk ,
5327
+ & g12b_mipi_isp_sel ,
5328
+ & g12b_mipi_isp_div ,
5329
+ & g12b_mipi_isp ,
5264
5330
};
5265
5331
5266
5332
static const struct reg_sequence g12a_init_regs [] = {
0 commit comments