1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2022 MediaTek Inc.
38 struct mtk_pllfh_data {
39 struct fh_pll_state state;
40 const struct fh_pll_data data;
44 void __iomem *reg_hp_en;
45 void __iomem *reg_clk_con;
46 void __iomem *reg_rst_con;
47 void __iomem *reg_slope0;
48 void __iomem *reg_slope1;
49 void __iomem *reg_cfg;
50 void __iomem *reg_updnlmt;
51 void __iomem *reg_dds;
52 void __iomem *reg_dvfs;
53 void __iomem *reg_mon;
57 struct mtk_clk_pll clk_pll;
58 struct fh_pll_regs regs;
59 struct mtk_pllfh_data *pllfh_data;
60 const struct fh_operation *ops;
65 int (*hopping)(struct mtk_fh *fh, unsigned int new_dds,
66 unsigned int postdiv);
67 int (*ssc_enable)(struct mtk_fh *fh, u32 rate);
70 int mtk_clk_register_pllfhs(struct device_node *node,
71 const struct mtk_pll_data *plls, int num_plls,
72 struct mtk_pllfh_data *pllfhs, int num_pllfhs,
73 struct clk_hw_onecell_data *clk_data);
75 void mtk_clk_unregister_pllfhs(const struct mtk_pll_data *plls, int num_plls,
76 struct mtk_pllfh_data *pllfhs, int num_fhs,
77 struct clk_hw_onecell_data *clk_data);
79 void fhctl_parse_dt(const u8 *compatible_node, struct mtk_pllfh_data *pllfhs,
82 #endif /* __CLK_PLLFH_H */