blob: 13c83a25958a6b9bd8db6524a508e412dfc21ff1 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Tony Lindgren120db2c2006-04-02 17:46:27 +01002#ifndef _OMAP2_MCSPI_H
3#define _OMAP2_MCSPI_H
4
Charulatha V617871d2011-02-17 09:53:09 -08005#define OMAP2_MCSPI_REV 0
6#define OMAP3_MCSPI_REV 1
7#define OMAP4_MCSPI_REV 2
8
Charulatha V1a5d8192011-02-02 17:52:14 +05309#define OMAP4_MCSPI_REG_OFFSET 0x100
10
Daniel Mack2cd45172012-11-14 11:14:26 +080011#define MCSPI_PINDIR_D0_IN_D1_OUT 0
12#define MCSPI_PINDIR_D0_OUT_D1_IN 1
Daniel Mack0384e902012-10-07 18:19:44 +020013
Tony Lindgren120db2c2006-04-02 17:46:27 +010014struct omap2_mcspi_platform_config {
Tony Lindgren120db2c2006-04-02 17:46:27 +010015 unsigned short num_cs;
Charulatha V1a5d8192011-02-02 17:52:14 +053016 unsigned int regs_offset;
Daniel Mack0384e902012-10-07 18:19:44 +020017 unsigned int pin_dir:1;
Tony Lindgren120db2c2006-04-02 17:46:27 +010018};
19
Charulatha V617871d2011-02-17 09:53:09 -080020struct omap2_mcspi_dev_attr {
21 unsigned short num_chipselect;
22};
23
Tony Lindgren120db2c2006-04-02 17:46:27 +010024struct omap2_mcspi_device_config {
25 unsigned turbo_mode:1;
Matthias Brugger5cbc7ca2013-01-24 13:40:41 +010026
27 /* toggle chip select after every word */
28 unsigned cs_per_word:1;
Tony Lindgren120db2c2006-04-02 17:46:27 +010029};
30
31#endif