linux/sound/soc/fsl/fsl_spdif.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * fsl_spdif.h - ALSA S/PDIF interface for the Freescale i.MX SoC
 *
 * Copyright (C) 2013 Freescale Semiconductor, Inc.
 *
 * Author: Nicolin Chen <[email protected]>
 *
 * Based on fsl_ssi.h
 * Author: Timur Tabi <[email protected]>
 * Copyright 2007-2008 Freescale Semiconductor, Inc.
 */

#ifndef _FSL_SPDIF_DAI_H
#define _FSL_SPDIF_DAI_H

/* S/PDIF Register Map */
#define REG_SPDIF_SCR
#define REG_SPDIF_SRCD
#define REG_SPDIF_SRPC
#define REG_SPDIF_SIE
#define REG_SPDIF_SIS
#define REG_SPDIF_SIC
#define REG_SPDIF_SRL
#define REG_SPDIF_SRR
#define REG_SPDIF_SRCSH
#define REG_SPDIF_SRCSL
#define REG_SPDIF_SRU
#define REG_SPDIF_SRQ
#define REG_SPDIF_STL
#define REG_SPDIF_STR
#define REG_SPDIF_STCSCH
#define REG_SPDIF_STCSCL
#define REG_SPDIF_STCSPH
#define REG_SPDIF_STCSPL
#define REG_SPDIF_SRFM
#define REG_SPDIF_STC

#define REG_SPDIF_SRCCA_31_0
#define REG_SPDIF_SRCCA_63_32
#define REG_SPDIF_SRCCA_95_64
#define REG_SPDIF_SRCCA_127_96
#define REG_SPDIF_SRCCA_159_128
#define REG_SPDIF_SRCCA_191_160
#define REG_SPDIF_STCCA_31_0
#define REG_SPDIF_STCCA_63_32
#define REG_SPDIF_STCCA_95_64
#define REG_SPDIF_STCCA_127_96
#define REG_SPDIF_STCCA_159_128
#define REG_SPDIF_STCCA_191_160

/* SPDIF Configuration register */
#define SCR_RXFIFO_CTL_OFFSET
#define SCR_RXFIFO_CTL_MASK
#define SCR_RXFIFO_CTL_ZERO
#define SCR_RXFIFO_OFF_OFFSET
#define SCR_RXFIFO_OFF_MASK
#define SCR_RXFIFO_OFF
#define SCR_RXFIFO_RST_OFFSET
#define SCR_RXFIFO_RST_MASK
#define SCR_RXFIFO_RST
#define SCR_RXFIFO_FSEL_OFFSET
#define SCR_RXFIFO_FSEL_MASK
#define SCR_RXFIFO_FSEL_IF0
#define SCR_RXFIFO_FSEL_IF4
#define SCR_RXFIFO_FSEL_IF8
#define SCR_RXFIFO_FSEL_IF12
#define SCR_RXFIFO_AUTOSYNC_OFFSET
#define SCR_RXFIFO_AUTOSYNC_MASK
#define SCR_RXFIFO_AUTOSYNC
#define SCR_TXFIFO_AUTOSYNC_OFFSET
#define SCR_TXFIFO_AUTOSYNC_MASK
#define SCR_TXFIFO_AUTOSYNC
#define SCR_TXFIFO_FSEL_OFFSET
#define SCR_TXFIFO_FSEL_MASK
#define SCR_TXFIFO_FSEL_IF0
#define SCR_TXFIFO_FSEL_IF4
#define SCR_TXFIFO_FSEL_IF8
#define SCR_TXFIFO_FSEL_IF12
#define SCR_RAW_CAPTURE_MODE
#define SCR_LOW_POWER
#define SCR_SOFT_RESET
#define SCR_TXFIFO_CTRL_OFFSET
#define SCR_TXFIFO_CTRL_MASK
#define SCR_TXFIFO_CTRL_ZERO
#define SCR_TXFIFO_CTRL_NORMAL
#define SCR_TXFIFO_CTRL_ONESAMPLE
#define SCR_DMA_RX_EN_OFFSET
#define SCR_DMA_RX_EN_MASK
#define SCR_DMA_RX_EN
#define SCR_DMA_TX_EN_OFFSET
#define SCR_DMA_TX_EN_MASK
#define SCR_DMA_TX_EN
#define SCR_VAL_OFFSET
#define SCR_VAL_MASK
#define SCR_VAL_CLEAR
#define SCR_TXSEL_OFFSET
#define SCR_TXSEL_MASK
#define SCR_TXSEL_OFF
#define SCR_TXSEL_RX
#define SCR_TXSEL_NORMAL
#define SCR_USRC_SEL_OFFSET
#define SCR_USRC_SEL_MASK
#define SCR_USRC_SEL_NONE
#define SCR_USRC_SEL_RECV
#define SCR_USRC_SEL_CHIP

#define SCR_DMA_xX_EN(tx)

/* SPDIF CDText control */
#define SRCD_CD_USER_OFFSET
#define SRCD_CD_USER

/* SPDIF Phase Configuration register */
#define SRPC_DPLL_LOCKED
#define SRPC_CLKSRC_SEL_OFFSET
#define SRPC_CLKSRC_SEL_MASK
#define SRPC_CLKSRC_SEL_SET(x)
#define SRPC_CLKSRC_SEL_LOCKED_OFFSET1
#define SRPC_CLKSRC_SEL_LOCKED_OFFSET2
#define SRPC_GAINSEL_OFFSET
#define SRPC_GAINSEL_MASK
#define SRPC_GAINSEL_SET(x)

#define SRPC_CLKSRC_MAX

enum spdif_gainsel {};
#define GAINSEL_MULTI_MAX
#define SPDIF_DEFAULT_GAINSEL

/* SPDIF interrupt mask define */
#define INT_DPLL_LOCKED
#define INT_TXFIFO_UNOV
#define INT_TXFIFO_RESYNC
#define INT_CNEW
#define INT_VAL_NOGOOD
#define INT_SYM_ERR
#define INT_BIT_ERR
#define INT_URX_FUL
#define INT_URX_OV
#define INT_QRX_FUL
#define INT_QRX_OV
#define INT_UQ_SYNC
#define INT_UQ_ERR
#define INT_RXFIFO_UNOV
#define INT_RXFIFO_RESYNC
#define INT_LOSS_LOCK
#define INT_TX_EM
#define INT_RXFIFO_FUL

/* SPDIF Clock register */
#define STC_SYSCLK_DF_OFFSET
#define STC_SYSCLK_DF_MASK
#define STC_SYSCLK_DF(x)
#define STC_TXCLK_SRC_OFFSET
#define STC_TXCLK_SRC_MASK
#define STC_TXCLK_SRC_SET(x)
#define STC_TXCLK_ALL_EN_OFFSET
#define STC_TXCLK_ALL_EN_MASK
#define STC_TXCLK_ALL_EN
#define STC_TXCLK_DF_OFFSET
#define STC_TXCLK_DF_MASK
#define STC_TXCLK_DF(x)
#define STC_TXCLK_SRC_MAX

#define STC_TXCLK_SPDIF_ROOT

/* SPDIF tx rate */
enum spdif_txrate {};
#define SPDIF_TXRATE_MAX


#define SPDIF_CSTATUS_BYTE
#define SPDIF_UBITS_SIZE
#define SPDIF_QSUB_SIZE


#define FSL_SPDIF_RATES_PLAYBACK

#define FSL_SPDIF_RATES_CAPTURE

#define FSL_SPDIF_FORMATS_PLAYBACK

#define FSL_SPDIF_FORMATS_CAPTURE

#endif /* _FSL_SPDIF_DAI_H */