summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/protonic-imx6/flash-header-vicutp.imxcfg
blob: a8178fe2580b7ff7e34c237de18d1d40847b9599 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/* SPDX-License-Identifier: GPL-2.0-only */

soc imx6
loadaddr 0x10000000
ivtofs 0x400

#include "ddr3-defines.imxcfg"

/* Debug */
wm 32 0x020e0228 0x00000005
/* wm 32 0x020e0244 0x00000005 */
wm 32 0x020e05f8 0x000130b0
/* wm 32 0x020e0614 0x000130b0 */

#include "padsetup-q.imxcfg"

/* Set Read data delay 3 delay units for all bits */
wm 32 0x021b081c 0x33333333
wm 32 0x021b0820 0x33333333
wm 32 0x021b0824 0x33333333
wm 32 0x021b0828 0x33333333
wm 32 0x021b481c 0x33333333
wm 32 0x021b4820 0x33333333
wm 32 0x021b4824 0x33333333
wm 32 0x021b4828 0x33333333

/* MDMISC No addr mirror, 1 WALAT, 5 RALAT, DDR3 mode */
wm 32 0x021b0018 0x00001742
check 32 until_all_bits_clear 0x021b0018 0x00000002

/* CSCR: Configuration mode */
wm 32 0x021b001c 0x00008000
check 32 until_any_bit_set 0x021b001c 0x00004000

wm 32 0x021b000c MDCFG0_4G_533MHZ_CL7
wm 32 0x021b0010 MDCFG1_533MHZ
wm 32 0x021b0014 MDCFG2_533MHZ

/* MDRWD */
wm 32 0x021b002c 0x000026d2

wm 32 0x021b0030 MDOR_4G_533MHZ
wm 32 0x021b0008 MDOTC_533MHZ
wm 32 0x021b0004 MDPDC_533MHZ
wm 32 0x021b0040 MDASP_2GIB25

/* Dual-Plus specific configuration */
/* MMDC: MAARCR: Disable reordering */
wm 32 0x021b0400 0x14420000
/* MMDC: MPPDCMPR2: ZQ Offset setting (TODO) */
wm 32 0x021b0890 0x00400008 /* Freescale sabre-auto: 0x00400C58 */

/* NOC: DDRCONF */
/* Sabre-auto: wm 32 0x00bb0008 0x00000000 */
/* Values (Address mapping for 64bit):
 *   0 : 16 Row, 3 Bank, 10 Col interleave (11 Col for 32 bit)
 *   1 : 15 Row, 3 Bank, 11 Col interleave (12 Col for 32 bit)
 *   2 : 18 Row, 3 Bank, 8 Col interleave  (9 Col for 32 bit)
 *   3 : 17 Row, 3 Bank, 9 Col interleave  (10 Col for 32 bit)
 *   4 : 2 CS (?), 15 Row, 3 Bank, 10 Col, interleave
 * ...
 */
wm 32 0x00bb0008 0x00000000

/*
 * NOC DdrTiming:
 *
 * Par. 	Chip		VALUE		SHIFT	Reg. field
 * ----------------------------------------------------------------
 * ActToAct	533MHz		0x1b (28)	0	0x0000001b
 * RdToMiss	533MHz		0x10 (16)	6	0x00000400
 * WrToMiss	*		0x1e (30)	12	0x0001e000
 * BurstLen	*		0x4 (8/2)	18	0x00100000
 * RdToWr	*		0x3 (3)		21	0x00600000
 * WrToRd	*		0xa (10)	26	0x28000000
 * BwRatio	* 		0x0 (0)		31	0x00000000
 * ----------------------------------------------------------------
 */
/* Sabre-auto: wm 32 0x00bb000c				0x2891E41A */
wm 32 0x00bb000c 					0x2871e41c

/*
 * NOC Activate:
 *
 * Par. 	Chip		VALUE		SHIFT	Reg. field
 * ----------------------------------------------------------------
 * Rrd		*		0x6 (6)		0	0x00000006
 * Faw		*		0x1b (27)	4	0x000001b0
 * FawBank	*		0x0 (0)		10	0x00000000
 * ----------------------------------------------------------------
 */
/* Sabre-auto: wm 32 0x00bb0038 			0x00000564 */
wm 32 0x00bb0038		 			0x000001b6

/*
 * NOC ReadLatency: (FIXME)
 */
wm 32 0x00bb0014 0x00000040

/*
 * NOC IPU1/IPU2 aging: (FIXME)
 */
wm 32 0x00bb0028 0x00000020
wm 32 0x00bb002c 0x00000020

wm 32 0x021b0000 MDCTL_4G
// check 32 until_any_bit_set 0x021b0018 0x80000000

/* DDR3 MR config */
wm 32 0x021b001c DDR3_MR2_533MHZ_RTT_120

/*
 * DDR3 chip MR3, n = 3, vvvv = 0 (no configurable function of interest).
 */
wm 32 0x021b001c 0x00008033

wm 32 0x021b001c DDR3_MR1_RTT_120_ODS_40
wm 32 0x021b001c DDR3_MR0_533MHZ_CL7

/*
 * ZQ calibration, n = 0x10 (Precharge all):
 * Bit 10 = 1:  Start ZQ calibration
 * REGISTER: 0x04008040
 */
wm 32 0x021b001c 0x04008040

/* MPZQHWCTRL */
wm 32 0x021b0800 0xa1390003 /* ZQ mode = 3  force calibration */
wm 32 0x021b4800 0xa1390003 

wm 32 0x021b0020 MDREF_64KHZ

wm 32 0x021b0818 MPODTCTRL_ODT_60
wm 32 0x021b4818 MPODTCTRL_ODT_60

wm 32 0x021b083c MPDGCTRL0_CH0_533MHZ
wm 32 0x021b483c MPDGCTRL0_CH1_533MHZ

wm 32 0x021b0840 MPDGCTRL1_CH0_533MHZ
wm 32 0x021b4840 MPDGCTRL1_CH1_533MHZ

/* MPRDDLCTL, MPWRDLCTL */
wm 32 0x021b0848 0x40404040 /* TODO. Read delay line conf. */
wm 32 0x021b4848 0x40404040 /* For now set all to 50%. */
wm 32 0x021b0850 0x40404040
wm 32 0x021b4850 0x40404040

/* MPWLDECTRL0,1 */
wm 32 0x021b080c 0x001f001f /* TODO. Write level delay control */
wm 32 0x021b0810 0x001f001f
wm 32 0x021b480c 0x001f001f
wm 32 0x021b4810 0x001f001f

/* MPMUR0 */
wm 32 0x021b08b8 0x00000800 /* Force measurement on delay lines */
wm 32 0x021b48b8 0x00000800

/* MDSCR */
wm 32 0x021b001c 0x00000000 /* Disable configuration req */

/* MAPSR */
wm 32 0x021b0404 0x00001006 /* Enable autorefresh  */

/* enable AXI cache for VDOA/PCIe/VPU/IPU */
wm 32 0x020e0010 0xff0000cf
/* set IPU AXI-id0 Qos=0xf(bypass AXI-id1 Qos=0x7) */
wm 32 0x020e0018 0x007f007f
wm 32 0x020e001c 0x007f007f

/* DEBUG leds */
wm 32 0x020e0244 0x00000005
wm 32 0x020e0614 0x000130b0

/* RGMII config */
wm 32 0x020e0790 0x00080000 /* 1V2 DDR IO */