blob: 6c006078c8a13dc596c02f9901b6a041549bec63 [file] [log] [blame]
Thomas Gleixnerb886d83c2019-06-01 10:08:55 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Wolfram Sang203a0732010-10-11 12:55:21 +02002/*
3 * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de>
Wolfram Sang203a0732010-10-11 12:55:21 +02004 */
5
6#ifndef __ASM_ARCH_IMX_ESDHC_H
7#define __ASM_ARCH_IMX_ESDHC_H
8
Dong Aishengad932202013-09-13 19:11:35 +08009#include <linux/types.h>
10
Shawn Guo913413c2011-06-21 22:41:51 +080011enum wp_types {
12 ESDHC_WP_NONE, /* no WP, neither controller nor gpio */
13 ESDHC_WP_CONTROLLER, /* mmc controller internal WP */
14 ESDHC_WP_GPIO, /* external gpio pin for WP */
15};
16
17enum cd_types {
18 ESDHC_CD_NONE, /* no CD, neither controller nor gpio */
19 ESDHC_CD_CONTROLLER, /* mmc controller internal CD */
20 ESDHC_CD_GPIO, /* external gpio pin for CD */
21 ESDHC_CD_PERMANENT, /* no CD, card permanently wired to host */
22};
23
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010024/**
Shawn Guo913413c2011-06-21 22:41:51 +080025 * struct esdhc_platform_data - platform data for esdhc on i.MX
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010026 *
Shawn Guo913413c2011-06-21 22:41:51 +080027 * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35.
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010028 *
Shawn Guo913413c2011-06-21 22:41:51 +080029 * @wp_type: type of write_protect method (see wp_types enum above)
30 * @cd_type: type of card_detect method (see cd_types enum above)
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010031 */
32
Wolfram Sang203a0732010-10-11 12:55:21 +020033struct esdhc_platform_data {
Shawn Guo913413c2011-06-21 22:41:51 +080034 enum wp_types wp_type;
35 enum cd_types cd_type;
Sascha Haueraf510792013-01-21 19:02:28 +080036 int max_bus_width;
Dong Aisheng602519b2013-10-18 19:48:47 +080037 unsigned int delay_line;
Haibo Chend407e30ba2015-08-11 19:38:27 +080038 unsigned int tuning_step; /* The delay cell steps in tuning procedure */
Dong Aishengd87fc962016-07-12 15:46:15 +080039 unsigned int tuning_start_tap; /* The start delay cell point in tuning procedure */
Wolfram Sang203a0732010-10-11 12:55:21 +020040};
41#endif /* __ASM_ARCH_IMX_ESDHC_H */