1/* ********************************************************************* 2 * Broadcom Common Firmware Environment (CFE) 3 * 4 * JEDEC DRAM constants File: jedec.h 5 * 6 * Constants and macros mostly related to JEDEC serial-presence 7 * detect ROMs on DIMMs 8 * 9 * Author: Mitch Lichtenberg 10 * 11 ********************************************************************* 12 * 13 * Copyright 2000,2001,2002,2003 14 * Broadcom Corporation. All rights reserved. 15 * 16 * This software is furnished under license and may be used and 17 * copied only in accordance with the following terms and 18 * conditions. Subject to these conditions, you may download, 19 * copy, install, use, modify and distribute modified or unmodified 20 * copies of this software in source and/or binary form. No title 21 * or ownership is transferred hereby. 22 * 23 * 1) Any source code used, modified or distributed must reproduce 24 * and retain this copyright notice and list of conditions 25 * as they appear in the source file. 26 * 27 * 2) No right is granted to use any trade name, trademark, or 28 * logo of Broadcom Corporation. The "Broadcom Corporation" 29 * name may not be used to endorse or promote products derived 30 * from this software without the prior written permission of 31 * Broadcom Corporation. 32 * 33 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR 34 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED 35 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 36 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT 37 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN 38 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT, 39 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 40 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 41 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 42 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 43 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 44 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF 45 * THE POSSIBILITY OF SUCH DAMAGE. 46 ********************************************************************* */ 47 48 49#ifndef _JEDEC_H 50#define _JEDEC_H 51 52/* ********************************************************************* 53 * JEDEC constants (serial presence detect offsets and bit fields) 54 ********************************************************************* */ 55 56#define JEDEC_SPD_MEMTYPE 2 /* memory type (sdram, ddr, etc.) */ 57#define JEDEC_SPD_ROWS 3 /* row bits */ 58#define JEDEC_SPD_COLS 4 /* column bits */ 59#define JEDEC_SPD_SIDES 5 /* number of sides */ 60#define JEDEC_SPD_WIDTH 6 /* and 7, bit width of device */ 61#define JEDEC_SPD_BANKS 17 /* number of banks */ 62#define JEDEC_SPD_DENSITY 31 /* module bank density */ 63#define JEDEC_SPD_ECC_INFO 11 64 65#define JEDEC_SPD_tCK25 9 /* tCK @ CAS 2.5 */ 66#define JEDEC_SPD_tCK20 23 /* tCK @ CAS 2.0 */ 67#define JEDEC_SPD_tCK10 25 /* tCK @ CAS 1.0 */ 68#define JEDEC_SPD_RFSH 12 /* refresh rate */ 69#define JEDEC_SPD_CASLATENCIES 18 /* CAS Latencies supported */ 70#define JEDEC_SPD_ATTRIBUTES 21 /* module attributes */ 71#define JEDEC_SPD_tRAS 30 /* tRAS */ 72#define JEDEC_SPD_tRP 27 /* tRP */ 73#define JEDEC_SPD_tRRD 28 /* tRRD */ 74#define JEDEC_SPD_tRCD 29 /* tRCD */ 75#define JEDEC_SPD_tRFC 42 /* tRFC */ 76#define JEDEC_SPD_tRC 41 /* tRC */ 77#define JEDEC_SPD_tRTP 38 /* tRTP */ 78#define JEDEC_SPD_DIMMTYPE 20 /* Dimm type DDR2 only */ 79 80#define JEDEC_SPD_SIZE 46 /* number of SPD bytes we will read 81 (adequate for DDR SDRAM) */ 82 83#define JEDEC_MEMTYPE_DDRSDRAM 1 84#define JEDEC_MEMTYPE_DDRSDRAM2 7 85#define JEDEC_MEMTYPE_SDRAM 4 86#define SPD_MEMTYPE_FCRAM 0x17 /* Use what SMART defines it as */ 87#define SPD_MEMTYPE_DDR2 0x08 88 89#define JEDEC_CASLAT_DDR2_6 0x40 90#define JEDEC_CASLAT_DDR2_5 0x20 91#define JEDEC_CASLAT_DDR2_4 0x10 92#define JEDEC_CASLAT_DDR2_3 0x08 93#define JEDEC_CASLAT_DDR2_2 0x04 94 95#define JEDEC_CASLAT_40 0x40 96#define JEDEC_CASLAT_35 0x20 97#define JEDEC_CASLAT_30 0x10 98#define JEDEC_CASLAT_25 0x08 99#define JEDEC_CASLAT_20 0x04 100#define JEDEC_CASLAT_15 0x02 101#define JEDEC_CASLAT_10 0x01 102 103#define JEDEC_ATTRIB_REG 0x02 104 105#define JEDEC_FLG_ECC_SUPPORT 0x02 106 107#define JEDEC_RFSH_MASK 0x7F 108#define JEDEC_RFSH_64khz 0 109#define JEDEC_RFSH_256khz 1 110#define JEDEC_RFSH_128khz 2 111#define JEDEC_RFSH_32khz 3 112#define JEDEC_RFSH_16khz 4 113#define JEDEC_RFSH_8khz 5 114 115#define JEDEC_DIMMTYPE_RDIMM 0x01 116#define JEDEC_DIMMTYPE_UDIMM 0x02 117#define JEDEC_DIMMTYPE_MRDIMM 0x10 118 119#endif /* _JEDEC_H */ 120