55#ifndef _GRLIB_SPICTRL_REGS_H
56#define _GRLIB_SPICTRL_REGS_H
84#define SPICTRL_CAP_SSSZ_SHIFT 24
85#define SPICTRL_CAP_SSSZ_MASK 0xff000000U
86#define SPICTRL_CAP_SSSZ_GET( _reg ) \
87 ( ( ( _reg ) & SPICTRL_CAP_SSSZ_MASK ) >> \
88 SPICTRL_CAP_SSSZ_SHIFT )
89#define SPICTRL_CAP_SSSZ_SET( _reg, _val ) \
90 ( ( ( _reg ) & ~SPICTRL_CAP_SSSZ_MASK ) | \
91 ( ( ( _val ) << SPICTRL_CAP_SSSZ_SHIFT ) & \
92 SPICTRL_CAP_SSSZ_MASK ) )
93#define SPICTRL_CAP_SSSZ( _val ) \
94 ( ( ( _val ) << SPICTRL_CAP_SSSZ_SHIFT ) & \
95 SPICTRL_CAP_SSSZ_MASK )
97#define SPICTRL_CAP_MAXWLEN_SHIFT 20
98#define SPICTRL_CAP_MAXWLEN_MASK 0xf00000U
99#define SPICTRL_CAP_MAXWLEN_GET( _reg ) \
100 ( ( ( _reg ) & SPICTRL_CAP_MAXWLEN_MASK ) >> \
101 SPICTRL_CAP_MAXWLEN_SHIFT )
102#define SPICTRL_CAP_MAXWLEN_SET( _reg, _val ) \
103 ( ( ( _reg ) & ~SPICTRL_CAP_MAXWLEN_MASK ) | \
104 ( ( ( _val ) << SPICTRL_CAP_MAXWLEN_SHIFT ) & \
105 SPICTRL_CAP_MAXWLEN_MASK ) )
106#define SPICTRL_CAP_MAXWLEN( _val ) \
107 ( ( ( _val ) << SPICTRL_CAP_MAXWLEN_SHIFT ) & \
108 SPICTRL_CAP_MAXWLEN_MASK )
110#define SPICTRL_CAP_TWEN 0x80000U
112#define SPICTRL_CAP_AMODE 0x40000U
114#define SPICTRL_CAP_ASELA 0x20000U
116#define SPICTRL_CAP_SSEN 0x10000U
118#define SPICTRL_CAP_FDEPTH_SHIFT 8
119#define SPICTRL_CAP_FDEPTH_MASK 0xff00U
120#define SPICTRL_CAP_FDEPTH_GET( _reg ) \
121 ( ( ( _reg ) & SPICTRL_CAP_FDEPTH_MASK ) >> \
122 SPICTRL_CAP_FDEPTH_SHIFT )
123#define SPICTRL_CAP_FDEPTH_SET( _reg, _val ) \
124 ( ( ( _reg ) & ~SPICTRL_CAP_FDEPTH_MASK ) | \
125 ( ( ( _val ) << SPICTRL_CAP_FDEPTH_SHIFT ) & \
126 SPICTRL_CAP_FDEPTH_MASK ) )
127#define SPICTRL_CAP_FDEPTH( _val ) \
128 ( ( ( _val ) << SPICTRL_CAP_FDEPTH_SHIFT ) & \
129 SPICTRL_CAP_FDEPTH_MASK )
131#define SPICTRL_CAP_SR 0x80U
133#define SPICTRL_CAP_FT_SHIFT 5
134#define SPICTRL_CAP_FT_MASK 0x60U
135#define SPICTRL_CAP_FT_GET( _reg ) \
136 ( ( ( _reg ) & SPICTRL_CAP_FT_MASK ) >> \
137 SPICTRL_CAP_FT_SHIFT )
138#define SPICTRL_CAP_FT_SET( _reg, _val ) \
139 ( ( ( _reg ) & ~SPICTRL_CAP_FT_MASK ) | \
140 ( ( ( _val ) << SPICTRL_CAP_FT_SHIFT ) & \
141 SPICTRL_CAP_FT_MASK ) )
142#define SPICTRL_CAP_FT( _val ) \
143 ( ( ( _val ) << SPICTRL_CAP_FT_SHIFT ) & \
144 SPICTRL_CAP_FT_MASK )
146#define SPICTRL_CAP_REV_SHIFT 0
147#define SPICTRL_CAP_REV_MASK 0x1fU
148#define SPICTRL_CAP_REV_GET( _reg ) \
149 ( ( ( _reg ) & SPICTRL_CAP_REV_MASK ) >> \
150 SPICTRL_CAP_REV_SHIFT )
151#define SPICTRL_CAP_REV_SET( _reg, _val ) \
152 ( ( ( _reg ) & ~SPICTRL_CAP_REV_MASK ) | \
153 ( ( ( _val ) << SPICTRL_CAP_REV_SHIFT ) & \
154 SPICTRL_CAP_REV_MASK ) )
155#define SPICTRL_CAP_REV( _val ) \
156 ( ( ( _val ) << SPICTRL_CAP_REV_SHIFT ) & \
157 SPICTRL_CAP_REV_MASK )
169#define SPICTRL_MODE_LOOP 0x40000000U
171#define SPICTRL_MODE_CPOL 0x20000000U
173#define SPICTRL_MODE_CPHA 0x10000000U
175#define SPICTRL_MODE_DIV_16 0x8000000U
177#define SPICTRL_MODE_REV 0x4000000U
179#define SPICTRL_MODE_MX 0x2000000U
181#define SPICTRL_MODE_EN 0x1000000U
183#define SPICTRL_MODE_LEN_SHIFT 20
184#define SPICTRL_MODE_LEN_MASK 0xf00000U
185#define SPICTRL_MODE_LEN_GET( _reg ) \
186 ( ( ( _reg ) & SPICTRL_MODE_LEN_MASK ) >> \
187 SPICTRL_MODE_LEN_SHIFT )
188#define SPICTRL_MODE_LEN_SET( _reg, _val ) \
189 ( ( ( _reg ) & ~SPICTRL_MODE_LEN_MASK ) | \
190 ( ( ( _val ) << SPICTRL_MODE_LEN_SHIFT ) & \
191 SPICTRL_MODE_LEN_MASK ) )
192#define SPICTRL_MODE_LEN( _val ) \
193 ( ( ( _val ) << SPICTRL_MODE_LEN_SHIFT ) & \
194 SPICTRL_MODE_LEN_MASK )
196#define SPICTRL_MODE_PM_SHIFT 16
197#define SPICTRL_MODE_PM_MASK 0xf0000U
198#define SPICTRL_MODE_PM_GET( _reg ) \
199 ( ( ( _reg ) & SPICTRL_MODE_PM_MASK ) >> \
200 SPICTRL_MODE_PM_SHIFT )
201#define SPICTRL_MODE_PM_SET( _reg, _val ) \
202 ( ( ( _reg ) & ~SPICTRL_MODE_PM_MASK ) | \
203 ( ( ( _val ) << SPICTRL_MODE_PM_SHIFT ) & \
204 SPICTRL_MODE_PM_MASK ) )
205#define SPICTRL_MODE_PM( _val ) \
206 ( ( ( _val ) << SPICTRL_MODE_PM_SHIFT ) & \
207 SPICTRL_MODE_PM_MASK )
209#define SPICTRL_MODE_TWEN 0x8000U
211#define SPICTRL_MODE_ASEL 0x4000U
213#define SPICTRL_MODE_FACT 0x2000U
215#define SPICTRL_MODE_OD 0x1000U
217#define SPICTRL_MODE_CG_SHIFT 7
218#define SPICTRL_MODE_CG_MASK 0xf80U
219#define SPICTRL_MODE_CG_GET( _reg ) \
220 ( ( ( _reg ) & SPICTRL_MODE_CG_MASK ) >> \
221 SPICTRL_MODE_CG_SHIFT )
222#define SPICTRL_MODE_CG_SET( _reg, _val ) \
223 ( ( ( _reg ) & ~SPICTRL_MODE_CG_MASK ) | \
224 ( ( ( _val ) << SPICTRL_MODE_CG_SHIFT ) & \
225 SPICTRL_MODE_CG_MASK ) )
226#define SPICTRL_MODE_CG( _val ) \
227 ( ( ( _val ) << SPICTRL_MODE_CG_SHIFT ) & \
228 SPICTRL_MODE_CG_MASK )
230#define SPICTRL_MODE_ASELDEL_SHIFT 5
231#define SPICTRL_MODE_ASELDEL_MASK 0x60U
232#define SPICTRL_MODE_ASELDEL_GET( _reg ) \
233 ( ( ( _reg ) & SPICTRL_MODE_ASELDEL_MASK ) >> \
234 SPICTRL_MODE_ASELDEL_SHIFT )
235#define SPICTRL_MODE_ASELDEL_SET( _reg, _val ) \
236 ( ( ( _reg ) & ~SPICTRL_MODE_ASELDEL_MASK ) | \
237 ( ( ( _val ) << SPICTRL_MODE_ASELDEL_SHIFT ) & \
238 SPICTRL_MODE_ASELDEL_MASK ) )
239#define SPICTRL_MODE_ASELDEL( _val ) \
240 ( ( ( _val ) << SPICTRL_MODE_ASELDEL_SHIFT ) & \
241 SPICTRL_MODE_ASELDEL_MASK )
243#define SPICTRL_MODE_TAC 0x10U
245#define SPICTRL_MODE_TTO 0x8U
247#define SPICTRL_MODE_IGSEL 0x4U
249#define SPICTRL_MODE_CITE 0x2U
261#define SPICTRL_EVENT_TIP 0x80000000U
263#define SPICTRL_EVENT_LT 0x4000U
265#define SPICTRL_EVENT_OV 0x1000U
267#define SPICTRL_EVENT_UN 0x800U
269#define SPICTRL_EVENT_MME 0x400U
271#define SPICTRL_EVENT_NE 0x200U
273#define SPICTRL_EVENT_NF 0x100U
285#define SPICTRL_MASK_TIPE 0x80000000U
287#define SPICTRL_MASK_LTE 0x4000U
289#define SPICTRL_MASK_OVE 0x1000U
291#define SPICTRL_MASK_UNE 0x800U
293#define SPICTRL_MASK_MMEE 0x400U
295#define SPICTRL_MASK_NEEE 0x200U
297#define SPICTRL_MASK_NFE 0x100U
309#define SPICTRL_CMD_LST 0x400000U
321#define SPICTRL_TX_TDATA_SHIFT 0
322#define SPICTRL_TX_TDATA_MASK 0xffffffffU
323#define SPICTRL_TX_TDATA_GET( _reg ) \
324 ( ( ( _reg ) & SPICTRL_TX_TDATA_MASK ) >> \
325 SPICTRL_TX_TDATA_SHIFT )
326#define SPICTRL_TX_TDATA_SET( _reg, _val ) \
327 ( ( ( _reg ) & ~SPICTRL_TX_TDATA_MASK ) | \
328 ( ( ( _val ) << SPICTRL_TX_TDATA_SHIFT ) & \
329 SPICTRL_TX_TDATA_MASK ) )
330#define SPICTRL_TX_TDATA( _val ) \
331 ( ( ( _val ) << SPICTRL_TX_TDATA_SHIFT ) & \
332 SPICTRL_TX_TDATA_MASK )
344#define SPICTRL_RX_RDATA_SHIFT 0
345#define SPICTRL_RX_RDATA_MASK 0xffffffffU
346#define SPICTRL_RX_RDATA_GET( _reg ) \
347 ( ( ( _reg ) & SPICTRL_RX_RDATA_MASK ) >> \
348 SPICTRL_RX_RDATA_SHIFT )
349#define SPICTRL_RX_RDATA_SET( _reg, _val ) \
350 ( ( ( _reg ) & ~SPICTRL_RX_RDATA_MASK ) | \
351 ( ( ( _val ) << SPICTRL_RX_RDATA_SHIFT ) & \
352 SPICTRL_RX_RDATA_MASK ) )
353#define SPICTRL_RX_RDATA( _val ) \
354 ( ( ( _val ) << SPICTRL_RX_RDATA_SHIFT ) & \
355 SPICTRL_RX_RDATA_MASK )
367#define SPICTRL_SLVSEL_SLVSEL_SHIFT 0
368#define SPICTRL_SLVSEL_SLVSEL_MASK 0x3U
369#define SPICTRL_SLVSEL_SLVSEL_GET( _reg ) \
370 ( ( ( _reg ) & SPICTRL_SLVSEL_SLVSEL_MASK ) >> \
371 SPICTRL_SLVSEL_SLVSEL_SHIFT )
372#define SPICTRL_SLVSEL_SLVSEL_SET( _reg, _val ) \
373 ( ( ( _reg ) & ~SPICTRL_SLVSEL_SLVSEL_MASK ) | \
374 ( ( ( _val ) << SPICTRL_SLVSEL_SLVSEL_SHIFT ) & \
375 SPICTRL_SLVSEL_SLVSEL_MASK ) )
376#define SPICTRL_SLVSEL_SLVSEL( _val ) \
377 ( ( ( _val ) << SPICTRL_SLVSEL_SLVSEL_SHIFT ) & \
378 SPICTRL_SLVSEL_SLVSEL_MASK )
391#define SPICTRL_ASLVSEL_ASLVSEL_SHIFT 0
392#define SPICTRL_ASLVSEL_ASLVSEL_MASK 0x3U
393#define SPICTRL_ASLVSEL_ASLVSEL_GET( _reg ) \
394 ( ( ( _reg ) & SPICTRL_ASLVSEL_ASLVSEL_MASK ) >> \
395 SPICTRL_ASLVSEL_ASLVSEL_SHIFT )
396#define SPICTRL_ASLVSEL_ASLVSEL_SET( _reg, _val ) \
397 ( ( ( _reg ) & ~SPICTRL_ASLVSEL_ASLVSEL_MASK ) | \
398 ( ( ( _val ) << SPICTRL_ASLVSEL_ASLVSEL_SHIFT ) & \
399 SPICTRL_ASLVSEL_ASLVSEL_MASK ) )
400#define SPICTRL_ASLVSEL_ASLVSEL( _val ) \
401 ( ( ( _val ) << SPICTRL_ASLVSEL_ASLVSEL_SHIFT ) & \
402 SPICTRL_ASLVSEL_ASLVSEL_MASK )
415 uint32_t reserved_4_20[ 7 ];
struct spictrl spictrl
This structure defines the SPICTRL register block memory map.
This structure defines the SPICTRL register block memory map.
Definition: spictrl-regs.h:409
uint32_t slvsel
See Slave select register (SLVSEL).
Definition: spictrl-regs.h:450
uint32_t rx
See Receive register (RX).
Definition: spictrl-regs.h:445
uint32_t aslvsel
See Automatic slave select register (ASLVSEL).
Definition: spictrl-regs.h:455
uint32_t event
See Event register (EVENT).
Definition: spictrl-regs.h:425
uint32_t cap
See Capability register (CAP).
Definition: spictrl-regs.h:413
uint32_t mode
See Mode register (MODE).
Definition: spictrl-regs.h:420
uint32_t cmd
See Command register (CMD).
Definition: spictrl-regs.h:435
uint32_t tx
See Transmit register (TX).
Definition: spictrl-regs.h:440
uint32_t mask
See Mask register (MASK).
Definition: spictrl-regs.h:430