18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public 38c2ecf20Sopenharmony_ci * License version 2. This program is licensed "as is" without any 48c2ecf20Sopenharmony_ci * warranty of any kind, whether express or implied. 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef __ASM_ARCH_PM_H 88c2ecf20Sopenharmony_ci#define __ASM_ARCH_PM_H 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <asm/errno.h> 118c2ecf20Sopenharmony_ci#include "irqs.h" 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#define CLOCK_GATING_CONTROL (DOVE_PMU_VIRT_BASE + 0x38) 148c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_USB0 0 158c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_USB1 1 168c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_GBE 2 178c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_SATA 3 188c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_PCIE0 4 198c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_PCIE1 5 208c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_SDIO0 8 218c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_SDIO1 9 228c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_NAND 10 238c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_CAMERA 11 248c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_I2S0 12 258c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_I2S1 13 268c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_CRYPTO 15 278c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_AC97 21 288c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_PDMA 22 298c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_XOR0 23 308c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_XOR1 24 318c2ecf20Sopenharmony_ci#define CLOCK_GATING_BIT_GIGA_PHY 30 328c2ecf20Sopenharmony_ci#define CLOCK_GATING_USB0_MASK (1 << CLOCK_GATING_BIT_USB0) 338c2ecf20Sopenharmony_ci#define CLOCK_GATING_USB1_MASK (1 << CLOCK_GATING_BIT_USB1) 348c2ecf20Sopenharmony_ci#define CLOCK_GATING_GBE_MASK (1 << CLOCK_GATING_BIT_GBE) 358c2ecf20Sopenharmony_ci#define CLOCK_GATING_SATA_MASK (1 << CLOCK_GATING_BIT_SATA) 368c2ecf20Sopenharmony_ci#define CLOCK_GATING_PCIE0_MASK (1 << CLOCK_GATING_BIT_PCIE0) 378c2ecf20Sopenharmony_ci#define CLOCK_GATING_PCIE1_MASK (1 << CLOCK_GATING_BIT_PCIE1) 388c2ecf20Sopenharmony_ci#define CLOCK_GATING_SDIO0_MASK (1 << CLOCK_GATING_BIT_SDIO0) 398c2ecf20Sopenharmony_ci#define CLOCK_GATING_SDIO1_MASK (1 << CLOCK_GATING_BIT_SDIO1) 408c2ecf20Sopenharmony_ci#define CLOCK_GATING_NAND_MASK (1 << CLOCK_GATING_BIT_NAND) 418c2ecf20Sopenharmony_ci#define CLOCK_GATING_CAMERA_MASK (1 << CLOCK_GATING_BIT_CAMERA) 428c2ecf20Sopenharmony_ci#define CLOCK_GATING_I2S0_MASK (1 << CLOCK_GATING_BIT_I2S0) 438c2ecf20Sopenharmony_ci#define CLOCK_GATING_I2S1_MASK (1 << CLOCK_GATING_BIT_I2S1) 448c2ecf20Sopenharmony_ci#define CLOCK_GATING_CRYPTO_MASK (1 << CLOCK_GATING_BIT_CRYPTO) 458c2ecf20Sopenharmony_ci#define CLOCK_GATING_AC97_MASK (1 << CLOCK_GATING_BIT_AC97) 468c2ecf20Sopenharmony_ci#define CLOCK_GATING_PDMA_MASK (1 << CLOCK_GATING_BIT_PDMA) 478c2ecf20Sopenharmony_ci#define CLOCK_GATING_XOR0_MASK (1 << CLOCK_GATING_BIT_XOR0) 488c2ecf20Sopenharmony_ci#define CLOCK_GATING_XOR1_MASK (1 << CLOCK_GATING_BIT_XOR1) 498c2ecf20Sopenharmony_ci#define CLOCK_GATING_GIGA_PHY_MASK (1 << CLOCK_GATING_BIT_GIGA_PHY) 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50) 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#define PMU_SW_RST_VIDEO_MASK BIT(16) 548c2ecf20Sopenharmony_ci#define PMU_SW_RST_GPU_MASK BIT(18) 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci#define PMU_PWR_GPU_PWR_DWN_MASK BIT(2) 578c2ecf20Sopenharmony_ci#define PMU_PWR_VPU_PWR_DWN_MASK BIT(3) 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define PMU_ISO_VIDEO_MASK BIT(0) 608c2ecf20Sopenharmony_ci#define PMU_ISO_GPU_MASK BIT(1) 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci#endif 63