blob: c100456eab17958bbdbe6571e6346db864c87ead [file] [log] [blame]
Tony Lindgren120db2c2006-04-02 17:46:27 +01001#ifndef _OMAP2_MCSPI_H
2#define _OMAP2_MCSPI_H
3
Charulatha V617871d2011-02-17 09:53:09 -08004#define OMAP2_MCSPI_REV 0
5#define OMAP3_MCSPI_REV 1
6#define OMAP4_MCSPI_REV 2
7
Charulatha V1a5d8192011-02-02 17:52:14 +05308#define OMAP4_MCSPI_REG_OFFSET 0x100
9
Daniel Mack2cd45172012-11-14 11:14:26 +080010#define MCSPI_PINDIR_D0_IN_D1_OUT 0
11#define MCSPI_PINDIR_D0_OUT_D1_IN 1
Daniel Mack0384e902012-10-07 18:19:44 +020012
Tony Lindgren120db2c2006-04-02 17:46:27 +010013struct omap2_mcspi_platform_config {
Tony Lindgren120db2c2006-04-02 17:46:27 +010014 unsigned short num_cs;
Charulatha V1a5d8192011-02-02 17:52:14 +053015 unsigned int regs_offset;
Daniel Mack0384e902012-10-07 18:19:44 +020016 unsigned int pin_dir:1;
Tony Lindgren120db2c2006-04-02 17:46:27 +010017};
18
Charulatha V617871d2011-02-17 09:53:09 -080019struct omap2_mcspi_dev_attr {
20 unsigned short num_chipselect;
21};
22
Tony Lindgren120db2c2006-04-02 17:46:27 +010023struct omap2_mcspi_device_config {
24 unsigned turbo_mode:1;
Matthias Brugger5cbc7ca2013-01-24 13:40:41 +010025
26 /* toggle chip select after every word */
27 unsigned cs_per_word:1;
Tony Lindgren120db2c2006-04-02 17:46:27 +010028};
29
30#endif