169d88a00SPaul Walmsley #ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_24XX_H 269d88a00SPaul Walmsley #define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_24XX_H 369d88a00SPaul Walmsley 469d88a00SPaul Walmsley /* 569d88a00SPaul Walmsley * OMAP24XX Clock Management register bits 669d88a00SPaul Walmsley * 769d88a00SPaul Walmsley * Copyright (C) 2007 Texas Instruments, Inc. 869d88a00SPaul Walmsley * Copyright (C) 2007 Nokia Corporation 969d88a00SPaul Walmsley * 1069d88a00SPaul Walmsley * Written by Paul Walmsley 1169d88a00SPaul Walmsley * 1269d88a00SPaul Walmsley * This program is free software; you can redistribute it and/or modify 1369d88a00SPaul Walmsley * it under the terms of the GNU General Public License version 2 as 1469d88a00SPaul Walmsley * published by the Free Software Foundation. 1569d88a00SPaul Walmsley */ 1669d88a00SPaul Walmsley 1769d88a00SPaul Walmsley #include "cm.h" 1869d88a00SPaul Walmsley 1969d88a00SPaul Walmsley /* Bits shared between registers */ 2069d88a00SPaul Walmsley 2169d88a00SPaul Walmsley /* CM_FCLKEN1_CORE and CM_ICLKEN1_CORE shared bits */ 2269d88a00SPaul Walmsley #define OMAP24XX_EN_CAM_SHIFT 31 23f38ca10aSPaul Walmsley #define OMAP24XX_EN_CAM_MASK (1 << 31) 2469d88a00SPaul Walmsley #define OMAP24XX_EN_WDT4_SHIFT 29 25f38ca10aSPaul Walmsley #define OMAP24XX_EN_WDT4_MASK (1 << 29) 2669d88a00SPaul Walmsley #define OMAP2420_EN_WDT3_SHIFT 28 27f38ca10aSPaul Walmsley #define OMAP2420_EN_WDT3_MASK (1 << 28) 2869d88a00SPaul Walmsley #define OMAP24XX_EN_MSPRO_SHIFT 27 29f38ca10aSPaul Walmsley #define OMAP24XX_EN_MSPRO_MASK (1 << 27) 3069d88a00SPaul Walmsley #define OMAP24XX_EN_FAC_SHIFT 25 31f38ca10aSPaul Walmsley #define OMAP24XX_EN_FAC_MASK (1 << 25) 3269d88a00SPaul Walmsley #define OMAP2420_EN_EAC_SHIFT 24 33f38ca10aSPaul Walmsley #define OMAP2420_EN_EAC_MASK (1 << 24) 3469d88a00SPaul Walmsley #define OMAP24XX_EN_HDQ_SHIFT 23 35f38ca10aSPaul Walmsley #define OMAP24XX_EN_HDQ_MASK (1 << 23) 3669d88a00SPaul Walmsley #define OMAP2420_EN_I2C2_SHIFT 20 37f38ca10aSPaul Walmsley #define OMAP2420_EN_I2C2_MASK (1 << 20) 3869d88a00SPaul Walmsley #define OMAP2420_EN_I2C1_SHIFT 19 39f38ca10aSPaul Walmsley #define OMAP2420_EN_I2C1_MASK (1 << 19) 4069d88a00SPaul Walmsley 4169d88a00SPaul Walmsley /* CM_FCLKEN2_CORE and CM_ICLKEN2_CORE shared bits */ 4269d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP5_SHIFT 5 43f38ca10aSPaul Walmsley #define OMAP2430_EN_MCBSP5_MASK (1 << 5) 4469d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP4_SHIFT 4 45f38ca10aSPaul Walmsley #define OMAP2430_EN_MCBSP4_MASK (1 << 4) 4669d88a00SPaul Walmsley #define OMAP2430_EN_MCBSP3_SHIFT 3 47f38ca10aSPaul Walmsley #define OMAP2430_EN_MCBSP3_MASK (1 << 3) 4869d88a00SPaul Walmsley #define OMAP24XX_EN_SSI_SHIFT 1 49f38ca10aSPaul Walmsley #define OMAP24XX_EN_SSI_MASK (1 << 1) 5069d88a00SPaul Walmsley 5169d88a00SPaul Walmsley /* CM_FCLKEN_WKUP and CM_ICLKEN_WKUP shared bits */ 5269d88a00SPaul Walmsley #define OMAP24XX_EN_MPU_WDT_SHIFT 3 53f38ca10aSPaul Walmsley #define OMAP24XX_EN_MPU_WDT_MASK (1 << 3) 5469d88a00SPaul Walmsley 5569d88a00SPaul Walmsley /* Bits specific to each register */ 5669d88a00SPaul Walmsley 5769d88a00SPaul Walmsley /* CM_IDLEST_MPU */ 5869d88a00SPaul Walmsley /* 2430 only */ 59f38ca10aSPaul Walmsley #define OMAP2430_ST_MPU_MASK (1 << 0) 6069d88a00SPaul Walmsley 6169d88a00SPaul Walmsley /* CM_CLKSEL_MPU */ 6269d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_MPU_SHIFT 0 6369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_MPU_MASK (0x1f << 0) 6469d88a00SPaul Walmsley 6569d88a00SPaul Walmsley /* CM_CLKSTCTRL_MPU */ 66801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_MPU_SHIFT 0 67801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_MPU_MASK (1 << 0) 6869d88a00SPaul Walmsley 6969d88a00SPaul Walmsley /* CM_FCLKEN1_CORE specific bits*/ 7069d88a00SPaul Walmsley #define OMAP24XX_EN_TV_SHIFT 2 71f38ca10aSPaul Walmsley #define OMAP24XX_EN_TV_MASK (1 << 2) 7269d88a00SPaul Walmsley #define OMAP24XX_EN_DSS2_SHIFT 1 73f38ca10aSPaul Walmsley #define OMAP24XX_EN_DSS2_MASK (1 << 1) 7469d88a00SPaul Walmsley #define OMAP24XX_EN_DSS1_SHIFT 0 75f38ca10aSPaul Walmsley #define OMAP24XX_EN_DSS1_MASK (1 << 0) 7669d88a00SPaul Walmsley 7769d88a00SPaul Walmsley /* CM_FCLKEN2_CORE specific bits */ 7869d88a00SPaul Walmsley #define OMAP2430_EN_I2CHS2_SHIFT 20 79f38ca10aSPaul Walmsley #define OMAP2430_EN_I2CHS2_MASK (1 << 20) 8069d88a00SPaul Walmsley #define OMAP2430_EN_I2CHS1_SHIFT 19 81f38ca10aSPaul Walmsley #define OMAP2430_EN_I2CHS1_MASK (1 << 19) 8269d88a00SPaul Walmsley #define OMAP2430_EN_MMCHSDB2_SHIFT 17 83f38ca10aSPaul Walmsley #define OMAP2430_EN_MMCHSDB2_MASK (1 << 17) 8469d88a00SPaul Walmsley #define OMAP2430_EN_MMCHSDB1_SHIFT 16 85f38ca10aSPaul Walmsley #define OMAP2430_EN_MMCHSDB1_MASK (1 << 16) 8669d88a00SPaul Walmsley 8769d88a00SPaul Walmsley /* CM_ICLKEN1_CORE specific bits */ 8869d88a00SPaul Walmsley #define OMAP24XX_EN_MAILBOXES_SHIFT 30 89f38ca10aSPaul Walmsley #define OMAP24XX_EN_MAILBOXES_MASK (1 << 30) 9069d88a00SPaul Walmsley #define OMAP24XX_EN_DSS_SHIFT 0 91f38ca10aSPaul Walmsley #define OMAP24XX_EN_DSS_MASK (1 << 0) 9269d88a00SPaul Walmsley 9369d88a00SPaul Walmsley /* CM_ICLKEN2_CORE specific bits */ 9469d88a00SPaul Walmsley 9569d88a00SPaul Walmsley /* CM_ICLKEN3_CORE */ 9669d88a00SPaul Walmsley /* 2430 only */ 9769d88a00SPaul Walmsley #define OMAP2430_EN_SDRC_SHIFT 2 98f38ca10aSPaul Walmsley #define OMAP2430_EN_SDRC_MASK (1 << 2) 9969d88a00SPaul Walmsley 10069d88a00SPaul Walmsley /* CM_ICLKEN4_CORE */ 10169d88a00SPaul Walmsley #define OMAP24XX_EN_PKA_SHIFT 4 102f38ca10aSPaul Walmsley #define OMAP24XX_EN_PKA_MASK (1 << 4) 10369d88a00SPaul Walmsley #define OMAP24XX_EN_AES_SHIFT 3 104f38ca10aSPaul Walmsley #define OMAP24XX_EN_AES_MASK (1 << 3) 10569d88a00SPaul Walmsley #define OMAP24XX_EN_RNG_SHIFT 2 106f38ca10aSPaul Walmsley #define OMAP24XX_EN_RNG_MASK (1 << 2) 10769d88a00SPaul Walmsley #define OMAP24XX_EN_SHA_SHIFT 1 108f38ca10aSPaul Walmsley #define OMAP24XX_EN_SHA_MASK (1 << 1) 10969d88a00SPaul Walmsley #define OMAP24XX_EN_DES_SHIFT 0 110f38ca10aSPaul Walmsley #define OMAP24XX_EN_DES_MASK (1 << 0) 11169d88a00SPaul Walmsley 11269d88a00SPaul Walmsley /* CM_IDLEST1_CORE specific bits */ 113da0747d4SPaul Walmsley #define OMAP24XX_ST_MAILBOXES_SHIFT 30 114da0747d4SPaul Walmsley #define OMAP24XX_ST_MAILBOXES_MASK (1 << 30) 115da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT4_SHIFT 29 116da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT4_MASK (1 << 29) 117da0747d4SPaul Walmsley #define OMAP2420_ST_WDT3_SHIFT 28 118da0747d4SPaul Walmsley #define OMAP2420_ST_WDT3_MASK (1 << 28) 119da0747d4SPaul Walmsley #define OMAP24XX_ST_MSPRO_SHIFT 27 120da0747d4SPaul Walmsley #define OMAP24XX_ST_MSPRO_MASK (1 << 27) 121da0747d4SPaul Walmsley #define OMAP24XX_ST_FAC_SHIFT 25 122da0747d4SPaul Walmsley #define OMAP24XX_ST_FAC_MASK (1 << 25) 123da0747d4SPaul Walmsley #define OMAP2420_ST_EAC_SHIFT 24 124da0747d4SPaul Walmsley #define OMAP2420_ST_EAC_MASK (1 << 24) 125da0747d4SPaul Walmsley #define OMAP24XX_ST_HDQ_SHIFT 23 126da0747d4SPaul Walmsley #define OMAP24XX_ST_HDQ_MASK (1 << 23) 127da0747d4SPaul Walmsley #define OMAP2420_ST_I2C2_SHIFT 20 128da0747d4SPaul Walmsley #define OMAP2420_ST_I2C2_MASK (1 << 20) 129*2004290fSPaul Walmsley #define OMAP2430_ST_I2CHS1_SHIFT 19 130*2004290fSPaul Walmsley #define OMAP2430_ST_I2CHS1_MASK (1 << 19) 131da0747d4SPaul Walmsley #define OMAP2420_ST_I2C1_SHIFT 19 132da0747d4SPaul Walmsley #define OMAP2420_ST_I2C1_MASK (1 << 19) 133*2004290fSPaul Walmsley #define OMAP2430_ST_I2CHS2_SHIFT 20 134*2004290fSPaul Walmsley #define OMAP2430_ST_I2CHS2_MASK (1 << 20) 135da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP2_SHIFT 16 136da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP2_MASK (1 << 16) 137da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP1_SHIFT 15 138da0747d4SPaul Walmsley #define OMAP24XX_ST_MCBSP1_MASK (1 << 15) 139da0747d4SPaul Walmsley #define OMAP24XX_ST_DSS_SHIFT 0 140da0747d4SPaul Walmsley #define OMAP24XX_ST_DSS_MASK (1 << 0) 14169d88a00SPaul Walmsley 14269d88a00SPaul Walmsley /* CM_IDLEST2_CORE */ 143da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP5_SHIFT 5 144da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP5_MASK (1 << 5) 145da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP4_SHIFT 4 146da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP4_MASK (1 << 4) 147da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP3_SHIFT 3 148da0747d4SPaul Walmsley #define OMAP2430_ST_MCBSP3_MASK (1 << 3) 149da0747d4SPaul Walmsley #define OMAP24XX_ST_SSI_SHIFT 1 150da0747d4SPaul Walmsley #define OMAP24XX_ST_SSI_MASK (1 << 1) 15169d88a00SPaul Walmsley 15269d88a00SPaul Walmsley /* CM_IDLEST3_CORE */ 15369d88a00SPaul Walmsley /* 2430 only */ 154da0747d4SPaul Walmsley #define OMAP2430_ST_SDRC_MASK (1 << 2) 15569d88a00SPaul Walmsley 15669d88a00SPaul Walmsley /* CM_IDLEST4_CORE */ 157da0747d4SPaul Walmsley #define OMAP24XX_ST_PKA_SHIFT 4 158da0747d4SPaul Walmsley #define OMAP24XX_ST_PKA_MASK (1 << 4) 159da0747d4SPaul Walmsley #define OMAP24XX_ST_AES_SHIFT 3 160da0747d4SPaul Walmsley #define OMAP24XX_ST_AES_MASK (1 << 3) 161da0747d4SPaul Walmsley #define OMAP24XX_ST_RNG_SHIFT 2 162da0747d4SPaul Walmsley #define OMAP24XX_ST_RNG_MASK (1 << 2) 163da0747d4SPaul Walmsley #define OMAP24XX_ST_SHA_SHIFT 1 164da0747d4SPaul Walmsley #define OMAP24XX_ST_SHA_MASK (1 << 1) 165da0747d4SPaul Walmsley #define OMAP24XX_ST_DES_SHIFT 0 166da0747d4SPaul Walmsley #define OMAP24XX_ST_DES_MASK (1 << 0) 16769d88a00SPaul Walmsley 16869d88a00SPaul Walmsley /* CM_AUTOIDLE1_CORE */ 169f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_CAM_MASK (1 << 31) 170f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MAILBOXES_MASK (1 << 30) 171f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_WDT4_MASK (1 << 29) 172f38ca10aSPaul Walmsley #define OMAP2420_AUTO_WDT3_MASK (1 << 28) 173f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MSPRO_MASK (1 << 27) 174f38ca10aSPaul Walmsley #define OMAP2420_AUTO_MMC_MASK (1 << 26) 175f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_FAC_MASK (1 << 25) 176f38ca10aSPaul Walmsley #define OMAP2420_AUTO_EAC_MASK (1 << 24) 177f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_HDQ_MASK (1 << 23) 178f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_UART2_MASK (1 << 22) 179f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_UART1_MASK (1 << 21) 180f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_I2C2_MASK (1 << 20) 181f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_I2C1_MASK (1 << 19) 182f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MCSPI2_MASK (1 << 18) 183f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MCSPI1_MASK (1 << 17) 184f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MCBSP2_MASK (1 << 16) 185f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MCBSP1_MASK (1 << 15) 186f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT12_MASK (1 << 14) 187f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT11_MASK (1 << 13) 188f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT10_MASK (1 << 12) 189f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT9_MASK (1 << 11) 190f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT8_MASK (1 << 10) 191f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT7_MASK (1 << 9) 192f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT6_MASK (1 << 8) 193f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT5_MASK (1 << 7) 194f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT4_MASK (1 << 6) 195f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT3_MASK (1 << 5) 196f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT2_MASK (1 << 4) 197f38ca10aSPaul Walmsley #define OMAP2420_AUTO_VLYNQ_MASK (1 << 3) 198f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_DSS_MASK (1 << 0) 19969d88a00SPaul Walmsley 20069d88a00SPaul Walmsley /* CM_AUTOIDLE2_CORE */ 201f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MDM_INTC_MASK (1 << 11) 202f38ca10aSPaul Walmsley #define OMAP2430_AUTO_GPIO5_MASK (1 << 10) 203f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MCSPI3_MASK (1 << 9) 204f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MMCHS2_MASK (1 << 8) 205f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MMCHS1_MASK (1 << 7) 206f38ca10aSPaul Walmsley #define OMAP2430_AUTO_USBHS_MASK (1 << 6) 207f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MCBSP5_MASK (1 << 5) 208f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MCBSP4_MASK (1 << 4) 209f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MCBSP3_MASK (1 << 3) 210f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_UART3_MASK (1 << 2) 211f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_SSI_MASK (1 << 1) 212f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_USB_MASK (1 << 0) 21369d88a00SPaul Walmsley 21469d88a00SPaul Walmsley /* CM_AUTOIDLE3_CORE */ 215f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_SDRC_MASK (1 << 2) 216f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPMC_MASK (1 << 1) 217f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_SDMA_MASK (1 << 0) 21869d88a00SPaul Walmsley 21969d88a00SPaul Walmsley /* CM_AUTOIDLE4_CORE */ 220f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_PKA_MASK (1 << 4) 221f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_AES_MASK (1 << 3) 222f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_RNG_MASK (1 << 2) 223f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_SHA_MASK (1 << 1) 224f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_DES_MASK (1 << 0) 22569d88a00SPaul Walmsley 22669d88a00SPaul Walmsley /* CM_CLKSEL1_CORE */ 22769d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_USB_SHIFT 25 22869d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_USB_MASK (0x7 << 25) 22969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_SSI_SHIFT 20 23069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_SSI_MASK (0x1f << 20) 23169d88a00SPaul Walmsley #define OMAP2420_CLKSEL_VLYNQ_SHIFT 15 23269d88a00SPaul Walmsley #define OMAP2420_CLKSEL_VLYNQ_MASK (0x1f << 15) 23369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSS2_SHIFT 13 23469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSS2_MASK (0x1 << 13) 23569d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSS1_SHIFT 8 23669d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSS1_MASK (0x1f << 8) 23769d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_L4_SHIFT 5 23869d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_L4_MASK (0x3 << 5) 23969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_L3_SHIFT 0 24069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_L3_MASK (0x1f << 0) 24169d88a00SPaul Walmsley 24269d88a00SPaul Walmsley /* CM_CLKSEL2_CORE */ 24369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT12_SHIFT 22 24469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT12_MASK (0x3 << 22) 24569d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT11_SHIFT 20 24669d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT11_MASK (0x3 << 20) 24769d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT10_SHIFT 18 24869d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT10_MASK (0x3 << 18) 24969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT9_SHIFT 16 25069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT9_MASK (0x3 << 16) 25169d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT8_SHIFT 14 25269d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT8_MASK (0x3 << 14) 25369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT7_SHIFT 12 25469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT7_MASK (0x3 << 12) 25569d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT6_SHIFT 10 25669d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT6_MASK (0x3 << 10) 25769d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT5_SHIFT 8 25869d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT5_MASK (0x3 << 8) 25969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT4_SHIFT 6 26069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT4_MASK (0x3 << 6) 26169d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT3_SHIFT 4 26269d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT3_MASK (0x3 << 4) 26369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT2_SHIFT 2 26469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT2_MASK (0x3 << 2) 26569d88a00SPaul Walmsley 26669d88a00SPaul Walmsley /* CM_CLKSTCTRL_CORE */ 267801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_DSS_SHIFT 2 268801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_DSS_MASK (1 << 2) 269801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_L4_SHIFT 1 270801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_L4_MASK (1 << 1) 271801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_L3_SHIFT 0 272801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_L3_MASK (1 << 0) 27369d88a00SPaul Walmsley 27469d88a00SPaul Walmsley /* CM_FCLKEN_GFX */ 27569d88a00SPaul Walmsley #define OMAP24XX_EN_3D_SHIFT 2 276f38ca10aSPaul Walmsley #define OMAP24XX_EN_3D_MASK (1 << 2) 27769d88a00SPaul Walmsley #define OMAP24XX_EN_2D_SHIFT 1 278f38ca10aSPaul Walmsley #define OMAP24XX_EN_2D_MASK (1 << 1) 27969d88a00SPaul Walmsley 28069d88a00SPaul Walmsley /* CM_ICLKEN_GFX specific bits */ 28169d88a00SPaul Walmsley 28269d88a00SPaul Walmsley /* CM_IDLEST_GFX specific bits */ 28369d88a00SPaul Walmsley 28469d88a00SPaul Walmsley /* CM_CLKSEL_GFX specific bits */ 28569d88a00SPaul Walmsley 28669d88a00SPaul Walmsley /* CM_CLKSTCTRL_GFX */ 287801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_GFX_SHIFT 0 288801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_GFX_MASK (1 << 0) 28969d88a00SPaul Walmsley 29069d88a00SPaul Walmsley /* CM_FCLKEN_WKUP specific bits */ 29169d88a00SPaul Walmsley 29269d88a00SPaul Walmsley /* CM_ICLKEN_WKUP specific bits */ 29369d88a00SPaul Walmsley #define OMAP2430_EN_ICR_SHIFT 6 294f38ca10aSPaul Walmsley #define OMAP2430_EN_ICR_MASK (1 << 6) 29569d88a00SPaul Walmsley #define OMAP24XX_EN_OMAPCTRL_SHIFT 5 296f38ca10aSPaul Walmsley #define OMAP24XX_EN_OMAPCTRL_MASK (1 << 5) 29769d88a00SPaul Walmsley #define OMAP24XX_EN_WDT1_SHIFT 4 298f38ca10aSPaul Walmsley #define OMAP24XX_EN_WDT1_MASK (1 << 4) 29969d88a00SPaul Walmsley #define OMAP24XX_EN_32KSYNC_SHIFT 1 300f38ca10aSPaul Walmsley #define OMAP24XX_EN_32KSYNC_MASK (1 << 1) 30169d88a00SPaul Walmsley 30269d88a00SPaul Walmsley /* CM_IDLEST_WKUP specific bits */ 303da0747d4SPaul Walmsley #define OMAP2430_ST_ICR_SHIFT 6 304da0747d4SPaul Walmsley #define OMAP2430_ST_ICR_MASK (1 << 6) 305da0747d4SPaul Walmsley #define OMAP24XX_ST_OMAPCTRL_SHIFT 5 306da0747d4SPaul Walmsley #define OMAP24XX_ST_OMAPCTRL_MASK (1 << 5) 307da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT1_SHIFT 4 308da0747d4SPaul Walmsley #define OMAP24XX_ST_WDT1_MASK (1 << 4) 309da0747d4SPaul Walmsley #define OMAP24XX_ST_MPU_WDT_SHIFT 3 310da0747d4SPaul Walmsley #define OMAP24XX_ST_MPU_WDT_MASK (1 << 3) 311da0747d4SPaul Walmsley #define OMAP24XX_ST_32KSYNC_SHIFT 1 312da0747d4SPaul Walmsley #define OMAP24XX_ST_32KSYNC_MASK (1 << 1) 31369d88a00SPaul Walmsley 31469d88a00SPaul Walmsley /* CM_AUTOIDLE_WKUP */ 315f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_OMAPCTRL_MASK (1 << 5) 316f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_WDT1_MASK (1 << 4) 317f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_MPU_WDT_MASK (1 << 3) 318f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPIOS_MASK (1 << 2) 319f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_32KSYNC_MASK (1 << 1) 320f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_GPT1_MASK (1 << 0) 32169d88a00SPaul Walmsley 32269d88a00SPaul Walmsley /* CM_CLKSEL_WKUP */ 32369d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT1_SHIFT 0 32469d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_GPT1_MASK (0x3 << 0) 32569d88a00SPaul Walmsley 32669d88a00SPaul Walmsley /* CM_CLKEN_PLL */ 32769d88a00SPaul Walmsley #define OMAP24XX_EN_54M_PLL_SHIFT 6 32869d88a00SPaul Walmsley #define OMAP24XX_EN_54M_PLL_MASK (0x3 << 6) 32969d88a00SPaul Walmsley #define OMAP24XX_EN_96M_PLL_SHIFT 2 33069d88a00SPaul Walmsley #define OMAP24XX_EN_96M_PLL_MASK (0x3 << 2) 33169d88a00SPaul Walmsley #define OMAP24XX_EN_DPLL_SHIFT 0 33269d88a00SPaul Walmsley #define OMAP24XX_EN_DPLL_MASK (0x3 << 0) 33369d88a00SPaul Walmsley 33469d88a00SPaul Walmsley /* CM_IDLEST_CKGEN */ 335f38ca10aSPaul Walmsley #define OMAP24XX_ST_54M_APLL_MASK (1 << 9) 336f38ca10aSPaul Walmsley #define OMAP24XX_ST_96M_APLL_MASK (1 << 8) 337f38ca10aSPaul Walmsley #define OMAP24XX_ST_54M_CLK_MASK (1 << 6) 338f38ca10aSPaul Walmsley #define OMAP24XX_ST_12M_CLK_MASK (1 << 5) 339f38ca10aSPaul Walmsley #define OMAP24XX_ST_48M_CLK_MASK (1 << 4) 340f38ca10aSPaul Walmsley #define OMAP24XX_ST_96M_CLK_MASK (1 << 2) 34169d88a00SPaul Walmsley #define OMAP24XX_ST_CORE_CLK_SHIFT 0 34269d88a00SPaul Walmsley #define OMAP24XX_ST_CORE_CLK_MASK (0x3 << 0) 34369d88a00SPaul Walmsley 34469d88a00SPaul Walmsley /* CM_AUTOIDLE_PLL */ 34569d88a00SPaul Walmsley #define OMAP24XX_AUTO_54M_SHIFT 6 34669d88a00SPaul Walmsley #define OMAP24XX_AUTO_54M_MASK (0x3 << 6) 34769d88a00SPaul Walmsley #define OMAP24XX_AUTO_96M_SHIFT 2 34869d88a00SPaul Walmsley #define OMAP24XX_AUTO_96M_MASK (0x3 << 2) 34969d88a00SPaul Walmsley #define OMAP24XX_AUTO_DPLL_SHIFT 0 35069d88a00SPaul Walmsley #define OMAP24XX_AUTO_DPLL_MASK (0x3 << 0) 35169d88a00SPaul Walmsley 35269d88a00SPaul Walmsley /* CM_CLKSEL1_PLL */ 35369d88a00SPaul Walmsley #define OMAP2430_MAXDPLLFASTLOCK_SHIFT 28 35469d88a00SPaul Walmsley #define OMAP2430_MAXDPLLFASTLOCK_MASK (0x7 << 28) 35569d88a00SPaul Walmsley #define OMAP24XX_APLLS_CLKIN_SHIFT 23 35669d88a00SPaul Walmsley #define OMAP24XX_APLLS_CLKIN_MASK (0x7 << 23) 35769d88a00SPaul Walmsley #define OMAP24XX_DPLL_MULT_SHIFT 12 35869d88a00SPaul Walmsley #define OMAP24XX_DPLL_MULT_MASK (0x3ff << 12) 35969d88a00SPaul Walmsley #define OMAP24XX_DPLL_DIV_SHIFT 8 36069d88a00SPaul Walmsley #define OMAP24XX_DPLL_DIV_MASK (0xf << 8) 36169d88a00SPaul Walmsley #define OMAP24XX_54M_SOURCE_SHIFT 5 362f38ca10aSPaul Walmsley #define OMAP24XX_54M_SOURCE_MASK (1 << 5) 36369d88a00SPaul Walmsley #define OMAP2430_96M_SOURCE_SHIFT 4 364f38ca10aSPaul Walmsley #define OMAP2430_96M_SOURCE_MASK (1 << 4) 36569d88a00SPaul Walmsley #define OMAP24XX_48M_SOURCE_SHIFT 3 366f38ca10aSPaul Walmsley #define OMAP24XX_48M_SOURCE_MASK (1 << 3) 36769d88a00SPaul Walmsley #define OMAP2430_ALTCLK_SOURCE_SHIFT 0 36869d88a00SPaul Walmsley #define OMAP2430_ALTCLK_SOURCE_MASK (0x7 << 0) 36969d88a00SPaul Walmsley 37069d88a00SPaul Walmsley /* CM_CLKSEL2_PLL */ 37169d88a00SPaul Walmsley #define OMAP24XX_CORE_CLK_SRC_SHIFT 0 37269d88a00SPaul Walmsley #define OMAP24XX_CORE_CLK_SRC_MASK (0x3 << 0) 37369d88a00SPaul Walmsley 37469d88a00SPaul Walmsley /* CM_FCLKEN_DSP */ 37569d88a00SPaul Walmsley #define OMAP2420_EN_IVA_COP_SHIFT 10 376f38ca10aSPaul Walmsley #define OMAP2420_EN_IVA_COP_MASK (1 << 10) 37769d88a00SPaul Walmsley #define OMAP2420_EN_IVA_MPU_SHIFT 8 378f38ca10aSPaul Walmsley #define OMAP2420_EN_IVA_MPU_MASK (1 << 8) 37969d88a00SPaul Walmsley #define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT 0 380f38ca10aSPaul Walmsley #define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_MASK (1 << 0) 38169d88a00SPaul Walmsley 38269d88a00SPaul Walmsley /* CM_ICLKEN_DSP */ 38369d88a00SPaul Walmsley #define OMAP2420_EN_DSP_IPI_SHIFT 1 384f38ca10aSPaul Walmsley #define OMAP2420_EN_DSP_IPI_MASK (1 << 1) 38569d88a00SPaul Walmsley 38669d88a00SPaul Walmsley /* CM_IDLEST_DSP */ 387f38ca10aSPaul Walmsley #define OMAP2420_ST_IVA_MASK (1 << 8) 388f38ca10aSPaul Walmsley #define OMAP2420_ST_IPI_MASK (1 << 1) 389f38ca10aSPaul Walmsley #define OMAP24XX_ST_DSP_MASK (1 << 0) 39069d88a00SPaul Walmsley 39169d88a00SPaul Walmsley /* CM_AUTOIDLE_DSP */ 392f38ca10aSPaul Walmsley #define OMAP2420_AUTO_DSP_IPI_MASK (1 << 1) 39369d88a00SPaul Walmsley 39469d88a00SPaul Walmsley /* CM_CLKSEL_DSP */ 395f38ca10aSPaul Walmsley #define OMAP2420_SYNC_IVA_MASK (1 << 13) 39669d88a00SPaul Walmsley #define OMAP2420_CLKSEL_IVA_SHIFT 8 39769d88a00SPaul Walmsley #define OMAP2420_CLKSEL_IVA_MASK (0x1f << 8) 398f38ca10aSPaul Walmsley #define OMAP24XX_SYNC_DSP_MASK (1 << 7) 39969d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSP_IF_SHIFT 5 40069d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSP_IF_MASK (0x3 << 5) 40169d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSP_SHIFT 0 40269d88a00SPaul Walmsley #define OMAP24XX_CLKSEL_DSP_MASK (0x1f << 0) 40369d88a00SPaul Walmsley 40469d88a00SPaul Walmsley /* CM_CLKSTCTRL_DSP */ 405801954d3SPaul Walmsley #define OMAP2420_AUTOSTATE_IVA_SHIFT 8 406801954d3SPaul Walmsley #define OMAP2420_AUTOSTATE_IVA_MASK (1 << 8) 407801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_DSP_SHIFT 0 408801954d3SPaul Walmsley #define OMAP24XX_AUTOSTATE_DSP_MASK (1 << 0) 40969d88a00SPaul Walmsley 41069d88a00SPaul Walmsley /* CM_FCLKEN_MDM */ 41169d88a00SPaul Walmsley /* 2430 only */ 41269d88a00SPaul Walmsley #define OMAP2430_EN_OSC_SHIFT 1 413f38ca10aSPaul Walmsley #define OMAP2430_EN_OSC_MASK (1 << 1) 41469d88a00SPaul Walmsley 41569d88a00SPaul Walmsley /* CM_ICLKEN_MDM */ 41669d88a00SPaul Walmsley /* 2430 only */ 41769d88a00SPaul Walmsley #define OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT 0 418f38ca10aSPaul Walmsley #define OMAP2430_CM_ICLKEN_MDM_EN_MDM_MASK (1 << 0) 41969d88a00SPaul Walmsley 42069d88a00SPaul Walmsley /* CM_IDLEST_MDM specific bits */ 42169d88a00SPaul Walmsley /* 2430 only */ 42269d88a00SPaul Walmsley 42369d88a00SPaul Walmsley /* CM_AUTOIDLE_MDM */ 42469d88a00SPaul Walmsley /* 2430 only */ 425f38ca10aSPaul Walmsley #define OMAP2430_AUTO_OSC_MASK (1 << 1) 426f38ca10aSPaul Walmsley #define OMAP2430_AUTO_MDM_MASK (1 << 0) 42769d88a00SPaul Walmsley 42869d88a00SPaul Walmsley /* CM_CLKSEL_MDM */ 42969d88a00SPaul Walmsley /* 2430 only */ 430f38ca10aSPaul Walmsley #define OMAP2430_SYNC_MDM_MASK (1 << 4) 43169d88a00SPaul Walmsley #define OMAP2430_CLKSEL_MDM_SHIFT 0 43269d88a00SPaul Walmsley #define OMAP2430_CLKSEL_MDM_MASK (0xf << 0) 43369d88a00SPaul Walmsley 43469d88a00SPaul Walmsley /* CM_CLKSTCTRL_MDM */ 43569d88a00SPaul Walmsley /* 2430 only */ 436801954d3SPaul Walmsley #define OMAP2430_AUTOSTATE_MDM_SHIFT 0 437801954d3SPaul Walmsley #define OMAP2430_AUTOSTATE_MDM_MASK (1 << 0) 43869d88a00SPaul Walmsley 43969d88a00SPaul Walmsley #endif 440