UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
598 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
Explorer
Explorer
527 Views
Registered: ‎03-26-2010

Re: Enable PL Clocks from PS in Petalinux

Jump to solution

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

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

Re: Enable PL Clocks from PS in Petalinux

Jump to solution

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
Explorer
Explorer
528 Views
Registered: ‎03-26-2010

Re: Enable PL Clocks from PS in Petalinux

Jump to solution

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

0 Kudos
Highlighted
Explorer
Explorer
507 Views
Registered: ‎03-26-2010

Re: Enable PL Clocks from PS in Petalinux

Jump to solution

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