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