12c14736cSHeiko Stübner /*
22c14736cSHeiko Stübner  * Copyright (c) 2014 MundoReader S.L.
32c14736cSHeiko Stübner  * Author: Heiko Stuebner <heiko@sntech.de>
42c14736cSHeiko Stübner  *
52c14736cSHeiko Stübner  * This program is free software; you can redistribute it and/or modify
62c14736cSHeiko Stübner  * it under the terms of the GNU General Public License as published by
72c14736cSHeiko Stübner  * the Free Software Foundation; either version 2 of the License, or
82c14736cSHeiko Stübner  * (at your option) any later version.
92c14736cSHeiko Stübner  *
102c14736cSHeiko Stübner  * This program is distributed in the hope that it will be useful,
112c14736cSHeiko Stübner  * but WITHOUT ANY WARRANTY; without even the implied warranty of
122c14736cSHeiko Stübner  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
132c14736cSHeiko Stübner  * GNU General Public License for more details.
142c14736cSHeiko Stübner  */
152c14736cSHeiko Stübner 
167c8f03d5SHeiko Stuebner #ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3188_COMMON_H
177c8f03d5SHeiko Stuebner #define _DT_BINDINGS_CLK_ROCKCHIP_RK3188_COMMON_H
187c8f03d5SHeiko Stuebner 
192c14736cSHeiko Stübner /* core clocks from */
202c14736cSHeiko Stübner #define PLL_APLL		1
212c14736cSHeiko Stübner #define PLL_DPLL		2
222c14736cSHeiko Stübner #define PLL_CPLL		3
232c14736cSHeiko Stübner #define PLL_GPLL		4
242c14736cSHeiko Stübner #define CORE_PERI		5
252c14736cSHeiko Stübner #define CORE_L2C		6
264d742e62SHeiko Stuebner #define ARMCLK			7
272c14736cSHeiko Stübner 
282c14736cSHeiko Stübner /* sclk gates (special clocks) */
292c14736cSHeiko Stübner #define SCLK_UART0		64
302c14736cSHeiko Stübner #define SCLK_UART1		65
312c14736cSHeiko Stübner #define SCLK_UART2		66
322c14736cSHeiko Stübner #define SCLK_UART3		67
332c14736cSHeiko Stübner #define SCLK_MAC		68
342c14736cSHeiko Stübner #define SCLK_SPI0		69
352c14736cSHeiko Stübner #define SCLK_SPI1		70
362c14736cSHeiko Stübner #define SCLK_SARADC		71
372c14736cSHeiko Stübner #define SCLK_SDMMC		72
382c14736cSHeiko Stübner #define SCLK_SDIO		73
392c14736cSHeiko Stübner #define SCLK_EMMC		74
402c14736cSHeiko Stübner #define SCLK_I2S0		75
412c14736cSHeiko Stübner #define SCLK_I2S1		76
422c14736cSHeiko Stübner #define SCLK_I2S2		77
432c14736cSHeiko Stübner #define SCLK_SPDIF		78
442c14736cSHeiko Stübner #define SCLK_CIF0		79
452c14736cSHeiko Stübner #define SCLK_CIF1		80
462c14736cSHeiko Stübner #define SCLK_OTGPHY0		81
472c14736cSHeiko Stübner #define SCLK_OTGPHY1		82
482c14736cSHeiko Stübner #define SCLK_HSADC		83
492c14736cSHeiko Stübner #define SCLK_TIMER0		84
502c14736cSHeiko Stübner #define SCLK_TIMER1		85
512c14736cSHeiko Stübner #define SCLK_TIMER2		86
522c14736cSHeiko Stübner #define SCLK_TIMER3		87
532c14736cSHeiko Stübner #define SCLK_TIMER4		88
542c14736cSHeiko Stübner #define SCLK_TIMER5		89
552c14736cSHeiko Stübner #define SCLK_TIMER6		90
562c14736cSHeiko Stübner #define SCLK_JTAG		91
572c14736cSHeiko Stübner #define SCLK_SMC		92
58b682572fSPaweł Jarosz #define SCLK_TSADC		93
592c14736cSHeiko Stübner 
602c14736cSHeiko Stübner #define DCLK_LCDC0		190
612c14736cSHeiko Stübner #define DCLK_LCDC1		191
622c14736cSHeiko Stübner 
632c14736cSHeiko Stübner /* aclk gates */
642c14736cSHeiko Stübner #define ACLK_DMA1		192
652c14736cSHeiko Stübner #define ACLK_DMA2		193
662c14736cSHeiko Stübner #define ACLK_GPS		194
672c14736cSHeiko Stübner #define ACLK_LCDC0		195
682c14736cSHeiko Stübner #define ACLK_LCDC1		196
692c14736cSHeiko Stübner #define ACLK_GPU		197
702c14736cSHeiko Stübner #define ACLK_SMC		198
712c14736cSHeiko Stübner #define ACLK_CIF		199
722c14736cSHeiko Stübner #define ACLK_IPP		200
732c14736cSHeiko Stübner #define ACLK_RGA		201
742c14736cSHeiko Stübner #define ACLK_CIF0		202
75550a1331SPaweł Jarosz #define ACLK_CPU		203
76550a1331SPaweł Jarosz #define ACLK_PERI		204
772c14736cSHeiko Stübner 
782c14736cSHeiko Stübner /* pclk gates */
792c14736cSHeiko Stübner #define PCLK_GRF		320
802c14736cSHeiko Stübner #define PCLK_PMU		321
812c14736cSHeiko Stübner #define PCLK_TIMER0		322
822c14736cSHeiko Stübner #define PCLK_TIMER1		323
832c14736cSHeiko Stübner #define PCLK_TIMER2		324
842c14736cSHeiko Stübner #define PCLK_TIMER3		325
852c14736cSHeiko Stübner #define PCLK_PWM01		326
862c14736cSHeiko Stübner #define PCLK_PWM23		327
872c14736cSHeiko Stübner #define PCLK_SPI0		328
882c14736cSHeiko Stübner #define PCLK_SPI1		329
892c14736cSHeiko Stübner #define PCLK_SARADC		330
902c14736cSHeiko Stübner #define PCLK_WDT		331
912c14736cSHeiko Stübner #define PCLK_UART0		332
922c14736cSHeiko Stübner #define PCLK_UART1		333
932c14736cSHeiko Stübner #define PCLK_UART2		334
942c14736cSHeiko Stübner #define PCLK_UART3		335
952c14736cSHeiko Stübner #define PCLK_I2C0		336
962c14736cSHeiko Stübner #define PCLK_I2C1		337
972c14736cSHeiko Stübner #define PCLK_I2C2		338
982c14736cSHeiko Stübner #define PCLK_I2C3		339
992c14736cSHeiko Stübner #define PCLK_I2C4		340
1002c14736cSHeiko Stübner #define PCLK_GPIO0		341
1012c14736cSHeiko Stübner #define PCLK_GPIO1		342
1022c14736cSHeiko Stübner #define PCLK_GPIO2		343
1032c14736cSHeiko Stübner #define PCLK_GPIO3		344
1042c14736cSHeiko Stübner #define PCLK_GPIO4		345
1052c14736cSHeiko Stübner #define PCLK_GPIO6		346
1062c14736cSHeiko Stübner #define PCLK_EFUSE		347
1072c14736cSHeiko Stübner #define PCLK_TZPC		348
1082c14736cSHeiko Stübner #define PCLK_TSADC		349
109550a1331SPaweł Jarosz #define PCLK_CPU		350
110550a1331SPaweł Jarosz #define PCLK_PERI		351
1112c14736cSHeiko Stübner 
1122c14736cSHeiko Stübner /* hclk gates */
1132c14736cSHeiko Stübner #define HCLK_SDMMC		448
1142c14736cSHeiko Stübner #define HCLK_SDIO		449
1152c14736cSHeiko Stübner #define HCLK_EMMC		450
1162c14736cSHeiko Stübner #define HCLK_OTG0		451
1172c14736cSHeiko Stübner #define HCLK_EMAC		452
1182c14736cSHeiko Stübner #define HCLK_SPDIF		453
1192c14736cSHeiko Stübner #define HCLK_I2S0		454
1202c14736cSHeiko Stübner #define HCLK_I2S1		455
1212c14736cSHeiko Stübner #define HCLK_I2S2		456
1222c14736cSHeiko Stübner #define HCLK_OTG1		457
1232c14736cSHeiko Stübner #define HCLK_HSIC		458
1242c14736cSHeiko Stübner #define HCLK_HSADC		459
1252c14736cSHeiko Stübner #define HCLK_PIDF		460
1262c14736cSHeiko Stübner #define HCLK_LCDC0		461
1272c14736cSHeiko Stübner #define HCLK_LCDC1		462
1282c14736cSHeiko Stübner #define HCLK_ROM		463
1292c14736cSHeiko Stübner #define HCLK_CIF0		464
1302c14736cSHeiko Stübner #define HCLK_IPP		465
1312c14736cSHeiko Stübner #define HCLK_RGA		466
1322c14736cSHeiko Stübner #define HCLK_NANDC0		467
133550a1331SPaweł Jarosz #define HCLK_CPU		468
134550a1331SPaweł Jarosz #define HCLK_PERI		469
1352c14736cSHeiko Stübner 
136550a1331SPaweł Jarosz #define CLK_NR_CLKS		(HCLK_PERI + 1)
1372c14736cSHeiko Stübner 
1382c14736cSHeiko Stübner /* soft-reset indices */
1392c14736cSHeiko Stübner #define SRST_MCORE		2
1402c14736cSHeiko Stübner #define SRST_CORE0		3
1412c14736cSHeiko Stübner #define SRST_CORE1		4
1422c14736cSHeiko Stübner #define SRST_MCORE_DBG		7
1432c14736cSHeiko Stübner #define SRST_CORE0_DBG		8
1442c14736cSHeiko Stübner #define SRST_CORE1_DBG		9
1452c14736cSHeiko Stübner #define SRST_CORE0_WDT		12
1462c14736cSHeiko Stübner #define SRST_CORE1_WDT		13
1472c14736cSHeiko Stübner #define SRST_STRC_SYS		14
1482c14736cSHeiko Stübner #define SRST_L2C		15
1492c14736cSHeiko Stübner 
1502c14736cSHeiko Stübner #define SRST_CPU_AHB		17
1512c14736cSHeiko Stübner #define SRST_AHB2APB		19
1522c14736cSHeiko Stübner #define SRST_DMA1		20
1532c14736cSHeiko Stübner #define SRST_INTMEM		21
1542c14736cSHeiko Stübner #define SRST_ROM		22
1552c14736cSHeiko Stübner #define SRST_SPDIF		26
1562c14736cSHeiko Stübner #define SRST_TIMER0		27
1572c14736cSHeiko Stübner #define SRST_TIMER1		28
1582c14736cSHeiko Stübner #define SRST_EFUSE		30
1592c14736cSHeiko Stübner 
1602c14736cSHeiko Stübner #define SRST_GPIO0		32
1612c14736cSHeiko Stübner #define SRST_GPIO1		33
1622c14736cSHeiko Stübner #define SRST_GPIO2		34
1632c14736cSHeiko Stübner #define SRST_GPIO3		35
1642c14736cSHeiko Stübner 
1652c14736cSHeiko Stübner #define SRST_UART0		39
1662c14736cSHeiko Stübner #define SRST_UART1		40
1672c14736cSHeiko Stübner #define SRST_UART2		41
1682c14736cSHeiko Stübner #define SRST_UART3		42
1692c14736cSHeiko Stübner #define SRST_I2C0		43
1702c14736cSHeiko Stübner #define SRST_I2C1		44
1712c14736cSHeiko Stübner #define SRST_I2C2		45
1722c14736cSHeiko Stübner #define SRST_I2C3		46
1732c14736cSHeiko Stübner #define SRST_I2C4		47
1742c14736cSHeiko Stübner 
1752c14736cSHeiko Stübner #define SRST_PWM0		48
1762c14736cSHeiko Stübner #define SRST_PWM1		49
1772c14736cSHeiko Stübner #define SRST_DAP_PO		50
1782c14736cSHeiko Stübner #define SRST_DAP		51
1792c14736cSHeiko Stübner #define SRST_DAP_SYS		52
1802c14736cSHeiko Stübner #define SRST_TPIU_ATB		53
1812c14736cSHeiko Stübner #define SRST_PMU_APB		54
1822c14736cSHeiko Stübner #define SRST_GRF		55
1832c14736cSHeiko Stübner #define SRST_PMU		56
1842c14736cSHeiko Stübner #define SRST_PERI_AXI		57
1852c14736cSHeiko Stübner #define SRST_PERI_AHB		58
1862c14736cSHeiko Stübner #define SRST_PERI_APB		59
1872c14736cSHeiko Stübner #define SRST_PERI_NIU		60
1882c14736cSHeiko Stübner #define SRST_CPU_PERI		61
1892c14736cSHeiko Stübner #define SRST_EMEM_PERI		62
1902c14736cSHeiko Stübner #define SRST_USB_PERI		63
1912c14736cSHeiko Stübner 
1922c14736cSHeiko Stübner #define SRST_DMA2		64
1932c14736cSHeiko Stübner #define SRST_SMC		65
1942c14736cSHeiko Stübner #define SRST_MAC		66
1952c14736cSHeiko Stübner #define SRST_NANC0		68
1962c14736cSHeiko Stübner #define SRST_USBOTG0		69
1972c14736cSHeiko Stübner #define SRST_USBPHY0		70
1982c14736cSHeiko Stübner #define SRST_OTGC0		71
1992c14736cSHeiko Stübner #define SRST_USBOTG1		72
2002c14736cSHeiko Stübner #define SRST_USBPHY1		73
2012c14736cSHeiko Stübner #define SRST_OTGC1		74
2022c14736cSHeiko Stübner #define SRST_HSADC		76
2032c14736cSHeiko Stübner #define SRST_PIDFILTER		77
2042c14736cSHeiko Stübner #define SRST_DDR_MSCH		79
2052c14736cSHeiko Stübner 
2062c14736cSHeiko Stübner #define SRST_TZPC		80
2072c14736cSHeiko Stübner #define SRST_SDMMC		81
2082c14736cSHeiko Stübner #define SRST_SDIO		82
2092c14736cSHeiko Stübner #define SRST_EMMC		83
2102c14736cSHeiko Stübner #define SRST_SPI0		84
2112c14736cSHeiko Stübner #define SRST_SPI1		85
2122c14736cSHeiko Stübner #define SRST_WDT		86
2132c14736cSHeiko Stübner #define SRST_SARADC		87
2142c14736cSHeiko Stübner #define SRST_DDRPHY		88
2152c14736cSHeiko Stübner #define SRST_DDRPHY_APB		89
2162c14736cSHeiko Stübner #define SRST_DDRCTL		90
2172c14736cSHeiko Stübner #define SRST_DDRCTL_APB		91
2182c14736cSHeiko Stübner #define SRST_DDRPUB		93
2192c14736cSHeiko Stübner 
2202c14736cSHeiko Stübner #define SRST_VIO0_AXI		98
2212c14736cSHeiko Stübner #define SRST_VIO0_AHB		99
2222c14736cSHeiko Stübner #define SRST_LCDC0_AXI		100
2232c14736cSHeiko Stübner #define SRST_LCDC0_AHB		101
2242c14736cSHeiko Stübner #define SRST_LCDC0_DCLK		102
2252c14736cSHeiko Stübner #define SRST_LCDC1_AXI		103
2262c14736cSHeiko Stübner #define SRST_LCDC1_AHB		104
2272c14736cSHeiko Stübner #define SRST_LCDC1_DCLK		105
2282c14736cSHeiko Stübner #define SRST_IPP_AXI		106
2292c14736cSHeiko Stübner #define SRST_IPP_AHB		107
2302c14736cSHeiko Stübner #define SRST_RGA_AXI		108
2312c14736cSHeiko Stübner #define SRST_RGA_AHB		109
2322c14736cSHeiko Stübner #define SRST_CIF0		110
2332c14736cSHeiko Stübner 
2342c14736cSHeiko Stübner #define SRST_VCODEC_AXI		112
2352c14736cSHeiko Stübner #define SRST_VCODEC_AHB		113
2362c14736cSHeiko Stübner #define SRST_VIO1_AXI		114
2372c14736cSHeiko Stübner #define SRST_VCODEC_CPU		115
2382c14736cSHeiko Stübner #define SRST_VCODEC_NIU		116
2392c14736cSHeiko Stübner #define SRST_GPU		120
2402c14736cSHeiko Stübner #define SRST_GPU_NIU		122
2412c14736cSHeiko Stübner #define SRST_TFUN_ATB		125
2422c14736cSHeiko Stübner #define SRST_TFUN_APB		126
2432c14736cSHeiko Stübner #define SRST_CTI4_APB		127
2442c14736cSHeiko Stübner 
2452c14736cSHeiko Stübner #define SRST_TPIU_APB		128
2462c14736cSHeiko Stübner #define SRST_TRACE		129
2472c14736cSHeiko Stübner #define SRST_CORE_DBG		130
2482c14736cSHeiko Stübner #define SRST_DBG_APB		131
2492c14736cSHeiko Stübner #define SRST_CTI0		132
2502c14736cSHeiko Stübner #define SRST_CTI0_APB		133
2512c14736cSHeiko Stübner #define SRST_CTI1		134
2522c14736cSHeiko Stübner #define SRST_CTI1_APB		135
2532c14736cSHeiko Stübner #define SRST_PTM_CORE0		136
2542c14736cSHeiko Stübner #define SRST_PTM_CORE1		137
2552c14736cSHeiko Stübner #define SRST_PTM0		138
2562c14736cSHeiko Stübner #define SRST_PTM0_ATB		139
2572c14736cSHeiko Stübner #define SRST_PTM1		140
2582c14736cSHeiko Stübner #define SRST_PTM1_ATB		141
2592c14736cSHeiko Stübner #define SRST_CTM		142
2602c14736cSHeiko Stübner #define SRST_TS			143
2617c8f03d5SHeiko Stuebner 
2627c8f03d5SHeiko Stuebner #endif
263