18c2ecf20Sopenharmony_ciDevice Tree Clock bindings for arch-vt8500
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThis binding uses the common clock binding[1].
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciRequired properties:
88c2ecf20Sopenharmony_ci- compatible : shall be one of the following:
98c2ecf20Sopenharmony_ci	"via,vt8500-pll-clock" - for a VT8500/WM8505 PLL clock
108c2ecf20Sopenharmony_ci	"wm,wm8650-pll-clock" - for a WM8650 PLL clock
118c2ecf20Sopenharmony_ci	"wm,wm8750-pll-clock" - for a WM8750 PLL clock
128c2ecf20Sopenharmony_ci	"wm,wm8850-pll-clock" - for a WM8850 PLL clock
138c2ecf20Sopenharmony_ci	"via,vt8500-device-clock" - for a VT/WM device clock
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciRequired properties for PLL clocks:
168c2ecf20Sopenharmony_ci- reg : shall be the control register offset from PMC base for the pll clock.
178c2ecf20Sopenharmony_ci- clocks : shall be the input parent clock phandle for the clock. This should
188c2ecf20Sopenharmony_ci	be the reference clock.
198c2ecf20Sopenharmony_ci- #clock-cells : from common clock binding; shall be set to 0.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciRequired properties for device clocks:
228c2ecf20Sopenharmony_ci- clocks : shall be the input parent clock phandle for the clock. This should
238c2ecf20Sopenharmony_ci	be a pll output.
248c2ecf20Sopenharmony_ci- #clock-cells : from common clock binding; shall be set to 0.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciDevice Clocks
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciDevice clocks are required to have one or both of the following sets of
308c2ecf20Sopenharmony_ciproperties:
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciGated device clocks:
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ciRequired properties:
368c2ecf20Sopenharmony_ci- enable-reg : shall be the register offset from PMC base for the enable
378c2ecf20Sopenharmony_ci	register.
388c2ecf20Sopenharmony_ci- enable-bit : shall be the bit within enable-reg to enable/disable the clock.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciDivisor device clocks:
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciRequired property:
448c2ecf20Sopenharmony_ci- divisor-reg : shall be the register offset from PMC base for the divisor
458c2ecf20Sopenharmony_ci	register.
468c2ecf20Sopenharmony_ciOptional property:
478c2ecf20Sopenharmony_ci- divisor-mask : shall be the mask for the divisor register. Defaults to 0x1f
488c2ecf20Sopenharmony_ci	if not specified.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciFor example:
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciref25: ref25M {
548c2ecf20Sopenharmony_ci	#clock-cells = <0>;
558c2ecf20Sopenharmony_ci	compatible = "fixed-clock";
568c2ecf20Sopenharmony_ci	clock-frequency = <25000000>;
578c2ecf20Sopenharmony_ci};
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ciplla: plla {
608c2ecf20Sopenharmony_ci	#clock-cells = <0>;
618c2ecf20Sopenharmony_ci	compatible = "wm,wm8650-pll-clock";
628c2ecf20Sopenharmony_ci	clocks = <&ref25>;
638c2ecf20Sopenharmony_ci	reg = <0x200>;
648c2ecf20Sopenharmony_ci};
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_cisdhc: sdhc {
678c2ecf20Sopenharmony_ci	#clock-cells = <0>;
688c2ecf20Sopenharmony_ci	compatible = "via,vt8500-device-clock";
698c2ecf20Sopenharmony_ci	clocks = <&pllb>;
708c2ecf20Sopenharmony_ci	divisor-reg = <0x328>;
718c2ecf20Sopenharmony_ci	divisor-mask = <0x3f>;
728c2ecf20Sopenharmony_ci	enable-reg = <0x254>;
738c2ecf20Sopenharmony_ci	enable-bit = <18>;
748c2ecf20Sopenharmony_ci};
75