cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dima2882
Explorer
Explorer
1,906 Views
Registered: ‎03-26-2010

Enable PL Clocks from PS in Petalinux

Jump to solution

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!

0 Kudos
1 Solution

Accepted Solutions
dima2882
Explorer
Explorer
1,835 Views
Registered: ‎03-26-2010

Have the parameter in, and read the wiki... No change unfortunately. Something else must be wrong 

View solution in original post

0 Kudos
3 Replies
timor.knudsen
Observer
Observer
1,844 Views
Registered: ‎06-20-2016

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:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842482/Device+Tree+Tips#DeviceTreeTips-4Clocks

0 Kudos
dima2882
Explorer
Explorer
1,836 Views
Registered: ‎03-26-2010

Have the parameter in, and read the wiki... No change unfortunately. Something else must be wrong 

View solution in original post

0 Kudos
dima2882
Explorer
Explorer
1,815 Views
Registered: ‎03-26-2010

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.

0 Kudos