18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * arch/arm/mach-prima2/include/mach/sirfsoc_usp.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef _SIRF_USP_H
98c2ecf20Sopenharmony_ci#define _SIRF_USP_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci/* USP Registers */
128c2ecf20Sopenharmony_ci#define USP_MODE1		0x00
138c2ecf20Sopenharmony_ci#define USP_MODE2		0x04
148c2ecf20Sopenharmony_ci#define USP_TX_FRAME_CTRL	0x08
158c2ecf20Sopenharmony_ci#define USP_RX_FRAME_CTRL	0x0C
168c2ecf20Sopenharmony_ci#define USP_TX_RX_ENABLE	0x10
178c2ecf20Sopenharmony_ci#define USP_INT_ENABLE		0x14
188c2ecf20Sopenharmony_ci#define USP_INT_STATUS		0x18
198c2ecf20Sopenharmony_ci#define USP_PIN_IO_DATA		0x1C
208c2ecf20Sopenharmony_ci#define USP_RISC_DSP_MODE	0x20
218c2ecf20Sopenharmony_ci#define USP_AYSNC_PARAM_REG	0x24
228c2ecf20Sopenharmony_ci#define USP_IRDA_X_MODE_DIV	0x28
238c2ecf20Sopenharmony_ci#define USP_SM_CFG		0x2C
248c2ecf20Sopenharmony_ci#define USP_TX_DMA_IO_CTRL	0x100
258c2ecf20Sopenharmony_ci#define USP_TX_DMA_IO_LEN	0x104
268c2ecf20Sopenharmony_ci#define USP_TX_FIFO_CTRL	0x108
278c2ecf20Sopenharmony_ci#define USP_TX_FIFO_LEVEL_CHK	0x10C
288c2ecf20Sopenharmony_ci#define USP_TX_FIFO_OP		0x110
298c2ecf20Sopenharmony_ci#define USP_TX_FIFO_STATUS	0x114
308c2ecf20Sopenharmony_ci#define USP_TX_FIFO_DATA	0x118
318c2ecf20Sopenharmony_ci#define USP_RX_DMA_IO_CTRL	0x120
328c2ecf20Sopenharmony_ci#define USP_RX_DMA_IO_LEN	0x124
338c2ecf20Sopenharmony_ci#define USP_RX_FIFO_CTRL	0x128
348c2ecf20Sopenharmony_ci#define USP_RX_FIFO_LEVEL_CHK	0x12C
358c2ecf20Sopenharmony_ci#define USP_RX_FIFO_OP		0x130
368c2ecf20Sopenharmony_ci#define USP_RX_FIFO_STATUS	0x134
378c2ecf20Sopenharmony_ci#define USP_RX_FIFO_DATA	0x138
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci/* USP MODE register-1 */
408c2ecf20Sopenharmony_ci#define USP_SYNC_MODE			0x00000001
418c2ecf20Sopenharmony_ci#define USP_CLOCK_MODE_SLAVE		0x00000002
428c2ecf20Sopenharmony_ci#define USP_LOOP_BACK_EN		0x00000004
438c2ecf20Sopenharmony_ci#define USP_HPSIR_EN			0x00000008
448c2ecf20Sopenharmony_ci#define USP_ENDIAN_CTRL_LSBF		0x00000010
458c2ecf20Sopenharmony_ci#define USP_EN				0x00000020
468c2ecf20Sopenharmony_ci#define USP_RXD_ACT_EDGE_FALLING	0x00000040
478c2ecf20Sopenharmony_ci#define USP_TXD_ACT_EDGE_FALLING	0x00000080
488c2ecf20Sopenharmony_ci#define USP_RFS_ACT_LEVEL_LOGIC1	0x00000100
498c2ecf20Sopenharmony_ci#define USP_TFS_ACT_LEVEL_LOGIC1	0x00000200
508c2ecf20Sopenharmony_ci#define USP_SCLK_IDLE_MODE_TOGGLE	0x00000400
518c2ecf20Sopenharmony_ci#define USP_SCLK_IDLE_LEVEL_LOGIC1	0x00000800
528c2ecf20Sopenharmony_ci#define USP_SCLK_PIN_MODE_IO	0x00001000
538c2ecf20Sopenharmony_ci#define USP_RFS_PIN_MODE_IO	0x00002000
548c2ecf20Sopenharmony_ci#define USP_TFS_PIN_MODE_IO	0x00004000
558c2ecf20Sopenharmony_ci#define USP_RXD_PIN_MODE_IO	0x00008000
568c2ecf20Sopenharmony_ci#define USP_TXD_PIN_MODE_IO	0x00010000
578c2ecf20Sopenharmony_ci#define USP_SCLK_IO_MODE_INPUT	0x00020000
588c2ecf20Sopenharmony_ci#define USP_RFS_IO_MODE_INPUT	0x00040000
598c2ecf20Sopenharmony_ci#define USP_TFS_IO_MODE_INPUT	0x00080000
608c2ecf20Sopenharmony_ci#define USP_RXD_IO_MODE_INPUT	0x00100000
618c2ecf20Sopenharmony_ci#define USP_TXD_IO_MODE_INPUT	0x00200000
628c2ecf20Sopenharmony_ci#define USP_IRDA_WIDTH_DIV_MASK	0x3FC00000
638c2ecf20Sopenharmony_ci#define USP_IRDA_WIDTH_DIV_OFFSET	0
648c2ecf20Sopenharmony_ci#define USP_IRDA_IDLE_LEVEL_HIGH	0x40000000
658c2ecf20Sopenharmony_ci#define USP_TX_UFLOW_REPEAT_ZERO	0x80000000
668c2ecf20Sopenharmony_ci#define USP_TX_ENDIAN_MODE		0x00000020
678c2ecf20Sopenharmony_ci#define USP_RX_ENDIAN_MODE		0x00000020
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci/* USP Mode Register-2 */
708c2ecf20Sopenharmony_ci#define USP_RXD_DELAY_LEN_MASK		0x000000FF
718c2ecf20Sopenharmony_ci#define USP_RXD_DELAY_LEN_OFFSET	0
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci#define USP_TXD_DELAY_LEN_MASK		0x0000FF00
748c2ecf20Sopenharmony_ci#define USP_TXD_DELAY_LEN_OFFSET	8
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci#define USP_ENA_CTRL_MODE		0x00010000
778c2ecf20Sopenharmony_ci#define USP_FRAME_CTRL_MODE		0x00020000
788c2ecf20Sopenharmony_ci#define USP_TFS_SOURCE_MODE             0x00040000
798c2ecf20Sopenharmony_ci#define USP_TFS_MS_MODE                 0x00080000
808c2ecf20Sopenharmony_ci#define USP_CLK_DIVISOR_MASK		0x7FE00000
818c2ecf20Sopenharmony_ci#define USP_CLK_DIVISOR_OFFSET		21
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci#define USP_TFS_CLK_SLAVE_MODE		(1<<20)
848c2ecf20Sopenharmony_ci#define USP_RFS_CLK_SLAVE_MODE		(1<<19)
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci#define USP_IRDA_DATA_WIDTH		0x80000000
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ci/* USP Transmit Frame Control Register */
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci#define USP_TXC_DATA_LEN_MASK		0x000000FF
918c2ecf20Sopenharmony_ci#define USP_TXC_DATA_LEN_OFFSET		0
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci#define USP_TXC_SYNC_LEN_MASK		0x0000FF00
948c2ecf20Sopenharmony_ci#define USP_TXC_SYNC_LEN_OFFSET		8
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ci#define USP_TXC_FRAME_LEN_MASK		0x00FF0000
978c2ecf20Sopenharmony_ci#define USP_TXC_FRAME_LEN_OFFSET	16
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci#define USP_TXC_SHIFTER_LEN_MASK	0x1F000000
1008c2ecf20Sopenharmony_ci#define USP_TXC_SHIFTER_LEN_OFFSET	24
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ci#define USP_TXC_SLAVE_CLK_SAMPLE	0x20000000
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ci#define USP_TXC_CLK_DIVISOR_MASK	0xC0000000
1058c2ecf20Sopenharmony_ci#define USP_TXC_CLK_DIVISOR_OFFSET	30
1068c2ecf20Sopenharmony_ci
1078c2ecf20Sopenharmony_ci/* USP Receive Frame Control Register */
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci#define USP_RXC_DATA_LEN_MASK		0x000000FF
1108c2ecf20Sopenharmony_ci#define USP_RXC_DATA_LEN_OFFSET		0
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci#define USP_RXC_FRAME_LEN_MASK		0x0000FF00
1138c2ecf20Sopenharmony_ci#define USP_RXC_FRAME_LEN_OFFSET	8
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci#define USP_RXC_SHIFTER_LEN_MASK	0x001F0000
1168c2ecf20Sopenharmony_ci#define USP_RXC_SHIFTER_LEN_OFFSET	16
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci#define USP_START_EDGE_MODE	0x00800000
1198c2ecf20Sopenharmony_ci#define USP_I2S_SYNC_CHG	0x00200000
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci#define USP_RXC_CLK_DIVISOR_MASK	0x0F000000
1228c2ecf20Sopenharmony_ci#define USP_RXC_CLK_DIVISOR_OFFSET	24
1238c2ecf20Sopenharmony_ci#define USP_SINGLE_SYNC_MODE		0x00400000
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci/* Tx - RX Enable Register */
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ci#define USP_RX_ENA		0x00000001
1288c2ecf20Sopenharmony_ci#define USP_TX_ENA		0x00000002
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_ci/* USP Interrupt Enable and status Register */
1318c2ecf20Sopenharmony_ci#define USP_RX_DONE_INT			0x00000001
1328c2ecf20Sopenharmony_ci#define USP_TX_DONE_INT			0x00000002
1338c2ecf20Sopenharmony_ci#define USP_RX_OFLOW_INT		0x00000004
1348c2ecf20Sopenharmony_ci#define USP_TX_UFLOW_INT		0x00000008
1358c2ecf20Sopenharmony_ci#define USP_RX_IO_DMA_INT		0x00000010
1368c2ecf20Sopenharmony_ci#define USP_TX_IO_DMA_INT		0x00000020
1378c2ecf20Sopenharmony_ci#define USP_RXFIFO_FULL_INT		0x00000040
1388c2ecf20Sopenharmony_ci#define USP_TXFIFO_EMPTY_INT		0x00000080
1398c2ecf20Sopenharmony_ci#define USP_RXFIFO_THD_INT		0x00000100
1408c2ecf20Sopenharmony_ci#define USP_TXFIFO_THD_INT		0x00000200
1418c2ecf20Sopenharmony_ci#define USP_UART_FRM_ERR_INT		0x00000400
1428c2ecf20Sopenharmony_ci#define USP_RX_TIMEOUT_INT		0x00000800
1438c2ecf20Sopenharmony_ci#define USP_TX_ALLOUT_INT		0x00001000
1448c2ecf20Sopenharmony_ci#define USP_RXD_BREAK_INT		0x00008000
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci/* All possible TX interruots */
1478c2ecf20Sopenharmony_ci#define USP_TX_INTERRUPT		(USP_TX_DONE_INT|USP_TX_UFLOW_INT|\
1488c2ecf20Sopenharmony_ci					USP_TX_IO_DMA_INT|\
1498c2ecf20Sopenharmony_ci					USP_TXFIFO_EMPTY_INT|\
1508c2ecf20Sopenharmony_ci					USP_TXFIFO_THD_INT)
1518c2ecf20Sopenharmony_ci/* All possible RX interruots */
1528c2ecf20Sopenharmony_ci#define USP_RX_INTERRUPT		(USP_RX_DONE_INT|USP_RX_OFLOW_INT|\
1538c2ecf20Sopenharmony_ci					USP_RX_IO_DMA_INT|\
1548c2ecf20Sopenharmony_ci					USP_RXFIFO_FULL_INT|\
1558c2ecf20Sopenharmony_ci					USP_RXFIFO_THD_INT|\
1568c2ecf20Sopenharmony_ci					USP_RX_TIMEOUT_INT)
1578c2ecf20Sopenharmony_ci
1588c2ecf20Sopenharmony_ci#define USP_INT_ALL        0x1FFF
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ci/* USP Pin I/O Data Register */
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ci#define USP_RFS_PIN_VALUE_MASK	0x00000001
1638c2ecf20Sopenharmony_ci#define USP_TFS_PIN_VALUE_MASK	0x00000002
1648c2ecf20Sopenharmony_ci#define USP_RXD_PIN_VALUE_MASK	0x00000004
1658c2ecf20Sopenharmony_ci#define USP_TXD_PIN_VALUE_MASK	0x00000008
1668c2ecf20Sopenharmony_ci#define USP_SCLK_PIN_VALUE_MASK	0x00000010
1678c2ecf20Sopenharmony_ci
1688c2ecf20Sopenharmony_ci/* USP RISC/DSP Mode Register */
1698c2ecf20Sopenharmony_ci#define USP_RISC_DSP_SEL	0x00000001
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_ci/* USP ASYNC PARAMETER Register*/
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ci#define USP_ASYNC_TIMEOUT_MASK	0x0000FFFF
1748c2ecf20Sopenharmony_ci#define USP_ASYNC_TIMEOUT_OFFSET	0
1758c2ecf20Sopenharmony_ci#define USP_ASYNC_TIMEOUT(x)	(((x)&USP_ASYNC_TIMEOUT_MASK) \
1768c2ecf20Sopenharmony_ci				<<USP_ASYNC_TIMEOUT_OFFSET)
1778c2ecf20Sopenharmony_ci
1788c2ecf20Sopenharmony_ci#define USP_ASYNC_DIV2_MASK		0x003F0000
1798c2ecf20Sopenharmony_ci#define USP_ASYNC_DIV2_OFFSET		16
1808c2ecf20Sopenharmony_ci
1818c2ecf20Sopenharmony_ci/* USP TX DMA I/O MODE Register */
1828c2ecf20Sopenharmony_ci#define USP_TX_MODE_IO			0x00000001
1838c2ecf20Sopenharmony_ci
1848c2ecf20Sopenharmony_ci/* USP TX DMA I/O Length Register */
1858c2ecf20Sopenharmony_ci#define USP_TX_DATA_LEN_MASK		0xFFFFFFFF
1868c2ecf20Sopenharmony_ci#define USP_TX_DATA_LEN_OFFSET		0
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_ci/* USP TX FIFO Control Register */
1898c2ecf20Sopenharmony_ci#define USP_TX_FIFO_WIDTH_MASK		0x00000003
1908c2ecf20Sopenharmony_ci#define USP_TX_FIFO_WIDTH_OFFSET	0
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ci#define USP_TX_FIFO_THD_MASK		0x000001FC
1938c2ecf20Sopenharmony_ci#define USP_TX_FIFO_THD_OFFSET		2
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci/* USP TX FIFO Level Check Register */
1968c2ecf20Sopenharmony_ci#define USP_TX_FIFO_LEVEL_CHECK_MASK	0x1F
1978c2ecf20Sopenharmony_ci#define USP_TX_FIFO_SC_OFFSET	0
1988c2ecf20Sopenharmony_ci#define USP_TX_FIFO_LC_OFFSET	10
1998c2ecf20Sopenharmony_ci#define USP_TX_FIFO_HC_OFFSET	20
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci#define TX_FIFO_SC(x)		(((x) & USP_TX_FIFO_LEVEL_CHECK_MASK) \
2028c2ecf20Sopenharmony_ci				<< USP_TX_FIFO_SC_OFFSET)
2038c2ecf20Sopenharmony_ci#define TX_FIFO_LC(x)		(((x) & USP_TX_FIFO_LEVEL_CHECK_MASK) \
2048c2ecf20Sopenharmony_ci				<< USP_TX_FIFO_LC_OFFSET)
2058c2ecf20Sopenharmony_ci#define TX_FIFO_HC(x)		(((x) & USP_TX_FIFO_LEVEL_CHECK_MASK) \
2068c2ecf20Sopenharmony_ci				<< USP_TX_FIFO_HC_OFFSET)
2078c2ecf20Sopenharmony_ci
2088c2ecf20Sopenharmony_ci/* USP TX FIFO Operation Register */
2098c2ecf20Sopenharmony_ci#define USP_TX_FIFO_RESET		0x00000001
2108c2ecf20Sopenharmony_ci#define USP_TX_FIFO_START		0x00000002
2118c2ecf20Sopenharmony_ci
2128c2ecf20Sopenharmony_ci/* USP TX FIFO Status Register */
2138c2ecf20Sopenharmony_ci#define USP_TX_FIFO_LEVEL_MASK		0x0000007F
2148c2ecf20Sopenharmony_ci#define USP_TX_FIFO_LEVEL_OFFSET	0
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci#define USP_TX_FIFO_FULL		0x00000080
2178c2ecf20Sopenharmony_ci#define USP_TX_FIFO_EMPTY		0x00000100
2188c2ecf20Sopenharmony_ci
2198c2ecf20Sopenharmony_ci/* USP TX FIFO Data Register */
2208c2ecf20Sopenharmony_ci#define USP_TX_FIFO_DATA_MASK		0xFFFFFFFF
2218c2ecf20Sopenharmony_ci#define USP_TX_FIFO_DATA_OFFSET		0
2228c2ecf20Sopenharmony_ci
2238c2ecf20Sopenharmony_ci/* USP RX DMA I/O MODE Register */
2248c2ecf20Sopenharmony_ci#define USP_RX_MODE_IO			0x00000001
2258c2ecf20Sopenharmony_ci#define USP_RX_DMA_FLUSH		0x00000004
2268c2ecf20Sopenharmony_ci
2278c2ecf20Sopenharmony_ci/* USP RX DMA I/O Length Register */
2288c2ecf20Sopenharmony_ci#define USP_RX_DATA_LEN_MASK		0xFFFFFFFF
2298c2ecf20Sopenharmony_ci#define USP_RX_DATA_LEN_OFFSET		0
2308c2ecf20Sopenharmony_ci
2318c2ecf20Sopenharmony_ci/* USP RX FIFO Control Register */
2328c2ecf20Sopenharmony_ci#define USP_RX_FIFO_WIDTH_MASK		0x00000003
2338c2ecf20Sopenharmony_ci#define USP_RX_FIFO_WIDTH_OFFSET	0
2348c2ecf20Sopenharmony_ci
2358c2ecf20Sopenharmony_ci#define USP_RX_FIFO_THD_MASK		0x000001FC
2368c2ecf20Sopenharmony_ci#define USP_RX_FIFO_THD_OFFSET		2
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_ci/* USP RX FIFO Level Check Register */
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_ci#define USP_RX_FIFO_LEVEL_CHECK_MASK	0x1F
2418c2ecf20Sopenharmony_ci#define USP_RX_FIFO_SC_OFFSET	0
2428c2ecf20Sopenharmony_ci#define USP_RX_FIFO_LC_OFFSET	10
2438c2ecf20Sopenharmony_ci#define USP_RX_FIFO_HC_OFFSET	20
2448c2ecf20Sopenharmony_ci
2458c2ecf20Sopenharmony_ci#define RX_FIFO_SC(x)		(((x) & USP_RX_FIFO_LEVEL_CHECK_MASK) \
2468c2ecf20Sopenharmony_ci				<< USP_RX_FIFO_SC_OFFSET)
2478c2ecf20Sopenharmony_ci#define RX_FIFO_LC(x)		(((x) & USP_RX_FIFO_LEVEL_CHECK_MASK) \
2488c2ecf20Sopenharmony_ci				<< USP_RX_FIFO_LC_OFFSET)
2498c2ecf20Sopenharmony_ci#define RX_FIFO_HC(x)		(((x) & USP_RX_FIFO_LEVEL_CHECK_MASK) \
2508c2ecf20Sopenharmony_ci				<< USP_RX_FIFO_HC_OFFSET)
2518c2ecf20Sopenharmony_ci
2528c2ecf20Sopenharmony_ci/* USP RX FIFO Operation Register */
2538c2ecf20Sopenharmony_ci#define USP_RX_FIFO_RESET		0x00000001
2548c2ecf20Sopenharmony_ci#define USP_RX_FIFO_START		0x00000002
2558c2ecf20Sopenharmony_ci
2568c2ecf20Sopenharmony_ci/* USP RX FIFO Status Register */
2578c2ecf20Sopenharmony_ci
2588c2ecf20Sopenharmony_ci#define USP_RX_FIFO_LEVEL_MASK		0x0000007F
2598c2ecf20Sopenharmony_ci#define USP_RX_FIFO_LEVEL_OFFSET	0
2608c2ecf20Sopenharmony_ci
2618c2ecf20Sopenharmony_ci#define USP_RX_FIFO_FULL		0x00000080
2628c2ecf20Sopenharmony_ci#define USP_RX_FIFO_EMPTY		0x00000100
2638c2ecf20Sopenharmony_ci
2648c2ecf20Sopenharmony_ci/* USP RX FIFO Data Register */
2658c2ecf20Sopenharmony_ci
2668c2ecf20Sopenharmony_ci#define USP_RX_FIFO_DATA_MASK		0xFFFFFFFF
2678c2ecf20Sopenharmony_ci#define USP_RX_FIFO_DATA_OFFSET		0
2688c2ecf20Sopenharmony_ci
2698c2ecf20Sopenharmony_ci/*
2708c2ecf20Sopenharmony_ci * When rx thd irq occur, sender just disable tx empty irq,
2718c2ecf20Sopenharmony_ci * Remaining data in tx fifo wil also be sent out.
2728c2ecf20Sopenharmony_ci */
2738c2ecf20Sopenharmony_ci#define USP_FIFO_SIZE			128
2748c2ecf20Sopenharmony_ci#define USP_TX_FIFO_THRESHOLD		(USP_FIFO_SIZE/2)
2758c2ecf20Sopenharmony_ci#define USP_RX_FIFO_THRESHOLD		(USP_FIFO_SIZE/2)
2768c2ecf20Sopenharmony_ci
2778c2ecf20Sopenharmony_ci/* FIFO_WIDTH for the USP_TX_FIFO_CTRL and USP_RX_FIFO_CTRL registers */
2788c2ecf20Sopenharmony_ci#define USP_FIFO_WIDTH_BYTE  0x00
2798c2ecf20Sopenharmony_ci#define USP_FIFO_WIDTH_WORD  0x01
2808c2ecf20Sopenharmony_ci#define USP_FIFO_WIDTH_DWORD 0x02
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_ci#define USP_ASYNC_DIV2          16
2838c2ecf20Sopenharmony_ci
2848c2ecf20Sopenharmony_ci#define USP_PLUGOUT_RETRY_CNT	2
2858c2ecf20Sopenharmony_ci
2868c2ecf20Sopenharmony_ci#define USP_TX_RX_FIFO_WIDTH_DWORD    2
2878c2ecf20Sopenharmony_ci
2888c2ecf20Sopenharmony_ci#define SIRF_USP_DIV_MCLK	0
2898c2ecf20Sopenharmony_ci
2908c2ecf20Sopenharmony_ci#define SIRF_USP_I2S_TFS_SYNC	0
2918c2ecf20Sopenharmony_ci#define SIRF_USP_I2S_RFS_SYNC	1
2928c2ecf20Sopenharmony_ci#endif
293