18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * sound/soc/rockchip/rockchip_i2s.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * ALSA SoC Audio Layer - Rockchip I2S Controller driver
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Copyright (c) 2014 Rockchip Electronics Co. Ltd.
88c2ecf20Sopenharmony_ci * Author: Jianqun xu <jay.xu@rock-chips.com>
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#ifndef _ROCKCHIP_IIS_H
128c2ecf20Sopenharmony_ci#define _ROCKCHIP_IIS_H
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*
158c2ecf20Sopenharmony_ci * TXCR
168c2ecf20Sopenharmony_ci * transmit operation control register
178c2ecf20Sopenharmony_ci*/
188c2ecf20Sopenharmony_ci#define I2S_TXCR_RCNT_SHIFT	17
198c2ecf20Sopenharmony_ci#define I2S_TXCR_RCNT_MASK	(0x3f << I2S_TXCR_RCNT_SHIFT)
208c2ecf20Sopenharmony_ci#define I2S_TXCR_CSR_SHIFT	15
218c2ecf20Sopenharmony_ci#define I2S_TXCR_CSR(x)		(x << I2S_TXCR_CSR_SHIFT)
228c2ecf20Sopenharmony_ci#define I2S_TXCR_CSR_MASK	(3 << I2S_TXCR_CSR_SHIFT)
238c2ecf20Sopenharmony_ci#define I2S_TXCR_HWT		BIT(14)
248c2ecf20Sopenharmony_ci#define I2S_TXCR_SJM_SHIFT	12
258c2ecf20Sopenharmony_ci#define I2S_TXCR_SJM_R		(0 << I2S_TXCR_SJM_SHIFT)
268c2ecf20Sopenharmony_ci#define I2S_TXCR_SJM_L		(1 << I2S_TXCR_SJM_SHIFT)
278c2ecf20Sopenharmony_ci#define I2S_TXCR_FBM_SHIFT	11
288c2ecf20Sopenharmony_ci#define I2S_TXCR_FBM_MSB	(0 << I2S_TXCR_FBM_SHIFT)
298c2ecf20Sopenharmony_ci#define I2S_TXCR_FBM_LSB	(1 << I2S_TXCR_FBM_SHIFT)
308c2ecf20Sopenharmony_ci#define I2S_TXCR_IBM_SHIFT	9
318c2ecf20Sopenharmony_ci#define I2S_TXCR_IBM_NORMAL	(0 << I2S_TXCR_IBM_SHIFT)
328c2ecf20Sopenharmony_ci#define I2S_TXCR_IBM_LSJM	(1 << I2S_TXCR_IBM_SHIFT)
338c2ecf20Sopenharmony_ci#define I2S_TXCR_IBM_RSJM	(2 << I2S_TXCR_IBM_SHIFT)
348c2ecf20Sopenharmony_ci#define I2S_TXCR_IBM_MASK	(3 << I2S_TXCR_IBM_SHIFT)
358c2ecf20Sopenharmony_ci#define I2S_TXCR_PBM_SHIFT	7
368c2ecf20Sopenharmony_ci#define I2S_TXCR_PBM_MODE(x)	(x << I2S_TXCR_PBM_SHIFT)
378c2ecf20Sopenharmony_ci#define I2S_TXCR_PBM_MASK	(3 << I2S_TXCR_PBM_SHIFT)
388c2ecf20Sopenharmony_ci#define I2S_TXCR_TFS_SHIFT	5
398c2ecf20Sopenharmony_ci#define I2S_TXCR_TFS_I2S	(0 << I2S_TXCR_TFS_SHIFT)
408c2ecf20Sopenharmony_ci#define I2S_TXCR_TFS_PCM	(1 << I2S_TXCR_TFS_SHIFT)
418c2ecf20Sopenharmony_ci#define I2S_TXCR_TFS_MASK	(1 << I2S_TXCR_TFS_SHIFT)
428c2ecf20Sopenharmony_ci#define I2S_TXCR_VDW_SHIFT	0
438c2ecf20Sopenharmony_ci#define I2S_TXCR_VDW(x)		((x - 1) << I2S_TXCR_VDW_SHIFT)
448c2ecf20Sopenharmony_ci#define I2S_TXCR_VDW_MASK	(0x1f << I2S_TXCR_VDW_SHIFT)
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci/*
478c2ecf20Sopenharmony_ci * RXCR
488c2ecf20Sopenharmony_ci * receive operation control register
498c2ecf20Sopenharmony_ci*/
508c2ecf20Sopenharmony_ci#define I2S_RXCR_CSR_SHIFT	15
518c2ecf20Sopenharmony_ci#define I2S_RXCR_CSR(x)		(x << I2S_RXCR_CSR_SHIFT)
528c2ecf20Sopenharmony_ci#define I2S_RXCR_CSR_MASK	(3 << I2S_RXCR_CSR_SHIFT)
538c2ecf20Sopenharmony_ci#define I2S_RXCR_HWT		BIT(14)
548c2ecf20Sopenharmony_ci#define I2S_RXCR_SJM_SHIFT	12
558c2ecf20Sopenharmony_ci#define I2S_RXCR_SJM_R		(0 << I2S_RXCR_SJM_SHIFT)
568c2ecf20Sopenharmony_ci#define I2S_RXCR_SJM_L		(1 << I2S_RXCR_SJM_SHIFT)
578c2ecf20Sopenharmony_ci#define I2S_RXCR_FBM_SHIFT	11
588c2ecf20Sopenharmony_ci#define I2S_RXCR_FBM_MSB	(0 << I2S_RXCR_FBM_SHIFT)
598c2ecf20Sopenharmony_ci#define I2S_RXCR_FBM_LSB	(1 << I2S_RXCR_FBM_SHIFT)
608c2ecf20Sopenharmony_ci#define I2S_RXCR_IBM_SHIFT	9
618c2ecf20Sopenharmony_ci#define I2S_RXCR_IBM_NORMAL	(0 << I2S_RXCR_IBM_SHIFT)
628c2ecf20Sopenharmony_ci#define I2S_RXCR_IBM_LSJM	(1 << I2S_RXCR_IBM_SHIFT)
638c2ecf20Sopenharmony_ci#define I2S_RXCR_IBM_RSJM	(2 << I2S_RXCR_IBM_SHIFT)
648c2ecf20Sopenharmony_ci#define I2S_RXCR_IBM_MASK	(3 << I2S_RXCR_IBM_SHIFT)
658c2ecf20Sopenharmony_ci#define I2S_RXCR_PBM_SHIFT	7
668c2ecf20Sopenharmony_ci#define I2S_RXCR_PBM_MODE(x)	(x << I2S_RXCR_PBM_SHIFT)
678c2ecf20Sopenharmony_ci#define I2S_RXCR_PBM_MASK	(3 << I2S_RXCR_PBM_SHIFT)
688c2ecf20Sopenharmony_ci#define I2S_RXCR_TFS_SHIFT	5
698c2ecf20Sopenharmony_ci#define I2S_RXCR_TFS_I2S	(0 << I2S_RXCR_TFS_SHIFT)
708c2ecf20Sopenharmony_ci#define I2S_RXCR_TFS_PCM	(1 << I2S_RXCR_TFS_SHIFT)
718c2ecf20Sopenharmony_ci#define I2S_RXCR_TFS_MASK	(1 << I2S_RXCR_TFS_SHIFT)
728c2ecf20Sopenharmony_ci#define I2S_RXCR_VDW_SHIFT	0
738c2ecf20Sopenharmony_ci#define I2S_RXCR_VDW(x)		((x - 1) << I2S_RXCR_VDW_SHIFT)
748c2ecf20Sopenharmony_ci#define I2S_RXCR_VDW_MASK	(0x1f << I2S_RXCR_VDW_SHIFT)
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci/*
778c2ecf20Sopenharmony_ci * CKR
788c2ecf20Sopenharmony_ci * clock generation register
798c2ecf20Sopenharmony_ci*/
808c2ecf20Sopenharmony_ci#define I2S_CKR_TRCM_SHIFT	28
818c2ecf20Sopenharmony_ci#define I2S_CKR_TRCM(x)	(x << I2S_CKR_TRCM_SHIFT)
828c2ecf20Sopenharmony_ci#define I2S_CKR_TRCM_TXRX	(0 << I2S_CKR_TRCM_SHIFT)
838c2ecf20Sopenharmony_ci#define I2S_CKR_TRCM_TXONLY	(1 << I2S_CKR_TRCM_SHIFT)
848c2ecf20Sopenharmony_ci#define I2S_CKR_TRCM_RXONLY	(2 << I2S_CKR_TRCM_SHIFT)
858c2ecf20Sopenharmony_ci#define I2S_CKR_TRCM_MASK	(3 << I2S_CKR_TRCM_SHIFT)
868c2ecf20Sopenharmony_ci#define I2S_CKR_MSS_SHIFT	27
878c2ecf20Sopenharmony_ci#define I2S_CKR_MSS_MASTER	(0 << I2S_CKR_MSS_SHIFT)
888c2ecf20Sopenharmony_ci#define I2S_CKR_MSS_SLAVE	(1 << I2S_CKR_MSS_SHIFT)
898c2ecf20Sopenharmony_ci#define I2S_CKR_MSS_MASK	(1 << I2S_CKR_MSS_SHIFT)
908c2ecf20Sopenharmony_ci#define I2S_CKR_CKP_SHIFT	26
918c2ecf20Sopenharmony_ci#define I2S_CKR_CKP_NEG		(0 << I2S_CKR_CKP_SHIFT)
928c2ecf20Sopenharmony_ci#define I2S_CKR_CKP_POS		(1 << I2S_CKR_CKP_SHIFT)
938c2ecf20Sopenharmony_ci#define I2S_CKR_CKP_MASK	(1 << I2S_CKR_CKP_SHIFT)
948c2ecf20Sopenharmony_ci#define I2S_CKR_RLP_SHIFT	25
958c2ecf20Sopenharmony_ci#define I2S_CKR_RLP_NORMAL	(0 << I2S_CKR_RLP_SHIFT)
968c2ecf20Sopenharmony_ci#define I2S_CKR_RLP_OPPSITE	(1 << I2S_CKR_RLP_SHIFT)
978c2ecf20Sopenharmony_ci#define I2S_CKR_TLP_SHIFT	24
988c2ecf20Sopenharmony_ci#define I2S_CKR_TLP_NORMAL	(0 << I2S_CKR_TLP_SHIFT)
998c2ecf20Sopenharmony_ci#define I2S_CKR_TLP_OPPSITE	(1 << I2S_CKR_TLP_SHIFT)
1008c2ecf20Sopenharmony_ci#define I2S_CKR_MDIV_SHIFT	16
1018c2ecf20Sopenharmony_ci#define I2S_CKR_MDIV(x)		((x - 1) << I2S_CKR_MDIV_SHIFT)
1028c2ecf20Sopenharmony_ci#define I2S_CKR_MDIV_MASK	(0xff << I2S_CKR_MDIV_SHIFT)
1038c2ecf20Sopenharmony_ci#define I2S_CKR_RSD_SHIFT	8
1048c2ecf20Sopenharmony_ci#define I2S_CKR_RSD(x)		((x - 1) << I2S_CKR_RSD_SHIFT)
1058c2ecf20Sopenharmony_ci#define I2S_CKR_RSD_MASK	(0xff << I2S_CKR_RSD_SHIFT)
1068c2ecf20Sopenharmony_ci#define I2S_CKR_TSD_SHIFT	0
1078c2ecf20Sopenharmony_ci#define I2S_CKR_TSD(x)		((x - 1) << I2S_CKR_TSD_SHIFT)
1088c2ecf20Sopenharmony_ci#define I2S_CKR_TSD_MASK	(0xff << I2S_CKR_TSD_SHIFT)
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ci/*
1118c2ecf20Sopenharmony_ci * FIFOLR
1128c2ecf20Sopenharmony_ci * FIFO level register
1138c2ecf20Sopenharmony_ci*/
1148c2ecf20Sopenharmony_ci#define I2S_FIFOLR_RFL_SHIFT	24
1158c2ecf20Sopenharmony_ci#define I2S_FIFOLR_RFL_MASK	(0x3f << I2S_FIFOLR_RFL_SHIFT)
1168c2ecf20Sopenharmony_ci#define I2S_FIFOLR_TFL3_SHIFT	18
1178c2ecf20Sopenharmony_ci#define I2S_FIFOLR_TFL3_MASK	(0x3f << I2S_FIFOLR_TFL3_SHIFT)
1188c2ecf20Sopenharmony_ci#define I2S_FIFOLR_TFL2_SHIFT	12
1198c2ecf20Sopenharmony_ci#define I2S_FIFOLR_TFL2_MASK	(0x3f << I2S_FIFOLR_TFL2_SHIFT)
1208c2ecf20Sopenharmony_ci#define I2S_FIFOLR_TFL1_SHIFT	6
1218c2ecf20Sopenharmony_ci#define I2S_FIFOLR_TFL1_MASK	(0x3f << I2S_FIFOLR_TFL1_SHIFT)
1228c2ecf20Sopenharmony_ci#define I2S_FIFOLR_TFL0_SHIFT	0
1238c2ecf20Sopenharmony_ci#define I2S_FIFOLR_TFL0_MASK	(0x3f << I2S_FIFOLR_TFL0_SHIFT)
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci/*
1268c2ecf20Sopenharmony_ci * DMACR
1278c2ecf20Sopenharmony_ci * DMA control register
1288c2ecf20Sopenharmony_ci*/
1298c2ecf20Sopenharmony_ci#define I2S_DMACR_RDE_SHIFT	24
1308c2ecf20Sopenharmony_ci#define I2S_DMACR_RDE_DISABLE	(0 << I2S_DMACR_RDE_SHIFT)
1318c2ecf20Sopenharmony_ci#define I2S_DMACR_RDE_ENABLE	(1 << I2S_DMACR_RDE_SHIFT)
1328c2ecf20Sopenharmony_ci#define I2S_DMACR_RDL_SHIFT	16
1338c2ecf20Sopenharmony_ci#define I2S_DMACR_RDL(x)	((x - 1) << I2S_DMACR_RDL_SHIFT)
1348c2ecf20Sopenharmony_ci#define I2S_DMACR_RDL_MASK	(0x1f << I2S_DMACR_RDL_SHIFT)
1358c2ecf20Sopenharmony_ci#define I2S_DMACR_TDE_SHIFT	8
1368c2ecf20Sopenharmony_ci#define I2S_DMACR_TDE_DISABLE	(0 << I2S_DMACR_TDE_SHIFT)
1378c2ecf20Sopenharmony_ci#define I2S_DMACR_TDE_ENABLE	(1 << I2S_DMACR_TDE_SHIFT)
1388c2ecf20Sopenharmony_ci#define I2S_DMACR_TDL_SHIFT	0
1398c2ecf20Sopenharmony_ci#define I2S_DMACR_TDL(x)	((x) << I2S_DMACR_TDL_SHIFT)
1408c2ecf20Sopenharmony_ci#define I2S_DMACR_TDL_MASK	(0x1f << I2S_DMACR_TDL_SHIFT)
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ci/*
1438c2ecf20Sopenharmony_ci * INTCR
1448c2ecf20Sopenharmony_ci * interrupt control register
1458c2ecf20Sopenharmony_ci*/
1468c2ecf20Sopenharmony_ci#define I2S_INTCR_RFT_SHIFT	20
1478c2ecf20Sopenharmony_ci#define I2S_INTCR_RFT(x)	((x - 1) << I2S_INTCR_RFT_SHIFT)
1488c2ecf20Sopenharmony_ci#define I2S_INTCR_RXOIC		BIT(18)
1498c2ecf20Sopenharmony_ci#define I2S_INTCR_RXOIE_SHIFT	17
1508c2ecf20Sopenharmony_ci#define I2S_INTCR_RXOIE_DISABLE	(0 << I2S_INTCR_RXOIE_SHIFT)
1518c2ecf20Sopenharmony_ci#define I2S_INTCR_RXOIE_ENABLE	(1 << I2S_INTCR_RXOIE_SHIFT)
1528c2ecf20Sopenharmony_ci#define I2S_INTCR_RXFIE_SHIFT	16
1538c2ecf20Sopenharmony_ci#define I2S_INTCR_RXFIE_DISABLE	(0 << I2S_INTCR_RXFIE_SHIFT)
1548c2ecf20Sopenharmony_ci#define I2S_INTCR_RXFIE_ENABLE	(1 << I2S_INTCR_RXFIE_SHIFT)
1558c2ecf20Sopenharmony_ci#define I2S_INTCR_TFT_SHIFT	4
1568c2ecf20Sopenharmony_ci#define I2S_INTCR_TFT(x)	((x - 1) << I2S_INTCR_TFT_SHIFT)
1578c2ecf20Sopenharmony_ci#define I2S_INTCR_TFT_MASK	(0x1f << I2S_INTCR_TFT_SHIFT)
1588c2ecf20Sopenharmony_ci#define I2S_INTCR_TXUIC		BIT(2)
1598c2ecf20Sopenharmony_ci#define I2S_INTCR_TXUIE_SHIFT	1
1608c2ecf20Sopenharmony_ci#define I2S_INTCR_TXUIE_DISABLE	(0 << I2S_INTCR_TXUIE_SHIFT)
1618c2ecf20Sopenharmony_ci#define I2S_INTCR_TXUIE_ENABLE	(1 << I2S_INTCR_TXUIE_SHIFT)
1628c2ecf20Sopenharmony_ci
1638c2ecf20Sopenharmony_ci/*
1648c2ecf20Sopenharmony_ci * INTSR
1658c2ecf20Sopenharmony_ci * interrupt status register
1668c2ecf20Sopenharmony_ci*/
1678c2ecf20Sopenharmony_ci#define I2S_INTSR_TXEIE_SHIFT	0
1688c2ecf20Sopenharmony_ci#define I2S_INTSR_TXEIE_DISABLE	(0 << I2S_INTSR_TXEIE_SHIFT)
1698c2ecf20Sopenharmony_ci#define I2S_INTSR_TXEIE_ENABLE	(1 << I2S_INTSR_TXEIE_SHIFT)
1708c2ecf20Sopenharmony_ci#define I2S_INTSR_RXOI_SHIFT	17
1718c2ecf20Sopenharmony_ci#define I2S_INTSR_RXOI_INA	(0 << I2S_INTSR_RXOI_SHIFT)
1728c2ecf20Sopenharmony_ci#define I2S_INTSR_RXOI_ACT	(1 << I2S_INTSR_RXOI_SHIFT)
1738c2ecf20Sopenharmony_ci#define I2S_INTSR_RXFI_SHIFT	16
1748c2ecf20Sopenharmony_ci#define I2S_INTSR_RXFI_INA	(0 << I2S_INTSR_RXFI_SHIFT)
1758c2ecf20Sopenharmony_ci#define I2S_INTSR_RXFI_ACT	(1 << I2S_INTSR_RXFI_SHIFT)
1768c2ecf20Sopenharmony_ci#define I2S_INTSR_TXUI_SHIFT	1
1778c2ecf20Sopenharmony_ci#define I2S_INTSR_TXUI_INA	(0 << I2S_INTSR_TXUI_SHIFT)
1788c2ecf20Sopenharmony_ci#define I2S_INTSR_TXUI_ACT	(1 << I2S_INTSR_TXUI_SHIFT)
1798c2ecf20Sopenharmony_ci#define I2S_INTSR_TXEI_SHIFT	0
1808c2ecf20Sopenharmony_ci#define I2S_INTSR_TXEI_INA	(0 << I2S_INTSR_TXEI_SHIFT)
1818c2ecf20Sopenharmony_ci#define I2S_INTSR_TXEI_ACT	(1 << I2S_INTSR_TXEI_SHIFT)
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci/*
1848c2ecf20Sopenharmony_ci * XFER
1858c2ecf20Sopenharmony_ci * Transfer start register
1868c2ecf20Sopenharmony_ci*/
1878c2ecf20Sopenharmony_ci#define I2S_XFER_RXS_SHIFT	1
1888c2ecf20Sopenharmony_ci#define I2S_XFER_RXS_STOP	(0 << I2S_XFER_RXS_SHIFT)
1898c2ecf20Sopenharmony_ci#define I2S_XFER_RXS_START	(1 << I2S_XFER_RXS_SHIFT)
1908c2ecf20Sopenharmony_ci#define I2S_XFER_TXS_SHIFT	0
1918c2ecf20Sopenharmony_ci#define I2S_XFER_TXS_STOP	(0 << I2S_XFER_TXS_SHIFT)
1928c2ecf20Sopenharmony_ci#define I2S_XFER_TXS_START	(1 << I2S_XFER_TXS_SHIFT)
1938c2ecf20Sopenharmony_ci
1948c2ecf20Sopenharmony_ci/*
1958c2ecf20Sopenharmony_ci * CLR
1968c2ecf20Sopenharmony_ci * clear SCLK domain logic register
1978c2ecf20Sopenharmony_ci*/
1988c2ecf20Sopenharmony_ci#define I2S_CLR_RXC	BIT(1)
1998c2ecf20Sopenharmony_ci#define I2S_CLR_TXC	BIT(0)
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci/*
2028c2ecf20Sopenharmony_ci * TXDR
2038c2ecf20Sopenharmony_ci * Transimt FIFO data register, write only.
2048c2ecf20Sopenharmony_ci*/
2058c2ecf20Sopenharmony_ci#define I2S_TXDR_MASK	(0xff)
2068c2ecf20Sopenharmony_ci
2078c2ecf20Sopenharmony_ci/*
2088c2ecf20Sopenharmony_ci * RXDR
2098c2ecf20Sopenharmony_ci * Receive FIFO data register, write only.
2108c2ecf20Sopenharmony_ci*/
2118c2ecf20Sopenharmony_ci#define I2S_RXDR_MASK	(0xff)
2128c2ecf20Sopenharmony_ci
2138c2ecf20Sopenharmony_ci/* Clock divider id */
2148c2ecf20Sopenharmony_cienum {
2158c2ecf20Sopenharmony_ci	ROCKCHIP_DIV_MCLK = 0,
2168c2ecf20Sopenharmony_ci	ROCKCHIP_DIV_BCLK,
2178c2ecf20Sopenharmony_ci};
2188c2ecf20Sopenharmony_ci
2198c2ecf20Sopenharmony_ci/* channel select */
2208c2ecf20Sopenharmony_ci#define I2S_CSR_SHIFT	15
2218c2ecf20Sopenharmony_ci#define I2S_CHN_2	(0 << I2S_CSR_SHIFT)
2228c2ecf20Sopenharmony_ci#define I2S_CHN_4	(1 << I2S_CSR_SHIFT)
2238c2ecf20Sopenharmony_ci#define I2S_CHN_6	(2 << I2S_CSR_SHIFT)
2248c2ecf20Sopenharmony_ci#define I2S_CHN_8	(3 << I2S_CSR_SHIFT)
2258c2ecf20Sopenharmony_ci
2268c2ecf20Sopenharmony_ci/* I2S REGS */
2278c2ecf20Sopenharmony_ci#define I2S_TXCR	(0x0000)
2288c2ecf20Sopenharmony_ci#define I2S_RXCR	(0x0004)
2298c2ecf20Sopenharmony_ci#define I2S_CKR		(0x0008)
2308c2ecf20Sopenharmony_ci#define I2S_FIFOLR	(0x000c)
2318c2ecf20Sopenharmony_ci#define I2S_DMACR	(0x0010)
2328c2ecf20Sopenharmony_ci#define I2S_INTCR	(0x0014)
2338c2ecf20Sopenharmony_ci#define I2S_INTSR	(0x0018)
2348c2ecf20Sopenharmony_ci#define I2S_XFER	(0x001c)
2358c2ecf20Sopenharmony_ci#define I2S_CLR		(0x0020)
2368c2ecf20Sopenharmony_ci#define I2S_TXDR	(0x0024)
2378c2ecf20Sopenharmony_ci#define I2S_RXDR	(0x0028)
2388c2ecf20Sopenharmony_ci
2398c2ecf20Sopenharmony_ci/* io direction cfg register */
2408c2ecf20Sopenharmony_ci#define I2S_IO_DIRECTION_MASK	(7)
2418c2ecf20Sopenharmony_ci#define I2S_IO_8CH_OUT_2CH_IN	(0)
2428c2ecf20Sopenharmony_ci#define I2S_IO_6CH_OUT_4CH_IN	(4)
2438c2ecf20Sopenharmony_ci#define I2S_IO_4CH_OUT_6CH_IN	(6)
2448c2ecf20Sopenharmony_ci#define I2S_IO_2CH_OUT_8CH_IN	(7)
2458c2ecf20Sopenharmony_ci
2468c2ecf20Sopenharmony_ci#endif /* _ROCKCHIP_IIS_H */
247