1*9122109aSPeter Griffin /* 2*9122109aSPeter Griffin * Copyright (c) 2015 Hisilicon Limited. 3*9122109aSPeter Griffin * 4*9122109aSPeter Griffin * Author: Bintian Wang <bintian.wang@huawei.com> 5*9122109aSPeter Griffin * 6*9122109aSPeter Griffin * This program is free software; you can redistribute it and/or modify 7*9122109aSPeter Griffin * it under the terms of the GNU General Public License version 2 as 8*9122109aSPeter Griffin * published by the Free Software Foundation. 9*9122109aSPeter Griffin */ 10*9122109aSPeter Griffin 11*9122109aSPeter Griffin #ifndef __DT_BINDINGS_CLOCK_HI6220_H 12*9122109aSPeter Griffin #define __DT_BINDINGS_CLOCK_HI6220_H 13*9122109aSPeter Griffin 14*9122109aSPeter Griffin /* clk in Hi6220 AO (always on) controller */ 15*9122109aSPeter Griffin #define HI6220_NONE_CLOCK 0 16*9122109aSPeter Griffin 17*9122109aSPeter Griffin /* fixed rate clocks */ 18*9122109aSPeter Griffin #define HI6220_REF32K 1 19*9122109aSPeter Griffin #define HI6220_CLK_TCXO 2 20*9122109aSPeter Griffin #define HI6220_MMC1_PAD 3 21*9122109aSPeter Griffin #define HI6220_MMC2_PAD 4 22*9122109aSPeter Griffin #define HI6220_MMC0_PAD 5 23*9122109aSPeter Griffin #define HI6220_PLL_BBP 6 24*9122109aSPeter Griffin #define HI6220_PLL_GPU 7 25*9122109aSPeter Griffin #define HI6220_PLL1_DDR 8 26*9122109aSPeter Griffin #define HI6220_PLL_SYS 9 27*9122109aSPeter Griffin #define HI6220_PLL_SYS_MEDIA 10 28*9122109aSPeter Griffin #define HI6220_DDR_SRC 11 29*9122109aSPeter Griffin #define HI6220_PLL_MEDIA 12 30*9122109aSPeter Griffin #define HI6220_PLL_DDR 13 31*9122109aSPeter Griffin 32*9122109aSPeter Griffin /* fixed factor clocks */ 33*9122109aSPeter Griffin #define HI6220_300M 14 34*9122109aSPeter Griffin #define HI6220_150M 15 35*9122109aSPeter Griffin #define HI6220_PICOPHY_SRC 16 36*9122109aSPeter Griffin #define HI6220_MMC0_SRC_SEL 17 37*9122109aSPeter Griffin #define HI6220_MMC1_SRC_SEL 18 38*9122109aSPeter Griffin #define HI6220_MMC2_SRC_SEL 19 39*9122109aSPeter Griffin #define HI6220_VPU_CODEC 20 40*9122109aSPeter Griffin #define HI6220_MMC0_SMP 21 41*9122109aSPeter Griffin #define HI6220_MMC1_SMP 22 42*9122109aSPeter Griffin #define HI6220_MMC2_SMP 23 43*9122109aSPeter Griffin 44*9122109aSPeter Griffin /* gate clocks */ 45*9122109aSPeter Griffin #define HI6220_WDT0_PCLK 24 46*9122109aSPeter Griffin #define HI6220_WDT1_PCLK 25 47*9122109aSPeter Griffin #define HI6220_WDT2_PCLK 26 48*9122109aSPeter Griffin #define HI6220_TIMER0_PCLK 27 49*9122109aSPeter Griffin #define HI6220_TIMER1_PCLK 28 50*9122109aSPeter Griffin #define HI6220_TIMER2_PCLK 29 51*9122109aSPeter Griffin #define HI6220_TIMER3_PCLK 30 52*9122109aSPeter Griffin #define HI6220_TIMER4_PCLK 31 53*9122109aSPeter Griffin #define HI6220_TIMER5_PCLK 32 54*9122109aSPeter Griffin #define HI6220_TIMER6_PCLK 33 55*9122109aSPeter Griffin #define HI6220_TIMER7_PCLK 34 56*9122109aSPeter Griffin #define HI6220_TIMER8_PCLK 35 57*9122109aSPeter Griffin #define HI6220_UART0_PCLK 36 58*9122109aSPeter Griffin 59*9122109aSPeter Griffin #define HI6220_AO_NR_CLKS 37 60*9122109aSPeter Griffin 61*9122109aSPeter Griffin /* clk in Hi6220 systrl */ 62*9122109aSPeter Griffin /* gate clock */ 63*9122109aSPeter Griffin #define HI6220_MMC0_CLK 1 64*9122109aSPeter Griffin #define HI6220_MMC0_CIUCLK 2 65*9122109aSPeter Griffin #define HI6220_MMC1_CLK 3 66*9122109aSPeter Griffin #define HI6220_MMC1_CIUCLK 4 67*9122109aSPeter Griffin #define HI6220_MMC2_CLK 5 68*9122109aSPeter Griffin #define HI6220_MMC2_CIUCLK 6 69*9122109aSPeter Griffin #define HI6220_USBOTG_HCLK 7 70*9122109aSPeter Griffin #define HI6220_CLK_PICOPHY 8 71*9122109aSPeter Griffin #define HI6220_HIFI 9 72*9122109aSPeter Griffin #define HI6220_DACODEC_PCLK 10 73*9122109aSPeter Griffin #define HI6220_EDMAC_ACLK 11 74*9122109aSPeter Griffin #define HI6220_CS_ATB 12 75*9122109aSPeter Griffin #define HI6220_I2C0_CLK 13 76*9122109aSPeter Griffin #define HI6220_I2C1_CLK 14 77*9122109aSPeter Griffin #define HI6220_I2C2_CLK 15 78*9122109aSPeter Griffin #define HI6220_I2C3_CLK 16 79*9122109aSPeter Griffin #define HI6220_UART1_PCLK 17 80*9122109aSPeter Griffin #define HI6220_UART2_PCLK 18 81*9122109aSPeter Griffin #define HI6220_UART3_PCLK 19 82*9122109aSPeter Griffin #define HI6220_UART4_PCLK 20 83*9122109aSPeter Griffin #define HI6220_SPI_CLK 21 84*9122109aSPeter Griffin #define HI6220_TSENSOR_CLK 22 85*9122109aSPeter Griffin #define HI6220_MMU_CLK 23 86*9122109aSPeter Griffin #define HI6220_HIFI_SEL 24 87*9122109aSPeter Griffin #define HI6220_MMC0_SYSPLL 25 88*9122109aSPeter Griffin #define HI6220_MMC1_SYSPLL 26 89*9122109aSPeter Griffin #define HI6220_MMC2_SYSPLL 27 90*9122109aSPeter Griffin #define HI6220_MMC0_SEL 28 91*9122109aSPeter Griffin #define HI6220_MMC1_SEL 29 92*9122109aSPeter Griffin #define HI6220_BBPPLL_SEL 30 93*9122109aSPeter Griffin #define HI6220_MEDIA_PLL_SRC 31 94*9122109aSPeter Griffin #define HI6220_MMC2_SEL 32 95*9122109aSPeter Griffin #define HI6220_CS_ATB_SYSPLL 33 96*9122109aSPeter Griffin 97*9122109aSPeter Griffin /* mux clocks */ 98*9122109aSPeter Griffin #define HI6220_MMC0_SRC 34 99*9122109aSPeter Griffin #define HI6220_MMC0_SMP_IN 35 100*9122109aSPeter Griffin #define HI6220_MMC1_SRC 36 101*9122109aSPeter Griffin #define HI6220_MMC1_SMP_IN 37 102*9122109aSPeter Griffin #define HI6220_MMC2_SRC 38 103*9122109aSPeter Griffin #define HI6220_MMC2_SMP_IN 39 104*9122109aSPeter Griffin #define HI6220_HIFI_SRC 40 105*9122109aSPeter Griffin #define HI6220_UART1_SRC 41 106*9122109aSPeter Griffin #define HI6220_UART2_SRC 42 107*9122109aSPeter Griffin #define HI6220_UART3_SRC 43 108*9122109aSPeter Griffin #define HI6220_UART4_SRC 44 109*9122109aSPeter Griffin #define HI6220_MMC0_MUX0 45 110*9122109aSPeter Griffin #define HI6220_MMC1_MUX0 46 111*9122109aSPeter Griffin #define HI6220_MMC2_MUX0 47 112*9122109aSPeter Griffin #define HI6220_MMC0_MUX1 48 113*9122109aSPeter Griffin #define HI6220_MMC1_MUX1 49 114*9122109aSPeter Griffin #define HI6220_MMC2_MUX1 50 115*9122109aSPeter Griffin 116*9122109aSPeter Griffin /* divider clocks */ 117*9122109aSPeter Griffin #define HI6220_CLK_BUS 51 118*9122109aSPeter Griffin #define HI6220_MMC0_DIV 52 119*9122109aSPeter Griffin #define HI6220_MMC1_DIV 53 120*9122109aSPeter Griffin #define HI6220_MMC2_DIV 54 121*9122109aSPeter Griffin #define HI6220_HIFI_DIV 55 122*9122109aSPeter Griffin #define HI6220_BBPPLL0_DIV 56 123*9122109aSPeter Griffin #define HI6220_CS_DAPB 57 124*9122109aSPeter Griffin #define HI6220_CS_ATB_DIV 58 125*9122109aSPeter Griffin 126*9122109aSPeter Griffin #define HI6220_SYS_NR_CLKS 59 127*9122109aSPeter Griffin 128*9122109aSPeter Griffin /* clk in Hi6220 media controller */ 129*9122109aSPeter Griffin /* gate clocks */ 130*9122109aSPeter Griffin #define HI6220_DSI_PCLK 1 131*9122109aSPeter Griffin #define HI6220_G3D_PCLK 2 132*9122109aSPeter Griffin #define HI6220_ACLK_CODEC_VPU 3 133*9122109aSPeter Griffin #define HI6220_ISP_SCLK 4 134*9122109aSPeter Griffin #define HI6220_ADE_CORE 5 135*9122109aSPeter Griffin #define HI6220_MED_MMU 6 136*9122109aSPeter Griffin #define HI6220_CFG_CSI4PHY 7 137*9122109aSPeter Griffin #define HI6220_CFG_CSI2PHY 8 138*9122109aSPeter Griffin #define HI6220_ISP_SCLK_GATE 9 139*9122109aSPeter Griffin #define HI6220_ISP_SCLK_GATE1 10 140*9122109aSPeter Griffin #define HI6220_ADE_CORE_GATE 11 141*9122109aSPeter Griffin #define HI6220_CODEC_VPU_GATE 12 142*9122109aSPeter Griffin #define HI6220_MED_SYSPLL 13 143*9122109aSPeter Griffin 144*9122109aSPeter Griffin /* mux clocks */ 145*9122109aSPeter Griffin #define HI6220_1440_1200 14 146*9122109aSPeter Griffin #define HI6220_1000_1200 15 147*9122109aSPeter Griffin #define HI6220_1000_1440 16 148*9122109aSPeter Griffin 149*9122109aSPeter Griffin /* divider clocks */ 150*9122109aSPeter Griffin #define HI6220_CODEC_JPEG 17 151*9122109aSPeter Griffin #define HI6220_ISP_SCLK_SRC 18 152*9122109aSPeter Griffin #define HI6220_ISP_SCLK1 19 153*9122109aSPeter Griffin #define HI6220_ADE_CORE_SRC 20 154*9122109aSPeter Griffin #define HI6220_ADE_PIX_SRC 21 155*9122109aSPeter Griffin #define HI6220_G3D_CLK 22 156*9122109aSPeter Griffin #define HI6220_CODEC_VPU_SRC 23 157*9122109aSPeter Griffin 158*9122109aSPeter Griffin #define HI6220_MEDIA_NR_CLKS 24 159*9122109aSPeter Griffin 160*9122109aSPeter Griffin /* clk in Hi6220 power controller */ 161*9122109aSPeter Griffin /* gate clocks */ 162*9122109aSPeter Griffin #define HI6220_PLL_GPU_GATE 1 163*9122109aSPeter Griffin #define HI6220_PLL1_DDR_GATE 2 164*9122109aSPeter Griffin #define HI6220_PLL_DDR_GATE 3 165*9122109aSPeter Griffin #define HI6220_PLL_MEDIA_GATE 4 166*9122109aSPeter Griffin #define HI6220_PLL0_BBP_GATE 5 167*9122109aSPeter Griffin 168*9122109aSPeter Griffin /* divider clocks */ 169*9122109aSPeter Griffin #define HI6220_DDRC_SRC 6 170*9122109aSPeter Griffin #define HI6220_DDRC_AXI1 7 171*9122109aSPeter Griffin 172*9122109aSPeter Griffin #define HI6220_POWER_NR_CLKS 8 173*9122109aSPeter Griffin #endif 174