Hi Igor,
I checked the the file http://www.nxp.com/docs/en/engineering-bulletin/EB821.pdf
It seems to me, that the described procedure to adjust the LDB clock is implemented within the functions “disable_anatop_clocks();” and “init_ldb_clks(np);” in file arch/arm/mach-imx/cpuidle-imx6q.c.
But I wonder why these are no used for the QuadPlus!
if (cpu_is_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_2_0) {
clk[IMX6QDL_CLK_LDB_DI0_SEL] = imx_clk_mux_flags("ldb_di0_sel", base + 0x2c, 9, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT);
clk[IMX6QDL_CLK_LDB_DI1_SEL] = imx_clk_mux_flags("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT);
} else {
/*
* The LDB_DI0/1_SEL muxes are registered read-only due to a hardware
* bug. Set the muxes to the requested values before registering the
* ldb_di_sel clocks.
*/
disable_anatop_clocks();
init_ldb_clks(np);
clk[IMX6QDL_CLK_LDB_DI0_SEL] = imx_clk_mux_ldb("ldb_di0_sel", base + 0x2c, 9, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels));
clk[IMX6QDL_CLK_LDB_DI1_SEL] = imx_clk_mux_ldb("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels));
}
Further down the file, the parent clock for IMX6QDL_CLK_LDB_DI0_SEL and IMX6QDL_CLK_LDB_DI1_SEL is set fix to IMX6QDL_CLK_PLL2_PFD0_352M.
if (cpu_is_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_2_0) {
imx_clk_set_parent(clk[IMX6QDL_CLK_LDB_DI0_SEL], clk[IMX6QDL_CLK_PLL2_PFD0_352M]);
imx_clk_set_parent(clk[IMX6QDL_CLK_LDB_DI1_SEL], clk[IMX6QDL_CLK_PLL2_PFD0_352M]);
}
What is the reason for this implementation for the iMX6QP?
In our application we use PLL5 for IMX6QDL_CLK_LDB_DI0_SEL and IMX6QDL_CLK_LDB_DI1_SEL.
Now I understand why it was not working with the original version of cpuidle-imx6q.c as PLL5 never was selected.
There are two ways the achieve this. Either setting the clock fix to PLL5 using IMX6QDL_CLK_PLL5_VIDEO_DIV or, what I prefer, using “disable_anatop_clocks();” and “init_ldb_clks(np);” and remove (set to comment) the fix adjustment. With this there is a dynamic way to set IMX6QDL_CLK_LDB_DI0_SEL and IMX6QDL_CLK_LDB_DI1_SEL by adding
&clks {
fsl,ldb-di0-parent = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>;
fsl,ldb-di1-parent = <&clks IMX6QDL_CLK_PLL5_VIDEO_DIV>;
};
to the device tree, which I found in e.g. imx6qdl-sabresd.dtsi.
This is working fine for me, but the remaining question to me is, what is the NXP recommended way the adjust the MUX for the iMX6QP. Is it that described in http://www.nxp.com/docs/en/engineering-bulletin/EB821.pdf ?
I guess – yes, as I think this document is valid for all iMX6 derivates, isn’t it?
Further I did not find differences between the QP and SOLO reference manuals in the CCM chapter regarding the MUX adjustment. Maybe I have overseen something important?
It would be of great help to me, if you could give me a comment about that.
Now I will go on the displaying images and playing videos and will come back to you if there are additional issues:-)
Thank you in advance and best regards
Elmar