blob: f07acc8cd61d5dd68737551c6174af4bdc91612c [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001/*
2 * Copyright (c) 2018 MediaTek Inc.
3 * Author: Weiyi Lu <weiyi.lu@mediatek.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef _DT_BINDINGS_CLK_MT8183_H
16#define _DT_BINDINGS_CLK_MT8183_H
17
18/* APMIXED */
19#define CLK_APMIXED_ARMPLL_LL 0
20#define CLK_APMIXED_ARMPLL_L 1
21#define CLK_APMIXED_CCIPLL 2
22#define CLK_APMIXED_MAINPLL 3
23#define CLK_APMIXED_UNIV2PLL 4
24#define CLK_APMIXED_MSDCPLL 5
25#define CLK_APMIXED_MMPLL 6
26#define CLK_APMIXED_MFGPLL 7
27#define CLK_APMIXED_TVDPLL 8
28#define CLK_APMIXED_APLL1 9
29#define CLK_APMIXED_APLL2 10
30#define CLK_APMIXED_SSUSB_26M 11
31#define CLK_APMIXED_APPLL_26M 12
32#define CLK_APMIXED_MIPIC0_26M 13
33#define CLK_APMIXED_MDPLLGP_26M 14
34#define CLK_APMIXED_MMSYS_26M 15
35#define CLK_APMIXED_UFS_26M 16
36#define CLK_APMIXED_MIPIC1_26M 17
37#define CLK_APMIXED_MEMPLL_26M 18
38#define CLK_APMIXED_CLKSQ_LVPLL_26M 19
39#define CLK_APMIXED_MIPID0_26M 20
40#define CLK_APMIXED_MIPID1_26M 21
41#define CLK_APMIXED_NR_CLK 22
42
43/* TOPCKGEN */
44#define CLK_TOP_MUX_AXI 0
45#define CLK_TOP_MUX_MM 1
46#define CLK_TOP_MUX_CAM 2
47#define CLK_TOP_MUX_MFG 3
48#define CLK_TOP_MUX_CAMTG 4
49#define CLK_TOP_MUX_UART 5
50#define CLK_TOP_MUX_SPI 6
51#define CLK_TOP_MUX_MSDC50_0_HCLK 7
52#define CLK_TOP_MUX_MSDC50_0 8
53#define CLK_TOP_MUX_MSDC30_1 9
54#define CLK_TOP_MUX_MSDC30_2 10
55#define CLK_TOP_MUX_AUDIO 11
56#define CLK_TOP_MUX_AUD_INTBUS 12
57#define CLK_TOP_MUX_FPWRAP_ULPOSC 13
58#define CLK_TOP_MUX_SCP 14
59#define CLK_TOP_MUX_ATB 15
60#define CLK_TOP_MUX_SSPM 16
61#define CLK_TOP_MUX_DPI0 17
62#define CLK_TOP_MUX_SCAM 18
63#define CLK_TOP_MUX_AUD_1 19
64#define CLK_TOP_MUX_AUD_2 20
65#define CLK_TOP_MUX_DISP_PWM 21
66#define CLK_TOP_MUX_SSUSB_TOP_XHCI 22
67#define CLK_TOP_MUX_USB_TOP 23
68#define CLK_TOP_MUX_SPM 24
69#define CLK_TOP_MUX_I2C 25
70#define CLK_TOP_MUX_F52M_MFG 26
71#define CLK_TOP_MUX_SENINF 27
72#define CLK_TOP_MUX_DXCC 28
73#define CLK_TOP_MUX_CAMTG2 29
74#define CLK_TOP_MUX_AUD_ENG1 30
75#define CLK_TOP_MUX_AUD_ENG2 31
76#define CLK_TOP_MUX_FAES_UFSFDE 32
77#define CLK_TOP_MUX_FUFS 33
78#define CLK_TOP_MUX_IMG 34
79#define CLK_TOP_MUX_DSP 35
80#define CLK_TOP_MUX_DSP1 36
81#define CLK_TOP_MUX_DSP2 37
82#define CLK_TOP_MUX_IPU_IF 38
83#define CLK_TOP_MUX_CAMTG3 39
84#define CLK_TOP_MUX_CAMTG4 40
85#define CLK_TOP_MUX_PMICSPI 41
86#define CLK_TOP_SYSPLL_CK 42
87#define CLK_TOP_SYSPLL_D2 43
88#define CLK_TOP_SYSPLL_D3 44
89#define CLK_TOP_SYSPLL_D5 45
90#define CLK_TOP_SYSPLL_D7 46
91#define CLK_TOP_SYSPLL_D2_D2 47
92#define CLK_TOP_SYSPLL_D2_D4 48
93#define CLK_TOP_SYSPLL_D2_D8 49
94#define CLK_TOP_SYSPLL_D2_D16 50
95#define CLK_TOP_SYSPLL_D3_D2 51
96#define CLK_TOP_SYSPLL_D3_D4 52
97#define CLK_TOP_SYSPLL_D3_D8 53
98#define CLK_TOP_SYSPLL_D5_D2 54
99#define CLK_TOP_SYSPLL_D5_D4 55
100#define CLK_TOP_SYSPLL_D7_D2 56
101#define CLK_TOP_SYSPLL_D7_D4 57
102#define CLK_TOP_UNIVPLL_CK 58
103#define CLK_TOP_UNIVPLL_D2 59
104#define CLK_TOP_UNIVPLL_D3 60
105#define CLK_TOP_UNIVPLL_D5 61
106#define CLK_TOP_UNIVPLL_D7 62
107#define CLK_TOP_UNIVPLL_D2_D2 63
108#define CLK_TOP_UNIVPLL_D2_D4 64
109#define CLK_TOP_UNIVPLL_D2_D8 65
110#define CLK_TOP_UNIVPLL_D3_D2 66
111#define CLK_TOP_UNIVPLL_D3_D4 67
112#define CLK_TOP_UNIVPLL_D3_D8 68
113#define CLK_TOP_UNIVPLL_D5_D2 69
114#define CLK_TOP_UNIVPLL_D5_D4 70
115#define CLK_TOP_UNIVPLL_D5_D8 71
116#define CLK_TOP_APLL1_CK 72
117#define CLK_TOP_APLL1_D2 73
118#define CLK_TOP_APLL1_D4 74
119#define CLK_TOP_APLL1_D8 75
120#define CLK_TOP_APLL2_CK 76
121#define CLK_TOP_APLL2_D2 77
122#define CLK_TOP_APLL2_D4 78
123#define CLK_TOP_APLL2_D8 79
124#define CLK_TOP_TVDPLL_CK 80
125#define CLK_TOP_TVDPLL_D2 81
126#define CLK_TOP_TVDPLL_D4 82
127#define CLK_TOP_TVDPLL_D8 83
128#define CLK_TOP_TVDPLL_D16 84
129#define CLK_TOP_MSDCPLL_CK 85
130#define CLK_TOP_MSDCPLL_D2 86
131#define CLK_TOP_MSDCPLL_D4 87
132#define CLK_TOP_MSDCPLL_D8 88
133#define CLK_TOP_MSDCPLL_D16 89
134#define CLK_TOP_AD_OSC_CK 90
135#define CLK_TOP_OSC_D2 91
136#define CLK_TOP_OSC_D4 92
137#define CLK_TOP_OSC_D8 93
138#define CLK_TOP_OSC_D16 94
139#define CLK_TOP_F26M_CK_D2 95
140#define CLK_TOP_MFGPLL_CK 96
141#define CLK_TOP_UNIVP_192M_CK 97
142#define CLK_TOP_UNIVP_192M_D2 98
143#define CLK_TOP_UNIVP_192M_D4 99
144#define CLK_TOP_UNIVP_192M_D8 100
145#define CLK_TOP_UNIVP_192M_D16 101
146#define CLK_TOP_UNIVP_192M_D32 102
147#define CLK_TOP_MMPLL_CK 103
148#define CLK_TOP_MMPLL_D4 104
149#define CLK_TOP_MMPLL_D4_D2 105
150#define CLK_TOP_MMPLL_D4_D4 106
151#define CLK_TOP_MMPLL_D5 107
152#define CLK_TOP_MMPLL_D5_D2 108
153#define CLK_TOP_MMPLL_D5_D4 109
154#define CLK_TOP_MMPLL_D6 110
155#define CLK_TOP_MMPLL_D7 111
156#define CLK_TOP_CLK26M 112
157#define CLK_TOP_CLK13M 113
158#define CLK_TOP_ULPOSC 114
159#define CLK_TOP_UNIVP_192M 115
160#define CLK_TOP_MUX_APLL_I2S0 116
161#define CLK_TOP_MUX_APLL_I2S1 117
162#define CLK_TOP_MUX_APLL_I2S2 118
163#define CLK_TOP_MUX_APLL_I2S3 119
164#define CLK_TOP_MUX_APLL_I2S4 120
165#define CLK_TOP_MUX_APLL_I2S5 121
166#define CLK_TOP_APLL12_DIV0 122
167#define CLK_TOP_APLL12_DIV1 123
168#define CLK_TOP_APLL12_DIV2 124
169#define CLK_TOP_APLL12_DIV3 125
170#define CLK_TOP_APLL12_DIV4 126
171#define CLK_TOP_APLL12_DIVB 127
172#define CLK_TOP_UNIVPLL 128
173#define CLK_TOP_ARMPLL_DIV_PLL1 129
174#define CLK_TOP_ARMPLL_DIV_PLL2 130
175#define CLK_TOP_NR_CLK 131
176
177/* CAMSYS */
178#define CLK_CAM_LARB6 0
179#define CLK_CAM_DFP_VAD 1
180#define CLK_CAM_CAM 2
181#define CLK_CAM_CAMTG 3
182#define CLK_CAM_SENINF 4
183#define CLK_CAM_CAMSV0 5
184#define CLK_CAM_CAMSV1 6
185#define CLK_CAM_CAMSV2 7
186#define CLK_CAM_CCU 8
187#define CLK_CAM_LARB3 9
188#define CLK_CAM_NR_CLK 10
189
190/* INFRACFG_AO */
191#define CLK_INFRA_PMIC_TMR 0
192#define CLK_INFRA_PMIC_AP 1
193#define CLK_INFRA_PMIC_MD 2
194#define CLK_INFRA_PMIC_CONN 3
195#define CLK_INFRA_SCPSYS 4
196#define CLK_INFRA_SEJ 5
197#define CLK_INFRA_APXGPT 6
198#define CLK_INFRA_ICUSB 7
199#define CLK_INFRA_GCE 8
200#define CLK_INFRA_THERM 9
201#define CLK_INFRA_I2C0 10
202#define CLK_INFRA_I2C1 11
203#define CLK_INFRA_I2C2 12
204#define CLK_INFRA_I2C3 13
205#define CLK_INFRA_PWM_HCLK 14
206#define CLK_INFRA_PWM1 15
207#define CLK_INFRA_PWM2 16
208#define CLK_INFRA_PWM3 17
209#define CLK_INFRA_PWM4 18
210#define CLK_INFRA_PWM 19
211#define CLK_INFRA_UART0 20
212#define CLK_INFRA_UART1 21
213#define CLK_INFRA_UART2 22
214#define CLK_INFRA_UART3 23
215#define CLK_INFRA_GCE_26M 24
216#define CLK_INFRA_CQ_DMA_FPC 25
217#define CLK_INFRA_BTIF 26
218#define CLK_INFRA_SPI0 27
219#define CLK_INFRA_MSDC0 28
220#define CLK_INFRA_MSDC1 29
221#define CLK_INFRA_MSDC2 30
222#define CLK_INFRA_MSDC0_SCK 31
223#define CLK_INFRA_DVFSRC 32
224#define CLK_INFRA_GCPU 33
225#define CLK_INFRA_TRNG 34
226#define CLK_INFRA_AUXADC 35
227#define CLK_INFRA_CPUM 36
228#define CLK_INFRA_CCIF1_AP 37
229#define CLK_INFRA_CCIF1_MD 38
230#define CLK_INFRA_AUXADC_MD 39
231#define CLK_INFRA_MSDC1_SCK 40
232#define CLK_INFRA_MSDC2_SCK 41
233#define CLK_INFRA_AP_DMA 42
234#define CLK_INFRA_XIU 43
235#define CLK_INFRA_DEVICE_APC 44
236#define CLK_INFRA_CCIF_AP 45
237#define CLK_INFRA_DEBUGSYS 46
238#define CLK_INFRA_AUDIO 47
239#define CLK_INFRA_CCIF_MD 48
240#define CLK_INFRA_DXCC_SEC_CORE 49
241#define CLK_INFRA_DXCC_AO 50
242#define CLK_INFRA_DRAMC_F26M 51
243#define CLK_INFRA_IRTX 52
244#define CLK_INFRA_DISP_PWM 53
245#define CLK_INFRA_CLDMA_BCLK 54
246#define CLK_INFRA_AUDIO_26M_BCLK 55
247#define CLK_INFRA_SPI1 56
248#define CLK_INFRA_I2C4 57
249#define CLK_INFRA_MODEM_TEMP_SHARE 58
250#define CLK_INFRA_SPI2 59
251#define CLK_INFRA_SPI3 60
252#define CLK_INFRA_UNIPRO_SCK 61
253#define CLK_INFRA_UNIPRO_TICK 62
254#define CLK_INFRA_UFS_MP_SAP_BCLK 63
255#define CLK_INFRA_MD32_BCLK 64
256#define CLK_INFRA_SSPM 65
257#define CLK_INFRA_UNIPRO_MBIST 66
258#define CLK_INFRA_SSPM_BUS_HCLK 67
259#define CLK_INFRA_I2C5 68
260#define CLK_INFRA_I2C5_ARBITER 69
261#define CLK_INFRA_I2C5_IMM 70
262#define CLK_INFRA_I2C1_ARBITER 71
263#define CLK_INFRA_I2C1_IMM 72
264#define CLK_INFRA_I2C2_ARBITER 73
265#define CLK_INFRA_I2C2_IMM 74
266#define CLK_INFRA_SPI4 75
267#define CLK_INFRA_SPI5 76
268#define CLK_INFRA_CQ_DMA 77
269#define CLK_INFRA_UFS 78
270#define CLK_INFRA_AES_UFSFDE 79
271#define CLK_INFRA_UFS_TICK 80
272#define CLK_INFRA_MSDC0_SELF 81
273#define CLK_INFRA_MSDC1_SELF 82
274#define CLK_INFRA_MSDC2_SELF 83
275#define CLK_INFRA_SSPM_26M_SELF 84
276#define CLK_INFRA_SSPM_32K_SELF 85
277#define CLK_INFRA_UFS_AXI 86
278#define CLK_INFRA_I2C6 87
279#define CLK_INFRA_AP_MSDC0 88
280#define CLK_INFRA_MD_MSDC0 89
281#define CLK_INFRA_USB 90
282#define CLK_INFRA_DEVMPU_BCLK 91
283#define CLK_INFRA_CCIF2_AP 92
284#define CLK_INFRA_CCIF2_MD 93
285#define CLK_INFRA_CCIF3_AP 94
286#define CLK_INFRA_CCIF3_MD 95
287#define CLK_INFRA_SEJ_F13M 96
288#define CLK_INFRA_AES_BCLK 97
289#define CLK_INFRA_I2C7 98
290#define CLK_INFRA_I2C8 99
291#define CLK_INFRA_FBIST2FPC 100
292#define CLK_INFRA_NR_CLK 101
293
294/* MFGCFG */
295#define CLK_MFG_BG3D 0
296#define CLK_MFG_NR_CLK 1
297
298/* IMG */
299#define CLK_IMG_OWE 0
300#define CLK_IMG_WPE_B 1
301#define CLK_IMG_WPE_A 2
302#define CLK_IMG_MFB 3
303#define CLK_IMG_RSC 4
304#define CLK_IMG_DPE 5
305#define CLK_IMG_FDVT 6
306#define CLK_IMG_DIP 7
307#define CLK_IMG_LARB2 8
308#define CLK_IMG_LARB5 9
309#define CLK_IMG_NR_CLK 10
310
311/* MMSYS_CONFIG */
312#define CLK_MM_SMI_COMMON 0
313#define CLK_MM_SMI_LARB0 1
314#define CLK_MM_SMI_LARB1 2
315#define CLK_MM_GALS_COMM0 3
316#define CLK_MM_GALS_COMM1 4
317#define CLK_MM_GALS_CCU2MM 5
318#define CLK_MM_GALS_IPU12MM 6
319#define CLK_MM_GALS_IMG2MM 7
320#define CLK_MM_GALS_CAM2MM 8
321#define CLK_MM_GALS_IPU2MM 9
322#define CLK_MM_MDP_DL_TXCK 10
323#define CLK_MM_IPU_DL_TXCK 11
324#define CLK_MM_MDP_RDMA0 12
325#define CLK_MM_MDP_RDMA1 13
326#define CLK_MM_MDP_RSZ0 14
327#define CLK_MM_MDP_RSZ1 15
328#define CLK_MM_MDP_TDSHP 16
329#define CLK_MM_MDP_WROT0 17
330#define CLK_MM_FAKE_ENG 18
331#define CLK_MM_DISP_OVL0 19
332#define CLK_MM_DISP_OVL0_2L 20
333#define CLK_MM_DISP_OVL1_2L 21
334#define CLK_MM_DISP_RDMA0 22
335#define CLK_MM_DISP_RDMA1 23
336#define CLK_MM_DISP_WDMA0 24
337#define CLK_MM_DISP_COLOR0 25
338#define CLK_MM_DISP_CCORR0 26
339#define CLK_MM_DISP_AAL0 27
340#define CLK_MM_DISP_GAMMA0 28
341#define CLK_MM_DISP_DITHER0 29
342#define CLK_MM_DISP_SPLIT 30
343#define CLK_MM_DSI0_MM 31
344#define CLK_MM_DSI0_IF 32
345#define CLK_MM_DPI_MM 33
346#define CLK_MM_DPI_IF 34
347#define CLK_MM_FAKE_ENG2 35
348#define CLK_MM_MDP_DL_RX 36
349#define CLK_MM_IPU_DL_RX 37
350#define CLK_MM_26M 38
351#define CLK_MM_MMSYS_R2Y 39
352#define CLK_MM_DISP_RSZ 40
353#define CLK_MM_MDP_WDMA0 41
354#define CLK_MM_MDP_AAL 42
355#define CLK_MM_MDP_CCORR 43
356#define CLK_MM_DBI_MM 44
357#define CLK_MM_DBI_IF 45
358#define CLK_MM_NR_CLK 46
359
360/* VDEC_GCON */
361#define CLK_VDEC_VDEC 0
362#define CLK_VDEC_LARB1 1
363#define CLK_VDEC_NR_CLK 2
364
365/* VENC_GCON */
366#define CLK_VENC_LARB 0
367#define CLK_VENC_VENC 1
368#define CLK_VENC_JPGENC 2
369#define CLK_VENC_NR_CLK 3
370
371/* AUDIO */
372#define CLK_AUDIO_TML 0
373#define CLK_AUDIO_DAC_PREDIS 1
374#define CLK_AUDIO_DAC 2
375#define CLK_AUDIO_ADC 3
376#define CLK_AUDIO_APLL_TUNER 4
377#define CLK_AUDIO_APLL2_TUNER 5
378#define CLK_AUDIO_24M 6
379#define CLK_AUDIO_22M 7
380#define CLK_AUDIO_AFE 8
381#define CLK_AUDIO_I2S4 9
382#define CLK_AUDIO_I2S3 10
383#define CLK_AUDIO_I2S2 11
384#define CLK_AUDIO_I2S1 12
385#define CLK_AUDIO_PDN_ADDA6_ADC 13
386#define CLK_AUDIO_TDM 14
387#define CLK_AUDIO_NR_CLK 15
388
389/* IPU_CONN */
390#define CLK_IPU_CONN_IPU 0
391#define CLK_IPU_CONN_AHB 1
392#define CLK_IPU_CONN_AXI 2
393#define CLK_IPU_CONN_ISP 3
394#define CLK_IPU_CONN_CAM_ADL 4
395#define CLK_IPU_CONN_IMG_ADL 5
396#define CLK_IPU_CONN_DAP_RX 6
397#define CLK_IPU_CONN_APB2AXI 7
398#define CLK_IPU_CONN_APB2AHB 8
399#define CLK_IPU_CONN_IPU_CAB1TO2 9
400#define CLK_IPU_CONN_IPU1_CAB1TO2 10
401#define CLK_IPU_CONN_IPU2_CAB1TO2 11
402#define CLK_IPU_CONN_CAB3TO3 12
403#define CLK_IPU_CONN_CAB2TO1 13
404#define CLK_IPU_CONN_CAB3TO1_SLICE 14
405#define CLK_IPU_CONN_NR_CLK 15
406
407/* IPU_ADL */
408#define CLK_IPU_ADL_CABGEN 0
409#define CLK_IPU_ADL_NR_CLK 1
410
411/* IPU_CORE0 */
412#define CLK_IPU_CORE0_JTAG 0
413#define CLK_IPU_CORE0_AXI 1
414#define CLK_IPU_CORE0_IPU 2
415#define CLK_IPU_CORE0_NR_CLK 3
416
417/* IPU_CORE1 */
418#define CLK_IPU_CORE1_JTAG 0
419#define CLK_IPU_CORE1_AXI 1
420#define CLK_IPU_CORE1_IPU 2
421#define CLK_IPU_CORE1_NR_CLK 3
422
423/* MCUCFG */
424#define CLK_MCU_MP0_SEL 0
425#define CLK_MCU_MP2_SEL 1
426#define CLK_MCU_BUS_SEL 2
427#define CLK_MCU_NR_CLK 3
428
429#endif /* _DT_BINDINGS_CLK_MT8183_H */