blob: 96704cd2fce230931d17a829cb6dd0894797a538 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0 */
Kumar Gala124b0822008-08-26 15:01:29 -05002/*
York Sun2896cb72014-03-27 17:54:47 -07003 * Copyright 2008-2014 Freescale Semiconductor, Inc.
Kumar Gala124b0822008-08-26 15:01:29 -05004 */
5
6#ifndef COMMON_TIMING_PARAMS_H
7#define COMMON_TIMING_PARAMS_H
8
9typedef struct {
10 /* parameters to constrict */
11
Priyanka Jain4a717412013-09-25 10:41:19 +053012 unsigned int tckmin_x_ps;
13 unsigned int tckmax_ps;
Priyanka Jain4a717412013-09-25 10:41:19 +053014 unsigned int trcd_ps;
15 unsigned int trp_ps;
16 unsigned int tras_ps;
York Sun2896cb72014-03-27 17:54:47 -070017#if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4)
18 unsigned int taamin_ps;
19#endif
Kumar Gala124b0822008-08-26 15:01:29 -050020
York Sun2896cb72014-03-27 17:54:47 -070021#ifdef CONFIG_SYS_FSL_DDR4
22 unsigned int trfc1_ps;
23 unsigned int trfc2_ps;
24 unsigned int trfc4_ps;
25 unsigned int trrds_ps;
26 unsigned int trrdl_ps;
27 unsigned int tccdl_ps;
York Sun6db4fdd2018-01-29 09:44:35 -080028 unsigned int trfc_slr_ps;
York Sun2896cb72014-03-27 17:54:47 -070029#else
Priyanka Jain4a717412013-09-25 10:41:19 +053030 unsigned int twtr_ps; /* maximum = 63750 ps */
31 unsigned int trfc_ps; /* maximum = 255 ns + 256 ns + .75 ns
Kumar Gala124b0822008-08-26 15:01:29 -050032 = 511750 ps */
33
Priyanka Jain4a717412013-09-25 10:41:19 +053034 unsigned int trrd_ps; /* maximum = 63750 ps */
York Sun2896cb72014-03-27 17:54:47 -070035 unsigned int trtp_ps; /* byte 38, spd->trtp */
36#endif
37 unsigned int twr_ps; /* maximum = 63750 ps */
Priyanka Jain4a717412013-09-25 10:41:19 +053038 unsigned int trc_ps; /* maximum = 254 ns + .75 ns = 254750 ps */
Kumar Gala124b0822008-08-26 15:01:29 -050039
40 unsigned int refresh_rate_ps;
Valentin Longchamp0b810932013-10-18 11:47:20 +020041 unsigned int extended_op_srt;
Kumar Gala124b0822008-08-26 15:01:29 -050042
York Sun2896cb72014-03-27 17:54:47 -070043#if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2)
Priyanka Jain4a717412013-09-25 10:41:19 +053044 unsigned int tis_ps; /* byte 32, spd->ca_setup */
45 unsigned int tih_ps; /* byte 33, spd->ca_hold */
46 unsigned int tds_ps; /* byte 34, spd->data_setup */
47 unsigned int tdh_ps; /* byte 35, spd->data_hold */
Priyanka Jain4a717412013-09-25 10:41:19 +053048 unsigned int tdqsq_max_ps; /* byte 44, spd->tdqsq */
49 unsigned int tqhs_ps; /* byte 45, spd->tqhs */
York Sun2896cb72014-03-27 17:54:47 -070050#endif
Kumar Gala124b0822008-08-26 15:01:29 -050051
52 unsigned int ndimms_present;
York Sun2896cb72014-03-27 17:54:47 -070053 unsigned int lowest_common_spd_caslat;
Kumar Gala124b0822008-08-26 15:01:29 -050054 unsigned int highest_common_derated_caslat;
55 unsigned int additive_latency;
Priyanka Jain4a717412013-09-25 10:41:19 +053056 unsigned int all_dimms_burst_lengths_bitmask;
57 unsigned int all_dimms_registered;
58 unsigned int all_dimms_unbuffered;
59 unsigned int all_dimms_ecc_capable;
Kumar Gala124b0822008-08-26 15:01:29 -050060
61 unsigned long long total_mem;
62 unsigned long long base_address;
yorkde879322010-07-02 22:25:55 +000063
64 /* DDR3 RDIMM */
65 unsigned char rcw[16]; /* Register Control Word 0-15 */
Kumar Gala124b0822008-08-26 15:01:29 -050066} common_timing_params_t;
67
68#endif