Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Hao Zhang | 7f8406d | 2014-07-09 23:44:49 +0300 | [diff] [blame] | 2 | /* |
| 3 | * Keystone2: DDR3 configuration |
| 4 | * |
| 5 | * (C) Copyright 2012-2014 |
| 6 | * Texas Instruments Incorporated, <www.ti.com> |
Hao Zhang | 7f8406d | 2014-07-09 23:44:49 +0300 | [diff] [blame] | 7 | */ |
| 8 | |
Hao Zhang | 7f8406d | 2014-07-09 23:44:49 +0300 | [diff] [blame] | 9 | #include <asm/arch/ddr3.h> |
Vitaly Andrianov | ead26f6 | 2016-03-04 10:36:42 -0600 | [diff] [blame] | 10 | #include "ddr3_cfg.h" |
Hao Zhang | 82be013 | 2014-07-16 00:59:27 +0300 | [diff] [blame] | 11 | |
Hao Zhang | c13cbcf | 2014-10-22 16:32:33 +0300 | [diff] [blame] | 12 | struct ddr3_phy_config ddr3phy_1600_2g = { |
| 13 | .pllcr = 0x0001C000ul, |
| 14 | .pgcr1_mask = (IODDRM_MASK | ZCKSEL_MASK), |
| 15 | .pgcr1_val = ((1 << 2) | (1 << 7) | (1 << 23)), |
| 16 | .ptr0 = 0x42C21590ul, |
| 17 | .ptr1 = 0xD05612C0ul, |
| 18 | .ptr2 = 0, /* not set in gel */ |
| 19 | .ptr3 = 0x0D861A80ul, |
| 20 | .ptr4 = 0x0C827100ul, |
| 21 | .dcr_mask = (PDQ_MASK | MPRDQ_MASK | BYTEMASK_MASK), |
| 22 | .dcr_val = ((1 << 10)), |
| 23 | .dtpr0 = 0x9D5CBB66ul, |
| 24 | .dtpr1 = 0x12868300ul, |
| 25 | .dtpr2 = 0x5002D200ul, |
| 26 | .mr0 = 0x00001C70ul, |
| 27 | .mr1 = 0x00000006ul, |
| 28 | .mr2 = 0x00000018ul, |
| 29 | .dtcr = 0x710035C7ul, |
| 30 | .pgcr2 = 0x00F07A12ul, |
| 31 | .zq0cr1 = 0x0001005Dul, |
| 32 | .zq1cr1 = 0x0001005Bul, |
| 33 | .zq2cr1 = 0x0001005Bul, |
| 34 | .pir_v1 = 0x00000033ul, |
| 35 | .pir_v2 = 0x0000FF81ul, |
| 36 | }; |
| 37 | |
| 38 | struct ddr3_emif_config ddr3_1600_2g = { |
| 39 | .sdcfg = 0x6200CE62ul, |
| 40 | .sdtim1 = 0x166C9855ul, |
| 41 | .sdtim2 = 0x00001D4Aul, |
| 42 | .sdtim3 = 0x435DFF53ul, |
| 43 | .sdtim4 = 0x543F0CFFul, |
| 44 | .zqcfg = 0x70073200ul, |
| 45 | .sdrfc = 0x00001869ul, |
| 46 | }; |