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:
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.
已解决! 转到解答。
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
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