xref: /openbmc/u-boot/arch/arm/include/asm/ti-common/ti-aemif.h (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2909ea9aaSKhoronzhuk, Ivan /*
3909ea9aaSKhoronzhuk, Ivan  * AEMIF definitions
4909ea9aaSKhoronzhuk, Ivan  *
5909ea9aaSKhoronzhuk, Ivan  * (C) Copyright 2012-2014
6909ea9aaSKhoronzhuk, Ivan  *     Texas Instruments Incorporated, <www.ti.com>
7909ea9aaSKhoronzhuk, Ivan  */
8909ea9aaSKhoronzhuk, Ivan 
9909ea9aaSKhoronzhuk, Ivan #ifndef _AEMIF_H_
10909ea9aaSKhoronzhuk, Ivan #define _AEMIF_H_
11909ea9aaSKhoronzhuk, Ivan 
12909ea9aaSKhoronzhuk, Ivan #define AEMIF_NUM_CS               4
13909ea9aaSKhoronzhuk, Ivan #define AEMIF_MODE_NOR             0
14909ea9aaSKhoronzhuk, Ivan #define AEMIF_MODE_NAND            1
15909ea9aaSKhoronzhuk, Ivan #define AEMIF_MODE_ONENAND         2
16909ea9aaSKhoronzhuk, Ivan #define AEMIF_PRESERVE             -1
17909ea9aaSKhoronzhuk, Ivan 
18909ea9aaSKhoronzhuk, Ivan struct aemif_config {
19909ea9aaSKhoronzhuk, Ivan 	unsigned mode;
20909ea9aaSKhoronzhuk, Ivan 	unsigned select_strobe;
21909ea9aaSKhoronzhuk, Ivan 	unsigned extend_wait;
22909ea9aaSKhoronzhuk, Ivan 	unsigned wr_setup;
23909ea9aaSKhoronzhuk, Ivan 	unsigned wr_strobe;
24909ea9aaSKhoronzhuk, Ivan 	unsigned wr_hold;
25909ea9aaSKhoronzhuk, Ivan 	unsigned rd_setup;
26909ea9aaSKhoronzhuk, Ivan 	unsigned rd_strobe;
27909ea9aaSKhoronzhuk, Ivan 	unsigned rd_hold;
28909ea9aaSKhoronzhuk, Ivan 	unsigned turn_around;
29909ea9aaSKhoronzhuk, Ivan 	enum {
30909ea9aaSKhoronzhuk, Ivan 		AEMIF_WIDTH_8	= 0,
31909ea9aaSKhoronzhuk, Ivan 		AEMIF_WIDTH_16	= 1,
32909ea9aaSKhoronzhuk, Ivan 		AEMIF_WIDTH_32	= 2,
33909ea9aaSKhoronzhuk, Ivan 	} width;
34909ea9aaSKhoronzhuk, Ivan };
35909ea9aaSKhoronzhuk, Ivan 
36909ea9aaSKhoronzhuk, Ivan void aemif_init(int num_cs, struct aemif_config *config);
37909ea9aaSKhoronzhuk, Ivan 
38909ea9aaSKhoronzhuk, Ivan #endif
39