@@ -713,6 +713,35 @@ static struct clk_regmap gxbb_mpll_prediv = {
713713};
714714
715715static struct clk_regmap gxbb_mpll0_div = {
716+ .data = & (struct meson_clk_mpll_data ){
717+ .sdm = {
718+ .reg_off = HHI_MPLL_CNTL7 ,
719+ .shift = 0 ,
720+ .width = 14 ,
721+ },
722+ .sdm_en = {
723+ .reg_off = HHI_MPLL_CNTL ,
724+ .shift = 25 ,
725+ .width = 1 ,
726+ },
727+ .n2 = {
728+ .reg_off = HHI_MPLL_CNTL7 ,
729+ .shift = 16 ,
730+ .width = 9 ,
731+ },
732+ .lock = & meson_clk_lock ,
733+ },
734+ .hw .init = & (struct clk_init_data ){
735+ .name = "mpll0_div" ,
736+ .ops = & meson_clk_mpll_ops ,
737+ .parent_hws = (const struct clk_hw * []) {
738+ & gxbb_mpll_prediv .hw
739+ },
740+ .num_parents = 1 ,
741+ },
742+ };
743+
744+ static struct clk_regmap gxl_mpll0_div = {
716745 .data = & (struct meson_clk_mpll_data ){
717746 .sdm = {
718747 .reg_off = HHI_MPLL_CNTL7 ,
@@ -749,7 +778,16 @@ static struct clk_regmap gxbb_mpll0 = {
749778 .hw .init = & (struct clk_init_data ){
750779 .name = "mpll0" ,
751780 .ops = & clk_regmap_gate_ops ,
752- .parent_hws = (const struct clk_hw * []) { & gxbb_mpll0_div .hw },
781+ .parent_data = & (const struct clk_parent_data ) {
782+ /*
783+ * Note:
784+ * GXL and GXBB have different SDM_EN registers. We
785+ * fallback to the global naming string mechanism so
786+ * mpll0_div picks up the appropriate one.
787+ */
788+ .name = "mpll0_div" ,
789+ .index = -1 ,
790+ },
753791 .num_parents = 1 ,
754792 .flags = CLK_SET_RATE_PARENT ,
755793 },
@@ -3044,7 +3082,7 @@ static struct clk_hw_onecell_data gxl_hw_onecell_data = {
30443082 [CLKID_VAPB_1 ] = & gxbb_vapb_1 .hw ,
30453083 [CLKID_VAPB_SEL ] = & gxbb_vapb_sel .hw ,
30463084 [CLKID_VAPB ] = & gxbb_vapb .hw ,
3047- [CLKID_MPLL0_DIV ] = & gxbb_mpll0_div .hw ,
3085+ [CLKID_MPLL0_DIV ] = & gxl_mpll0_div .hw ,
30483086 [CLKID_MPLL1_DIV ] = & gxbb_mpll1_div .hw ,
30493087 [CLKID_MPLL2_DIV ] = & gxbb_mpll2_div .hw ,
30503088 [CLKID_MPLL_PREDIV ] = & gxbb_mpll_prediv .hw ,
@@ -3439,7 +3477,7 @@ static struct clk_regmap *const gxl_clk_regmaps[] = {
34393477 & gxbb_mpll0 ,
34403478 & gxbb_mpll1 ,
34413479 & gxbb_mpll2 ,
3442- & gxbb_mpll0_div ,
3480+ & gxl_mpll0_div ,
34433481 & gxbb_mpll1_div ,
34443482 & gxbb_mpll2_div ,
34453483 & gxbb_cts_amclk_div ,
0 commit comments