Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / clk / meson / clk-pll.h
blob949157fb7bf55a1cec94a6e470a5232a93a83fab
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (c) 2019 BayLibre, SAS.
4 * Author: Jerome Brunet <jbrunet@baylibre.com>
5 */
7 #ifndef __MESON_CLK_PLL_H
8 #define __MESON_CLK_PLL_H
10 #include <linux/clk-provider.h>
11 #include <linux/regmap.h>
12 #include "parm.h"
14 struct pll_params_table {
15 unsigned int m;
16 unsigned int n;
19 struct pll_mult_range {
20 unsigned int min;
21 unsigned int max;
24 #define PLL_PARAMS(_m, _n) \
25 { \
26 .m = (_m), \
27 .n = (_n), \
30 #define CLK_MESON_PLL_ROUND_CLOSEST BIT(0)
31 #define CLK_MESON_PLL_NOINIT_ENABLED BIT(1)
33 struct meson_clk_pll_data {
34 struct parm en;
35 struct parm m;
36 struct parm n;
37 struct parm frac;
38 struct parm l;
39 struct parm rst;
40 struct parm current_en;
41 struct parm l_detect;
42 const struct reg_sequence *init_regs;
43 unsigned int init_count;
44 const struct pll_params_table *table;
45 const struct pll_mult_range *range;
46 unsigned int frac_max;
47 u8 flags;
50 extern const struct clk_ops meson_clk_pll_ro_ops;
51 extern const struct clk_ops meson_clk_pll_ops;
52 extern const struct clk_ops meson_clk_pcie_pll_ops;
54 #endif /* __MESON_CLK_PLL_H */