linux/sound/soc/loongson/loongson_i2s.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * ALSA I2S interface for the Loongson platform
 *
 * Copyright (C) 2023 Loongson Technology Corporation Limited
 * Author: Yingkun Meng <[email protected]>
 */

#ifndef _LOONGSON_I2S_H
#define _LOONGSON_I2S_H

#include <linux/regmap.h>
#include <sound/dmaengine_pcm.h>

/* I2S Common Registers */
#define LS_I2S_VER
#define LS_I2S_CFG
#define LS_I2S_CTRL
#define LS_I2S_RX_DATA
#define LS_I2S_TX_DATA

/* 2K2000 I2S Specify Registers */
#define LS_I2S_CFG1

/* 7A2000 I2S Specify Registers */
#define LS_I2S_TX_ORDER
#define LS_I2S_RX_ORDER

/* Loongson I2S Control Register */
#define I2S_CTRL_MCLK_READY
#define I2S_CTRL_MASTER
#define I2S_CTRL_MSB
#define I2S_CTRL_RX_EN
#define I2S_CTRL_TX_EN
#define I2S_CTRL_RX_DMA_EN
#define I2S_CTRL_CLK_READY
#define I2S_CTRL_TX_DMA_EN
#define I2S_CTRL_RESET
#define I2S_CTRL_MCLK_EN
#define I2S_CTRL_RX_INT_EN
#define I2S_CTRL_TX_INT_EN

#define LS_I2S_DRVNAME

struct loongson_dma_data {};

struct loongson_i2s {};

extern const struct dev_pm_ops loongson_i2s_pm;
extern struct snd_soc_dai_driver loongson_i2s_dai;

#endif