tools/linux: add sys_clk to device tree

* required for using standard devm_clk_get() clock mechanism in linux drivers
This commit is contained in:
Andrew Dennison 2021-10-14 08:51:01 +11:00 committed by Florent Kermarrec
parent 200a1a18ee
commit 9b67898e99

View file

@ -88,6 +88,16 @@ def generate_dts(d, initrd_start=None, initrd_size=None, initrd=None, root_devic
};
"""
# Clocks ------------------------------------------------------------------------------------------
dts += """
sys_clk: pll {{
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <{sys_clk_freq}>;
}};
""".format(sys_clk_freq=d["constants"]["config_clock_frequency"])
# CPU ------------------------------------------------------------------------------------------
# RISC-V