blob: 433a0b64c45d42f7bd381e952accfc42de3733f3 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2019 MediaTek Inc.
4 * Author: Yong Wu <yong.wu@mediatek.com>
5 */
6
7#ifndef _DT_BINDINGS_CLK_MT2731_H
8#define _DT_BINDINGS_CLK_MT2731_H
9
10/* APMIXEDSYS */
11
12#define CLK_APMIXED_ARMPLL 0
13#define CLK_APMIXED_MAINPLL 1
14#define CLK_APMIXED_UNIVPLL 2
15#define CLK_APMIXED_MSDCPLL 3
16#define CLK_APMIXED_APLL1 4
17#define CLK_APMIXED_APLL2 5
18#define CLK_APMIXED_MPLL 6
19#define CLK_APMIXED_ETHERPLL 7
20#define CLK_APMIXED_NR_CLK 8
21
22/* TOPCKGEN */
23
24#define CLK_TOP_CLK26M 0
25#define CLK_TOP_SYSPLL 1
26#define CLK_TOP_SYSPLL_D2 2
27#define CLK_TOP_SYSPLL1_D2 3
28#define CLK_TOP_SYSPLL1_D4 4
29#define CLK_TOP_SYSPLL1_D8 5
30#define CLK_TOP_SYSPLL1_D16 6
31#define CLK_TOP_SYSPLL_D3 7
32#define CLK_TOP_SYSPLL2_D2 8
33#define CLK_TOP_SYSPLL2_D4 9
34#define CLK_TOP_SYSPLL2_D8 10
35#define CLK_TOP_SYSPLL_D5 11
36#define CLK_TOP_SYSPLL3_D2 12
37#define CLK_TOP_SYSPLL3_D4 13
38#define CLK_TOP_SYSPLL_D7 14
39#define CLK_TOP_SYSPLL4_D2 15
40#define CLK_TOP_SYSPLL4_D4 16
41#define CLK_TOP_USB20_192M 17
42#define CLK_TOP_USB20_192M_D2 18
43#define CLK_TOP_USB20_192M_D4 19
44#define CLK_TOP_UNIVPLL_D2 20
45#define CLK_TOP_UNIVPLL1_D2 21
46#define CLK_TOP_UNIVPLL1_D4 22
47#define CLK_TOP_UNIVPLL1_D8 23
48#define CLK_TOP_UNIVPLL_D3 24
49#define CLK_TOP_UNIVPLL2_D2 25
50#define CLK_TOP_UNIVPLL2_D4 26
51#define CLK_TOP_UNIVPLL2_D8 27
52#define CLK_TOP_UNIVPLL2_D16 28
53#define CLK_TOP_UNIVPLL_D5 29
54#define CLK_TOP_UNIVPLL3_D2 30
55#define CLK_TOP_UNIVPLL3_D4 31
56#define CLK_TOP_MSDCPLL 32
57#define CLK_TOP_MSDCPLL_D2 33
58#define CLK_TOP_APLL1 34
59#define CLK_TOP_APLL1_D2 35
60#define CLK_TOP_APLL1_D4 36
61#define CLK_TOP_APLL1_D8 37
62#define CLK_TOP_APLL2 38
63#define CLK_TOP_APLL2_D2 39
64#define CLK_TOP_APLL2_D4 40
65#define CLK_TOP_APLL2_D8 41
66#define CLK_TOP_ETHERPLL 42
67#define CLK_TOP_ETHERPLL_D4 43
68#define CLK_TOP_ETHERPLL_D10 44
69#define CLK_TOP_HD_FAXI 45
70#define CLK_TOP_F_FUART 46
71#define CLK_TOP_SPI 47
72#define CLK_TOP_MSDC50_0 48
73#define CLK_TOP_MSDC30_1 49
74#define CLK_TOP_AUDIO 50
75#define CLK_TOP_AUD_1 51
76#define CLK_TOP_AUD_ENGEN1 52
77#define CLK_TOP_AUD_ENGEN2 53
78#define CLK_TOP_HSM_CRYPTO 54
79#define CLK_TOP_I2C 55
80#define CLK_TOP_MSDC50_2_HCLK 56
81#define CLK_TOP_MSDC30_2 57
82#define CLK_TOP_NFI1X_BCLK 58
83#define CLK_TOP_PCIE_MAC 59
84#define CLK_TOP_F_FSSUSB_TOP 60
85#define CLK_TOP_SPISLV 61
86#define CLK_TOP_ETHER_125M 62
87#define CLK_TOP_PWM 63
88#define CLK_TOP_ARMPLL_DIVIDER_PLL1 64
89#define CLK_TOP_ARMPLL_DIVIDER_PLL2 65
90#define CLK_TOP_AXI_SEL 66
91#define CLK_TOP_UART_SEL 67
92#define CLK_TOP_SPI_SEL 68
93#define CLK_TOP_MSDC50_0_HCLK_SEL 69
94#define CLK_TOP_MSDC50_0_SEL 70
95#define CLK_TOP_MSDC30_1_SEL 71
96#define CLK_TOP_AUDIO_SEL 72
97#define CLK_TOP_AUD_INTBUS_SEL 73
98#define CLK_TOP_AUD_1_SEL 74
99#define CLK_TOP_AUD_2_SEL 75
100#define CLK_TOP_AUD_ENGEN1_SEL 76
101#define CLK_TOP_AUD_ENGEN2_SEL 77
102#define CLK_TOP_DXCC_SEL 78
103#define CLK_TOP_HSM_CRYPTO_SEL 79 /* no use */
104#define CLK_TOP_HSM_ARC_SEL 80 /* no use */
105#define CLK_TOP_GCPU_SEL 81
106#define CLK_TOP_ECC_SEL 82
107#define CLK_TOP_USB_TOP_SEL 83
108#define CLK_TOP_SPM_SEL 84
109#define CLK_TOP_I2C_SEL 85
110#define CLK_TOP_PWRAP_ULPOSC_SEL 86
111#define CLK_TOP_MSDC50_2_HCLK_SEL 87
112#define CLK_TOP_MSDC30_2_SEL 88
113#define CLK_TOP_NFI1X_BCLK_SEL 89
114#define CLK_TOP_SPINFI_BCLK_SEL 90
115#define CLK_TOP_PCIE_MAC_SEL 91
116#define CLK_TOP_SSUSB_TOP_SEL 92
117#define CLK_TOP_SPISLV_SEL 93
118#define CLK_TOP_ETHER_125M_SEL 94
119#define CLK_TOP_ETHER_50M_RMII_SEL 95
120#define CLK_TOP_ETHER_62P4M_SEL 96
121#define CLK_TOP_PWM_SEL 97
122#define CLK_TOP_ARMPLL_DIVIDER_PLL1_EN 98
123#define CLK_TOP_ARMPLL_DIVIDER_PLL2_EN 99
124#define CLK_TOP_I2S0_M_SEL 100
125#define CLK_TOP_I2S1_M_SEL 101
126#define CLK_TOP_I2S2_M_SEL 102
127#define CLK_TOP_I2S3_M_SEL 103
128#define CLK_TOP_I2S4_M_SEL 104
129#define CLK_TOP_I2S5_M_SEL 105
130#define CLK_TOP_APLL12_DIV0 106
131#define CLK_TOP_APLL12_DIV1 107
132#define CLK_TOP_APLL12_DIV2 108
133#define CLK_TOP_APLL12_DIV3 109
134#define CLK_TOP_APLL12_DIV4 110
135#define CLK_TOP_APLL12_DIVB 111
136#define CLK_TOP_APLL12_DIV5 112
137#define CLK_TOP_NR_CLK 113
138
139/* INFRACFG */
140
141#define CLK_IFR_APXGPT 0
142#define CLK_IFR_ICUSB 1
143#define CLK_IFR_GCE 2
144#define CLK_IFR_THERM 3
145#define CLK_IFR_I2C_AP 4
146#define CLK_IFR_I2C_CCU 5
147#define CLK_IFR_I2C_SSPM 6
148#define CLK_IFR_I2C_RSV 7
149#define CLK_IFR_PWM_HCLK 8
150#define CLK_IFR_PWM1 9
151#define CLK_IFR_PWM2 10
152#define CLK_IFR_PWM3 11
153#define CLK_IFR_PWM4 12
154#define CLK_IFR_PWM5 13
155#define CLK_IFR_PWM 14
156#define CLK_IFR_UART0 15
157#define CLK_IFR_UART1 16
158#define CLK_IFR_UART2 17
159#define CLK_IFR_UART3 18
160#define CLK_IFR_GCE_26M 19
161#define CLK_IFR_CQ_DMA_FPC 20 /* defeature */
162#define CLK_IFR_SPI0 21
163#define CLK_IFR_MSDC0 22
164#define CLK_IFR_MSDC1 23
165#define CLK_IFR_MSDC2 24
166#define CLK_IFR_TRNG 25
167#define CLK_IFR_CCIF1_AP 26
168#define CLK_IFR_CCIF1_MD 27
169#define CLK_IFR_PCIE 28
170#define CLK_IFR_NFI 29
171#define CLK_IFR_AP_DMA 30
172#define CLK_IFR_DEVICE_APC 31
173#define CLK_IFR_CCIF_AP 32
174/* #define CLK_IFR_DEBUGSYS 33 */
175#define CLK_IFR_CCIF_MD 34
176#define CLK_IFR_HSM 35 /* no use */
177#define CLK_IFR_HSM_AO 36 /* no use */
178#define CLK_IFR_ETHER 37
179#define CLK_IFR_SPI_SLAVE 38
180#define CLK_IFR_RG_PWM_FBCLK6 39
181#define CLK_IFR_SSUSB 40
182#define CLK_IFR_CLDMA_BCLK 41
183#define CLK_IFR_AUDIO_26M_BCLK 42
184#define CLK_IFR_SPI1 43
185#define CLK_IFR_SPI2 44
186#define CLK_IFR_SPI3 45 /* defeature */
187#define CLK_IFR_SPI4 46 /* defeature */
188#define CLK_IFR_SPI5 47 /* defeature */
189#define CLK_IFR_CQ_DMA 48
190#define CLK_IFR_I2C6 49 /* defeature */
191#define CLK_IFR_MSDC0_SRC 50
192#define CLK_IFR_MSDC1_SRC 51
193#define CLK_IFR_MSDC2_SRC 52
194#define CLK_IFR_MCU_PM_BCLK 53
195#define CLK_IFR_CCIF2_AP 54
196#define CLK_IFR_CCIF2_MD 55
197#define CLK_IFR_UART4 56
198#define CLK_IFR_UART5 57
199#define CLK_IFR_UART6 58
200#define CLK_IFR_NR_CLK 59
201
202/* AUDIO */
203
204#define CLK_AUDIO_AFE 0
205#define CLK_AUDIO_22M 1
206#define CLK_AUDIO_24M 2
207#define CLK_AUDIO_APLL2_TUNER 3
208#define CLK_AUDIO_APLL_TUNER 4
209#define CLK_AUDIO_ADC 5
210#define CLK_AUDIO_DAC 6
211#define CLK_AUDIO_DAC_PREDIS 7
212#define CLK_AUDIO_TML 8
213#define CLK_AUDIO_NLE 9
214#define CLK_AUDIO_I2S0_BCLK 10
215#define CLK_AUDIO_I2S1_BCLK 11
216#define CLK_AUDIO_I2S2_BCLK 12
217#define CLK_AUDIO_I2S4_BCLK 13
218#define CLK_AUDIO_I2S5_BCLK 14
219#define CLK_AUDIO_I2S6_BCLK 15
220#define CLK_AUDIO_NR_CLK 16
221
222#endif /* _DT_BINDINGS_CLK_MT2731_H */
223