summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/fiiom3k/nand-target.h
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-02-27 22:08:58 +0000
committerAidan MacDonald <amachronic@protonmail.com>2021-03-28 00:01:37 +0000
commit3ec66893e377b088c1284d2d23adb2aeea6d7965 (patch)
treeb647717f83ad56b15dc42cfdef5d04d68cd9bd6b /firmware/target/mips/ingenic_x1000/fiiom3k/nand-target.h
parent83fcbedc65f4b9ae7e491ecf6f07c0af4b245f74 (diff)
downloadrockbox-3ec66893e377b088c1284d2d23adb2aeea6d7965.tar.gz
rockbox-3ec66893e377b088c1284d2d23adb2aeea6d7965.zip
New port: FiiO M3K on bare metal
Change-Id: I7517e7d5459e129dcfc9465c6fbd708619888fbe
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k/nand-target.h')
-rw-r--r--firmware/target/mips/ingenic_x1000/fiiom3k/nand-target.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/nand-target.h b/firmware/target/mips/ingenic_x1000/fiiom3k/nand-target.h
new file mode 100644
index 0000000000..26a8b840c9
--- /dev/null
+++ b/firmware/target/mips/ingenic_x1000/fiiom3k/nand-target.h
@@ -0,0 +1,42 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2021 Aidan MacDonald
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef __NAND_TARGET_H__
23#define __NAND_TARGET_H__
24
25/* The max page size (main + spare) of all NAND chips used by this target */
26#define NAND_MAX_PAGE_SIZE (2048 + 64)
27
28/* The clock source to use for the SFC controller. Note the SPL has special
29 * handling which ignores this choice, so it only applies to bootloader & app.
30 */
31#define NAND_CLOCK_SOURCE X1000_CLK_SCLK_A
32
33/* The clock speed to use for the SFC controller during chip identification */
34#define NAND_INIT_CLOCK_SPEED 150000000
35
36/* Initial value to program SFC_DEV_CONF register with */
37#define NAND_INIT_SFC_DEV_CONF \
38 jz_orf(SFC_DEV_CONF, CE_DL(1), HOLD_DL(1), WP_DL(1), \
39 CPHA(0), CPOL(0), TSH(7), TSETUP(0), THOLD(0), \
40 STA_TYPE_V(1BYTE), CMD_TYPE_V(8BITS), SMP_DELAY(1))
41
42#endif /* __NAND_TARGET_H__ */