4 * This file is part of BeRTOS.
6 * Bertos is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * As a special exception, you may use this file as part of a free software
21 * library without restriction. Specifically, if other files instantiate
22 * templates or use macros or inline functions from this file, or you compile
23 * this file and link it with other files to produce an executable, this
24 * file does not by itself cause the resulting executable to be covered by
25 * the GNU General Public License. This exception does not however
26 * invalidate any other reasons why the executable file might be covered by
27 * the GNU General Public License.
29 * Copyright 2011 Develer S.r.l. (http://www.develer.com/)
33 * \brief Micron MT29F serial NAND driver for SAM3's static memory controller (interface).
35 * \author Stefano Fedrigo <aleph@develer.com>
41 #include <drv/mt29f.h>
44 // MT29F2G08AAD, FIXME: configurable
45 #define MT29F_DATA_SIZE 0x800 // 2048 B
46 #define MT29F_SPARE_SIZE 0x40 // 64 B
47 #define MT29F_PAGE_SIZE (MT29F_DATA_SIZE + MT29F_SPARE_SIZE)
48 #define MT29F_BLOCK_SIZE 0x20000 // 128 kB
49 #define MT29F_SIZE 0x10000000 // 256 MB
50 #define MT29F_ECC_NWORDS (MT29F_DATA_SIZE / 256)
51 #define MT29F_CSID NFC_CMD_CSID_0 // Chip select
56 #define MT29F_PIN_CE BV(6)
57 #define MT29F_PIN_RB BV(2)
58 #define MT29F_PINS_PORTA (MT29F_PIN_CE | MT29F_PIN_RB)
59 #define MT29F_PERIPH_PORTA PIO_PERIPH_B
61 #define MT29F_PIN_OE BV(19)
62 #define MT29F_PIN_WE BV(20)
63 #define MT29F_PIN_IO 0x0000FFFF
64 #define MT29F_PINS_PORTC (MT29F_PIN_OE | MT29F_PIN_WE | MT29F_PIN_IO)
65 #define MT29F_PERIPH_PORTC PIO_PERIPH_A
67 #define MT29F_PIN_CLE BV(9)
68 #define MT29F_PIN_ALE BV(8)
69 #define MT29F_PINS_PORTD (MT29F_PIN_CLE | MT29F_PIN_ALE)
70 #define MT29F_PERIPH_PORTD PIO_PERIPH_A
73 #endif /* MT29F_SAM3_H */