xref: /rk3399_rockchip-uboot/drivers/mtd/nand/raw/nand_timings.c (revision cfcc706c901d603707657919484e4f65467be9ff)
1*cfcc706cSMiquel Raynal /*
2*cfcc706cSMiquel Raynal  *  Copyright (C) 2014 Free Electrons
3*cfcc706cSMiquel Raynal  *
4*cfcc706cSMiquel Raynal  *  Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
5*cfcc706cSMiquel Raynal  *
6*cfcc706cSMiquel Raynal  * This program is free software; you can redistribute it and/or modify
7*cfcc706cSMiquel Raynal  * it under the terms of the GNU General Public License version 2 as
8*cfcc706cSMiquel Raynal  * published by the Free Software Foundation.
9*cfcc706cSMiquel Raynal  *
10*cfcc706cSMiquel Raynal  */
11*cfcc706cSMiquel Raynal #include <common.h>
12*cfcc706cSMiquel Raynal #include <linux/kernel.h>
13*cfcc706cSMiquel Raynal #include <linux/mtd/rawnand.h>
14*cfcc706cSMiquel Raynal 
15*cfcc706cSMiquel Raynal static const struct nand_data_interface onfi_sdr_timings[] = {
16*cfcc706cSMiquel Raynal 	/* Mode 0 */
17*cfcc706cSMiquel Raynal 	{
18*cfcc706cSMiquel Raynal 		.type = NAND_SDR_IFACE,
19*cfcc706cSMiquel Raynal 		.timings.sdr = {
20*cfcc706cSMiquel Raynal 			.tCCS_min = 500000,
21*cfcc706cSMiquel Raynal 			.tR_max = 200000000,
22*cfcc706cSMiquel Raynal 			.tADL_min = 400000,
23*cfcc706cSMiquel Raynal 			.tALH_min = 20000,
24*cfcc706cSMiquel Raynal 			.tALS_min = 50000,
25*cfcc706cSMiquel Raynal 			.tAR_min = 25000,
26*cfcc706cSMiquel Raynal 			.tCEA_max = 100000,
27*cfcc706cSMiquel Raynal 			.tCEH_min = 20000,
28*cfcc706cSMiquel Raynal 			.tCH_min = 20000,
29*cfcc706cSMiquel Raynal 			.tCHZ_max = 100000,
30*cfcc706cSMiquel Raynal 			.tCLH_min = 20000,
31*cfcc706cSMiquel Raynal 			.tCLR_min = 20000,
32*cfcc706cSMiquel Raynal 			.tCLS_min = 50000,
33*cfcc706cSMiquel Raynal 			.tCOH_min = 0,
34*cfcc706cSMiquel Raynal 			.tCS_min = 70000,
35*cfcc706cSMiquel Raynal 			.tDH_min = 20000,
36*cfcc706cSMiquel Raynal 			.tDS_min = 40000,
37*cfcc706cSMiquel Raynal 			.tFEAT_max = 1000000,
38*cfcc706cSMiquel Raynal 			.tIR_min = 10000,
39*cfcc706cSMiquel Raynal 			.tITC_max = 1000000,
40*cfcc706cSMiquel Raynal 			.tRC_min = 100000,
41*cfcc706cSMiquel Raynal 			.tREA_max = 40000,
42*cfcc706cSMiquel Raynal 			.tREH_min = 30000,
43*cfcc706cSMiquel Raynal 			.tRHOH_min = 0,
44*cfcc706cSMiquel Raynal 			.tRHW_min = 200000,
45*cfcc706cSMiquel Raynal 			.tRHZ_max = 200000,
46*cfcc706cSMiquel Raynal 			.tRLOH_min = 0,
47*cfcc706cSMiquel Raynal 			.tRP_min = 50000,
48*cfcc706cSMiquel Raynal 			.tRR_min = 40000,
49*cfcc706cSMiquel Raynal 			.tRST_max = 250000000000ULL,
50*cfcc706cSMiquel Raynal 			.tWB_max = 200000,
51*cfcc706cSMiquel Raynal 			.tWC_min = 100000,
52*cfcc706cSMiquel Raynal 			.tWH_min = 30000,
53*cfcc706cSMiquel Raynal 			.tWHR_min = 120000,
54*cfcc706cSMiquel Raynal 			.tWP_min = 50000,
55*cfcc706cSMiquel Raynal 			.tWW_min = 100000,
56*cfcc706cSMiquel Raynal 		},
57*cfcc706cSMiquel Raynal 	},
58*cfcc706cSMiquel Raynal 	/* Mode 1 */
59*cfcc706cSMiquel Raynal 	{
60*cfcc706cSMiquel Raynal 		.type = NAND_SDR_IFACE,
61*cfcc706cSMiquel Raynal 		.timings.sdr = {
62*cfcc706cSMiquel Raynal 			.tCCS_min = 500000,
63*cfcc706cSMiquel Raynal 			.tR_max = 200000000,
64*cfcc706cSMiquel Raynal 			.tADL_min = 400000,
65*cfcc706cSMiquel Raynal 			.tALH_min = 10000,
66*cfcc706cSMiquel Raynal 			.tALS_min = 25000,
67*cfcc706cSMiquel Raynal 			.tAR_min = 10000,
68*cfcc706cSMiquel Raynal 			.tCEA_max = 45000,
69*cfcc706cSMiquel Raynal 			.tCEH_min = 20000,
70*cfcc706cSMiquel Raynal 			.tCH_min = 10000,
71*cfcc706cSMiquel Raynal 			.tCHZ_max = 50000,
72*cfcc706cSMiquel Raynal 			.tCLH_min = 10000,
73*cfcc706cSMiquel Raynal 			.tCLR_min = 10000,
74*cfcc706cSMiquel Raynal 			.tCLS_min = 25000,
75*cfcc706cSMiquel Raynal 			.tCOH_min = 15000,
76*cfcc706cSMiquel Raynal 			.tCS_min = 35000,
77*cfcc706cSMiquel Raynal 			.tDH_min = 10000,
78*cfcc706cSMiquel Raynal 			.tDS_min = 20000,
79*cfcc706cSMiquel Raynal 			.tFEAT_max = 1000000,
80*cfcc706cSMiquel Raynal 			.tIR_min = 0,
81*cfcc706cSMiquel Raynal 			.tITC_max = 1000000,
82*cfcc706cSMiquel Raynal 			.tRC_min = 50000,
83*cfcc706cSMiquel Raynal 			.tREA_max = 30000,
84*cfcc706cSMiquel Raynal 			.tREH_min = 15000,
85*cfcc706cSMiquel Raynal 			.tRHOH_min = 15000,
86*cfcc706cSMiquel Raynal 			.tRHW_min = 100000,
87*cfcc706cSMiquel Raynal 			.tRHZ_max = 100000,
88*cfcc706cSMiquel Raynal 			.tRLOH_min = 0,
89*cfcc706cSMiquel Raynal 			.tRP_min = 25000,
90*cfcc706cSMiquel Raynal 			.tRR_min = 20000,
91*cfcc706cSMiquel Raynal 			.tRST_max = 500000000,
92*cfcc706cSMiquel Raynal 			.tWB_max = 100000,
93*cfcc706cSMiquel Raynal 			.tWC_min = 45000,
94*cfcc706cSMiquel Raynal 			.tWH_min = 15000,
95*cfcc706cSMiquel Raynal 			.tWHR_min = 80000,
96*cfcc706cSMiquel Raynal 			.tWP_min = 25000,
97*cfcc706cSMiquel Raynal 			.tWW_min = 100000,
98*cfcc706cSMiquel Raynal 		},
99*cfcc706cSMiquel Raynal 	},
100*cfcc706cSMiquel Raynal 	/* Mode 2 */
101*cfcc706cSMiquel Raynal 	{
102*cfcc706cSMiquel Raynal 		.type = NAND_SDR_IFACE,
103*cfcc706cSMiquel Raynal 		.timings.sdr = {
104*cfcc706cSMiquel Raynal 			.tCCS_min = 500000,
105*cfcc706cSMiquel Raynal 			.tR_max = 200000000,
106*cfcc706cSMiquel Raynal 			.tADL_min = 400000,
107*cfcc706cSMiquel Raynal 			.tALH_min = 10000,
108*cfcc706cSMiquel Raynal 			.tALS_min = 15000,
109*cfcc706cSMiquel Raynal 			.tAR_min = 10000,
110*cfcc706cSMiquel Raynal 			.tCEA_max = 30000,
111*cfcc706cSMiquel Raynal 			.tCEH_min = 20000,
112*cfcc706cSMiquel Raynal 			.tCH_min = 10000,
113*cfcc706cSMiquel Raynal 			.tCHZ_max = 50000,
114*cfcc706cSMiquel Raynal 			.tCLH_min = 10000,
115*cfcc706cSMiquel Raynal 			.tCLR_min = 10000,
116*cfcc706cSMiquel Raynal 			.tCLS_min = 15000,
117*cfcc706cSMiquel Raynal 			.tCOH_min = 15000,
118*cfcc706cSMiquel Raynal 			.tCS_min = 25000,
119*cfcc706cSMiquel Raynal 			.tDH_min = 5000,
120*cfcc706cSMiquel Raynal 			.tDS_min = 15000,
121*cfcc706cSMiquel Raynal 			.tFEAT_max = 1000000,
122*cfcc706cSMiquel Raynal 			.tIR_min = 0,
123*cfcc706cSMiquel Raynal 			.tITC_max = 1000000,
124*cfcc706cSMiquel Raynal 			.tRC_min = 35000,
125*cfcc706cSMiquel Raynal 			.tREA_max = 25000,
126*cfcc706cSMiquel Raynal 			.tREH_min = 15000,
127*cfcc706cSMiquel Raynal 			.tRHOH_min = 15000,
128*cfcc706cSMiquel Raynal 			.tRHW_min = 100000,
129*cfcc706cSMiquel Raynal 			.tRHZ_max = 100000,
130*cfcc706cSMiquel Raynal 			.tRLOH_min = 0,
131*cfcc706cSMiquel Raynal 			.tRR_min = 20000,
132*cfcc706cSMiquel Raynal 			.tRST_max = 500000000,
133*cfcc706cSMiquel Raynal 			.tWB_max = 100000,
134*cfcc706cSMiquel Raynal 			.tRP_min = 17000,
135*cfcc706cSMiquel Raynal 			.tWC_min = 35000,
136*cfcc706cSMiquel Raynal 			.tWH_min = 15000,
137*cfcc706cSMiquel Raynal 			.tWHR_min = 80000,
138*cfcc706cSMiquel Raynal 			.tWP_min = 17000,
139*cfcc706cSMiquel Raynal 			.tWW_min = 100000,
140*cfcc706cSMiquel Raynal 		},
141*cfcc706cSMiquel Raynal 	},
142*cfcc706cSMiquel Raynal 	/* Mode 3 */
143*cfcc706cSMiquel Raynal 	{
144*cfcc706cSMiquel Raynal 		.type = NAND_SDR_IFACE,
145*cfcc706cSMiquel Raynal 		.timings.sdr = {
146*cfcc706cSMiquel Raynal 			.tCCS_min = 500000,
147*cfcc706cSMiquel Raynal 			.tR_max = 200000000,
148*cfcc706cSMiquel Raynal 			.tADL_min = 400000,
149*cfcc706cSMiquel Raynal 			.tALH_min = 5000,
150*cfcc706cSMiquel Raynal 			.tALS_min = 10000,
151*cfcc706cSMiquel Raynal 			.tAR_min = 10000,
152*cfcc706cSMiquel Raynal 			.tCEA_max = 25000,
153*cfcc706cSMiquel Raynal 			.tCEH_min = 20000,
154*cfcc706cSMiquel Raynal 			.tCH_min = 5000,
155*cfcc706cSMiquel Raynal 			.tCHZ_max = 50000,
156*cfcc706cSMiquel Raynal 			.tCLH_min = 5000,
157*cfcc706cSMiquel Raynal 			.tCLR_min = 10000,
158*cfcc706cSMiquel Raynal 			.tCLS_min = 10000,
159*cfcc706cSMiquel Raynal 			.tCOH_min = 15000,
160*cfcc706cSMiquel Raynal 			.tCS_min = 25000,
161*cfcc706cSMiquel Raynal 			.tDH_min = 5000,
162*cfcc706cSMiquel Raynal 			.tDS_min = 10000,
163*cfcc706cSMiquel Raynal 			.tFEAT_max = 1000000,
164*cfcc706cSMiquel Raynal 			.tIR_min = 0,
165*cfcc706cSMiquel Raynal 			.tITC_max = 1000000,
166*cfcc706cSMiquel Raynal 			.tRC_min = 30000,
167*cfcc706cSMiquel Raynal 			.tREA_max = 20000,
168*cfcc706cSMiquel Raynal 			.tREH_min = 10000,
169*cfcc706cSMiquel Raynal 			.tRHOH_min = 15000,
170*cfcc706cSMiquel Raynal 			.tRHW_min = 100000,
171*cfcc706cSMiquel Raynal 			.tRHZ_max = 100000,
172*cfcc706cSMiquel Raynal 			.tRLOH_min = 0,
173*cfcc706cSMiquel Raynal 			.tRP_min = 15000,
174*cfcc706cSMiquel Raynal 			.tRR_min = 20000,
175*cfcc706cSMiquel Raynal 			.tRST_max = 500000000,
176*cfcc706cSMiquel Raynal 			.tWB_max = 100000,
177*cfcc706cSMiquel Raynal 			.tWC_min = 30000,
178*cfcc706cSMiquel Raynal 			.tWH_min = 10000,
179*cfcc706cSMiquel Raynal 			.tWHR_min = 80000,
180*cfcc706cSMiquel Raynal 			.tWP_min = 15000,
181*cfcc706cSMiquel Raynal 			.tWW_min = 100000,
182*cfcc706cSMiquel Raynal 		},
183*cfcc706cSMiquel Raynal 	},
184*cfcc706cSMiquel Raynal 	/* Mode 4 */
185*cfcc706cSMiquel Raynal 	{
186*cfcc706cSMiquel Raynal 		.type = NAND_SDR_IFACE,
187*cfcc706cSMiquel Raynal 		.timings.sdr = {
188*cfcc706cSMiquel Raynal 			.tCCS_min = 500000,
189*cfcc706cSMiquel Raynal 			.tR_max = 200000000,
190*cfcc706cSMiquel Raynal 			.tADL_min = 400000,
191*cfcc706cSMiquel Raynal 			.tALH_min = 5000,
192*cfcc706cSMiquel Raynal 			.tALS_min = 10000,
193*cfcc706cSMiquel Raynal 			.tAR_min = 10000,
194*cfcc706cSMiquel Raynal 			.tCEA_max = 25000,
195*cfcc706cSMiquel Raynal 			.tCEH_min = 20000,
196*cfcc706cSMiquel Raynal 			.tCH_min = 5000,
197*cfcc706cSMiquel Raynal 			.tCHZ_max = 30000,
198*cfcc706cSMiquel Raynal 			.tCLH_min = 5000,
199*cfcc706cSMiquel Raynal 			.tCLR_min = 10000,
200*cfcc706cSMiquel Raynal 			.tCLS_min = 10000,
201*cfcc706cSMiquel Raynal 			.tCOH_min = 15000,
202*cfcc706cSMiquel Raynal 			.tCS_min = 20000,
203*cfcc706cSMiquel Raynal 			.tDH_min = 5000,
204*cfcc706cSMiquel Raynal 			.tDS_min = 10000,
205*cfcc706cSMiquel Raynal 			.tFEAT_max = 1000000,
206*cfcc706cSMiquel Raynal 			.tIR_min = 0,
207*cfcc706cSMiquel Raynal 			.tITC_max = 1000000,
208*cfcc706cSMiquel Raynal 			.tRC_min = 25000,
209*cfcc706cSMiquel Raynal 			.tREA_max = 20000,
210*cfcc706cSMiquel Raynal 			.tREH_min = 10000,
211*cfcc706cSMiquel Raynal 			.tRHOH_min = 15000,
212*cfcc706cSMiquel Raynal 			.tRHW_min = 100000,
213*cfcc706cSMiquel Raynal 			.tRHZ_max = 100000,
214*cfcc706cSMiquel Raynal 			.tRLOH_min = 5000,
215*cfcc706cSMiquel Raynal 			.tRP_min = 12000,
216*cfcc706cSMiquel Raynal 			.tRR_min = 20000,
217*cfcc706cSMiquel Raynal 			.tRST_max = 500000000,
218*cfcc706cSMiquel Raynal 			.tWB_max = 100000,
219*cfcc706cSMiquel Raynal 			.tWC_min = 25000,
220*cfcc706cSMiquel Raynal 			.tWH_min = 10000,
221*cfcc706cSMiquel Raynal 			.tWHR_min = 80000,
222*cfcc706cSMiquel Raynal 			.tWP_min = 12000,
223*cfcc706cSMiquel Raynal 			.tWW_min = 100000,
224*cfcc706cSMiquel Raynal 		},
225*cfcc706cSMiquel Raynal 	},
226*cfcc706cSMiquel Raynal 	/* Mode 5 */
227*cfcc706cSMiquel Raynal 	{
228*cfcc706cSMiquel Raynal 		.type = NAND_SDR_IFACE,
229*cfcc706cSMiquel Raynal 		.timings.sdr = {
230*cfcc706cSMiquel Raynal 			.tCCS_min = 500000,
231*cfcc706cSMiquel Raynal 			.tR_max = 200000000,
232*cfcc706cSMiquel Raynal 			.tADL_min = 400000,
233*cfcc706cSMiquel Raynal 			.tALH_min = 5000,
234*cfcc706cSMiquel Raynal 			.tALS_min = 10000,
235*cfcc706cSMiquel Raynal 			.tAR_min = 10000,
236*cfcc706cSMiquel Raynal 			.tCEA_max = 25000,
237*cfcc706cSMiquel Raynal 			.tCEH_min = 20000,
238*cfcc706cSMiquel Raynal 			.tCH_min = 5000,
239*cfcc706cSMiquel Raynal 			.tCHZ_max = 30000,
240*cfcc706cSMiquel Raynal 			.tCLH_min = 5000,
241*cfcc706cSMiquel Raynal 			.tCLR_min = 10000,
242*cfcc706cSMiquel Raynal 			.tCLS_min = 10000,
243*cfcc706cSMiquel Raynal 			.tCOH_min = 15000,
244*cfcc706cSMiquel Raynal 			.tCS_min = 15000,
245*cfcc706cSMiquel Raynal 			.tDH_min = 5000,
246*cfcc706cSMiquel Raynal 			.tDS_min = 7000,
247*cfcc706cSMiquel Raynal 			.tFEAT_max = 1000000,
248*cfcc706cSMiquel Raynal 			.tIR_min = 0,
249*cfcc706cSMiquel Raynal 			.tITC_max = 1000000,
250*cfcc706cSMiquel Raynal 			.tRC_min = 20000,
251*cfcc706cSMiquel Raynal 			.tREA_max = 16000,
252*cfcc706cSMiquel Raynal 			.tREH_min = 7000,
253*cfcc706cSMiquel Raynal 			.tRHOH_min = 15000,
254*cfcc706cSMiquel Raynal 			.tRHW_min = 100000,
255*cfcc706cSMiquel Raynal 			.tRHZ_max = 100000,
256*cfcc706cSMiquel Raynal 			.tRLOH_min = 5000,
257*cfcc706cSMiquel Raynal 			.tRP_min = 10000,
258*cfcc706cSMiquel Raynal 			.tRR_min = 20000,
259*cfcc706cSMiquel Raynal 			.tRST_max = 500000000,
260*cfcc706cSMiquel Raynal 			.tWB_max = 100000,
261*cfcc706cSMiquel Raynal 			.tWC_min = 20000,
262*cfcc706cSMiquel Raynal 			.tWH_min = 7000,
263*cfcc706cSMiquel Raynal 			.tWHR_min = 80000,
264*cfcc706cSMiquel Raynal 			.tWP_min = 10000,
265*cfcc706cSMiquel Raynal 			.tWW_min = 100000,
266*cfcc706cSMiquel Raynal 		},
267*cfcc706cSMiquel Raynal 	},
268*cfcc706cSMiquel Raynal };
269*cfcc706cSMiquel Raynal 
270*cfcc706cSMiquel Raynal /**
271*cfcc706cSMiquel Raynal  * onfi_async_timing_mode_to_sdr_timings - [NAND Interface] Retrieve NAND
272*cfcc706cSMiquel Raynal  * timings according to the given ONFI timing mode
273*cfcc706cSMiquel Raynal  * @mode: ONFI timing mode
274*cfcc706cSMiquel Raynal  */
onfi_async_timing_mode_to_sdr_timings(int mode)275*cfcc706cSMiquel Raynal const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode)
276*cfcc706cSMiquel Raynal {
277*cfcc706cSMiquel Raynal 	if (mode < 0 || mode >= ARRAY_SIZE(onfi_sdr_timings))
278*cfcc706cSMiquel Raynal 		return ERR_PTR(-EINVAL);
279*cfcc706cSMiquel Raynal 
280*cfcc706cSMiquel Raynal 	return &onfi_sdr_timings[mode].timings.sdr;
281*cfcc706cSMiquel Raynal }
282*cfcc706cSMiquel Raynal EXPORT_SYMBOL(onfi_async_timing_mode_to_sdr_timings);
283*cfcc706cSMiquel Raynal 
284*cfcc706cSMiquel Raynal /**
285*cfcc706cSMiquel Raynal  * onfi_init_data_interface - [NAND Interface] Initialize a data interface from
286*cfcc706cSMiquel Raynal  * given ONFI mode
287*cfcc706cSMiquel Raynal  * @iface: The data interface to be initialized
288*cfcc706cSMiquel Raynal  * @mode: The ONFI timing mode
289*cfcc706cSMiquel Raynal  */
onfi_init_data_interface(struct nand_chip * chip,struct nand_data_interface * iface,enum nand_data_interface_type type,int timing_mode)290*cfcc706cSMiquel Raynal int onfi_init_data_interface(struct nand_chip *chip,
291*cfcc706cSMiquel Raynal 			     struct nand_data_interface *iface,
292*cfcc706cSMiquel Raynal 			     enum nand_data_interface_type type,
293*cfcc706cSMiquel Raynal 			     int timing_mode)
294*cfcc706cSMiquel Raynal {
295*cfcc706cSMiquel Raynal 	if (type != NAND_SDR_IFACE)
296*cfcc706cSMiquel Raynal 		return -EINVAL;
297*cfcc706cSMiquel Raynal 
298*cfcc706cSMiquel Raynal 	if (timing_mode < 0 || timing_mode >= ARRAY_SIZE(onfi_sdr_timings))
299*cfcc706cSMiquel Raynal 		return -EINVAL;
300*cfcc706cSMiquel Raynal 
301*cfcc706cSMiquel Raynal 	*iface = onfi_sdr_timings[timing_mode];
302*cfcc706cSMiquel Raynal 
303*cfcc706cSMiquel Raynal 	/*
304*cfcc706cSMiquel Raynal 	 * Initialize timings that cannot be deduced from timing mode:
305*cfcc706cSMiquel Raynal 	 * tR, tPROG, tCCS, ...
306*cfcc706cSMiquel Raynal 	 * These information are part of the ONFI parameter page.
307*cfcc706cSMiquel Raynal 	 */
308*cfcc706cSMiquel Raynal 	if (chip->onfi_version) {
309*cfcc706cSMiquel Raynal 		struct nand_onfi_params *params = &chip->onfi_params;
310*cfcc706cSMiquel Raynal 		struct nand_sdr_timings *timings = &iface->timings.sdr;
311*cfcc706cSMiquel Raynal 
312*cfcc706cSMiquel Raynal 		/* microseconds -> picoseconds */
313*cfcc706cSMiquel Raynal 		timings->tPROG_max = 1000000ULL * le16_to_cpu(params->t_prog);
314*cfcc706cSMiquel Raynal 		timings->tBERS_max = 1000000ULL * le16_to_cpu(params->t_bers);
315*cfcc706cSMiquel Raynal 		timings->tR_max = 1000000ULL * le16_to_cpu(params->t_r);
316*cfcc706cSMiquel Raynal 
317*cfcc706cSMiquel Raynal 		/* nanoseconds -> picoseconds */
318*cfcc706cSMiquel Raynal 		timings->tCCS_min = 1000UL * le16_to_cpu(params->t_ccs);
319*cfcc706cSMiquel Raynal 	}
320*cfcc706cSMiquel Raynal 
321*cfcc706cSMiquel Raynal 	return 0;
322*cfcc706cSMiquel Raynal }
323*cfcc706cSMiquel Raynal EXPORT_SYMBOL(onfi_init_data_interface);
324*cfcc706cSMiquel Raynal 
325*cfcc706cSMiquel Raynal /**
326*cfcc706cSMiquel Raynal  * nand_get_default_data_interface - [NAND Interface] Retrieve NAND
327*cfcc706cSMiquel Raynal  * data interface for mode 0. This is used as default timing after
328*cfcc706cSMiquel Raynal  * reset.
329*cfcc706cSMiquel Raynal  */
nand_get_default_data_interface(void)330*cfcc706cSMiquel Raynal const struct nand_data_interface *nand_get_default_data_interface(void)
331*cfcc706cSMiquel Raynal {
332*cfcc706cSMiquel Raynal 	return &onfi_sdr_timings[0];
333*cfcc706cSMiquel Raynal }
334*cfcc706cSMiquel Raynal EXPORT_SYMBOL(nand_get_default_data_interface);
335