blob: 6730cde1b806fb178e6c8a42d0a7e9a05c96be22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*
* Copyright (C) 2015
* Toradex, Inc.
*
* Authors: Stefan Agner
* Sanchayan Maity
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __ASM_ARCH_VF610_DDRMC_H
#define __ASM_ARCH_VF610_DDRMC_H
struct ddrmc_lvl_info {
u16 wrlvl_reg_en;
u16 wrlvl_dl_0;
u16 wrlvl_dl_1;
u16 rdlvl_gt_reg_en;
u16 rdlvl_gt_dl_0;
u16 rdlvl_gt_dl_1;
u16 rdlvl_reg_en;
u16 rdlvl_dl_0;
u16 rdlvl_dl_1;
};
struct ddr3_jedec_timings {
u8 tinit;
u32 trst_pwron;
u32 cke_inactive;
u8 wrlat;
u8 caslat_lin;
u8 trc;
u8 trrd;
u8 tccd;
u8 tfaw;
u8 trp;
u8 twtr;
u8 tras_min;
u8 tmrd;
u8 trtp;
u32 tras_max;
u8 tmod;
u8 tckesr;
u8 tcke;
u8 trcd_int;
u8 tdal;
u16 tdll;
u8 trp_ab;
u16 tref;
u8 trfc;
u8 tpdex;
u8 txpdll;
u8 txsnr;
u16 txsr;
u8 cksrx;
u8 cksre;
u16 zqcl;
u16 zqinit;
u8 zqcs;
u8 ref_per_zq;
u8 aprebit;
u8 wlmrd;
u8 wldqsen;
};
void ddrmc_setup_iomux(void);
void ddrmc_phy_init(void);
void ddrmc_ctrl_init_ddr3(struct ddr3_jedec_timings const *timings,
struct ddrmc_lvl_info *lvl,
int col_diff, int row_diff);
#endif
|