162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) STMicroelectronics 2009 462306a36Sopenharmony_ci * Copyright (C) ST-Ericsson SA 2010 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Author: Kumar Sanghvi <kumar.sanghvi@stericsson.com> 762306a36Sopenharmony_ci * Author: Sundar Iyer <sundar.iyer@stericsson.com> 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * PRCM Unit registers 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#ifndef __DB8500_PRCMU_REGS_H 1362306a36Sopenharmony_ci#define __DB8500_PRCMU_REGS_H 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#define BITS(_start, _end) ((BIT(_end) - BIT(_start)) + BIT(_end)) 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#define PRCM_ACLK_MGT (0x004) 1862306a36Sopenharmony_ci#define PRCM_SVAMMCSPCLK_MGT (0x008) 1962306a36Sopenharmony_ci#define PRCM_SIAMMDSPCLK_MGT (0x00C) 2062306a36Sopenharmony_ci#define PRCM_SGACLK_MGT (0x014) 2162306a36Sopenharmony_ci#define PRCM_UARTCLK_MGT (0x018) 2262306a36Sopenharmony_ci#define PRCM_MSP02CLK_MGT (0x01C) 2362306a36Sopenharmony_ci#define PRCM_I2CCLK_MGT (0x020) 2462306a36Sopenharmony_ci#define PRCM_SDMMCCLK_MGT (0x024) 2562306a36Sopenharmony_ci#define PRCM_SLIMCLK_MGT (0x028) 2662306a36Sopenharmony_ci#define PRCM_PER1CLK_MGT (0x02C) 2762306a36Sopenharmony_ci#define PRCM_PER2CLK_MGT (0x030) 2862306a36Sopenharmony_ci#define PRCM_PER3CLK_MGT (0x034) 2962306a36Sopenharmony_ci#define PRCM_PER5CLK_MGT (0x038) 3062306a36Sopenharmony_ci#define PRCM_PER6CLK_MGT (0x03C) 3162306a36Sopenharmony_ci#define PRCM_PER7CLK_MGT (0x040) 3262306a36Sopenharmony_ci#define PRCM_LCDCLK_MGT (0x044) 3362306a36Sopenharmony_ci#define PRCM_BMLCLK_MGT (0x04C) 3462306a36Sopenharmony_ci#define PRCM_HSITXCLK_MGT (0x050) 3562306a36Sopenharmony_ci#define PRCM_HSIRXCLK_MGT (0x054) 3662306a36Sopenharmony_ci#define PRCM_HDMICLK_MGT (0x058) 3762306a36Sopenharmony_ci#define PRCM_APEATCLK_MGT (0x05C) 3862306a36Sopenharmony_ci#define PRCM_APETRACECLK_MGT (0x060) 3962306a36Sopenharmony_ci#define PRCM_MCDECLK_MGT (0x064) 4062306a36Sopenharmony_ci#define PRCM_IPI2CCLK_MGT (0x068) 4162306a36Sopenharmony_ci#define PRCM_DSIALTCLK_MGT (0x06C) 4262306a36Sopenharmony_ci#define PRCM_DMACLK_MGT (0x074) 4362306a36Sopenharmony_ci#define PRCM_B2R2CLK_MGT (0x078) 4462306a36Sopenharmony_ci#define PRCM_TVCLK_MGT (0x07C) 4562306a36Sopenharmony_ci#define PRCM_UNIPROCLK_MGT (0x278) 4662306a36Sopenharmony_ci#define PRCM_SSPCLK_MGT (0x280) 4762306a36Sopenharmony_ci#define PRCM_RNGCLK_MGT (0x284) 4862306a36Sopenharmony_ci#define PRCM_UICCCLK_MGT (0x27C) 4962306a36Sopenharmony_ci#define PRCM_MSP1CLK_MGT (0x288) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define PRCM_ARM_PLLDIVPS (prcmu_base + 0x118) 5262306a36Sopenharmony_ci#define PRCM_ARM_PLLDIVPS_ARM_BRM_RATE 0x3f 5362306a36Sopenharmony_ci#define PRCM_ARM_PLLDIVPS_MAX_MASK 0xf 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci#define PRCM_PLLARM_LOCKP (prcmu_base + 0x0a8) 5662306a36Sopenharmony_ci#define PRCM_PLLARM_LOCKP_PRCM_PLLARM_LOCKP3 0x2 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#define PRCM_ARM_CHGCLKREQ (prcmu_base + 0x114) 5962306a36Sopenharmony_ci#define PRCM_ARM_CHGCLKREQ_PRCM_ARM_CHGCLKREQ BIT(0) 6062306a36Sopenharmony_ci#define PRCM_ARM_CHGCLKREQ_PRCM_ARM_DIVSEL BIT(16) 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#define PRCM_PLLARM_ENABLE (prcmu_base + 0x98) 6362306a36Sopenharmony_ci#define PRCM_PLLARM_ENABLE_PRCM_PLLARM_ENABLE 0x1 6462306a36Sopenharmony_ci#define PRCM_PLLARM_ENABLE_PRCM_PLLARM_COUNTON 0x100 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci#define PRCM_ARMCLKFIX_MGT (prcmu_base + 0x0) 6762306a36Sopenharmony_ci#define PRCM_A9PL_FORCE_CLKEN (prcmu_base + 0x19C) 6862306a36Sopenharmony_ci#define PRCM_A9_RESETN_CLR (prcmu_base + 0x1f4) 6962306a36Sopenharmony_ci#define PRCM_A9_RESETN_SET (prcmu_base + 0x1f0) 7062306a36Sopenharmony_ci#define PRCM_ARM_LS_CLAMP (prcmu_base + 0x30c) 7162306a36Sopenharmony_ci#define PRCM_SRAM_A9 (prcmu_base + 0x308) 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci#define PRCM_A9PL_FORCE_CLKEN_PRCM_A9PL_FORCE_CLKEN BIT(0) 7462306a36Sopenharmony_ci#define PRCM_A9PL_FORCE_CLKEN_PRCM_A9AXI_FORCE_CLKEN BIT(1) 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci/* CPU mailbox registers */ 7762306a36Sopenharmony_ci#define PRCM_MBOX_CPU_VAL (prcmu_base + 0x0fc) 7862306a36Sopenharmony_ci#define PRCM_MBOX_CPU_SET (prcmu_base + 0x100) 7962306a36Sopenharmony_ci#define PRCM_MBOX_CPU_CLR (prcmu_base + 0x104) 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci#define PRCM_HOSTACCESS_REQ (prcmu_base + 0x334) 8262306a36Sopenharmony_ci#define PRCM_HOSTACCESS_REQ_HOSTACCESS_REQ 0x1 8362306a36Sopenharmony_ci#define PRCM_HOSTACCESS_REQ_WAKE_REQ BIT(16) 8462306a36Sopenharmony_ci#define ARM_WAKEUP_MODEM 0x1 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci#define PRCM_ARM_IT1_CLR (prcmu_base + 0x48C) 8762306a36Sopenharmony_ci#define PRCM_ARM_IT1_VAL (prcmu_base + 0x494) 8862306a36Sopenharmony_ci#define PRCM_HOLD_EVT (prcmu_base + 0x174) 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci#define PRCM_MOD_AWAKE_STATUS (prcmu_base + 0x4A0) 9162306a36Sopenharmony_ci#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_COREPD_AWAKE BIT(0) 9262306a36Sopenharmony_ci#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_AAPD_AWAKE BIT(1) 9362306a36Sopenharmony_ci#define PRCM_MOD_AWAKE_STATUS_PRCM_MOD_VMODEM_OFF_ISO BIT(2) 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci#define PRCM_ITSTATUS0 (prcmu_base + 0x148) 9662306a36Sopenharmony_ci#define PRCM_ITSTATUS1 (prcmu_base + 0x150) 9762306a36Sopenharmony_ci#define PRCM_ITSTATUS2 (prcmu_base + 0x158) 9862306a36Sopenharmony_ci#define PRCM_ITSTATUS3 (prcmu_base + 0x160) 9962306a36Sopenharmony_ci#define PRCM_ITSTATUS4 (prcmu_base + 0x168) 10062306a36Sopenharmony_ci#define PRCM_ITSTATUS5 (prcmu_base + 0x484) 10162306a36Sopenharmony_ci#define PRCM_ITCLEAR5 (prcmu_base + 0x488) 10262306a36Sopenharmony_ci#define PRCM_ARMIT_MASKXP70_IT (prcmu_base + 0x1018) 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci/* System reset register */ 10562306a36Sopenharmony_ci#define PRCM_APE_SOFTRST (prcmu_base + 0x228) 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci/* Level shifter and clamp control registers */ 10862306a36Sopenharmony_ci#define PRCM_MMIP_LS_CLAMP_SET (prcmu_base + 0x420) 10962306a36Sopenharmony_ci#define PRCM_MMIP_LS_CLAMP_CLR (prcmu_base + 0x424) 11062306a36Sopenharmony_ci 11162306a36Sopenharmony_ci#define PRCM_MMIP_LS_CLAMP_DSIPLL_CLAMP BIT(11) 11262306a36Sopenharmony_ci#define PRCM_MMIP_LS_CLAMP_DSIPLL_CLAMPI BIT(22) 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci/* PRCMU clock/PLL/reset registers */ 11562306a36Sopenharmony_ci#define PRCM_PLLSOC0_FREQ (prcmu_base + 0x080) 11662306a36Sopenharmony_ci#define PRCM_PLLSOC1_FREQ (prcmu_base + 0x084) 11762306a36Sopenharmony_ci#define PRCM_PLLARM_FREQ (prcmu_base + 0x088) 11862306a36Sopenharmony_ci#define PRCM_PLLDDR_FREQ (prcmu_base + 0x08C) 11962306a36Sopenharmony_ci#define PRCM_PLL_FREQ_D_SHIFT 0 12062306a36Sopenharmony_ci#define PRCM_PLL_FREQ_D_MASK BITS(0, 7) 12162306a36Sopenharmony_ci#define PRCM_PLL_FREQ_N_SHIFT 8 12262306a36Sopenharmony_ci#define PRCM_PLL_FREQ_N_MASK BITS(8, 13) 12362306a36Sopenharmony_ci#define PRCM_PLL_FREQ_R_SHIFT 16 12462306a36Sopenharmony_ci#define PRCM_PLL_FREQ_R_MASK BITS(16, 18) 12562306a36Sopenharmony_ci#define PRCM_PLL_FREQ_SELDIV2 BIT(24) 12662306a36Sopenharmony_ci#define PRCM_PLL_FREQ_DIV2EN BIT(25) 12762306a36Sopenharmony_ci 12862306a36Sopenharmony_ci#define PRCM_PLLDSI_FREQ (prcmu_base + 0x500) 12962306a36Sopenharmony_ci#define PRCM_PLLDSI_ENABLE (prcmu_base + 0x504) 13062306a36Sopenharmony_ci#define PRCM_PLLDSI_LOCKP (prcmu_base + 0x508) 13162306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL (prcmu_base + 0x530) 13262306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV (prcmu_base + 0x52C) 13362306a36Sopenharmony_ci#define PRCM_PLLDSI_LOCKP (prcmu_base + 0x508) 13462306a36Sopenharmony_ci#define PRCM_APE_RESETN_SET (prcmu_base + 0x1E4) 13562306a36Sopenharmony_ci#define PRCM_APE_RESETN_CLR (prcmu_base + 0x1E8) 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci#define PRCM_PLLDSI_ENABLE_PRCM_PLLDSI_ENABLE BIT(0) 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci#define PRCM_PLLDSI_LOCKP_PRCM_PLLDSI_LOCKP10 BIT(0) 14062306a36Sopenharmony_ci#define PRCM_PLLDSI_LOCKP_PRCM_PLLDSI_LOCKP3 BIT(1) 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL_DSI0_PLLOUT_DIVSEL_SHIFT 0 14362306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL_DSI0_PLLOUT_DIVSEL_MASK BITS(0, 2) 14462306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL_DSI1_PLLOUT_DIVSEL_SHIFT 8 14562306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL_DSI1_PLLOUT_DIVSEL_MASK BITS(8, 10) 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL_OFF 0 14862306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL_PHI 1 14962306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL_PHI_2 2 15062306a36Sopenharmony_ci#define PRCM_DSI_PLLOUT_SEL_PHI_4 3 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI0_ESC_CLK_DIV_SHIFT 0 15362306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI0_ESC_CLK_DIV_MASK BITS(0, 7) 15462306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI1_ESC_CLK_DIV_SHIFT 8 15562306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI1_ESC_CLK_DIV_MASK BITS(8, 15) 15662306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI2_ESC_CLK_DIV_SHIFT 16 15762306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI2_ESC_CLK_DIV_MASK BITS(16, 23) 15862306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI0_ESC_CLK_EN BIT(24) 15962306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI1_ESC_CLK_EN BIT(25) 16062306a36Sopenharmony_ci#define PRCM_DSITVCLK_DIV_DSI2_ESC_CLK_EN BIT(26) 16162306a36Sopenharmony_ci 16262306a36Sopenharmony_ci#define PRCM_APE_RESETN_DSIPLL_RESETN BIT(14) 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci#define PRCM_CLKOCR (prcmu_base + 0x1CC) 16562306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKOUT0_REF_CLK (1 << 0) 16662306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKOUT0_MASK BITS(0, 13) 16762306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKOUT1_REF_CLK (1 << 16) 16862306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKOUT1_MASK BITS(16, 29) 16962306a36Sopenharmony_ci 17062306a36Sopenharmony_ci/* ePOD and memory power signal control registers */ 17162306a36Sopenharmony_ci#define PRCM_EPOD_C_SET (prcmu_base + 0x410) 17262306a36Sopenharmony_ci#define PRCM_SRAM_LS_SLEEP (prcmu_base + 0x304) 17362306a36Sopenharmony_ci 17462306a36Sopenharmony_ci/* Debug power control unit registers */ 17562306a36Sopenharmony_ci#define PRCM_POWER_STATE_SET (prcmu_base + 0x254) 17662306a36Sopenharmony_ci 17762306a36Sopenharmony_ci/* Miscellaneous unit registers */ 17862306a36Sopenharmony_ci#define PRCM_DSI_SW_RESET (prcmu_base + 0x324) 17962306a36Sopenharmony_ci#define PRCM_GPIOCR (prcmu_base + 0x138) 18062306a36Sopenharmony_ci#define PRCM_GPIOCR_DBG_STM_MOD_CMD1 0x800 18162306a36Sopenharmony_ci#define PRCM_GPIOCR_DBG_UARTMOD_CMD0 0x1 18262306a36Sopenharmony_ci 18362306a36Sopenharmony_ci/* PRCMU HW semaphore */ 18462306a36Sopenharmony_ci#define PRCM_SEM (prcmu_base + 0x400) 18562306a36Sopenharmony_ci#define PRCM_SEM_PRCM_SEM BIT(0) 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_ci#define PRCM_TCR (prcmu_base + 0x1C8) 18862306a36Sopenharmony_ci#define PRCM_TCR_TENSEL_MASK BITS(0, 7) 18962306a36Sopenharmony_ci#define PRCM_TCR_STOP_TIMERS BIT(16) 19062306a36Sopenharmony_ci#define PRCM_TCR_DOZE_MODE BIT(17) 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKODIV0_SHIFT 0 19362306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKODIV0_MASK BITS(0, 5) 19462306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKOSEL0_SHIFT 6 19562306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKOSEL0_MASK BITS(6, 8) 19662306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKODIV1_SHIFT 16 19762306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKODIV1_MASK BITS(16, 21) 19862306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKOSEL1_SHIFT 22 19962306a36Sopenharmony_ci#define PRCM_CLKOCR_CLKOSEL1_MASK BITS(22, 24) 20062306a36Sopenharmony_ci#define PRCM_CLKOCR_CLK1TYPE BIT(28) 20162306a36Sopenharmony_ci 20262306a36Sopenharmony_ci#define PRCM_CLK_MGT_CLKPLLDIV_MASK BITS(0, 4) 20362306a36Sopenharmony_ci#define PRCM_CLK_MGT_CLKPLLSW_SOC0 BIT(5) 20462306a36Sopenharmony_ci#define PRCM_CLK_MGT_CLKPLLSW_SOC1 BIT(6) 20562306a36Sopenharmony_ci#define PRCM_CLK_MGT_CLKPLLSW_DDR BIT(7) 20662306a36Sopenharmony_ci#define PRCM_CLK_MGT_CLKPLLSW_MASK BITS(5, 7) 20762306a36Sopenharmony_ci#define PRCM_CLK_MGT_CLKEN BIT(8) 20862306a36Sopenharmony_ci#define PRCM_CLK_MGT_CLK38 BIT(9) 20962306a36Sopenharmony_ci#define PRCM_CLK_MGT_CLK38DIV BIT(11) 21062306a36Sopenharmony_ci#define PRCM_SGACLK_MGT_SGACLKDIV_BY_2_5_EN BIT(12) 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci/* GPIOCR register */ 21362306a36Sopenharmony_ci#define PRCM_GPIOCR_SPI2_SELECT BIT(23) 21462306a36Sopenharmony_ci 21562306a36Sopenharmony_ci#define PRCM_DDR_SUBSYS_APE_MINBW (prcmu_base + 0x438) 21662306a36Sopenharmony_ci#define PRCM_CGATING_BYPASS (prcmu_base + 0x134) 21762306a36Sopenharmony_ci#define PRCM_CGATING_BYPASS_ICN2 BIT(6) 21862306a36Sopenharmony_ci 21962306a36Sopenharmony_ci/* Miscellaneous unit registers */ 22062306a36Sopenharmony_ci#define PRCM_RESOUTN_SET (prcmu_base + 0x214) 22162306a36Sopenharmony_ci#define PRCM_RESOUTN_CLR (prcmu_base + 0x218) 22262306a36Sopenharmony_ci 22362306a36Sopenharmony_ci/* System reset register */ 22462306a36Sopenharmony_ci#define PRCM_APE_SOFTRST (prcmu_base + 0x228) 22562306a36Sopenharmony_ci 22662306a36Sopenharmony_ci#endif /* __DB8500_PRCMU_REGS_H */ 227