~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/mediatek/mt8188/mt8188-afe-clk.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/soc/mediatek/mt8188/mt8188-afe-clk.h (Architecture i386) and /sound/soc/mediatek/mt8188/mt8188-afe-clk.h (Architecture m68k)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * mt8188-afe-clk.h  --  MediaTek 8188 afe clo      3  * mt8188-afe-clk.h  --  MediaTek 8188 afe clock ctrl definition
  4  *                                                  4  *
  5  * Copyright (c) 2022 MediaTek Inc.                 5  * Copyright (c) 2022 MediaTek Inc.
  6  * Author: Bicycle Tsai <bicycle.tsai@mediatek      6  * Author: Bicycle Tsai <bicycle.tsai@mediatek.com>
  7  *         Trevor Wu <trevor.wu@mediatek.com>       7  *         Trevor Wu <trevor.wu@mediatek.com>
  8  *         Chun-Chia Chiu <chun-chia.chiu@medi      8  *         Chun-Chia Chiu <chun-chia.chiu@mediatek.com>
  9  */                                                 9  */
 10                                                    10 
 11 #ifndef _MT8188_AFE_CLK_H_                         11 #ifndef _MT8188_AFE_CLK_H_
 12 #define _MT8188_AFE_CLK_H_                         12 #define _MT8188_AFE_CLK_H_
 13                                                    13 
 14 /* APLL */                                         14 /* APLL */
 15 #define APLL1_W_NAME "APLL1"                       15 #define APLL1_W_NAME "APLL1"
 16 #define APLL2_W_NAME "APLL2"                       16 #define APLL2_W_NAME "APLL2"
 17                                                    17 
 18 enum {                                             18 enum {
 19         /* xtal */                                 19         /* xtal */
 20         MT8188_CLK_XTAL_26M,                       20         MT8188_CLK_XTAL_26M,
 21         /* pll */                                  21         /* pll */
 22         MT8188_CLK_APMIXED_APLL1,                  22         MT8188_CLK_APMIXED_APLL1,
 23         MT8188_CLK_APMIXED_APLL2,                  23         MT8188_CLK_APMIXED_APLL2,
 24         /* divider */                              24         /* divider */
 25         MT8188_CLK_TOP_APLL1_D4,                   25         MT8188_CLK_TOP_APLL1_D4,
 26         MT8188_CLK_TOP_APLL2_D4,                   26         MT8188_CLK_TOP_APLL2_D4,
 27         MT8188_CLK_TOP_APLL12_DIV0,                27         MT8188_CLK_TOP_APLL12_DIV0,
 28         MT8188_CLK_TOP_APLL12_DIV1,                28         MT8188_CLK_TOP_APLL12_DIV1,
 29         MT8188_CLK_TOP_APLL12_DIV2,                29         MT8188_CLK_TOP_APLL12_DIV2,
 30         MT8188_CLK_TOP_APLL12_DIV3,                30         MT8188_CLK_TOP_APLL12_DIV3,
 31         MT8188_CLK_TOP_APLL12_DIV4,                31         MT8188_CLK_TOP_APLL12_DIV4,
 32         MT8188_CLK_TOP_APLL12_DIV9,                32         MT8188_CLK_TOP_APLL12_DIV9,
 33         /* mux */                                  33         /* mux */
 34         MT8188_CLK_TOP_A1SYS_HP_SEL,               34         MT8188_CLK_TOP_A1SYS_HP_SEL,
 35         MT8188_CLK_TOP_A2SYS_SEL,                  35         MT8188_CLK_TOP_A2SYS_SEL,
 36         MT8188_CLK_TOP_AUD_IEC_SEL,                36         MT8188_CLK_TOP_AUD_IEC_SEL,
 37         MT8188_CLK_TOP_AUD_INTBUS_SEL,             37         MT8188_CLK_TOP_AUD_INTBUS_SEL,
 38         MT8188_CLK_TOP_AUDIO_H_SEL,                38         MT8188_CLK_TOP_AUDIO_H_SEL,
 39         MT8188_CLK_TOP_AUDIO_LOCAL_BUS_SEL,        39         MT8188_CLK_TOP_AUDIO_LOCAL_BUS_SEL,
 40         MT8188_CLK_TOP_DPTX_M_SEL,                 40         MT8188_CLK_TOP_DPTX_M_SEL,
 41         MT8188_CLK_TOP_I2SO1_M_SEL,                41         MT8188_CLK_TOP_I2SO1_M_SEL,
 42         MT8188_CLK_TOP_I2SO2_M_SEL,                42         MT8188_CLK_TOP_I2SO2_M_SEL,
 43         MT8188_CLK_TOP_I2SI1_M_SEL,                43         MT8188_CLK_TOP_I2SI1_M_SEL,
 44         MT8188_CLK_TOP_I2SI2_M_SEL,                44         MT8188_CLK_TOP_I2SI2_M_SEL,
 45         /* clock gate */                           45         /* clock gate */
 46         MT8188_CLK_ADSP_AUDIO_26M,                 46         MT8188_CLK_ADSP_AUDIO_26M,
 47         MT8188_CLK_AUD_AFE,                        47         MT8188_CLK_AUD_AFE,
 48         MT8188_CLK_AUD_APLL1_TUNER,                48         MT8188_CLK_AUD_APLL1_TUNER,
 49         MT8188_CLK_AUD_APLL2_TUNER,                49         MT8188_CLK_AUD_APLL2_TUNER,
 50         MT8188_CLK_AUD_TOP0_SPDF,                  50         MT8188_CLK_AUD_TOP0_SPDF,
 51         MT8188_CLK_AUD_APLL,                       51         MT8188_CLK_AUD_APLL,
 52         MT8188_CLK_AUD_APLL2,                      52         MT8188_CLK_AUD_APLL2,
 53         MT8188_CLK_AUD_DAC,                        53         MT8188_CLK_AUD_DAC,
 54         MT8188_CLK_AUD_ADC,                        54         MT8188_CLK_AUD_ADC,
 55         MT8188_CLK_AUD_DAC_HIRES,                  55         MT8188_CLK_AUD_DAC_HIRES,
 56         MT8188_CLK_AUD_A1SYS_HP,                   56         MT8188_CLK_AUD_A1SYS_HP,
 57         MT8188_CLK_AUD_ADC_HIRES,                  57         MT8188_CLK_AUD_ADC_HIRES,
 58         MT8188_CLK_AUD_I2SIN,                      58         MT8188_CLK_AUD_I2SIN,
 59         MT8188_CLK_AUD_TDM_IN,                     59         MT8188_CLK_AUD_TDM_IN,
 60         MT8188_CLK_AUD_I2S_OUT,                    60         MT8188_CLK_AUD_I2S_OUT,
 61         MT8188_CLK_AUD_TDM_OUT,                    61         MT8188_CLK_AUD_TDM_OUT,
 62         MT8188_CLK_AUD_HDMI_OUT,                   62         MT8188_CLK_AUD_HDMI_OUT,
 63         MT8188_CLK_AUD_ASRC11,                     63         MT8188_CLK_AUD_ASRC11,
 64         MT8188_CLK_AUD_ASRC12,                     64         MT8188_CLK_AUD_ASRC12,
 65         MT8188_CLK_AUD_A1SYS,                      65         MT8188_CLK_AUD_A1SYS,
 66         MT8188_CLK_AUD_A2SYS,                      66         MT8188_CLK_AUD_A2SYS,
 67         MT8188_CLK_AUD_PCMIF,                      67         MT8188_CLK_AUD_PCMIF,
 68         MT8188_CLK_AUD_MEMIF_UL1,                  68         MT8188_CLK_AUD_MEMIF_UL1,
 69         MT8188_CLK_AUD_MEMIF_UL2,                  69         MT8188_CLK_AUD_MEMIF_UL2,
 70         MT8188_CLK_AUD_MEMIF_UL3,                  70         MT8188_CLK_AUD_MEMIF_UL3,
 71         MT8188_CLK_AUD_MEMIF_UL4,                  71         MT8188_CLK_AUD_MEMIF_UL4,
 72         MT8188_CLK_AUD_MEMIF_UL5,                  72         MT8188_CLK_AUD_MEMIF_UL5,
 73         MT8188_CLK_AUD_MEMIF_UL6,                  73         MT8188_CLK_AUD_MEMIF_UL6,
 74         MT8188_CLK_AUD_MEMIF_UL8,                  74         MT8188_CLK_AUD_MEMIF_UL8,
 75         MT8188_CLK_AUD_MEMIF_UL9,                  75         MT8188_CLK_AUD_MEMIF_UL9,
 76         MT8188_CLK_AUD_MEMIF_UL10,                 76         MT8188_CLK_AUD_MEMIF_UL10,
 77         MT8188_CLK_AUD_MEMIF_DL2,                  77         MT8188_CLK_AUD_MEMIF_DL2,
 78         MT8188_CLK_AUD_MEMIF_DL3,                  78         MT8188_CLK_AUD_MEMIF_DL3,
 79         MT8188_CLK_AUD_MEMIF_DL6,                  79         MT8188_CLK_AUD_MEMIF_DL6,
 80         MT8188_CLK_AUD_MEMIF_DL7,                  80         MT8188_CLK_AUD_MEMIF_DL7,
 81         MT8188_CLK_AUD_MEMIF_DL8,                  81         MT8188_CLK_AUD_MEMIF_DL8,
 82         MT8188_CLK_AUD_MEMIF_DL10,                 82         MT8188_CLK_AUD_MEMIF_DL10,
 83         MT8188_CLK_AUD_MEMIF_DL11,                 83         MT8188_CLK_AUD_MEMIF_DL11,
 84         MT8188_CLK_NUM,                            84         MT8188_CLK_NUM,
 85 };                                                 85 };
 86                                                    86 
 87 enum {                                             87 enum {
 88         MT8188_AUD_PLL1,                           88         MT8188_AUD_PLL1,
 89         MT8188_AUD_PLL2,                           89         MT8188_AUD_PLL2,
 90         MT8188_AUD_PLL3,                           90         MT8188_AUD_PLL3,
 91         MT8188_AUD_PLL4,                           91         MT8188_AUD_PLL4,
 92         MT8188_AUD_PLL5,                           92         MT8188_AUD_PLL5,
 93         MT8188_AUD_PLL_NUM,                        93         MT8188_AUD_PLL_NUM,
 94 };                                                 94 };
 95                                                    95 
 96 enum {                                             96 enum {
 97         MT8188_MCK_SEL_26M,                        97         MT8188_MCK_SEL_26M,
 98         MT8188_MCK_SEL_APLL1,                      98         MT8188_MCK_SEL_APLL1,
 99         MT8188_MCK_SEL_APLL2,                      99         MT8188_MCK_SEL_APLL2,
100         MT8188_MCK_SEL_APLL3,                     100         MT8188_MCK_SEL_APLL3,
101         MT8188_MCK_SEL_APLL4,                     101         MT8188_MCK_SEL_APLL4,
102         MT8188_MCK_SEL_APLL5,                     102         MT8188_MCK_SEL_APLL5,
103         MT8188_MCK_SEL_NUM,                       103         MT8188_MCK_SEL_NUM,
104 };                                                104 };
105                                                   105 
106 struct mtk_base_afe;                              106 struct mtk_base_afe;
107                                                   107 
108 int mt8188_afe_get_mclk_source_clk_id(int sel)    108 int mt8188_afe_get_mclk_source_clk_id(int sel);
109 int mt8188_afe_get_mclk_source_rate(struct mtk    109 int mt8188_afe_get_mclk_source_rate(struct mtk_base_afe *afe, int apll);
110 int mt8188_afe_get_default_mclk_source_by_rate    110 int mt8188_afe_get_default_mclk_source_by_rate(int rate);
111 int mt8188_get_apll_by_rate(struct mtk_base_af    111 int mt8188_get_apll_by_rate(struct mtk_base_afe *afe, int rate);
112 int mt8188_get_apll_by_name(struct mtk_base_af    112 int mt8188_get_apll_by_name(struct mtk_base_afe *afe, const char *name);
113 int mt8188_afe_init_clock(struct mtk_base_afe     113 int mt8188_afe_init_clock(struct mtk_base_afe *afe);
114 int mt8188_afe_enable_clk(struct mtk_base_afe     114 int mt8188_afe_enable_clk(struct mtk_base_afe *afe, struct clk *clk);
115 void mt8188_afe_disable_clk(struct mtk_base_af    115 void mt8188_afe_disable_clk(struct mtk_base_afe *afe, struct clk *clk);
116 int mt8188_afe_set_clk_rate(struct mtk_base_af    116 int mt8188_afe_set_clk_rate(struct mtk_base_afe *afe, struct clk *clk,
117                             unsigned int rate)    117                             unsigned int rate);
118 int mt8188_afe_set_clk_parent(struct mtk_base_    118 int mt8188_afe_set_clk_parent(struct mtk_base_afe *afe, struct clk *clk,
119                               struct clk *pare    119                               struct clk *parent);
120 int mt8188_apll1_enable(struct mtk_base_afe *a    120 int mt8188_apll1_enable(struct mtk_base_afe *afe);
121 int mt8188_apll1_disable(struct mtk_base_afe *    121 int mt8188_apll1_disable(struct mtk_base_afe *afe);
122 int mt8188_apll2_enable(struct mtk_base_afe *a    122 int mt8188_apll2_enable(struct mtk_base_afe *afe);
123 int mt8188_apll2_disable(struct mtk_base_afe *    123 int mt8188_apll2_disable(struct mtk_base_afe *afe);
124 int mt8188_afe_enable_main_clock(struct mtk_ba    124 int mt8188_afe_enable_main_clock(struct mtk_base_afe *afe);
125 int mt8188_afe_disable_main_clock(struct mtk_b    125 int mt8188_afe_disable_main_clock(struct mtk_base_afe *afe);
126 int mt8188_afe_enable_reg_rw_clk(struct mtk_ba    126 int mt8188_afe_enable_reg_rw_clk(struct mtk_base_afe *afe);
127 int mt8188_afe_disable_reg_rw_clk(struct mtk_b    127 int mt8188_afe_disable_reg_rw_clk(struct mtk_base_afe *afe);
128                                                   128 
129 #endif                                            129 #endif
130                                                   130 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php