Additional clock gates (LPCG) for i.MX7 ENET clocks

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Additional clock gates (LPCG) for i.MX7 ENET clocks

Jump to solution
1,147 Views
vsiles
Senior Contributor I

Hi !

Following my question about i.MX7 ENET clock gate in i.MX7 clock tre: ENET_REF_CLK_ROOT gates , I am now interested in the LPCG part of the tree. Some clocks, like ENET_AXI_CLK_ROOT or ENET1_TIME_CLK_ROOT have an associated LPCG, and some like ENET1_REF_CLK_ROOT don't have one.

From the clock tree, we can see that:

  1. ENET_AXI_CLK_ROOT has a LPCG but it is not documented
  2. ENET1_TIME_CLK_ROOT is using LPCG CCGR112 and ENET2_TIME_CLK_ROOT is using LPCG CCGR113
  3. ENET1_REF_CLK_ROOT and ENET2_REF_CLK_ROOT don't have any LPCG

However in NPX Linux bsp (linux-imx.git - i.MX Linux Kernel ) we can see the following code

clks[IMX7D_ENET1_REF_ROOT_CLK] = imx_clk_gate4("enet1_ref_root_clk", "enet1_ref_post_div", base + 0x44e0, 0);
clks[IMX7D_ENET1_TIME_ROOT_CLK] = imx_clk_gate4("enet1_time_root_clk", "enet1_time_post_div", base + 0x44f0, 0);
clks[IMX7D_ENET2_REF_ROOT_CLK] = imx_clk_gate4("enet2_ref_root_clk", "enet2_ref_post_div", base + 0x4500, 0);
clks[IMX7D_ENET2_TIME_ROOT_CLK] = imx_clk_gate4("enet2_time_root_clk", "enet2_time_post_div", base + 0x4510, 0);

It refers to LPCG CCGR78, 79, 80 and 81.

There are two issues here: the "REF" clocks shouldn't have any LPCG, and the "TIME" clocks are using the wrong LPCG.

There is an unfinished discussion on the arm-kernel mailing list (see RE: i.MX7 clock support broken — ARM, OMAP, Xscale Linux Kernel ) where it seems that it is a mistake, but the guy here never gave the feedback from the IC team.

Can anyone have a final answer to these clocks ? Is the RefMan accurate or is the linux driver correct ?

Best,

V.

Labels (2)
Tags (3)
0 Kudos
1 Solution
866 Views
Yuri
NXP Employee
NXP Employee

Hello,

  

  Only CCGRs, shown in Table 5-19 (CCGR Mapping Table) of the i.MX7D RM

(Rev. 0.1, 08/2016), should be really used, since “Not all CCGRs are mapped ".

Some code, involved in Linux BSP, may be based on preliminary i.MX7 specs.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
867 Views
Yuri
NXP Employee
NXP Employee

Hello,

  

  Only CCGRs, shown in Table 5-19 (CCGR Mapping Table) of the i.MX7D RM

(Rev. 0.1, 08/2016), should be really used, since “Not all CCGRs are mapped ".

Some code, involved in Linux BSP, may be based on preliminary i.MX7 specs.

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
866 Views
vsiles
Senior Contributor I

Ok, so refman is correct. Thank you Yuri !

 Do you know if a fix to Linux BSP is to be expected ?

0 Kudos
866 Views
Yuri
NXP Employee
NXP Employee

Hardly the fix will be provided till explicit bug detection because of this code.

~Yuri.

0 Kudos
866 Views
vsiles
Senior Contributor I

It seems to me the kernel is buggy:

- it only works because u-boot enabled the gate in the first place

- power management can't be correctly done because there is no way to close the LPCG

0 Kudos