1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * (C) Copyright 2006-2008 4 * Texas Instruments, <www.ti.com> 5 * 6 * (C) Copyright 2020 7 * Robert Bosch Power Tools GmbH 8 * 9 * Author 10 * Moses Christopher <BollavarapuMoses.Christopher@in.bosch.com> 11 * 12 * Copied from: 13 * arch/arm/include/asm/arch-am33xx/mem.h 14 * 15 * Initial Code from: 16 * Mansoor Ahamed <mansoor.ahamed@ti.com> 17 * Richard Woodruff <r-woodruff2@ti.com> 18 */ 19 20 #ifndef _MEM_GUARDIAN_H_ 21 #define _MEM_GUARDIAN_H_ 22 23 /* 24 * GPMC settings - 25 * Definitions is as per the following format 26 * #define <PART>_GPMC_CONFIG<x> <value> 27 * Where: 28 * PART is the part name e.g. M_NAND - Micron Nand Flash 29 * x is GPMC config registers from 1 to 7 (there will be 7 macros) 30 * Value is corresponding value 31 * 32 * For every valid PRCM configuration there should be only one definition of 33 * the same. 34 * 35 * The following values are optimized for improving the NAND Read speed 36 * They are applicable and tested for Bosch Guardian Board. 37 * Read Speeds rose from 1.5MiBs to over 7.6MiBs 38 * 39 * Currently valid part Names are (PART): 40 * M_NAND - Micron NAND 41 */ 42 #define GPMC_SIZE_256M 0x0 43 #define GPMC_SIZE_128M 0x8 44 #define GPMC_SIZE_64M 0xC 45 #define GPMC_SIZE_32M 0xE 46 #define GPMC_SIZE_16M 0xF 47 48 #define M_NAND_GPMC_CONFIG1 0x00000800 49 #define M_NAND_GPMC_CONFIG2 0x00030300 50 #define M_NAND_GPMC_CONFIG3 0x00030300 51 #define M_NAND_GPMC_CONFIG4 0x02000201 52 #define M_NAND_GPMC_CONFIG5 0x00030303 53 #define M_NAND_GPMC_CONFIG6 0x000000C0 54 #define M_NAND_GPMC_CONFIG7 0x00000008 55 56 /* max number of GPMC Chip Selects */ 57 #define GPMC_MAX_CS 8 58 /* max number of GPMC regs */ 59 #define GPMC_MAX_REG 7 60 61 #define DBG_MPDB 6 62 63 #endif /* endif _MEM_GUARDIAN_H_ */ 64