4 On targets with a PLL compatible with the FE310-G000 SoC, the PLL is configured
5 at program initialization with a constructor. This PLL sets the clock frequency
6 of the RISC-V CPU, and users of Freedom Metal who wish to set a specific clock
7 rate can use Freedom Metal to request that the PLL take on a certain output rate.
9 In the DeviceTree for your target, there should be a node like the following
10 (example taken from the SiFive HiFive1):
12 .. code-block:: DeviceTree
15 compatible = "sifive,fe310-g000,pll";
16 clocks = <&hfxoscout &hfroscout>;
17 clock-names = "pllref", "pllsel0";
18 reg = <&prci 0x8 &prci 0xc>;
19 reg-names = "config", "divider";
20 clock-frequency = <16000000>;
23 The ``clock-frequency`` property of the node sets the requested clock rate of
24 the FE310-G000 PLL. The PLL driver will attempt to configure the PLL to achieve
27 Users should note that the FE310-G000 PLL only supports certain input/output
28 clock rate ratios, and so the effective output rate of the PLL may differ from