1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright 2008 Freescale Semiconductor, Inc.
9 #include <fsl_ddr_sdram.h>
10 #include <fsl_ddr_dimm_params.h>
12 void get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
14 i2c_read(i2c_address, 0, 1, (uchar *)spd, sizeof(ddr2_spd_eeprom_t));
16 /* We use soldered memory, but use an SPD EEPROM to describe it.
17 * The SPD has an unspecified dimm type, but the DDR2 initialization
18 * code requires a specific type to be specified. This sets the type
19 * as a standard unregistered SO-DIMM. */
20 if (spd->dimm_type == 0) {
22 ((uchar *)spd)[63] += 0x4;
26 void fsl_ddr_board_options(memctl_options_t *popts,
28 unsigned int ctrl_num)
31 * Factors to consider for clock adjust:
32 * - number of chips on bus
37 * This needs to be determined on a board-by-board basis.
41 popts->clk_adjust = 7;
44 * Factors to consider for CPO:
48 popts->cpo_override = 9;
51 * Factors to consider for write data delay:
61 popts->write_data_delay = 3;
64 * Factors to consider for half-strength driver enable:
65 * - number of DIMMs installed
67 popts->half_strength_driver_enable = 0;