162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci#ifndef __ASM_ARCH_PM_H 462306a36Sopenharmony_ci#define __ASM_ARCH_PM_H 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#include <asm/errno.h> 762306a36Sopenharmony_ci#include "irqs.h" 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#define CLOCK_GATING_CONTROL (DOVE_PMU_VIRT_BASE + 0x38) 1062306a36Sopenharmony_ci#define CLOCK_GATING_BIT_USB0 0 1162306a36Sopenharmony_ci#define CLOCK_GATING_BIT_USB1 1 1262306a36Sopenharmony_ci#define CLOCK_GATING_BIT_GBE 2 1362306a36Sopenharmony_ci#define CLOCK_GATING_BIT_SATA 3 1462306a36Sopenharmony_ci#define CLOCK_GATING_BIT_PCIE0 4 1562306a36Sopenharmony_ci#define CLOCK_GATING_BIT_PCIE1 5 1662306a36Sopenharmony_ci#define CLOCK_GATING_BIT_SDIO0 8 1762306a36Sopenharmony_ci#define CLOCK_GATING_BIT_SDIO1 9 1862306a36Sopenharmony_ci#define CLOCK_GATING_BIT_NAND 10 1962306a36Sopenharmony_ci#define CLOCK_GATING_BIT_CAMERA 11 2062306a36Sopenharmony_ci#define CLOCK_GATING_BIT_I2S0 12 2162306a36Sopenharmony_ci#define CLOCK_GATING_BIT_I2S1 13 2262306a36Sopenharmony_ci#define CLOCK_GATING_BIT_CRYPTO 15 2362306a36Sopenharmony_ci#define CLOCK_GATING_BIT_AC97 21 2462306a36Sopenharmony_ci#define CLOCK_GATING_BIT_PDMA 22 2562306a36Sopenharmony_ci#define CLOCK_GATING_BIT_XOR0 23 2662306a36Sopenharmony_ci#define CLOCK_GATING_BIT_XOR1 24 2762306a36Sopenharmony_ci#define CLOCK_GATING_BIT_GIGA_PHY 30 2862306a36Sopenharmony_ci#define CLOCK_GATING_USB0_MASK (1 << CLOCK_GATING_BIT_USB0) 2962306a36Sopenharmony_ci#define CLOCK_GATING_USB1_MASK (1 << CLOCK_GATING_BIT_USB1) 3062306a36Sopenharmony_ci#define CLOCK_GATING_GBE_MASK (1 << CLOCK_GATING_BIT_GBE) 3162306a36Sopenharmony_ci#define CLOCK_GATING_SATA_MASK (1 << CLOCK_GATING_BIT_SATA) 3262306a36Sopenharmony_ci#define CLOCK_GATING_PCIE0_MASK (1 << CLOCK_GATING_BIT_PCIE0) 3362306a36Sopenharmony_ci#define CLOCK_GATING_PCIE1_MASK (1 << CLOCK_GATING_BIT_PCIE1) 3462306a36Sopenharmony_ci#define CLOCK_GATING_SDIO0_MASK (1 << CLOCK_GATING_BIT_SDIO0) 3562306a36Sopenharmony_ci#define CLOCK_GATING_SDIO1_MASK (1 << CLOCK_GATING_BIT_SDIO1) 3662306a36Sopenharmony_ci#define CLOCK_GATING_NAND_MASK (1 << CLOCK_GATING_BIT_NAND) 3762306a36Sopenharmony_ci#define CLOCK_GATING_CAMERA_MASK (1 << CLOCK_GATING_BIT_CAMERA) 3862306a36Sopenharmony_ci#define CLOCK_GATING_I2S0_MASK (1 << CLOCK_GATING_BIT_I2S0) 3962306a36Sopenharmony_ci#define CLOCK_GATING_I2S1_MASK (1 << CLOCK_GATING_BIT_I2S1) 4062306a36Sopenharmony_ci#define CLOCK_GATING_CRYPTO_MASK (1 << CLOCK_GATING_BIT_CRYPTO) 4162306a36Sopenharmony_ci#define CLOCK_GATING_AC97_MASK (1 << CLOCK_GATING_BIT_AC97) 4262306a36Sopenharmony_ci#define CLOCK_GATING_PDMA_MASK (1 << CLOCK_GATING_BIT_PDMA) 4362306a36Sopenharmony_ci#define CLOCK_GATING_XOR0_MASK (1 << CLOCK_GATING_BIT_XOR0) 4462306a36Sopenharmony_ci#define CLOCK_GATING_XOR1_MASK (1 << CLOCK_GATING_BIT_XOR1) 4562306a36Sopenharmony_ci#define CLOCK_GATING_GIGA_PHY_MASK (1 << CLOCK_GATING_BIT_GIGA_PHY) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50) 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci#define PMU_SW_RST_VIDEO_MASK BIT(16) 5062306a36Sopenharmony_ci#define PMU_SW_RST_GPU_MASK BIT(18) 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci#define PMU_PWR_GPU_PWR_DWN_MASK BIT(2) 5362306a36Sopenharmony_ci#define PMU_PWR_VPU_PWR_DWN_MASK BIT(3) 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci#define PMU_ISO_VIDEO_MASK BIT(0) 5662306a36Sopenharmony_ci#define PMU_ISO_GPU_MASK BIT(1) 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#endif 59