blob: 75f70f6ac13778f448a03de3136d32a0ef638b65 [file] [log] [blame]
Wolfram Sang203a0732010-10-11 12:55:21 +02001/*
2 * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; version 2
7 * of the License.
8 */
9
10#ifndef __ASM_ARCH_IMX_ESDHC_H
11#define __ASM_ARCH_IMX_ESDHC_H
12
Dong Aishengad932202013-09-13 19:11:35 +080013#include <linux/types.h>
14
Shawn Guo913413c2011-06-21 22:41:51 +080015enum wp_types {
16 ESDHC_WP_NONE, /* no WP, neither controller nor gpio */
17 ESDHC_WP_CONTROLLER, /* mmc controller internal WP */
18 ESDHC_WP_GPIO, /* external gpio pin for WP */
19};
20
21enum cd_types {
22 ESDHC_CD_NONE, /* no CD, neither controller nor gpio */
23 ESDHC_CD_CONTROLLER, /* mmc controller internal CD */
24 ESDHC_CD_GPIO, /* external gpio pin for CD */
25 ESDHC_CD_PERMANENT, /* no CD, card permanently wired to host */
26};
27
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010028/**
Shawn Guo913413c2011-06-21 22:41:51 +080029 * struct esdhc_platform_data - platform data for esdhc on i.MX
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010030 *
Shawn Guo913413c2011-06-21 22:41:51 +080031 * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35.
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010032 *
Shawn Guo913413c2011-06-21 22:41:51 +080033 * @wp_gpio: gpio for write_protect
34 * @cd_gpio: gpio for card_detect interrupt
35 * @wp_type: type of write_protect method (see wp_types enum above)
36 * @cd_type: type of card_detect method (see cd_types enum above)
Dong Aishengad932202013-09-13 19:11:35 +080037 * @support_vsel: indicate it supports 1.8v switching
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010038 */
39
Wolfram Sang203a0732010-10-11 12:55:21 +020040struct esdhc_platform_data {
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010041 unsigned int wp_gpio;
Wolfram Sang7e29c302011-02-26 14:44:41 +010042 unsigned int cd_gpio;
Shawn Guo913413c2011-06-21 22:41:51 +080043 enum wp_types wp_type;
44 enum cd_types cd_type;
Sascha Haueraf510792013-01-21 19:02:28 +080045 int max_bus_width;
Lucas Stach0ddf03c2013-06-05 15:13:26 +020046 unsigned int f_max;
Dong Aishengad932202013-09-13 19:11:35 +080047 bool support_vsel;
Dong Aisheng602519b2013-10-18 19:48:47 +080048 unsigned int delay_line;
Wolfram Sang203a0732010-10-11 12:55:21 +020049};
50#endif /* __ASM_ARCH_IMX_ESDHC_H */