2 * Copyright 2008 Freescale Semiconductor, Inc.
4 * SPDX-License-Identifier: GPL-2.0
10 #include <fsl_ddr_sdram.h>
11 #include <fsl_ddr_dimm_params.h>
13 void get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
15 i2c_read(i2c_address, 0, 1, (uchar *)spd, sizeof(ddr2_spd_eeprom_t));
17 /* We use soldered memory, but use an SPD EEPROM to describe it.
18 * The SPD has an unspecified dimm type, but the DDR2 initialization
19 * code requires a specific type to be specified. This sets the type
20 * as a standard unregistered SO-DIMM. */
21 if (spd->dimm_type == 0) {
23 ((uchar *)spd)[63] += 0x4;
27 void fsl_ddr_board_options(memctl_options_t *popts,
29 unsigned int ctrl_num)
32 * Factors to consider for clock adjust:
33 * - number of chips on bus
38 * This needs to be determined on a board-by-board basis.
42 popts->clk_adjust = 7;
45 * Factors to consider for CPO:
49 popts->cpo_override = 9;
52 * Factors to consider for write data delay:
62 popts->write_data_delay = 3;
65 * Factors to consider for half-strength driver enable:
66 * - number of DIMMs installed
68 popts->half_strength_driver_enable = 0;