01-28-2019 09:02 AM - edited 01-28-2019 11:34 AM
Hi all,
I've reviewed all of the prior posts on the subject and am still stuggling with this...
I have a Petalinux 2018.2 system with a ZCU102 MPSoC deivce that works great in u-boot. PL clocks fclk0 and fclk1 generate the right frequencies, fabric hardware is happy. When I boot into Petalinux those clocks turn off. On the advice of @rdennen91 (https://forums.xilinx.com/t5/Embedded-Linux/Enabling-PL-Clocks-in-Zynq-MPSoC/td-p/824893), I added the following to my system-user.dtsi:
&fclk0 { status = "okay"; compatible = "xlnx,fclk"; }; &fclk1 { status = "okay"; compatible = "xlnx,fclk"; };
No change was seen, as soon as petalinux boots I lose those clocks. My petalinux-confg has this turned on: CONFIG_SUBSYSTEM_PMUFW_POWER_KERNEL_CONFIGURATIONS=y. Additionally, decompiling my device tree blob, I did see the following for the PL clocks, proving that my device tree changes from above were put in appropriately:
fclk0 { status = "okay"; compatible = "xlnx,fclk"; clocks = <0x3 0x47>; }; fclk1 { status = "okay"; compatible = "xlnx,fclk"; clocks = <0x3 0x48>; }; fclk2 { status = "disabled"; compatible = "xlnx,fclk"; clocks = <0x3 0x49>; }; fclk3 { status = "disabled"; compatible = "xlnx,fclk"; clocks = <0x3 0x4a>; };
To top it all off, this still returns 1, meaning that the clocks PL0 and PL1 are supposed to be working:
more /sys/kernel/debug/clk/pl0_ref/clk_enable_count
1
I haven't found any other power-related options that do anything I'd recognize.
Is there something else in kernel config I'm supposed to turn on? Please advise!
01-29-2019 05:26 AM
Have the parameter in, and read the wiki... No change unfortunately. Something else must be wrong
01-29-2019 01:11 AM - edited 01-29-2019 01:12 AM
Linux disables unused clocks by default. One idea is to introduce the parameter
clk_ignore_unused
in the kernel bootargs. You can change the settings via
petalinux_config
and then navigating to DTG Settings -> Kernel Bootargs. Then disable "generate boot args automatically" and make sure the "user set kernel bootargs" string is set correctly.
Also see this section in the Xilinx Wiki:
01-29-2019 05:26 AM
Have the parameter in, and read the wiki... No change unfortunately. Something else must be wrong
01-31-2019 07:11 AM
Established that clocks are working... This isn't the issue anymore. Posts above had accurate information on how to make sure PL clocks worked in Petalinux, but there's another issue going on.