171b9114dSArnd Bergmann /* SPDX-License-Identifier: GPL-2.0-only */ 271b9114dSArnd Bergmann /* 371b9114dSArnd Bergmann * Copyright 2008 Openmoko, Inc. 471b9114dSArnd Bergmann * Copyright 2008 Simtec Electronics 571b9114dSArnd Bergmann * http://armlinux.simtec.co.uk/ 671b9114dSArnd Bergmann * Ben Dooks <ben@simtec.co.uk> 771b9114dSArnd Bergmann * 871b9114dSArnd Bergmann * S3C64XX - syscon power and sleep control registers 971b9114dSArnd Bergmann */ 1071b9114dSArnd Bergmann 1171b9114dSArnd Bergmann #ifndef __MACH_S3C64XX_REGS_SYSCON_POWER_H 1271b9114dSArnd Bergmann #define __MACH_S3C64XX_REGS_SYSCON_POWER_H __FILE__ 1371b9114dSArnd Bergmann 1471b9114dSArnd Bergmann #define S3C64XX_PWR_CFG S3C_SYSREG(0x804) 1571b9114dSArnd Bergmann 1671b9114dSArnd Bergmann #define S3C64XX_PWRCFG_OSC_OTG_DISABLE (1 << 17) 1771b9114dSArnd Bergmann #define S3C64XX_PWRCFG_MMC2_DISABLE (1 << 16) 1871b9114dSArnd Bergmann #define S3C64XX_PWRCFG_MMC1_DISABLE (1 << 15) 1971b9114dSArnd Bergmann #define S3C64XX_PWRCFG_MMC0_DISABLE (1 << 14) 2071b9114dSArnd Bergmann #define S3C64XX_PWRCFG_HSI_DISABLE (1 << 13) 2171b9114dSArnd Bergmann #define S3C64XX_PWRCFG_TS_DISABLE (1 << 12) 2271b9114dSArnd Bergmann #define S3C64XX_PWRCFG_RTC_TICK_DISABLE (1 << 11) 2371b9114dSArnd Bergmann #define S3C64XX_PWRCFG_RTC_ALARM_DISABLE (1 << 10) 2471b9114dSArnd Bergmann #define S3C64XX_PWRCFG_MSM_DISABLE (1 << 9) 2571b9114dSArnd Bergmann #define S3C64XX_PWRCFG_KEY_DISABLE (1 << 8) 2671b9114dSArnd Bergmann #define S3C64XX_PWRCFG_BATF_DISABLE (1 << 7) 2771b9114dSArnd Bergmann 2871b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_WFI_MASK (0x3 << 5) 2971b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_WFI_SHIFT (5) 3071b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_WFI_IGNORE (0x0 << 5) 3171b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_WFI_IDLE (0x1 << 5) 3271b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_WFI_STOP (0x2 << 5) 3371b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_WFI_SLEEP (0x3 << 5) 3471b9114dSArnd Bergmann 3571b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_BATFLT_MASK (0x3 << 3) 3671b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_BATFLT_SHIFT (3) 3771b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_BATFLT_IGNORE (0x0 << 3) 3871b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_BATFLT_IRQ (0x1 << 3) 3971b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_BATFLT_SLEEP (0x3 << 3) 4071b9114dSArnd Bergmann 4171b9114dSArnd Bergmann #define S3C64XX_PWRCFG_CFG_BAT_WAKE (1 << 2) 4271b9114dSArnd Bergmann #define S3C64XX_PWRCFG_OSC27_EN (1 << 0) 4371b9114dSArnd Bergmann 4471b9114dSArnd Bergmann #define S3C64XX_EINT_MASK S3C_SYSREG(0x808) 4571b9114dSArnd Bergmann 4671b9114dSArnd Bergmann #define S3C64XX_NORMAL_CFG S3C_SYSREG(0x810) 4771b9114dSArnd Bergmann 4871b9114dSArnd Bergmann #define S3C64XX_NORMALCFG_IROM_ON (1 << 30) 4971b9114dSArnd Bergmann #define S3C64XX_NORMALCFG_DOMAIN_ETM_ON (1 << 16) 5071b9114dSArnd Bergmann #define S3C64XX_NORMALCFG_DOMAIN_S_ON (1 << 15) 5171b9114dSArnd Bergmann #define S3C64XX_NORMALCFG_DOMAIN_F_ON (1 << 14) 5271b9114dSArnd Bergmann #define S3C64XX_NORMALCFG_DOMAIN_P_ON (1 << 13) 5371b9114dSArnd Bergmann #define S3C64XX_NORMALCFG_DOMAIN_I_ON (1 << 12) 5471b9114dSArnd Bergmann #define S3C64XX_NORMALCFG_DOMAIN_G_ON (1 << 10) 5571b9114dSArnd Bergmann #define S3C64XX_NORMALCFG_DOMAIN_V_ON (1 << 9) 5671b9114dSArnd Bergmann 5771b9114dSArnd Bergmann #define S3C64XX_STOP_CFG S3C_SYSREG(0x814) 5871b9114dSArnd Bergmann 5971b9114dSArnd Bergmann #define S3C64XX_STOPCFG_MEMORY_ARM_ON (1 << 29) 6071b9114dSArnd Bergmann #define S3C64XX_STOPCFG_TOP_MEMORY_ON (1 << 20) 6171b9114dSArnd Bergmann #define S3C64XX_STOPCFG_ARM_LOGIC_ON (1 << 17) 6271b9114dSArnd Bergmann #define S3C64XX_STOPCFG_TOP_LOGIC_ON (1 << 8) 6371b9114dSArnd Bergmann #define S3C64XX_STOPCFG_OSC_EN (1 << 0) 6471b9114dSArnd Bergmann 6571b9114dSArnd Bergmann #define S3C64XX_SLEEP_CFG S3C_SYSREG(0x818) 6671b9114dSArnd Bergmann 6771b9114dSArnd Bergmann #define S3C64XX_SLEEPCFG_OSC_EN (1 << 0) 6871b9114dSArnd Bergmann 6971b9114dSArnd Bergmann #define S3C64XX_STOP_MEM_CFG S3C_SYSREG(0x81c) 7071b9114dSArnd Bergmann 7171b9114dSArnd Bergmann #define S3C64XX_STOPMEMCFG_MODEMIF_RETAIN (1 << 6) 7271b9114dSArnd Bergmann #define S3C64XX_STOPMEMCFG_HOSTIF_RETAIN (1 << 5) 7371b9114dSArnd Bergmann #define S3C64XX_STOPMEMCFG_OTG_RETAIN (1 << 4) 7471b9114dSArnd Bergmann #define S3C64XX_STOPMEMCFG_HSMCC_RETAIN (1 << 3) 7571b9114dSArnd Bergmann #define S3C64XX_STOPMEMCFG_IROM_RETAIN (1 << 2) 7671b9114dSArnd Bergmann #define S3C64XX_STOPMEMCFG_IRDA_RETAIN (1 << 1) 7771b9114dSArnd Bergmann #define S3C64XX_STOPMEMCFG_NFCON_RETAIN (1 << 0) 7871b9114dSArnd Bergmann 7971b9114dSArnd Bergmann #define S3C64XX_OSC_STABLE S3C_SYSREG(0x824) 8071b9114dSArnd Bergmann #define S3C64XX_PWR_STABLE S3C_SYSREG(0x828) 8171b9114dSArnd Bergmann 8271b9114dSArnd Bergmann #define S3C64XX_WAKEUP_STAT S3C_SYSREG(0x908) 8371b9114dSArnd Bergmann 8471b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_MMC2 (1 << 11) 8571b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_MMC1 (1 << 10) 8671b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_MMC0 (1 << 9) 8771b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_HSI (1 << 8) 8871b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_BATFLT (1 << 6) 8971b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_MSM (1 << 5) 9071b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_KEY (1 << 4) 9171b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_TS (1 << 3) 9271b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_RTC_TICK (1 << 2) 9371b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_RTC_ALARM (1 << 1) 9471b9114dSArnd Bergmann #define S3C64XX_WAKEUPSTAT_EINT (1 << 0) 9571b9114dSArnd Bergmann 9671b9114dSArnd Bergmann #define S3C64XX_BLK_PWR_STAT S3C_SYSREG(0x90c) 9771b9114dSArnd Bergmann 9871b9114dSArnd Bergmann #define S3C64XX_BLKPWRSTAT_G (1 << 7) 9971b9114dSArnd Bergmann #define S3C64XX_BLKPWRSTAT_ETM (1 << 6) 10071b9114dSArnd Bergmann #define S3C64XX_BLKPWRSTAT_S (1 << 5) 10171b9114dSArnd Bergmann #define S3C64XX_BLKPWRSTAT_F (1 << 4) 10271b9114dSArnd Bergmann #define S3C64XX_BLKPWRSTAT_P (1 << 3) 10371b9114dSArnd Bergmann #define S3C64XX_BLKPWRSTAT_I (1 << 2) 10471b9114dSArnd Bergmann #define S3C64XX_BLKPWRSTAT_V (1 << 1) 10571b9114dSArnd Bergmann #define S3C64XX_BLKPWRSTAT_TOP (1 << 0) 10671b9114dSArnd Bergmann 10771b9114dSArnd Bergmann #define S3C64XX_INFORM0 S3C_SYSREG(0xA00) 10871b9114dSArnd Bergmann #define S3C64XX_INFORM1 S3C_SYSREG(0xA04) 10971b9114dSArnd Bergmann #define S3C64XX_INFORM2 S3C_SYSREG(0xA08) 11071b9114dSArnd Bergmann #define S3C64XX_INFORM3 S3C_SYSREG(0xA0C) 11171b9114dSArnd Bergmann 11271b9114dSArnd Bergmann #endif /* __MACH_S3C64XX_REGS_SYSCON_POWER_H */ 113