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 */ 2269d88a00SPaul Walmsley #define OMAP24XX_VOLTTRANS_ST (1 << 2) 2369d88a00SPaul Walmsley #define OMAP24XX_WKUP2_ST (1 << 1) 2469d88a00SPaul Walmsley #define OMAP24XX_WKUP1_ST (1 << 0) 2569d88a00SPaul Walmsley 2669d88a00SPaul Walmsley /* PRCM_IRQENABLE_MPU, PM_IRQENABLE_DSP, PRCM_IRQENABLE_IVA shared bits */ 2769d88a00SPaul Walmsley #define OMAP24XX_VOLTTRANS_EN (1 << 2) 2869d88a00SPaul Walmsley #define OMAP24XX_WKUP2_EN (1 << 1) 2969d88a00SPaul Walmsley #define OMAP24XX_WKUP1_EN (1 << 0) 3069d88a00SPaul Walmsley 3169d88a00SPaul Walmsley /* PM_WKDEP_GFX, PM_WKDEP_MPU, PM_WKDEP_DSP, PM_WKDEP_MDM shared bits */ 32*fe6a58f8SPaul Walmsley #define OMAP24XX_EN_MPU_SHIFT 1 33*fe6a58f8SPaul Walmsley #define OMAP24XX_EN_MPU_MASK (1 << 1) 34*fe6a58f8SPaul Walmsley #define OMAP24XX_EN_CORE_SHIFT 0 35*fe6a58f8SPaul 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) 4369d88a00SPaul Walmsley #define OMAP24XX_MEMRETSTATE (1 << 3) 4469d88a00SPaul Walmsley 4569d88a00SPaul Walmsley /* PM_PWSTCTRL_GFX, PM_PWSTCTRL_DSP, PM_PWSTCTRL_MDM shared bits */ 4669d88a00SPaul Walmsley #define OMAP24XX_FORCESTATE (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 */ 5269d88a00SPaul Walmsley #define OMAP24XX_CLKACTIVITY (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 */ 7469d88a00SPaul Walmsley #define OMAP24XX_AUTOIDLE (1 << 0) 7569d88a00SPaul Walmsley 7669d88a00SPaul Walmsley /* PRCM_IRQSTATUS_MPU specific bits */ 7769d88a00SPaul Walmsley #define OMAP2430_DPLL_RECAL_ST (1 << 6) 7869d88a00SPaul Walmsley #define OMAP24XX_TRANSITION_ST (1 << 5) 7969d88a00SPaul Walmsley #define OMAP24XX_EVGENOFF_ST (1 << 4) 8069d88a00SPaul Walmsley #define OMAP24XX_EVGENON_ST (1 << 3) 8169d88a00SPaul Walmsley 8269d88a00SPaul Walmsley /* PRCM_IRQENABLE_MPU specific bits */ 8369d88a00SPaul Walmsley #define OMAP2430_DPLL_RECAL_EN (1 << 6) 8469d88a00SPaul Walmsley #define OMAP24XX_TRANSITION_EN (1 << 5) 8569d88a00SPaul Walmsley #define OMAP24XX_EVGENOFF_EN (1 << 4) 8669d88a00SPaul Walmsley #define OMAP24XX_EVGENON_EN (1 << 3) 8769d88a00SPaul Walmsley 8869d88a00SPaul Walmsley /* PRCM_VOLTCTRL */ 8969d88a00SPaul Walmsley #define OMAP24XX_AUTO_EXTVOLT (1 << 15) 9069d88a00SPaul Walmsley #define OMAP24XX_FORCE_EXTVOLT (1 << 14) 9169d88a00SPaul Walmsley #define OMAP24XX_SETOFF_LEVEL_SHIFT 12 9269d88a00SPaul Walmsley #define OMAP24XX_SETOFF_LEVEL_MASK (0x3 << 12) 9369d88a00SPaul Walmsley #define OMAP24XX_MEMRETCTRL (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 10769d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_EN (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 11369d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_EN (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 12169d88a00SPaul Walmsley #define OMAP24XX_EMULATION_EN (1 << 0) 12269d88a00SPaul Walmsley 12369d88a00SPaul Walmsley /* PRCM_CLKCFG_CTRL */ 12469d88a00SPaul Walmsley #define OMAP24XX_VALID_CONFIG (1 << 0) 12569d88a00SPaul Walmsley 12669d88a00SPaul Walmsley /* PRCM_CLKCFG_STATUS */ 12769d88a00SPaul Walmsley #define OMAP24XX_CONFIG_STATUS (1 << 0) 12869d88a00SPaul Walmsley 12969d88a00SPaul Walmsley /* PRCM_VOLTSETUP specific bits */ 13069d88a00SPaul Walmsley 13169d88a00SPaul Walmsley /* PRCM_CLKSSETUP specific bits */ 13269d88a00SPaul Walmsley 13369d88a00SPaul Walmsley /* PRCM_POLCTRL */ 13469d88a00SPaul Walmsley #define OMAP2420_CLKOUT2_POL (1 << 10) 13569d88a00SPaul Walmsley #define OMAP24XX_CLKOUT_POL (1 << 9) 13669d88a00SPaul Walmsley #define OMAP24XX_CLKREQ_POL (1 << 8) 13769d88a00SPaul Walmsley #define OMAP2430_USE_POWEROK (1 << 2) 13869d88a00SPaul Walmsley #define OMAP2430_POWEROK_POL (1 << 1) 13969d88a00SPaul Walmsley #define OMAP24XX_EXTVOL_POL (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 */ 145*fe6a58f8SPaul Walmsley #define OMAP2430_PM_WKDEP_MPU_EN_MDM_SHIFT 5 146*fe6a58f8SPaul Walmsley #define OMAP2430_PM_WKDEP_MPU_EN_MDM_MASK (1 << 5) 147*fe6a58f8SPaul Walmsley #define OMAP24XX_PM_WKDEP_MPU_EN_DSP_SHIFT 2 148*fe6a58f8SPaul 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 */ 15769d88a00SPaul Walmsley #define OMAP2430_FORCESTATE (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*/ 17169d88a00SPaul Walmsley #define OMAP2430_PM_WKDEP_CORE_EN_MDM (1 << 5) 17269d88a00SPaul Walmsley #define OMAP24XX_PM_WKDEP_CORE_EN_GFX (1 << 3) 17369d88a00SPaul Walmsley #define OMAP24XX_PM_WKDEP_CORE_EN_DSP (1 << 2) 17469d88a00SPaul Walmsley 17569d88a00SPaul Walmsley /* PM_PWSTCTRL_CORE specific bits */ 17669d88a00SPaul Walmsley #define OMAP24XX_MEMORYCHANGE (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) 18369d88a00SPaul Walmsley #define OMAP24XX_MEM3RETSTATE (1 << 5) 18469d88a00SPaul Walmsley #define OMAP24XX_MEM2RETSTATE (1 << 4) 18569d88a00SPaul Walmsley #define OMAP24XX_MEM1RETSTATE (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 */ 19669d88a00SPaul Walmsley #define OMAP24XX_GFX_RST (1 << 0) 19769d88a00SPaul Walmsley 19869d88a00SPaul Walmsley /* RM_RSTST_GFX specific bits */ 19969d88a00SPaul Walmsley #define OMAP24XX_GFX_SW_RST (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" */ 21269d88a00SPaul Walmsley #define OMAP24XX_EXTWMPU_RST (1 << 6) 21369d88a00SPaul Walmsley #define OMAP24XX_SECU_WD_RST (1 << 5) 21469d88a00SPaul Walmsley #define OMAP24XX_MPU_WD_RST (1 << 4) 21569d88a00SPaul Walmsley #define OMAP24XX_SECU_VIOL_RST (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 */ 22269d88a00SPaul Walmsley #define OMAP2420_RST_IVA (1 << 8) 22369d88a00SPaul Walmsley #define OMAP24XX_RST2_DSP (1 << 1) 22469d88a00SPaul Walmsley #define OMAP24XX_RST1_DSP (1 << 0) 22569d88a00SPaul Walmsley 22669d88a00SPaul Walmsley /* RM_RSTST_DSP specific bits */ 22769d88a00SPaul Walmsley /* 2430 calls GLOBALWMPU_RST "GLOBALWARM_RST" */ 22869d88a00SPaul Walmsley #define OMAP2420_IVA_SW_RST (1 << 8) 22969d88a00SPaul Walmsley #define OMAP24XX_DSP_SW_RST2 (1 << 5) 23069d88a00SPaul Walmsley #define OMAP24XX_DSP_SW_RST1 (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) 23869d88a00SPaul Walmsley #define OMAP2420_MEMIRETSTATE (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 */ 25169d88a00SPaul Walmsley #define OMAP2430_PWRON1_MDM (1 << 1) 25269d88a00SPaul Walmsley #define OMAP2430_RST1_MDM (1 << 0) 25369d88a00SPaul Walmsley 25469d88a00SPaul Walmsley /* RM_RSTST_MDM specific bits */ 25569d88a00SPaul Walmsley /* 2430 only */ 25669d88a00SPaul Walmsley #define OMAP2430_MDM_SECU_VIOL (1 << 6) 25769d88a00SPaul Walmsley #define OMAP2430_MDM_SW_PWRON1 (1 << 5) 25869d88a00SPaul Walmsley #define OMAP2430_MDM_SW_RST1 (1 << 4) 25969d88a00SPaul Walmsley 26069d88a00SPaul Walmsley /* PM_WKEN_MDM */ 26169d88a00SPaul Walmsley /* 2430 only */ 26269d88a00SPaul Walmsley #define OMAP2430_PM_WKEN_MDM_EN_MDM (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 */ 27269d88a00SPaul Walmsley #define OMAP2430_KILLDOMAINWKUP (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