linux/sound/soc/sof/mediatek/mt8195/mt8195.h

/* SPDX-License-Identifier: GPL-2.0 */

/*
 * Copyright (c) 2021 MediaTek Corporation. All rights reserved.
 *
 *  Header file for the mt8195 DSP register definition
 */

#ifndef __MT8195_H
#define __MT8195_H

struct mtk_adsp_chip_info;
struct snd_sof_dev;

#define DSP_REG_BASE
#define SCP_CFGREG_BASE
#define DSP_SYSAO_BASE

/*****************************************************************************
 *                  R E G I S T E R       TABLE
 *****************************************************************************/
#define DSP_JTAGMUX
#define DSP_ALTRESETVEC
#define DSP_PDEBUGDATA
#define DSP_PDEBUGBUS0
#define PDEBUG_ENABLE
#define DSP_PDEBUGBUS1
#define DSP_PDEBUGINST
#define DSP_PDEBUGLS0STAT
#define DSP_PDEBUGLS1STAT
#define DSP_PDEBUGPC
#define DSP_RESET_SW
#define ADSP_BRESET_SW
#define ADSP_DRESET_SW
#define ADSP_RUNSTALL
#define STATVECTOR_SEL
#define ADSP_PWAIT
#define DSP_PFAULTBUS
#define DSP_PFAULTINFO
#define DSP_GPR00
#define DSP_GPR01
#define DSP_GPR02
#define DSP_GPR03
#define DSP_GPR04
#define DSP_GPR05
#define DSP_GPR06
#define DSP_GPR07
#define DSP_GPR08
#define DSP_GPR09
#define DSP_GPR0A
#define DSP_GPR0B
#define DSP_GPR0C
#define DSP_GPR0D
#define DSP_GPR0E
#define DSP_GPR0F
#define DSP_GPR10
#define DSP_GPR11
#define DSP_GPR12
#define DSP_GPR13
#define DSP_GPR14
#define DSP_GPR15
#define DSP_GPR16
#define DSP_GPR17
#define DSP_GPR18
#define DSP_GPR19
#define DSP_GPR1A
#define DSP_GPR1B
#define DSP_GPR1C
#define DSP_GPR1D
#define DSP_GPR1E
#define DSP_GPR1F
#define DSP_TCM_OFFSET
#define DSP_DDR_OFFSET
#define DSP_INTFDSP
#define DSP_INTFDSP_CLR
#define DSP_SRAM_PD_SW1
#define DSP_SRAM_PD_SW2
#define DSP_OCD
#define DSP_RG_DSP_IRQ_POL
#define DSP_DSP_IRQ_EN
#define DSP_DSP_IRQ_LEVEL
#define DSP_DSP_IRQ_STATUS
#define DSP_RG_INT2CIRQ
#define DSP_RG_INT_POL_CTL0
#define DSP_RG_INT_EN_CTL0
#define DSP_RG_INT_LV_CTL0
#define DSP_RG_INT_STATUS0
#define DSP_PDEBUGSTATUS0
#define DSP_PDEBUGSTATUS1
#define DSP_PDEBUGSTATUS2
#define DSP_PDEBUGSTATUS3
#define DSP_PDEBUGSTATUS4
#define DSP_PDEBUGSTATUS5
#define DSP_PDEBUGSTATUS6
#define DSP_PDEBUGSTATUS7
#define DSP_DSP2PSRAM_PRIORITY
#define DSP_AUDIO_DSP2SPM_INT
#define DSP_AUDIO_DSP2SPM_INT_ACK
#define DSP_AUDIO_DSP_DEBUG_SEL
#define DSP_AUDIO_DSP_EMI_BASE_ADDR
#define DSP_AUDIO_DSP_SHARED_IRAM
#define DSP_AUDIO_DSP_CKCTRL_P2P_CK_CON
#define DSP_RG_SEMAPHORE00
#define DSP_RG_SEMAPHORE01
#define DSP_RG_SEMAPHORE02
#define DSP_RG_SEMAPHORE03
#define DSP_RG_SEMAPHORE04
#define DSP_RG_SEMAPHORE05
#define DSP_RG_SEMAPHORE06
#define DSP_RG_SEMAPHORE07
#define DSP_RESERVED_0
#define DSP_RESERVED_1

/* dsp wdt */
#define DSP_WDT_MODE

/* dsp mbox */
#define DSP_MBOX_IN_CMD
#define DSP_MBOX_IN_CMD_CLR
#define DSP_MBOX_OUT_CMD
#define DSP_MBOX_OUT_CMD_CLR
#define DSP_MBOX_IN_MSG0
#define DSP_MBOX_IN_MSG1
#define DSP_MBOX_OUT_MSG0
#define DSP_MBOX_OUT_MSG1

/*dsp sys ao*/
#define ADSP_SRAM_POOL_CON
#define DSP_SRAM_POOL_PD_MASK
#define DSP_EMI_MAP_ADDR

/* DSP memories */
#define MBOX_OFFSET
#define MBOX_SIZE
#define DSP_DRAM_SIZE

#define DSP_REG_BAR
#define DSP_MBOX0_BAR
#define DSP_MBOX1_BAR
#define DSP_MBOX2_BAR

#define SIZE_SHARED_DRAM_DL
#define SIZE_SHARED_DRAM_UL

#define TOTAL_SIZE_SHARED_DRAM_FROM_TAIL

#define SRAM_PHYS_BASE_FROM_DSP_VIEW
#define DRAM_PHYS_BASE_FROM_DSP_VIEW

/*remap dram between AP and DSP view, 4KB aligned*/
#define DRAM_REMAP_SHIFT
#define DRAM_REMAP_MASK

/* suspend dsp idle check interval and timeout */
#define SUSPEND_DSP_IDLE_TIMEOUT_US
#define SUSPEND_DSP_IDLE_POLL_INTERVAL_US

void sof_hifixdsp_boot_sequence(struct snd_sof_dev *sdev, u32 boot_addr);
void sof_hifixdsp_shutdown(struct snd_sof_dev *sdev);
#endif