mt8183-afe-clk.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * mt8183-afe-clk.h -- Mediatek 8183 afe clock ctrl definition
  4. *
  5. * Copyright (c) 2018 MediaTek Inc.
  6. * Author: KaiChieh Chuang <[email protected]>
  7. */
  8. #ifndef _MT8183_AFE_CLK_H_
  9. #define _MT8183_AFE_CLK_H_
  10. /* APLL */
  11. #define APLL1_W_NAME "APLL1"
  12. #define APLL2_W_NAME "APLL2"
  13. enum {
  14. MT8183_APLL1 = 0,
  15. MT8183_APLL2,
  16. };
  17. struct mtk_base_afe;
  18. int mt8183_init_clock(struct mtk_base_afe *afe);
  19. int mt8183_afe_enable_clock(struct mtk_base_afe *afe);
  20. int mt8183_afe_disable_clock(struct mtk_base_afe *afe);
  21. int mt8183_apll1_enable(struct mtk_base_afe *afe);
  22. void mt8183_apll1_disable(struct mtk_base_afe *afe);
  23. int mt8183_apll2_enable(struct mtk_base_afe *afe);
  24. void mt8183_apll2_disable(struct mtk_base_afe *afe);
  25. int mt8183_get_apll_rate(struct mtk_base_afe *afe, int apll);
  26. int mt8183_get_apll_by_rate(struct mtk_base_afe *afe, int rate);
  27. int mt8183_get_apll_by_name(struct mtk_base_afe *afe, const char *name);
  28. int mt8183_mck_enable(struct mtk_base_afe *afe, int mck_id, int rate);
  29. void mt8183_mck_disable(struct mtk_base_afe *afe, int mck_id);
  30. #endif