blob: 070010728b85684de293c817f5c2bd5d35a515e4 [file] [log] [blame]
Kumar Gala58e5e9a2008-08-26 15:01:29 -05001/*
York Sun34e026f2014-03-27 17:54:47 -07002 * Copyright 2008-2014 Freescale Semiconductor, Inc.
Kumar Gala58e5e9a2008-08-26 15:01:29 -05003 *
Tom Riniac727572018-02-14 21:34:05 -05004 * SPDX-License-Identifier: GPL-2.0
Kumar Gala58e5e9a2008-08-26 15:01:29 -05005 */
6
7#ifndef COMMON_TIMING_PARAMS_H
8#define COMMON_TIMING_PARAMS_H
9
10typedef struct {
11 /* parameters to constrict */
12
Priyanka Jain0dd38a32013-09-25 10:41:19 +053013 unsigned int tckmin_x_ps;
14 unsigned int tckmax_ps;
Priyanka Jain0dd38a32013-09-25 10:41:19 +053015 unsigned int trcd_ps;
16 unsigned int trp_ps;
17 unsigned int tras_ps;
York Sun34e026f2014-03-27 17:54:47 -070018#if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4)
19 unsigned int taamin_ps;
20#endif
Kumar Gala58e5e9a2008-08-26 15:01:29 -050021
York Sun34e026f2014-03-27 17:54:47 -070022#ifdef CONFIG_SYS_FSL_DDR4
23 unsigned int trfc1_ps;
24 unsigned int trfc2_ps;
25 unsigned int trfc4_ps;
26 unsigned int trrds_ps;
27 unsigned int trrdl_ps;
28 unsigned int tccdl_ps;
York Sunc0c32af2018-01-29 09:44:35 -080029 unsigned int trfc_slr_ps;
York Sun34e026f2014-03-27 17:54:47 -070030#else
Priyanka Jain0dd38a32013-09-25 10:41:19 +053031 unsigned int twtr_ps; /* maximum = 63750 ps */
32 unsigned int trfc_ps; /* maximum = 255 ns + 256 ns + .75 ns
Kumar Gala58e5e9a2008-08-26 15:01:29 -050033 = 511750 ps */
34
Priyanka Jain0dd38a32013-09-25 10:41:19 +053035 unsigned int trrd_ps; /* maximum = 63750 ps */
York Sun34e026f2014-03-27 17:54:47 -070036 unsigned int trtp_ps; /* byte 38, spd->trtp */
37#endif
38 unsigned int twr_ps; /* maximum = 63750 ps */
Priyanka Jain0dd38a32013-09-25 10:41:19 +053039 unsigned int trc_ps; /* maximum = 254 ns + .75 ns = 254750 ps */
Kumar Gala58e5e9a2008-08-26 15:01:29 -050040
41 unsigned int refresh_rate_ps;
Valentin Longchamp7e157b02013-10-18 11:47:20 +020042 unsigned int extended_op_srt;
Kumar Gala58e5e9a2008-08-26 15:01:29 -050043
York Sun34e026f2014-03-27 17:54:47 -070044#if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2)
Priyanka Jain0dd38a32013-09-25 10:41:19 +053045 unsigned int tis_ps; /* byte 32, spd->ca_setup */
46 unsigned int tih_ps; /* byte 33, spd->ca_hold */
47 unsigned int tds_ps; /* byte 34, spd->data_setup */
48 unsigned int tdh_ps; /* byte 35, spd->data_hold */
Priyanka Jain0dd38a32013-09-25 10:41:19 +053049 unsigned int tdqsq_max_ps; /* byte 44, spd->tdqsq */
50 unsigned int tqhs_ps; /* byte 45, spd->tqhs */
York Sun34e026f2014-03-27 17:54:47 -070051#endif
Kumar Gala58e5e9a2008-08-26 15:01:29 -050052
53 unsigned int ndimms_present;
York Sun34e026f2014-03-27 17:54:47 -070054 unsigned int lowest_common_spd_caslat;
Kumar Gala58e5e9a2008-08-26 15:01:29 -050055 unsigned int highest_common_derated_caslat;
56 unsigned int additive_latency;
Priyanka Jain0dd38a32013-09-25 10:41:19 +053057 unsigned int all_dimms_burst_lengths_bitmask;
58 unsigned int all_dimms_registered;
59 unsigned int all_dimms_unbuffered;
60 unsigned int all_dimms_ecc_capable;
Kumar Gala58e5e9a2008-08-26 15:01:29 -050061
62 unsigned long long total_mem;
63 unsigned long long base_address;
york9490ff42010-07-02 22:25:55 +000064
65 /* DDR3 RDIMM */
66 unsigned char rcw[16]; /* Register Control Word 0-15 */
Kumar Gala58e5e9a2008-08-26 15:01:29 -050067} common_timing_params_t;
68
69#endif