@@ -3549,6 +3549,22 @@ static struct clk_regmap g12a_cts_encp_sel = {
3549
3549
},
3550
3550
};
3551
3551
3552
+ static struct clk_regmap g12a_cts_encl_sel = {
3553
+ .data = & (struct clk_regmap_mux_data ){
3554
+ .offset = HHI_VIID_CLK_DIV ,
3555
+ .mask = 0xf ,
3556
+ .shift = 12 ,
3557
+ .table = mux_table_cts_sel ,
3558
+ },
3559
+ .hw .init = & (struct clk_init_data ){
3560
+ .name = "cts_encl_sel" ,
3561
+ .ops = & clk_regmap_mux_ops ,
3562
+ .parent_hws = g12a_cts_parent_hws ,
3563
+ .num_parents = ARRAY_SIZE (g12a_cts_parent_hws ),
3564
+ .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE ,
3565
+ },
3566
+ };
3567
+
3552
3568
static struct clk_regmap g12a_cts_vdac_sel = {
3553
3569
.data = & (struct clk_regmap_mux_data ){
3554
3570
.offset = HHI_VIID_CLK_DIV ,
@@ -3628,6 +3644,22 @@ static struct clk_regmap g12a_cts_encp = {
3628
3644
},
3629
3645
};
3630
3646
3647
+ static struct clk_regmap g12a_cts_encl = {
3648
+ .data = & (struct clk_regmap_gate_data ){
3649
+ .offset = HHI_VID_CLK_CNTL2 ,
3650
+ .bit_idx = 3 ,
3651
+ },
3652
+ .hw .init = & (struct clk_init_data ) {
3653
+ .name = "cts_encl" ,
3654
+ .ops = & clk_regmap_gate_ops ,
3655
+ .parent_hws = (const struct clk_hw * []) {
3656
+ & g12a_cts_encl_sel .hw
3657
+ },
3658
+ .num_parents = 1 ,
3659
+ .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED ,
3660
+ },
3661
+ };
3662
+
3631
3663
static struct clk_regmap g12a_cts_vdac = {
3632
3664
.data = & (struct clk_regmap_gate_data ){
3633
3665
.offset = HHI_VID_CLK_CNTL2 ,
@@ -3722,6 +3754,66 @@ static struct clk_regmap g12a_mipi_dsi_pxclk = {
3722
3754
},
3723
3755
};
3724
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
+
3725
3817
/* HDMI Clocks */
3726
3818
3727
3819
static const struct clk_parent_data g12a_hdmi_parent_data [] = {
@@ -4214,9 +4306,12 @@ static MESON_GATE(g12a_htx_hdcp22, HHI_GCLK_MPEG2, 3);
4214
4306
static MESON_GATE (g12a_htx_pclk , HHI_GCLK_MPEG2 , 4 ) ;
4215
4307
static MESON_GATE (g12a_bt656 , HHI_GCLK_MPEG2 , 6 ) ;
4216
4308
static MESON_GATE (g12a_usb1_to_ddr , HHI_GCLK_MPEG2 , 8 ) ;
4309
+ static MESON_GATE (g12b_mipi_isp_gate , HHI_GCLK_MPEG2 , 17 ) ;
4217
4310
static MESON_GATE (g12a_mmc_pclk , HHI_GCLK_MPEG2 , 11 ) ;
4218
4311
static MESON_GATE (g12a_uart2 , HHI_GCLK_MPEG2 , 15 ) ;
4219
4312
static MESON_GATE (g12a_vpu_intr , HHI_GCLK_MPEG2 , 25 ) ;
4313
+ static MESON_GATE (g12b_csi_phy1 , HHI_GCLK_MPEG2 , 28 ) ;
4314
+ static MESON_GATE (g12b_csi_phy0 , HHI_GCLK_MPEG2 , 29 ) ;
4220
4315
static MESON_GATE (g12a_gic , HHI_GCLK_MPEG2 , 30 ) ;
4221
4316
4222
4317
static MESON_GATE (g12a_vclk2_venci0 , HHI_GCLK_OTHER , 1 ) ;
@@ -4407,10 +4502,12 @@ static struct clk_hw *g12a_hw_clks[] = {
4407
4502
[CLKID_VCLK2_DIV12 ] = & g12a_vclk2_div12 .hw ,
4408
4503
[CLKID_CTS_ENCI_SEL ] = & g12a_cts_enci_sel .hw ,
4409
4504
[CLKID_CTS_ENCP_SEL ] = & g12a_cts_encp_sel .hw ,
4505
+ [CLKID_CTS_ENCL_SEL ] = & g12a_cts_encl_sel .hw ,
4410
4506
[CLKID_CTS_VDAC_SEL ] = & g12a_cts_vdac_sel .hw ,
4411
4507
[CLKID_HDMI_TX_SEL ] = & g12a_hdmi_tx_sel .hw ,
4412
4508
[CLKID_CTS_ENCI ] = & g12a_cts_enci .hw ,
4413
4509
[CLKID_CTS_ENCP ] = & g12a_cts_encp .hw ,
4510
+ [CLKID_CTS_ENCL ] = & g12a_cts_encl .hw ,
4414
4511
[CLKID_CTS_VDAC ] = & g12a_cts_vdac .hw ,
4415
4512
[CLKID_HDMI_TX ] = & g12a_hdmi_tx .hw ,
4416
4513
[CLKID_HDMI_SEL ] = & g12a_hdmi_sel .hw ,
@@ -4632,10 +4729,12 @@ static struct clk_hw *g12b_hw_clks[] = {
4632
4729
[CLKID_VCLK2_DIV12 ] = & g12a_vclk2_div12 .hw ,
4633
4730
[CLKID_CTS_ENCI_SEL ] = & g12a_cts_enci_sel .hw ,
4634
4731
[CLKID_CTS_ENCP_SEL ] = & g12a_cts_encp_sel .hw ,
4732
+ [CLKID_CTS_ENCL_SEL ] = & g12a_cts_encl_sel .hw ,
4635
4733
[CLKID_CTS_VDAC_SEL ] = & g12a_cts_vdac_sel .hw ,
4636
4734
[CLKID_HDMI_TX_SEL ] = & g12a_hdmi_tx_sel .hw ,
4637
4735
[CLKID_CTS_ENCI ] = & g12a_cts_enci .hw ,
4638
4736
[CLKID_CTS_ENCP ] = & g12a_cts_encp .hw ,
4737
+ [CLKID_CTS_ENCL ] = & g12a_cts_encl .hw ,
4639
4738
[CLKID_CTS_VDAC ] = & g12a_cts_vdac .hw ,
4640
4739
[CLKID_HDMI_TX ] = & g12a_hdmi_tx .hw ,
4641
4740
[CLKID_HDMI_SEL ] = & g12a_hdmi_sel .hw ,
@@ -4729,6 +4828,12 @@ static struct clk_hw *g12b_hw_clks[] = {
4729
4828
[CLKID_MIPI_DSI_PXCLK_SEL ] = & g12a_mipi_dsi_pxclk_sel .hw ,
4730
4829
[CLKID_MIPI_DSI_PXCLK_DIV ] = & g12a_mipi_dsi_pxclk_div .hw ,
4731
4830
[CLKID_MIPI_DSI_PXCLK ] = & g12a_mipi_dsi_pxclk .hw ,
4831
+ [CLKID_MIPI_ISP_SEL ] = & g12b_mipi_isp_sel .hw ,
4832
+ [CLKID_MIPI_ISP_DIV ] = & g12b_mipi_isp_div .hw ,
4833
+ [CLKID_MIPI_ISP ] = & g12b_mipi_isp .hw ,
4834
+ [CLKID_MIPI_ISP_GATE ] = & g12b_mipi_isp_gate .hw ,
4835
+ [CLKID_MIPI_ISP_CSI_PHY0 ] = & g12b_csi_phy0 .hw ,
4836
+ [CLKID_MIPI_ISP_CSI_PHY1 ] = & g12b_csi_phy1 .hw ,
4732
4837
};
4733
4838
4734
4839
static struct clk_hw * sm1_hw_clks [] = {
@@ -4892,10 +4997,12 @@ static struct clk_hw *sm1_hw_clks[] = {
4892
4997
[CLKID_VCLK2_DIV12 ] = & g12a_vclk2_div12 .hw ,
4893
4998
[CLKID_CTS_ENCI_SEL ] = & g12a_cts_enci_sel .hw ,
4894
4999
[CLKID_CTS_ENCP_SEL ] = & g12a_cts_encp_sel .hw ,
5000
+ [CLKID_CTS_ENCL_SEL ] = & g12a_cts_encl_sel .hw ,
4895
5001
[CLKID_CTS_VDAC_SEL ] = & g12a_cts_vdac_sel .hw ,
4896
5002
[CLKID_HDMI_TX_SEL ] = & g12a_hdmi_tx_sel .hw ,
4897
5003
[CLKID_CTS_ENCI ] = & g12a_cts_enci .hw ,
4898
5004
[CLKID_CTS_ENCP ] = & g12a_cts_encp .hw ,
5005
+ [CLKID_CTS_ENCL ] = & g12a_cts_encl .hw ,
4899
5006
[CLKID_CTS_VDAC ] = & g12a_cts_vdac .hw ,
4900
5007
[CLKID_HDMI_TX ] = & g12a_hdmi_tx .hw ,
4901
5008
[CLKID_HDMI_SEL ] = & g12a_hdmi_sel .hw ,
@@ -5123,10 +5230,12 @@ static struct clk_regmap *const g12a_clk_regmaps[] = {
5123
5230
& g12a_vclk2_div12_en ,
5124
5231
& g12a_cts_enci_sel ,
5125
5232
& g12a_cts_encp_sel ,
5233
+ & g12a_cts_encl_sel ,
5126
5234
& g12a_cts_vdac_sel ,
5127
5235
& g12a_hdmi_tx_sel ,
5128
5236
& g12a_cts_enci ,
5129
5237
& g12a_cts_encp ,
5238
+ & g12a_cts_encl ,
5130
5239
& g12a_cts_vdac ,
5131
5240
& g12a_hdmi_tx ,
5132
5241
& g12a_hdmi_sel ,
@@ -5221,6 +5330,12 @@ static struct clk_regmap *const g12a_clk_regmaps[] = {
5221
5330
& g12a_mipi_dsi_pxclk_sel ,
5222
5331
& g12a_mipi_dsi_pxclk_div ,
5223
5332
& g12a_mipi_dsi_pxclk ,
5333
+ & g12b_mipi_isp_sel ,
5334
+ & g12b_mipi_isp_div ,
5335
+ & g12b_mipi_isp ,
5336
+ & g12b_mipi_isp_gate ,
5337
+ & g12b_csi_phy1 ,
5338
+ & g12b_csi_phy0 ,
5224
5339
};
5225
5340
5226
5341
static const struct reg_sequence g12a_init_regs [] = {
0 commit comments