1 /* SPDX-License-Identifier: GPL-2.0 2 * 3 * MediaTek 8365 AFE clock control definitions 4 * 5 * Copyright (c) 2024 MediaTek Inc. 6 * Authors: Jia Zeng <jia.zeng@mediatek.com> 7 * Alexandre Mergnat <amergnat@baylibre.com> 8 */ 9 10 #ifndef _MT8365_AFE_UTILS_H_ 11 #define _MT8365_AFE_UTILS_H_ 12 13 struct mtk_base_afe; 14 struct clk; 15 16 int mt8365_afe_init_audio_clk(struct mtk_base_afe *afe); 17 void mt8365_afe_disable_clk(struct mtk_base_afe *afe, struct clk *clk); 18 int mt8365_afe_set_clk_rate(struct mtk_base_afe *afe, struct clk *clk, unsigned int rate); 19 int mt8365_afe_set_clk_parent(struct mtk_base_afe *afe, struct clk *clk, struct clk *parent); 20 int mt8365_afe_enable_top_cg(struct mtk_base_afe *afe, unsigned int cg_type); 21 int mt8365_afe_disable_top_cg(struct mtk_base_afe *afe, unsigned int cg_type); 22 int mt8365_afe_enable_main_clk(struct mtk_base_afe *afe); 23 int mt8365_afe_disable_main_clk(struct mtk_base_afe *afe); 24 int mt8365_afe_emi_clk_on(struct mtk_base_afe *afe); 25 int mt8365_afe_emi_clk_off(struct mtk_base_afe *afe); 26 int mt8365_afe_enable_afe_on(struct mtk_base_afe *afe); 27 int mt8365_afe_disable_afe_on(struct mtk_base_afe *afe); 28 int mt8365_afe_enable_apll_tuner_cfg(struct mtk_base_afe *afe, unsigned int apll); 29 int mt8365_afe_disable_apll_tuner_cfg(struct mtk_base_afe *afe, unsigned int apll); 30 int mt8365_afe_enable_apll_associated_cfg(struct mtk_base_afe *afe, unsigned int apll); 31 int mt8365_afe_disable_apll_associated_cfg(struct mtk_base_afe *afe, unsigned int apll); 32 #endif 33