162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * mt8183-afe-clk.h -- Mediatek 8183 afe clock ctrl definition 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2018 MediaTek Inc. 662306a36Sopenharmony_ci * Author: KaiChieh Chuang <kaichieh.chuang@mediatek.com> 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef _MT8183_AFE_CLK_H_ 1062306a36Sopenharmony_ci#define _MT8183_AFE_CLK_H_ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* APLL */ 1362306a36Sopenharmony_ci#define APLL1_W_NAME "APLL1" 1462306a36Sopenharmony_ci#define APLL2_W_NAME "APLL2" 1562306a36Sopenharmony_cienum { 1662306a36Sopenharmony_ci MT8183_APLL1 = 0, 1762306a36Sopenharmony_ci MT8183_APLL2, 1862306a36Sopenharmony_ci}; 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_cistruct mtk_base_afe; 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciint mt8183_init_clock(struct mtk_base_afe *afe); 2362306a36Sopenharmony_ciint mt8183_afe_enable_clock(struct mtk_base_afe *afe); 2462306a36Sopenharmony_ciint mt8183_afe_disable_clock(struct mtk_base_afe *afe); 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciint mt8183_apll1_enable(struct mtk_base_afe *afe); 2762306a36Sopenharmony_civoid mt8183_apll1_disable(struct mtk_base_afe *afe); 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciint mt8183_apll2_enable(struct mtk_base_afe *afe); 3062306a36Sopenharmony_civoid mt8183_apll2_disable(struct mtk_base_afe *afe); 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciint mt8183_get_apll_rate(struct mtk_base_afe *afe, int apll); 3362306a36Sopenharmony_ciint mt8183_get_apll_by_rate(struct mtk_base_afe *afe, int rate); 3462306a36Sopenharmony_ciint mt8183_get_apll_by_name(struct mtk_base_afe *afe, const char *name); 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ciint mt8183_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate); 3762306a36Sopenharmony_civoid mt8183_mck_disable(struct mtk_base_afe *afe, int mck_id); 3862306a36Sopenharmony_ci#endif 39