To show a list of clock settings on a Zynq UltraScale+ device running Linux, you typically want to inspect the clock framework information exposed by the Linux kernel. The Zynq UltraScale+ uses the Xilinx clock framework, and the clock information is usually available via the debugfs interface or through sysfs.
Here are some common methods to list clock settings on such a system:
1. Using debugfs (clk debug interface)
The Linux kernel exposes clock information under debugfs if the clock debug support is enabled.
- Mount debugfs (if not already mounted):
mount -t debugfs none /sys/kernel/debug
- List clocks:
cat /sys/kernel/debug/clk/clk_summary
This file shows a summary of all clocks, their rates, parents, and enable counts.
Alternatively, you can explore:
ls /sys/kernel/debug/clk/
You might find files like clk_summary, clk_enable, clk_disable, etc.
2. Using sysfs clock interface
Some clocks may be exposed under /sys:
ls /sys/kernel/debug/clk/
or
ls /sys/devices/clk/
But usually, the debugfs interface is more comprehensive.
3. Using clk command (if available)
Some embedded Linux distributions include a clk utility (part of the Linux kernel tools or Xilinx tools) to query clocks:
clk --show
If not installed, you can build it from the Linux kernel tools or use debugfs as above.
4. Using device tree and driver info
You can also check the device tree source or overlay for clock configurations, but this is static info, not runtime clock rates.
Summary
The most straightforward way on a Zynq UltraScale+ Linux system is:
mount -t debugfs none /sys/kernel/debug
cat /sys/kernel/debug/clk/clk_summary
This will show you a list of clocks, their current rates, parents, and enable status.
If you want, I can help you interpret the output or guide you on enabling debugfs if it’s not available.