xref: /linux/include/dt-bindings/clock/hi6220-clock.h (revision b0459491ca2dcda4223b3f3c80a635ae12218580)
12a40a2eaSBintian Wang /*
22a40a2eaSBintian Wang  * Copyright (c) 2015 Hisilicon Limited.
32a40a2eaSBintian Wang  *
42a40a2eaSBintian Wang  * Author: Bintian Wang <bintian.wang@huawei.com>
52a40a2eaSBintian Wang  *
62a40a2eaSBintian Wang  * This program is free software; you can redistribute it and/or modify
72a40a2eaSBintian Wang  * it under the terms of the GNU General Public License version 2 as
82a40a2eaSBintian Wang  * published by the Free Software Foundation.
92a40a2eaSBintian Wang  */
102a40a2eaSBintian Wang 
112a40a2eaSBintian Wang #ifndef __DT_BINDINGS_CLOCK_HI6220_H
122a40a2eaSBintian Wang #define __DT_BINDINGS_CLOCK_HI6220_H
132a40a2eaSBintian Wang 
142a40a2eaSBintian Wang /* clk in Hi6220 AO (always on) controller */
152a40a2eaSBintian Wang #define HI6220_NONE_CLOCK	0
162a40a2eaSBintian Wang 
172a40a2eaSBintian Wang /* fixed rate clocks */
182a40a2eaSBintian Wang #define HI6220_REF32K		1
192a40a2eaSBintian Wang #define HI6220_CLK_TCXO		2
202a40a2eaSBintian Wang #define HI6220_MMC1_PAD		3
212a40a2eaSBintian Wang #define HI6220_MMC2_PAD		4
222a40a2eaSBintian Wang #define HI6220_MMC0_PAD		5
232a40a2eaSBintian Wang #define HI6220_PLL_BBP		6
242a40a2eaSBintian Wang #define HI6220_PLL_GPU		7
252a40a2eaSBintian Wang #define HI6220_PLL1_DDR		8
262a40a2eaSBintian Wang #define HI6220_PLL_SYS		9
272a40a2eaSBintian Wang #define HI6220_PLL_SYS_MEDIA	10
282a40a2eaSBintian Wang #define HI6220_DDR_SRC		11
292a40a2eaSBintian Wang #define HI6220_PLL_MEDIA	12
302a40a2eaSBintian Wang #define HI6220_PLL_DDR		13
312a40a2eaSBintian Wang 
322a40a2eaSBintian Wang /* fixed factor clocks */
332a40a2eaSBintian Wang #define HI6220_300M		14
342a40a2eaSBintian Wang #define HI6220_150M		15
352a40a2eaSBintian Wang #define HI6220_PICOPHY_SRC	16
362a40a2eaSBintian Wang #define HI6220_MMC0_SRC_SEL	17
372a40a2eaSBintian Wang #define HI6220_MMC1_SRC_SEL	18
382a40a2eaSBintian Wang #define HI6220_MMC2_SRC_SEL	19
392a40a2eaSBintian Wang #define HI6220_VPU_CODEC	20
402a40a2eaSBintian Wang #define HI6220_MMC0_SMP		21
412a40a2eaSBintian Wang #define HI6220_MMC1_SMP		22
422a40a2eaSBintian Wang #define HI6220_MMC2_SMP		23
432a40a2eaSBintian Wang 
442a40a2eaSBintian Wang /* gate clocks */
452a40a2eaSBintian Wang #define HI6220_WDT0_PCLK	24
462a40a2eaSBintian Wang #define HI6220_WDT1_PCLK	25
472a40a2eaSBintian Wang #define HI6220_WDT2_PCLK	26
482a40a2eaSBintian Wang #define HI6220_TIMER0_PCLK	27
492a40a2eaSBintian Wang #define HI6220_TIMER1_PCLK	28
502a40a2eaSBintian Wang #define HI6220_TIMER2_PCLK	29
512a40a2eaSBintian Wang #define HI6220_TIMER3_PCLK	30
522a40a2eaSBintian Wang #define HI6220_TIMER4_PCLK	31
532a40a2eaSBintian Wang #define HI6220_TIMER5_PCLK	32
542a40a2eaSBintian Wang #define HI6220_TIMER6_PCLK	33
552a40a2eaSBintian Wang #define HI6220_TIMER7_PCLK	34
562a40a2eaSBintian Wang #define HI6220_TIMER8_PCLK	35
572a40a2eaSBintian Wang #define HI6220_UART0_PCLK	36
586fb924dcSZhangfei Gao #define HI6220_RTC0_PCLK	37
596fb924dcSZhangfei Gao #define HI6220_RTC1_PCLK	38
606fb924dcSZhangfei Gao #define HI6220_AO_NR_CLKS	39
612a40a2eaSBintian Wang 
622a40a2eaSBintian Wang /* clk in Hi6220 systrl */
632a40a2eaSBintian Wang /* gate clock */
642a40a2eaSBintian Wang #define HI6220_MMC0_CLK		1
652a40a2eaSBintian Wang #define HI6220_MMC0_CIUCLK	2
662a40a2eaSBintian Wang #define HI6220_MMC1_CLK		3
672a40a2eaSBintian Wang #define HI6220_MMC1_CIUCLK	4
682a40a2eaSBintian Wang #define HI6220_MMC2_CLK		5
692a40a2eaSBintian Wang #define HI6220_MMC2_CIUCLK	6
702a40a2eaSBintian Wang #define HI6220_USBOTG_HCLK	7
712a40a2eaSBintian Wang #define HI6220_CLK_PICOPHY	8
722a40a2eaSBintian Wang #define HI6220_HIFI		9
732a40a2eaSBintian Wang #define HI6220_DACODEC_PCLK	10
742a40a2eaSBintian Wang #define HI6220_EDMAC_ACLK	11
752a40a2eaSBintian Wang #define HI6220_CS_ATB		12
762a40a2eaSBintian Wang #define HI6220_I2C0_CLK		13
772a40a2eaSBintian Wang #define HI6220_I2C1_CLK		14
782a40a2eaSBintian Wang #define HI6220_I2C2_CLK		15
792a40a2eaSBintian Wang #define HI6220_I2C3_CLK		16
802a40a2eaSBintian Wang #define HI6220_UART1_PCLK	17
812a40a2eaSBintian Wang #define HI6220_UART2_PCLK	18
822a40a2eaSBintian Wang #define HI6220_UART3_PCLK	19
832a40a2eaSBintian Wang #define HI6220_UART4_PCLK	20
842a40a2eaSBintian Wang #define HI6220_SPI_CLK		21
852a40a2eaSBintian Wang #define HI6220_TSENSOR_CLK	22
862a40a2eaSBintian Wang #define HI6220_MMU_CLK		23
872a40a2eaSBintian Wang #define HI6220_HIFI_SEL		24
882a40a2eaSBintian Wang #define HI6220_MMC0_SYSPLL	25
892a40a2eaSBintian Wang #define HI6220_MMC1_SYSPLL	26
902a40a2eaSBintian Wang #define HI6220_MMC2_SYSPLL	27
912a40a2eaSBintian Wang #define HI6220_MMC0_SEL		28
922a40a2eaSBintian Wang #define HI6220_MMC1_SEL		29
932a40a2eaSBintian Wang #define HI6220_BBPPLL_SEL	30
942a40a2eaSBintian Wang #define HI6220_MEDIA_PLL_SRC	31
952a40a2eaSBintian Wang #define HI6220_MMC2_SEL		32
962a40a2eaSBintian Wang #define HI6220_CS_ATB_SYSPLL	33
972a40a2eaSBintian Wang 
982a40a2eaSBintian Wang /* mux clocks */
992a40a2eaSBintian Wang #define HI6220_MMC0_SRC		34
1002a40a2eaSBintian Wang #define HI6220_MMC0_SMP_IN	35
1012a40a2eaSBintian Wang #define HI6220_MMC1_SRC		36
1022a40a2eaSBintian Wang #define HI6220_MMC1_SMP_IN	37
1032a40a2eaSBintian Wang #define HI6220_MMC2_SRC		38
1042a40a2eaSBintian Wang #define HI6220_MMC2_SMP_IN	39
1052a40a2eaSBintian Wang #define HI6220_HIFI_SRC		40
1062a40a2eaSBintian Wang #define HI6220_UART1_SRC	41
1072a40a2eaSBintian Wang #define HI6220_UART2_SRC	42
1082a40a2eaSBintian Wang #define HI6220_UART3_SRC	43
1092a40a2eaSBintian Wang #define HI6220_UART4_SRC	44
1102a40a2eaSBintian Wang #define HI6220_MMC0_MUX0	45
1112a40a2eaSBintian Wang #define HI6220_MMC1_MUX0	46
1122a40a2eaSBintian Wang #define HI6220_MMC2_MUX0	47
1132a40a2eaSBintian Wang #define HI6220_MMC0_MUX1	48
1142a40a2eaSBintian Wang #define HI6220_MMC1_MUX1	49
1152a40a2eaSBintian Wang #define HI6220_MMC2_MUX1	50
1162a40a2eaSBintian Wang 
1172a40a2eaSBintian Wang /* divider clocks */
1182a40a2eaSBintian Wang #define HI6220_CLK_BUS		51
1192a40a2eaSBintian Wang #define HI6220_MMC0_DIV		52
1202a40a2eaSBintian Wang #define HI6220_MMC1_DIV		53
1212a40a2eaSBintian Wang #define HI6220_MMC2_DIV		54
1222a40a2eaSBintian Wang #define HI6220_HIFI_DIV		55
1232a40a2eaSBintian Wang #define HI6220_BBPPLL0_DIV	56
1242a40a2eaSBintian Wang #define HI6220_CS_DAPB		57
1252a40a2eaSBintian Wang #define HI6220_CS_ATB_DIV	58
1262a40a2eaSBintian Wang 
127*b0459491SLeo Yan /* gate clock */
128*b0459491SLeo Yan #define HI6220_DAPB_CLK		59
129*b0459491SLeo Yan 
130*b0459491SLeo Yan #define HI6220_SYS_NR_CLKS	60
1312a40a2eaSBintian Wang 
1322a40a2eaSBintian Wang /* clk in Hi6220 media controller */
1332a40a2eaSBintian Wang /* gate clocks */
1342a40a2eaSBintian Wang #define HI6220_DSI_PCLK		1
1352a40a2eaSBintian Wang #define HI6220_G3D_PCLK		2
1362a40a2eaSBintian Wang #define HI6220_ACLK_CODEC_VPU	3
1372a40a2eaSBintian Wang #define HI6220_ISP_SCLK		4
1382a40a2eaSBintian Wang #define HI6220_ADE_CORE		5
1392a40a2eaSBintian Wang #define HI6220_MED_MMU		6
1402a40a2eaSBintian Wang #define HI6220_CFG_CSI4PHY	7
1412a40a2eaSBintian Wang #define HI6220_CFG_CSI2PHY	8
1422a40a2eaSBintian Wang #define HI6220_ISP_SCLK_GATE	9
1432a40a2eaSBintian Wang #define HI6220_ISP_SCLK_GATE1	10
1442a40a2eaSBintian Wang #define HI6220_ADE_CORE_GATE	11
1452a40a2eaSBintian Wang #define HI6220_CODEC_VPU_GATE	12
1462a40a2eaSBintian Wang #define HI6220_MED_SYSPLL	13
1472a40a2eaSBintian Wang 
1482a40a2eaSBintian Wang /* mux clocks */
1492a40a2eaSBintian Wang #define HI6220_1440_1200	14
1502a40a2eaSBintian Wang #define HI6220_1000_1200	15
1512a40a2eaSBintian Wang #define HI6220_1000_1440	16
1522a40a2eaSBintian Wang 
1532a40a2eaSBintian Wang /* divider clocks */
1542a40a2eaSBintian Wang #define HI6220_CODEC_JPEG	17
1552a40a2eaSBintian Wang #define HI6220_ISP_SCLK_SRC	18
1562a40a2eaSBintian Wang #define HI6220_ISP_SCLK1	19
1572a40a2eaSBintian Wang #define HI6220_ADE_CORE_SRC	20
1582a40a2eaSBintian Wang #define HI6220_ADE_PIX_SRC	21
1592a40a2eaSBintian Wang #define HI6220_G3D_CLK		22
1602a40a2eaSBintian Wang #define HI6220_CODEC_VPU_SRC	23
1612a40a2eaSBintian Wang 
1622a40a2eaSBintian Wang #define HI6220_MEDIA_NR_CLKS	24
1632a40a2eaSBintian Wang 
1642a40a2eaSBintian Wang /* clk in Hi6220 power controller */
1652a40a2eaSBintian Wang /* gate clocks */
1662a40a2eaSBintian Wang #define HI6220_PLL_GPU_GATE	1
1672a40a2eaSBintian Wang #define HI6220_PLL1_DDR_GATE	2
1682a40a2eaSBintian Wang #define HI6220_PLL_DDR_GATE	3
1692a40a2eaSBintian Wang #define HI6220_PLL_MEDIA_GATE	4
1702a40a2eaSBintian Wang #define HI6220_PLL0_BBP_GATE	5
1712a40a2eaSBintian Wang 
1722a40a2eaSBintian Wang /* divider clocks */
1732a40a2eaSBintian Wang #define HI6220_DDRC_SRC		6
1742a40a2eaSBintian Wang #define HI6220_DDRC_AXI1	7
1752a40a2eaSBintian Wang 
1762a40a2eaSBintian Wang #define HI6220_POWER_NR_CLKS	8
1772a40a2eaSBintian Wang #endif
178