162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright 2008 Openmoko, Inc. 462306a36Sopenharmony_ci * Copyright 2008 Simtec Electronics 562306a36Sopenharmony_ci * http://armlinux.simtec.co.uk/ 662306a36Sopenharmony_ci * Ben Dooks <ben@simtec.co.uk> 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * S3C64XX - syscon power and sleep control registers 962306a36Sopenharmony_ci*/ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#ifndef __MACH_S3C64XX_REGS_SYSCON_POWER_H 1262306a36Sopenharmony_ci#define __MACH_S3C64XX_REGS_SYSCON_POWER_H __FILE__ 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#define S3C64XX_PWR_CFG S3C_SYSREG(0x804) 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#define S3C64XX_PWRCFG_OSC_OTG_DISABLE (1 << 17) 1762306a36Sopenharmony_ci#define S3C64XX_PWRCFG_MMC2_DISABLE (1 << 16) 1862306a36Sopenharmony_ci#define S3C64XX_PWRCFG_MMC1_DISABLE (1 << 15) 1962306a36Sopenharmony_ci#define S3C64XX_PWRCFG_MMC0_DISABLE (1 << 14) 2062306a36Sopenharmony_ci#define S3C64XX_PWRCFG_HSI_DISABLE (1 << 13) 2162306a36Sopenharmony_ci#define S3C64XX_PWRCFG_TS_DISABLE (1 << 12) 2262306a36Sopenharmony_ci#define S3C64XX_PWRCFG_RTC_TICK_DISABLE (1 << 11) 2362306a36Sopenharmony_ci#define S3C64XX_PWRCFG_RTC_ALARM_DISABLE (1 << 10) 2462306a36Sopenharmony_ci#define S3C64XX_PWRCFG_MSM_DISABLE (1 << 9) 2562306a36Sopenharmony_ci#define S3C64XX_PWRCFG_KEY_DISABLE (1 << 8) 2662306a36Sopenharmony_ci#define S3C64XX_PWRCFG_BATF_DISABLE (1 << 7) 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_WFI_MASK (0x3 << 5) 2962306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_WFI_SHIFT (5) 3062306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_WFI_IGNORE (0x0 << 5) 3162306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_WFI_IDLE (0x1 << 5) 3262306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_WFI_STOP (0x2 << 5) 3362306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_WFI_SLEEP (0x3 << 5) 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_BATFLT_MASK (0x3 << 3) 3662306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_BATFLT_SHIFT (3) 3762306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_BATFLT_IGNORE (0x0 << 3) 3862306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_BATFLT_IRQ (0x1 << 3) 3962306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_BATFLT_SLEEP (0x3 << 3) 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci#define S3C64XX_PWRCFG_CFG_BAT_WAKE (1 << 2) 4262306a36Sopenharmony_ci#define S3C64XX_PWRCFG_OSC27_EN (1 << 0) 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci#define S3C64XX_EINT_MASK S3C_SYSREG(0x808) 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci#define S3C64XX_NORMAL_CFG S3C_SYSREG(0x810) 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci#define S3C64XX_NORMALCFG_IROM_ON (1 << 30) 4962306a36Sopenharmony_ci#define S3C64XX_NORMALCFG_DOMAIN_ETM_ON (1 << 16) 5062306a36Sopenharmony_ci#define S3C64XX_NORMALCFG_DOMAIN_S_ON (1 << 15) 5162306a36Sopenharmony_ci#define S3C64XX_NORMALCFG_DOMAIN_F_ON (1 << 14) 5262306a36Sopenharmony_ci#define S3C64XX_NORMALCFG_DOMAIN_P_ON (1 << 13) 5362306a36Sopenharmony_ci#define S3C64XX_NORMALCFG_DOMAIN_I_ON (1 << 12) 5462306a36Sopenharmony_ci#define S3C64XX_NORMALCFG_DOMAIN_G_ON (1 << 10) 5562306a36Sopenharmony_ci#define S3C64XX_NORMALCFG_DOMAIN_V_ON (1 << 9) 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci#define S3C64XX_STOP_CFG S3C_SYSREG(0x814) 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci#define S3C64XX_STOPCFG_MEMORY_ARM_ON (1 << 29) 6062306a36Sopenharmony_ci#define S3C64XX_STOPCFG_TOP_MEMORY_ON (1 << 20) 6162306a36Sopenharmony_ci#define S3C64XX_STOPCFG_ARM_LOGIC_ON (1 << 17) 6262306a36Sopenharmony_ci#define S3C64XX_STOPCFG_TOP_LOGIC_ON (1 << 8) 6362306a36Sopenharmony_ci#define S3C64XX_STOPCFG_OSC_EN (1 << 0) 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci#define S3C64XX_SLEEP_CFG S3C_SYSREG(0x818) 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci#define S3C64XX_SLEEPCFG_OSC_EN (1 << 0) 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci#define S3C64XX_STOP_MEM_CFG S3C_SYSREG(0x81c) 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci#define S3C64XX_STOPMEMCFG_MODEMIF_RETAIN (1 << 6) 7262306a36Sopenharmony_ci#define S3C64XX_STOPMEMCFG_HOSTIF_RETAIN (1 << 5) 7362306a36Sopenharmony_ci#define S3C64XX_STOPMEMCFG_OTG_RETAIN (1 << 4) 7462306a36Sopenharmony_ci#define S3C64XX_STOPMEMCFG_HSMCC_RETAIN (1 << 3) 7562306a36Sopenharmony_ci#define S3C64XX_STOPMEMCFG_IROM_RETAIN (1 << 2) 7662306a36Sopenharmony_ci#define S3C64XX_STOPMEMCFG_IRDA_RETAIN (1 << 1) 7762306a36Sopenharmony_ci#define S3C64XX_STOPMEMCFG_NFCON_RETAIN (1 << 0) 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci#define S3C64XX_OSC_STABLE S3C_SYSREG(0x824) 8062306a36Sopenharmony_ci#define S3C64XX_PWR_STABLE S3C_SYSREG(0x828) 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci#define S3C64XX_WAKEUP_STAT S3C_SYSREG(0x908) 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_MMC2 (1 << 11) 8562306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_MMC1 (1 << 10) 8662306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_MMC0 (1 << 9) 8762306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_HSI (1 << 8) 8862306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_BATFLT (1 << 6) 8962306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_MSM (1 << 5) 9062306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_KEY (1 << 4) 9162306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_TS (1 << 3) 9262306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_RTC_TICK (1 << 2) 9362306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_RTC_ALARM (1 << 1) 9462306a36Sopenharmony_ci#define S3C64XX_WAKEUPSTAT_EINT (1 << 0) 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci#define S3C64XX_BLK_PWR_STAT S3C_SYSREG(0x90c) 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ci#define S3C64XX_BLKPWRSTAT_G (1 << 7) 9962306a36Sopenharmony_ci#define S3C64XX_BLKPWRSTAT_ETM (1 << 6) 10062306a36Sopenharmony_ci#define S3C64XX_BLKPWRSTAT_S (1 << 5) 10162306a36Sopenharmony_ci#define S3C64XX_BLKPWRSTAT_F (1 << 4) 10262306a36Sopenharmony_ci#define S3C64XX_BLKPWRSTAT_P (1 << 3) 10362306a36Sopenharmony_ci#define S3C64XX_BLKPWRSTAT_I (1 << 2) 10462306a36Sopenharmony_ci#define S3C64XX_BLKPWRSTAT_V (1 << 1) 10562306a36Sopenharmony_ci#define S3C64XX_BLKPWRSTAT_TOP (1 << 0) 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci#define S3C64XX_INFORM0 S3C_SYSREG(0xA00) 10862306a36Sopenharmony_ci#define S3C64XX_INFORM1 S3C_SYSREG(0xA04) 10962306a36Sopenharmony_ci#define S3C64XX_INFORM2 S3C_SYSREG(0xA08) 11062306a36Sopenharmony_ci#define S3C64XX_INFORM3 S3C_SYSREG(0xA0C) 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci#endif /* __MACH_S3C64XX_REGS_SYSCON_POWER_H */ 113