183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2e84a324bSAshish Kumar /* 3e84a324bSAshish Kumar * Copyright 2017 NXP 4e84a324bSAshish Kumar */ 5e84a324bSAshish Kumar 6e84a324bSAshish Kumar #ifndef __LS1088A_DDR_H__ 7e84a324bSAshish Kumar #define __LS1088A_DDR_H__ 8e84a324bSAshish Kumar struct board_specific_parameters { 9e84a324bSAshish Kumar u32 n_ranks; 10e84a324bSAshish Kumar u32 datarate_mhz_high; 11e84a324bSAshish Kumar u32 rank_gb; 12e84a324bSAshish Kumar u32 clk_adjust; 13e84a324bSAshish Kumar u32 wrlvl_start; 14e84a324bSAshish Kumar u32 wrlvl_ctl_2; 15e84a324bSAshish Kumar u32 wrlvl_ctl_3; 16e84a324bSAshish Kumar }; 17e84a324bSAshish Kumar 18e84a324bSAshish Kumar /* 19e84a324bSAshish Kumar * These tables contain all valid speeds we want to override with board 20e84a324bSAshish Kumar * specific parameters. datarate_mhz_high values need to be in ascending order 21e84a324bSAshish Kumar * for each n_ranks group. 22e84a324bSAshish Kumar */ 23e84a324bSAshish Kumar 24e84a324bSAshish Kumar static const struct board_specific_parameters udimm0[] = { 25e84a324bSAshish Kumar /* 26e84a324bSAshish Kumar * memory controller 0 27e84a324bSAshish Kumar * num| hi| rank| clk| wrlvl | wrlvl | wrlvl 28e84a324bSAshish Kumar * ranks| mhz| GB |adjst| start | ctl2 | ctl3 29e84a324bSAshish Kumar */ 30e84a324bSAshish Kumar #if defined(CONFIG_TARGET_LS1088ARDB) 31e84a324bSAshish Kumar 32e84a324bSAshish Kumar {2, 1666, 0, 8, 8, 0x090A0B0E, 0x0F10110D,}, 33*7d3a532dSAshish Kumar {2, 1900, 0, 8, 9, 0x0A0B0C10, 0x1112140E,}, 34e84a324bSAshish Kumar {2, 2300, 0, 8, 9, 0x0A0C0E11, 0x1214160F,}, 35e84a324bSAshish Kumar {} 367769776aSAshish Kumar #elif defined(CONFIG_TARGET_LS1088AQDS) 377769776aSAshish Kumar {2, 1666, 0, 8, 8, 0x0A0A0C0E, 0x0F10110C,}, 38*7d3a532dSAshish Kumar {2, 1900, 0, 8, 9, 0x0A0B0C10, 0x1112140E,}, 397769776aSAshish Kumar {2, 2300, 0, 4, 9, 0x0A0C0D11, 0x1214150E,}, 407769776aSAshish Kumar {} 41e84a324bSAshish Kumar 42e84a324bSAshish Kumar #endif 43e84a324bSAshish Kumar }; 44e84a324bSAshish Kumar 45e84a324bSAshish Kumar static const struct board_specific_parameters *udimms[] = { 46e84a324bSAshish Kumar udimm0, 47e84a324bSAshish Kumar }; 48e84a324bSAshish Kumar #endif 49