blob: 902da65de029ba4e5ebb2b6d02b9a2d00416bd6a [file] [log] [blame]
TsiChungLiew7af77512008-01-14 15:30:15 -06001/*
2 * SSI Internal Memory Map
3 *
4 * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
5 * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
6 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
TsiChungLiew7af77512008-01-14 15:30:15 -06008 */
9
10#ifndef __SSI_H__
11#define __SSI_H__
12
TsiChungLiew7af77512008-01-14 15:30:15 -060013typedef struct ssi {
14 u32 tx0;
15 u32 tx1;
16 u32 rx0;
17 u32 rx1;
18 u32 cr;
19 u32 isr;
20 u32 ier;
21 u32 tcr;
22 u32 rcr;
23 u32 ccr;
24 u8 resv0[0x4];
25 u32 fcsr;
26 u8 resv1[0x8];
27 u32 acr;
28 u32 acadd;
29 u32 acdat;
30 u32 atag;
31 u32 tmask;
32 u32 rmask;
33} ssi_t;
34
TsiChungLiew7af77512008-01-14 15:30:15 -060035#define SSI_CR_CIS (0x00000200)
36#define SSI_CR_TCH (0x00000100)
37#define SSI_CR_MCE (0x00000080)
TsiChung Liew012522f2008-10-21 10:03:07 +000038#define SSI_CR_I2S_MASK (0xFFFFFF9F)
TsiChungLiew7af77512008-01-14 15:30:15 -060039#define SSI_CR_I2S_SLAVE (0x00000040)
40#define SSI_CR_I2S_MASTER (0x00000020)
41#define SSI_CR_I2S_NORMAL (0x00000000)
42#define SSI_CR_SYN (0x00000010)
43#define SSI_CR_NET (0x00000008)
44#define SSI_CR_RE (0x00000004)
45#define SSI_CR_TE (0x00000002)
46#define SSI_CR_SSI_EN (0x00000001)
47
TsiChungLiew7af77512008-01-14 15:30:15 -060048#define SSI_ISR_CMDAU (0x00040000)
49#define SSI_ISR_CMDDU (0x00020000)
50#define SSI_ISR_RXT (0x00010000)
51#define SSI_ISR_RDR1 (0x00008000)
52#define SSI_ISR_RDR0 (0x00004000)
53#define SSI_ISR_TDE1 (0x00002000)
54#define SSI_ISR_TDE0 (0x00001000)
55#define SSI_ISR_ROE1 (0x00000800)
56#define SSI_ISR_ROE0 (0x00000400)
57#define SSI_ISR_TUE1 (0x00000200)
58#define SSI_ISR_TUE0 (0x00000100)
59#define SSI_ISR_TFS (0x00000080)
60#define SSI_ISR_RFS (0x00000040)
61#define SSI_ISR_TLS (0x00000020)
62#define SSI_ISR_RLS (0x00000010)
63#define SSI_ISR_RFF1 (0x00000008)
64#define SSI_ISR_RFF0 (0x00000004)
65#define SSI_ISR_TFE1 (0x00000002)
66#define SSI_ISR_TFE0 (0x00000001)
67
TsiChungLiew7af77512008-01-14 15:30:15 -060068#define SSI_IER_RDMAE (0x00400000)
69#define SSI_IER_RIE (0x00200000)
70#define SSI_IER_TDMAE (0x00100000)
71#define SSI_IER_TIE (0x00080000)
72#define SSI_IER_CMDAU (0x00040000)
73#define SSI_IER_CMDU (0x00020000)
74#define SSI_IER_RXT (0x00010000)
75#define SSI_IER_RDR1 (0x00008000)
76#define SSI_IER_RDR0 (0x00004000)
77#define SSI_IER_TDE1 (0x00002000)
78#define SSI_IER_TDE0 (0x00001000)
79#define SSI_IER_ROE1 (0x00000800)
80#define SSI_IER_ROE0 (0x00000400)
81#define SSI_IER_TUE1 (0x00000200)
82#define SSI_IER_TUE0 (0x00000100)
83#define SSI_IER_TFS (0x00000080)
84#define SSI_IER_RFS (0x00000040)
85#define SSI_IER_TLS (0x00000020)
86#define SSI_IER_RLS (0x00000010)
87#define SSI_IER_RFF1 (0x00000008)
88#define SSI_IER_RFF0 (0x00000004)
89#define SSI_IER_TFE1 (0x00000002)
90#define SSI_IER_TFE0 (0x00000001)
91
TsiChungLiew7af77512008-01-14 15:30:15 -060092#define SSI_TCR_TXBIT0 (0x00000200)
93#define SSI_TCR_TFEN1 (0x00000100)
94#define SSI_TCR_TFEN0 (0x00000080)
95#define SSI_TCR_TFDIR (0x00000040)
96#define SSI_TCR_TXDIR (0x00000020)
97#define SSI_TCR_TSHFD (0x00000010)
98#define SSI_TCR_TSCKP (0x00000008)
99#define SSI_TCR_TFSI (0x00000004)
100#define SSI_TCR_TFSL (0x00000002)
101#define SSI_TCR_TEFS (0x00000001)
102
TsiChungLiew7af77512008-01-14 15:30:15 -0600103#define SSI_RCR_RXEXT (0x00000400)
104#define SSI_RCR_RXBIT0 (0x00000200)
105#define SSI_RCR_RFEN1 (0x00000100)
106#define SSI_RCR_RFEN0 (0x00000080)
107#define SSI_RCR_RSHFD (0x00000010)
108#define SSI_RCR_RSCKP (0x00000008)
109#define SSI_RCR_RFSI (0x00000004)
110#define SSI_RCR_RFSL (0x00000002)
111#define SSI_RCR_REFS (0x00000001)
112
TsiChungLiew7af77512008-01-14 15:30:15 -0600113#define SSI_CCR_DIV2 (0x00040000)
114#define SSI_CCR_PSR (0x00020000)
TsiChung Liew012522f2008-10-21 10:03:07 +0000115#define SSI_CCR_WL(x) (((x) & 0x0F) << 13)
116#define SSI_CCR_WL_MASK (0xFFFE1FFF)
117#define SSI_CCR_DC(x) (((x)& 0x1F) << 8)
118#define SSI_CCR_DC_MASK (0xFFFFE0FF)
119#define SSI_CCR_PM(x) ((x) & 0xFF)
120#define SSI_CCR_PM_MASK (0xFFFFFF00)
TsiChungLiew7af77512008-01-14 15:30:15 -0600121
TsiChung Liew012522f2008-10-21 10:03:07 +0000122#define SSI_FCSR_RFCNT1(x) (((x) & 0x0F) << 28)
123#define SSI_FCSR_RFCNT1_MASK (0x0FFFFFFF)
124#define SSI_FCSR_TFCNT1(x) (((x) & 0x0F) << 24)
125#define SSI_FCSR_TFCNT1_MASK (0xF0FFFFFF)
126#define SSI_FCSR_RFWM1(x) (((x) & 0x0F) << 20)
127#define SSI_FCSR_RFWM1_MASK (0xFF0FFFFF)
128#define SSI_FCSR_TFWM1(x) (((x) & 0x0F) << 16)
129#define SSI_FCSR_TFWM1_MASK (0xFFF0FFFF)
130#define SSI_FCSR_RFCNT0(x) (((x) & 0x0F) << 12)
131#define SSI_FCSR_RFCNT0_MASK (0xFFFF0FFF)
132#define SSI_FCSR_TFCNT0(x) (((x) & 0x0F) << 8)
133#define SSI_FCSR_TFCNT0_MASK (0xFFFFF0FF)
134#define SSI_FCSR_RFWM0(x) (((x) & 0x0F) << 4)
135#define SSI_FCSR_RFWM0_MASK (0xFFFFFF0F)
136#define SSI_FCSR_TFWM0(x) ((x) & 0x0F)
137#define SSI_FCSR_TFWM0_MASK (0xFFFFFFF0)
TsiChungLiew7af77512008-01-14 15:30:15 -0600138
TsiChung Liew012522f2008-10-21 10:03:07 +0000139#define SSI_ACR_FRDIV(x) (((x) & 0x3F) << 5)
140#define SSI_ACR_FRDIV_MASK (0xFFFFF81F)
TsiChungLiew7af77512008-01-14 15:30:15 -0600141#define SSI_ACR_WR (0x00000010)
142#define SSI_ACR_RD (0x00000008)
143#define SSI_ACR_TIF (0x00000004)
144#define SSI_ACR_FV (0x00000002)
145#define SSI_ACR_AC97EN (0x00000001)
146
TsiChung Liew012522f2008-10-21 10:03:07 +0000147#define SSI_ACADD_SSI_ACADD(x) ((x) & 0x0007FFFF)
TsiChungLiew7af77512008-01-14 15:30:15 -0600148
TsiChung Liew012522f2008-10-21 10:03:07 +0000149#define SSI_ACDAT_SSI_ACDAT(x) ((x) & 0x0007FFFF)
TsiChungLiew7af77512008-01-14 15:30:15 -0600150
TsiChung Liew012522f2008-10-21 10:03:07 +0000151#define SSI_ATAG_DDI_ATAG(x) ((x) & 0x0000FFFF)
TsiChungLiew7af77512008-01-14 15:30:15 -0600152
153#endif /* __SSI_H__ */