169d88a00SPaul Walmsley #ifndef __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_24XX_H 269d88a00SPaul Walmsley #define __ARCH_ARM_MACH_OMAP2_PRM_REGBITS_24XX_H 369d88a00SPaul Walmsley 469d88a00SPaul Walmsley /* 569d88a00SPaul Walmsley * OMAP24XX Power/Reset 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 "prm.h" 1869d88a00SPaul Walmsley 1969d88a00SPaul Walmsley /* Bits shared between registers */ 2069d88a00SPaul Walmsley 2169d88a00SPaul Walmsley /* PRCM_IRQSTATUS_MPU, PM_IRQSTATUS_DSP, PRCM_IRQSTATUS_IVA shared bits */ 22*f38ca10aSPaul Walmsley #define OMAP24XX_VOLTTRANS_ST_MASK (1 << 2) 23*f38ca10aSPaul Walmsley #define OMAP24XX_WKUP2_ST_MASK (1 << 1) 24*f38ca10aSPaul Walmsley #define OMAP24XX_WKUP1_ST_MASK (1 << 0) 2569d88a00SPaul Walmsley 2669d88a00SPaul Walmsley /* PRCM_IRQENABLE_MPU, PM_IRQENABLE_DSP, PRCM_IRQENABLE_IVA shared bits */ 27*f38ca10aSPaul Walmsley #define OMAP24XX_VOLTTRANS_EN_MASK (1 << 2) 28*f38ca10aSPaul Walmsley #define OMAP24XX_WKUP2_EN_MASK (1 << 1) 29*f38ca10aSPaul Walmsley #define OMAP24XX_WKUP1_EN_MASK (1 << 0) 3069d88a00SPaul Walmsley 3169d88a00SPaul Walmsley /* PM_WKDEP_GFX, PM_WKDEP_MPU, PM_WKDEP_DSP, PM_WKDEP_MDM shared bits */ 32fe6a58f8SPaul Walmsley #define OMAP24XX_EN_MPU_SHIFT 1 33fe6a58f8SPaul Walmsley #define OMAP24XX_EN_MPU_MASK (1 << 1) 34fe6a58f8SPaul Walmsley #define OMAP24XX_EN_CORE_SHIFT 0 35fe6a58f8SPaul Walmsley #define OMAP24XX_EN_CORE_MASK (1 << 0) 3669d88a00SPaul Walmsley 3769d88a00SPaul Walmsley /* 3869d88a00SPaul Walmsley * PM_PWSTCTRL_MPU, PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM 3969d88a00SPaul Walmsley * shared bits 4069d88a00SPaul Walmsley */ 4169d88a00SPaul Walmsley #define OMAP24XX_MEMONSTATE_SHIFT 10 4269d88a00SPaul Walmsley #define OMAP24XX_MEMONSTATE_MASK (0x3 << 10) 43*f38ca10aSPaul Walmsley #define OMAP24XX_MEMRETSTATE_MASK (1 << 3) 4469d88a00SPaul Walmsley 4569d88a00SPaul Walmsley /* PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM shared bits */ 46*f38ca10aSPaul Walmsley #define OMAP24XX_FORCESTATE_MASK (1 << 18) 4769d88a00SPaul Walmsley 4869d88a00SPaul Walmsley /* 4969d88a00SPaul Walmsley * PM_PWSTST_CORE, PM_PWSTST_GFX, PM_PWSTST_MPU, PM_PWSTST_DSP, 5069d88a00SPaul Walmsley * PM_PWSTST_MDM shared bits 5169d88a00SPaul Walmsley */ 52*f38ca10aSPaul Walmsley #define OMAP24XX_CLKACTIVITY_MASK (1 << 19) 5369d88a00SPaul Walmsley 5469d88a00SPaul Walmsley /* PM_PWSTST_MPU, PM_PWSTST_CORE, PM_PWSTST_DSP shared bits */ 5569d88a00SPaul Walmsley #define OMAP24XX_LASTSTATEENTERED_SHIFT 4 5669d88a00SPaul Walmsley #define OMAP24XX_LASTSTATEENTERED_MASK (0x3 << 4) 5769d88a00SPaul Walmsley 5869d88a00SPaul Walmsley /* PM_PWSTST_MPU and PM_PWSTST_DSP shared bits */ 5969d88a00SPaul Walmsley #define OMAP2430_MEMSTATEST_SHIFT 10 6069d88a00SPaul Walmsley #define OMAP2430_MEMSTATEST_MASK (0x3 << 10) 6169d88a00SPaul Walmsley 6269d88a00SPaul Walmsley /* PM_PWSTST_GFX, PM_PWSTST_DSP, PM_PWSTST_MDM shared bits */ 6369d88a00SPaul Walmsley #define OMAP24XX_POWERSTATEST_SHIFT 0 6469d88a00SPaul Walmsley #define OMAP24XX_POWERSTATEST_MASK (0x3 << 0) 6569d88a00SPaul Walmsley 6669d88a00SPaul Walmsley 6769d88a00SPaul Walmsley /* Bits specific to each register */ 6869d88a00SPaul Walmsley 6969d88a00SPaul Walmsley /* PRCM_REVISION */ 7069d88a00SPaul Walmsley #define OMAP24XX_REV_SHIFT 0 7169d88a00SPaul Walmsley #define OMAP24XX_REV_MASK (0xff << 0) 7269d88a00SPaul Walmsley 7369d88a00SPaul Walmsley /* PRCM_SYSCONFIG */ 74*f38ca10aSPaul Walmsley #define OMAP24XX_AUTOIDLE_MASK (1 << 0) 7569d88a00SPaul Walmsley 7669d88a00SPaul Walmsley /* PRCM_IRQSTATUS_MPU specific bits */ 77*f38ca10aSPaul Walmsley #define OMAP2430_DPLL_RECAL_ST_MASK (1 << 6) 78*f38ca10aSPaul Walmsley #define OMAP24XX_TRANSITION_ST_MASK (1 << 5) 79*f38ca10aSPaul Walmsley #define OMAP24XX_EVGENOFF_ST_MASK (1 << 4) 80*f38ca10aSPaul Walmsley #define OMAP24XX_EVGENON_ST_MASK (1 << 3) 8169d88a00SPaul Walmsley 8269d88a00SPaul Walmsley /* PRCM_IRQENABLE_MPU specific bits */ 83*f38ca10aSPaul Walmsley #define OMAP2430_DPLL_RECAL_EN_MASK (1 << 6) 84*f38ca10aSPaul Walmsley #define OMAP24XX_TRANSITION_EN_MASK (1 << 5) 85*f38ca10aSPaul Walmsley #define OMAP24XX_EVGENOFF_EN_MASK (1 << 4) 86*f38ca10aSPaul Walmsley #define OMAP24XX_EVGENON_EN_MASK (1 << 3) 8769d88a00SPaul Walmsley 8869d88a00SPaul Walmsley /* PRCM_VOLTCTRL */ 89*f38ca10aSPaul Walmsley #define OMAP24XX_AUTO_EXTVOLT_MASK (1 << 15) 90*f38ca10aSPaul Walmsley #define OMAP24XX_FORCE_EXTVOLT_MASK (1 << 14) 9169d88a00SPaul Walmsley #define OMAP24XX_SETOFF_LEVEL_SHIFT 12 9269d88a00SPaul Walmsley #define OMAP24XX_SETOFF_LEVEL_MASK (0x3 << 12) 93*f38ca10aSPaul Walmsley #define OMAP24XX_MEMRETCTRL_MASK (1 << 8) 9469d88a00SPaul Walmsley #define OMAP24XX_SETRET_LEVEL_SHIFT 6 9569d88a00SPaul Walmsley #define OMAP24XX_SETRET_LEVEL_MASK (0x3 << 6) 9669d88a00SPaul Walmsley #define OMAP24XX_VOLT_LEVEL_SHIFT 0 9769d88a00SPaul Walmsley #define OMAP24XX_VOLT_LEVEL_MASK (0x3 << 0) 9869d88a00SPaul Walmsley 9969d88a00SPaul Walmsley /* PRCM_VOLTST */ 10069d88a00SPaul Walmsley #define OMAP24XX_ST_VOLTLEVEL_SHIFT 0 10169d88a00SPaul Walmsley #define OMAP24XX_ST_VOLTLEVEL_MASK (0x3 << 0) 10269d88a00SPaul Walmsley 10369d88a00SPaul Walmsley /* PRCM_CLKSRC_CTRL specific bits */ 10469d88a00SPaul Walmsley 10569d88a00SPaul Walmsley /* PRCM_CLKOUT_CTRL */ 10669d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_EN_SHIFT 15 107*f38ca10aSPaul Walmsley #define OMAP2420_CLKOUT2_EN_MASK (1 << 15) 10869d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_DIV_SHIFT 11 10969d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_DIV_MASK (0x7 << 11) 11069d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_SOURCE_SHIFT 8 11169d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_SOURCE_MASK (0x3 << 8) 11269d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_EN_SHIFT 7 113*f38ca10aSPaul Walmsley #define OMAP24XX_CLKOUT_EN_MASK (1 << 7) 11469d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_DIV_SHIFT 3 11569d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_DIV_MASK (0x7 << 3) 11669d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_SOURCE_SHIFT 0 11769d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_SOURCE_MASK (0x3 << 0) 11869d88a00SPaul Walmsley 11969d88a00SPaul Walmsley /* PRCM_CLKEMUL_CTRL */ 12069d88a00SPaul Walmsley #define OMAP24XX_EMULATION_EN_SHIFT 0 121*f38ca10aSPaul Walmsley #define OMAP24XX_EMULATION_EN_MASK (1 << 0) 12269d88a00SPaul Walmsley 12369d88a00SPaul Walmsley /* PRCM_CLKCFG_CTRL */ 124*f38ca10aSPaul Walmsley #define OMAP24XX_VALID_CONFIG_MASK (1 << 0) 12569d88a00SPaul Walmsley 12669d88a00SPaul Walmsley /* PRCM_CLKCFG_STATUS */ 127*f38ca10aSPaul Walmsley #define OMAP24XX_CONFIG_STATUS_MASK (1 << 0) 12869d88a00SPaul Walmsley 12969d88a00SPaul Walmsley /* PRCM_VOLTSETUP specific bits */ 13069d88a00SPaul Walmsley 13169d88a00SPaul Walmsley /* PRCM_CLKSSETUP specific bits */ 13269d88a00SPaul Walmsley 13369d88a00SPaul Walmsley /* PRCM_POLCTRL */ 134*f38ca10aSPaul Walmsley #define OMAP2420_CLKOUT2_POL_MASK (1 << 10) 135*f38ca10aSPaul Walmsley #define OMAP24XX_CLKOUT_POL_MASK (1 << 9) 136*f38ca10aSPaul Walmsley #define OMAP24XX_CLKREQ_POL_MASK (1 << 8) 137*f38ca10aSPaul Walmsley #define OMAP2430_USE_POWEROK_MASK (1 << 2) 138*f38ca10aSPaul Walmsley #define OMAP2430_POWEROK_POL_MASK (1 << 1) 139*f38ca10aSPaul Walmsley #define OMAP24XX_EXTVOL_POL_MASK (1 << 0) 14069d88a00SPaul Walmsley 14169d88a00SPaul Walmsley /* RM_RSTST_MPU specific bits */ 14269d88a00SPaul Walmsley /* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" instead */ 14369d88a00SPaul Walmsley 14469d88a00SPaul Walmsley /* PM_WKDEP_MPU specific bits */ 145fe6a58f8SPaul Walmsley #define OMAP2430_PM_WKDEP_MPU_EN_MDM_SHIFT 5 146fe6a58f8SPaul Walmsley #define OMAP2430_PM_WKDEP_MPU_EN_MDM_MASK (1 << 5) 147fe6a58f8SPaul Walmsley #define OMAP24XX_PM_WKDEP_MPU_EN_DSP_SHIFT 2 148fe6a58f8SPaul Walmsley #define OMAP24XX_PM_WKDEP_MPU_EN_DSP_MASK (1 << 2) 14969d88a00SPaul Walmsley 15069d88a00SPaul Walmsley /* PM_EVGENCTRL_MPU specific bits */ 15169d88a00SPaul Walmsley 15269d88a00SPaul Walmsley /* PM_EVEGENONTIM_MPU specific bits */ 15369d88a00SPaul Walmsley 15469d88a00SPaul Walmsley /* PM_EVEGENOFFTIM_MPU specific bits */ 15569d88a00SPaul Walmsley 15669d88a00SPaul Walmsley /* PM_PWSTCTRL_MPU specific bits */ 157*f38ca10aSPaul Walmsley #define OMAP2430_FORCESTATE_MASK (1 << 18) 15869d88a00SPaul Walmsley 15969d88a00SPaul Walmsley /* PM_PWSTST_MPU specific bits */ 16069d88a00SPaul Walmsley /* INTRANSITION, CLKACTIVITY, POWERSTATE, MEMSTATEST are 2430 only */ 16169d88a00SPaul Walmsley 16269d88a00SPaul Walmsley /* PM_WKEN1_CORE specific bits */ 16369d88a00SPaul Walmsley 16469d88a00SPaul Walmsley /* PM_WKEN2_CORE specific bits */ 16569d88a00SPaul Walmsley 16669d88a00SPaul Walmsley /* PM_WKST1_CORE specific bits*/ 16769d88a00SPaul Walmsley 16869d88a00SPaul Walmsley /* PM_WKST2_CORE specific bits */ 16969d88a00SPaul Walmsley 17069d88a00SPaul Walmsley /* PM_WKDEP_CORE specific bits*/ 171*f38ca10aSPaul Walmsley #define OMAP2430_PM_WKDEP_CORE_EN_MDM_MASK (1 << 5) 172*f38ca10aSPaul Walmsley #define OMAP24XX_PM_WKDEP_CORE_EN_GFX_MASK (1 << 3) 173*f38ca10aSPaul Walmsley #define OMAP24XX_PM_WKDEP_CORE_EN_DSP_MASK (1 << 2) 17469d88a00SPaul Walmsley 17569d88a00SPaul Walmsley /* PM_PWSTCTRL_CORE specific bits */ 176*f38ca10aSPaul Walmsley #define OMAP24XX_MEMORYCHANGE_MASK (1 << 20) 17769d88a00SPaul Walmsley #define OMAP24XX_MEM3ONSTATE_SHIFT 14 17869d88a00SPaul Walmsley #define OMAP24XX_MEM3ONSTATE_MASK (0x3 << 14) 17969d88a00SPaul Walmsley #define OMAP24XX_MEM2ONSTATE_SHIFT 12 18069d88a00SPaul Walmsley #define OMAP24XX_MEM2ONSTATE_MASK (0x3 << 12) 18169d88a00SPaul Walmsley #define OMAP24XX_MEM1ONSTATE_SHIFT 10 18269d88a00SPaul Walmsley #define OMAP24XX_MEM1ONSTATE_MASK (0x3 << 10) 183*f38ca10aSPaul Walmsley #define OMAP24XX_MEM3RETSTATE_MASK (1 << 5) 184*f38ca10aSPaul Walmsley #define OMAP24XX_MEM2RETSTATE_MASK (1 << 4) 185*f38ca10aSPaul Walmsley #define OMAP24XX_MEM1RETSTATE_MASK (1 << 3) 18669d88a00SPaul Walmsley 18769d88a00SPaul Walmsley /* PM_PWSTST_CORE specific bits */ 18869d88a00SPaul Walmsley #define OMAP24XX_MEM3STATEST_SHIFT 14 18969d88a00SPaul Walmsley #define OMAP24XX_MEM3STATEST_MASK (0x3 << 14) 19069d88a00SPaul Walmsley #define OMAP24XX_MEM2STATEST_SHIFT 12 19169d88a00SPaul Walmsley #define OMAP24XX_MEM2STATEST_MASK (0x3 << 12) 19269d88a00SPaul Walmsley #define OMAP24XX_MEM1STATEST_SHIFT 10 19369d88a00SPaul Walmsley #define OMAP24XX_MEM1STATEST_MASK (0x3 << 10) 19469d88a00SPaul Walmsley 19569d88a00SPaul Walmsley /* RM_RSTCTRL_GFX */ 196*f38ca10aSPaul Walmsley #define OMAP24XX_GFX_RST_MASK (1 << 0) 19769d88a00SPaul Walmsley 19869d88a00SPaul Walmsley /* RM_RSTST_GFX specific bits */ 199*f38ca10aSPaul Walmsley #define OMAP24XX_GFX_SW_RST_MASK (1 << 4) 20069d88a00SPaul Walmsley 20169d88a00SPaul Walmsley /* PM_PWSTCTRL_GFX specific bits */ 20269d88a00SPaul Walmsley 20369d88a00SPaul Walmsley /* PM_WKDEP_GFX specific bits */ 20469d88a00SPaul Walmsley /* 2430 often calls EN_WAKEUP "EN_WKUP" */ 20569d88a00SPaul Walmsley 20669d88a00SPaul Walmsley /* RM_RSTCTRL_WKUP specific bits */ 20769d88a00SPaul Walmsley 20869d88a00SPaul Walmsley /* RM_RSTTIME_WKUP specific bits */ 20969d88a00SPaul Walmsley 21069d88a00SPaul Walmsley /* RM_RSTST_WKUP specific bits */ 21169d88a00SPaul Walmsley /* 2430 calls EXTWMPU_RST "EXTWARM_RST" and GLOBALWMPU_RST "GLOBALWARM_RST" */ 212*f38ca10aSPaul Walmsley #define OMAP24XX_EXTWMPU_RST_MASK (1 << 6) 213*f38ca10aSPaul Walmsley #define OMAP24XX_SECU_WD_RST_MASK (1 << 5) 214*f38ca10aSPaul Walmsley #define OMAP24XX_MPU_WD_RST_MASK (1 << 4) 215*f38ca10aSPaul Walmsley #define OMAP24XX_SECU_VIOL_RST_MASK (1 << 3) 21669d88a00SPaul Walmsley 21769d88a00SPaul Walmsley /* PM_WKEN_WKUP specific bits */ 21869d88a00SPaul Walmsley 21969d88a00SPaul Walmsley /* PM_WKST_WKUP specific bits */ 22069d88a00SPaul Walmsley 22169d88a00SPaul Walmsley /* RM_RSTCTRL_DSP */ 222*f38ca10aSPaul Walmsley #define OMAP2420_RST_IVA_MASK (1 << 8) 223*f38ca10aSPaul Walmsley #define OMAP24XX_RST2_DSP_MASK (1 << 1) 224*f38ca10aSPaul Walmsley #define OMAP24XX_RST1_DSP_MASK (1 << 0) 22569d88a00SPaul Walmsley 22669d88a00SPaul Walmsley /* RM_RSTST_DSP specific bits */ 22769d88a00SPaul Walmsley /* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" */ 228*f38ca10aSPaul Walmsley #define OMAP2420_IVA_SW_RST_MASK (1 << 8) 229*f38ca10aSPaul Walmsley #define OMAP24XX_DSP_SW_RST2_MASK (1 << 5) 230*f38ca10aSPaul Walmsley #define OMAP24XX_DSP_SW_RST1_MASK (1 << 4) 23169d88a00SPaul Walmsley 23269d88a00SPaul Walmsley /* PM_WKDEP_DSP specific bits */ 23369d88a00SPaul Walmsley 23469d88a00SPaul Walmsley /* PM_PWSTCTRL_DSP specific bits */ 23569d88a00SPaul Walmsley /* 2430 only: MEMONSTATE, MEMRETSTATE */ 23669d88a00SPaul Walmsley #define OMAP2420_MEMIONSTATE_SHIFT 12 23769d88a00SPaul Walmsley #define OMAP2420_MEMIONSTATE_MASK (0x3 << 12) 238*f38ca10aSPaul Walmsley #define OMAP2420_MEMIRETSTATE_MASK (1 << 4) 23969d88a00SPaul Walmsley 24069d88a00SPaul Walmsley /* PM_PWSTST_DSP specific bits */ 24169d88a00SPaul Walmsley /* MEMSTATEST is 2430 only */ 24269d88a00SPaul Walmsley #define OMAP2420_MEMISTATEST_SHIFT 12 24369d88a00SPaul Walmsley #define OMAP2420_MEMISTATEST_MASK (0x3 << 12) 24469d88a00SPaul Walmsley 24569d88a00SPaul Walmsley /* PRCM_IRQSTATUS_DSP specific bits */ 24669d88a00SPaul Walmsley 24769d88a00SPaul Walmsley /* PRCM_IRQENABLE_DSP specific bits */ 24869d88a00SPaul Walmsley 24969d88a00SPaul Walmsley /* RM_RSTCTRL_MDM */ 25069d88a00SPaul Walmsley /* 2430 only */ 251*f38ca10aSPaul Walmsley #define OMAP2430_PWRON1_MDM_MASK (1 << 1) 252*f38ca10aSPaul Walmsley #define OMAP2430_RST1_MDM_MASK (1 << 0) 25369d88a00SPaul Walmsley 25469d88a00SPaul Walmsley /* RM_RSTST_MDM specific bits */ 25569d88a00SPaul Walmsley /* 2430 only */ 256*f38ca10aSPaul Walmsley #define OMAP2430_MDM_SECU_VIOL_MASK (1 << 6) 257*f38ca10aSPaul Walmsley #define OMAP2430_MDM_SW_PWRON1_MASK (1 << 5) 258*f38ca10aSPaul Walmsley #define OMAP2430_MDM_SW_RST1_MASK (1 << 4) 25969d88a00SPaul Walmsley 26069d88a00SPaul Walmsley /* PM_WKEN_MDM */ 26169d88a00SPaul Walmsley /* 2430 only */ 262*f38ca10aSPaul Walmsley #define OMAP2430_PM_WKEN_MDM_EN_MDM_MASK (1 << 0) 26369d88a00SPaul Walmsley 26469d88a00SPaul Walmsley /* PM_WKST_MDM specific bits */ 26569d88a00SPaul Walmsley /* 2430 only */ 26669d88a00SPaul Walmsley 26769d88a00SPaul Walmsley /* PM_WKDEP_MDM specific bits */ 26869d88a00SPaul Walmsley /* 2430 only */ 26969d88a00SPaul Walmsley 27069d88a00SPaul Walmsley /* PM_PWSTCTRL_MDM specific bits */ 27169d88a00SPaul Walmsley /* 2430 only */ 272*f38ca10aSPaul Walmsley #define OMAP2430_KILLDOMAINWKUP_MASK (1 << 19) 27369d88a00SPaul Walmsley 27469d88a00SPaul Walmsley /* PM_PWSTST_MDM specific bits */ 27569d88a00SPaul Walmsley /* 2430 only */ 27669d88a00SPaul Walmsley 27769d88a00SPaul Walmsley /* PRCM_IRQSTATUS_IVA */ 27869d88a00SPaul Walmsley /* 2420 only */ 27969d88a00SPaul Walmsley 28069d88a00SPaul Walmsley /* PRCM_IRQENABLE_IVA */ 28169d88a00SPaul Walmsley /* 2420 only */ 28269d88a00SPaul Walmsley 28369d88a00SPaul Walmsley #endif 284