xref: /rk3399_rockchip-uboot/arch/arm/mach-exynos/exynos4_setup.h (revision 783983f323730540f861413dfbea6802c88afcf8)
1*77b55e8cSThomas Abraham /*
2*77b55e8cSThomas Abraham  * Machine Specific Values for EXYNOS4012 based board
3*77b55e8cSThomas Abraham  *
4*77b55e8cSThomas Abraham  * Copyright (C) 2011 Samsung Electronics
5*77b55e8cSThomas Abraham  *
6*77b55e8cSThomas Abraham  * SPDX-License-Identifier:	GPL-2.0+
7*77b55e8cSThomas Abraham  */
8*77b55e8cSThomas Abraham 
9*77b55e8cSThomas Abraham #ifndef _ORIGEN_SETUP_H
10*77b55e8cSThomas Abraham #define _ORIGEN_SETUP_H
11*77b55e8cSThomas Abraham 
12*77b55e8cSThomas Abraham #include <config.h>
13*77b55e8cSThomas Abraham #include <asm/arch/cpu.h>
14*77b55e8cSThomas Abraham 
15*77b55e8cSThomas Abraham #ifdef CONFIG_CLK_800_330_165
16*77b55e8cSThomas Abraham #define DRAM_CLK_330
17*77b55e8cSThomas Abraham #endif
18*77b55e8cSThomas Abraham #ifdef CONFIG_CLK_1000_200_200
19*77b55e8cSThomas Abraham #define DRAM_CLK_200
20*77b55e8cSThomas Abraham #endif
21*77b55e8cSThomas Abraham #ifdef CONFIG_CLK_1000_330_165
22*77b55e8cSThomas Abraham #define DRAM_CLK_330
23*77b55e8cSThomas Abraham #endif
24*77b55e8cSThomas Abraham #ifdef CONFIG_CLK_1000_400_200
25*77b55e8cSThomas Abraham #define DRAM_CLK_400
26*77b55e8cSThomas Abraham #endif
27*77b55e8cSThomas Abraham 
28*77b55e8cSThomas Abraham /* Bus Configuration Register Address */
29*77b55e8cSThomas Abraham #define ASYNC_CONFIG		0x10010350
30*77b55e8cSThomas Abraham 
31*77b55e8cSThomas Abraham /* CLK_SRC_CPU */
32*77b55e8cSThomas Abraham #define MUX_HPM_SEL_MOUTAPLL		0x0
33*77b55e8cSThomas Abraham #define MUX_HPM_SEL_SCLKMPLL		0x1
34*77b55e8cSThomas Abraham #define MUX_CORE_SEL_MOUTAPLL		0x0
35*77b55e8cSThomas Abraham #define MUX_CORE_SEL_SCLKMPLL		0x1
36*77b55e8cSThomas Abraham #define MUX_MPLL_SEL_FILPLL		0x0
37*77b55e8cSThomas Abraham #define MUX_MPLL_SEL_MOUTMPLLFOUT	0x1
38*77b55e8cSThomas Abraham #define MUX_APLL_SEL_FILPLL		0x0
39*77b55e8cSThomas Abraham #define MUX_APLL_SEL_MOUTMPLLFOUT	0x1
40*77b55e8cSThomas Abraham #define CLK_SRC_CPU_VAL			((MUX_HPM_SEL_MOUTAPLL << 20) \
41*77b55e8cSThomas Abraham 					| (MUX_CORE_SEL_MOUTAPLL << 16) \
42*77b55e8cSThomas Abraham 					| (MUX_MPLL_SEL_MOUTMPLLFOUT << 8)\
43*77b55e8cSThomas Abraham 					| (MUX_APLL_SEL_MOUTMPLLFOUT << 0))
44*77b55e8cSThomas Abraham 
45*77b55e8cSThomas Abraham /* CLK_DIV_CPU0 */
46*77b55e8cSThomas Abraham #define APLL_RATIO		0x0
47*77b55e8cSThomas Abraham #define PCLK_DBG_RATIO		0x1
48*77b55e8cSThomas Abraham #define ATB_RATIO		0x3
49*77b55e8cSThomas Abraham #define PERIPH_RATIO		0x3
50*77b55e8cSThomas Abraham #define COREM1_RATIO		0x7
51*77b55e8cSThomas Abraham #define COREM0_RATIO		0x3
52*77b55e8cSThomas Abraham #define CORE_RATIO		0x0
53*77b55e8cSThomas Abraham #define CLK_DIV_CPU0_VAL	((APLL_RATIO << 24) \
54*77b55e8cSThomas Abraham 				| (PCLK_DBG_RATIO << 20) \
55*77b55e8cSThomas Abraham 				| (ATB_RATIO << 16) \
56*77b55e8cSThomas Abraham 				| (PERIPH_RATIO << 12) \
57*77b55e8cSThomas Abraham 				| (COREM1_RATIO << 8) \
58*77b55e8cSThomas Abraham 				| (COREM0_RATIO << 4) \
59*77b55e8cSThomas Abraham 				| (CORE_RATIO << 0))
60*77b55e8cSThomas Abraham 
61*77b55e8cSThomas Abraham /* CLK_DIV_CPU1 */
62*77b55e8cSThomas Abraham #define HPM_RATIO		0x0
63*77b55e8cSThomas Abraham #define COPY_RATIO		0x3
64*77b55e8cSThomas Abraham #define CLK_DIV_CPU1_VAL	((HPM_RATIO << 4) | (COPY_RATIO))
65*77b55e8cSThomas Abraham 
66*77b55e8cSThomas Abraham /* CLK_SRC_DMC */
67*77b55e8cSThomas Abraham #define MUX_PWI_SEL_XXTI		0x0
68*77b55e8cSThomas Abraham #define MUX_PWI_SEL_XUSBXTI		0x1
69*77b55e8cSThomas Abraham #define MUX_PWI_SEL_SCLK_HDMI24M	0x2
70*77b55e8cSThomas Abraham #define MUX_PWI_SEL_SCLK_USBPHY0	0x3
71*77b55e8cSThomas Abraham #define MUX_PWI_SEL_SCLK_USBPHY1	0x4
72*77b55e8cSThomas Abraham #define MUX_PWI_SEL_SCLK_HDMIPHY	0x5
73*77b55e8cSThomas Abraham #define MUX_PWI_SEL_SCLKMPLL		0x6
74*77b55e8cSThomas Abraham #define MUX_PWI_SEL_SCLKEPLL		0x7
75*77b55e8cSThomas Abraham #define MUX_PWI_SEL_SCLKVPLL		0x8
76*77b55e8cSThomas Abraham #define MUX_DPHY_SEL_SCLKMPLL		0x0
77*77b55e8cSThomas Abraham #define MUX_DPHY_SEL_SCLKAPLL		0x1
78*77b55e8cSThomas Abraham #define MUX_DMC_BUS_SEL_SCLKMPLL	0x0
79*77b55e8cSThomas Abraham #define MUX_DMC_BUS_SEL_SCLKAPLL	0x1
80*77b55e8cSThomas Abraham #define CLK_SRC_DMC_VAL			((MUX_PWI_SEL_XUSBXTI << 16) \
81*77b55e8cSThomas Abraham 					| (MUX_DPHY_SEL_SCLKMPLL << 8) \
82*77b55e8cSThomas Abraham 					| (MUX_DMC_BUS_SEL_SCLKMPLL << 4))
83*77b55e8cSThomas Abraham 
84*77b55e8cSThomas Abraham /* CLK_DIV_DMC0 */
85*77b55e8cSThomas Abraham #define CORE_TIMERS_RATIO	0x1
86*77b55e8cSThomas Abraham #define COPY2_RATIO		0x3
87*77b55e8cSThomas Abraham #define DMCP_RATIO		0x1
88*77b55e8cSThomas Abraham #define DMCD_RATIO		0x1
89*77b55e8cSThomas Abraham #define DMC_RATIO		0x1
90*77b55e8cSThomas Abraham #define DPHY_RATIO		0x1
91*77b55e8cSThomas Abraham #define ACP_PCLK_RATIO		0x1
92*77b55e8cSThomas Abraham #define ACP_RATIO		0x3
93*77b55e8cSThomas Abraham #define CLK_DIV_DMC0_VAL	((CORE_TIMERS_RATIO << 28) \
94*77b55e8cSThomas Abraham 				| (COPY2_RATIO << 24) \
95*77b55e8cSThomas Abraham 				| (DMCP_RATIO << 20) \
96*77b55e8cSThomas Abraham 				| (DMCD_RATIO << 16) \
97*77b55e8cSThomas Abraham 				| (DMC_RATIO << 12) \
98*77b55e8cSThomas Abraham 				| (DPHY_RATIO << 8) \
99*77b55e8cSThomas Abraham 				| (ACP_PCLK_RATIO << 4)	\
100*77b55e8cSThomas Abraham 				| (ACP_RATIO << 0))
101*77b55e8cSThomas Abraham 
102*77b55e8cSThomas Abraham /* CLK_DIV_DMC1 */
103*77b55e8cSThomas Abraham #define DPM_RATIO		0x1
104*77b55e8cSThomas Abraham #define DVSEM_RATIO		0x1
105*77b55e8cSThomas Abraham #define PWI_RATIO		0x1
106*77b55e8cSThomas Abraham #define CLK_DIV_DMC1_VAL	((DPM_RATIO << 24) \
107*77b55e8cSThomas Abraham 				| (DVSEM_RATIO << 16) \
108*77b55e8cSThomas Abraham 				| (PWI_RATIO << 8))
109*77b55e8cSThomas Abraham 
110*77b55e8cSThomas Abraham /* CLK_SRC_TOP0 */
111*77b55e8cSThomas Abraham #define MUX_ONENAND_SEL_ACLK_133	0x0
112*77b55e8cSThomas Abraham #define MUX_ONENAND_SEL_ACLK_160	0x1
113*77b55e8cSThomas Abraham #define MUX_ACLK_133_SEL_SCLKMPLL	0x0
114*77b55e8cSThomas Abraham #define MUX_ACLK_133_SEL_SCLKAPLL	0x1
115*77b55e8cSThomas Abraham #define MUX_ACLK_160_SEL_SCLKMPLL	0x0
116*77b55e8cSThomas Abraham #define MUX_ACLK_160_SEL_SCLKAPLL	0x1
117*77b55e8cSThomas Abraham #define MUX_ACLK_100_SEL_SCLKMPLL	0x0
118*77b55e8cSThomas Abraham #define MUX_ACLK_100_SEL_SCLKAPLL	0x1
119*77b55e8cSThomas Abraham #define MUX_ACLK_200_SEL_SCLKMPLL	0x0
120*77b55e8cSThomas Abraham #define MUX_ACLK_200_SEL_SCLKAPLL	0x1
121*77b55e8cSThomas Abraham #define MUX_VPLL_SEL_FINPLL		0x0
122*77b55e8cSThomas Abraham #define MUX_VPLL_SEL_FOUTVPLL		0x1
123*77b55e8cSThomas Abraham #define MUX_EPLL_SEL_FINPLL		0x0
124*77b55e8cSThomas Abraham #define MUX_EPLL_SEL_FOUTEPLL		0x1
125*77b55e8cSThomas Abraham #define MUX_ONENAND_1_SEL_MOUTONENAND	0x0
126*77b55e8cSThomas Abraham #define MUX_ONENAND_1_SEL_SCLKVPLL	0x1
127*77b55e8cSThomas Abraham #define CLK_SRC_TOP0_VAL		((MUX_ONENAND_SEL_ACLK_133 << 28) \
128*77b55e8cSThomas Abraham 					| (MUX_ACLK_133_SEL_SCLKMPLL << 24) \
129*77b55e8cSThomas Abraham 					| (MUX_ACLK_160_SEL_SCLKMPLL << 20) \
130*77b55e8cSThomas Abraham 					| (MUX_ACLK_100_SEL_SCLKMPLL << 16) \
131*77b55e8cSThomas Abraham 					| (MUX_ACLK_200_SEL_SCLKMPLL << 12) \
132*77b55e8cSThomas Abraham 					| (MUX_VPLL_SEL_FINPLL << 8) \
133*77b55e8cSThomas Abraham 					| (MUX_EPLL_SEL_FINPLL << 4)\
134*77b55e8cSThomas Abraham 					| (MUX_ONENAND_1_SEL_MOUTONENAND << 0))
135*77b55e8cSThomas Abraham 
136*77b55e8cSThomas Abraham /* CLK_SRC_TOP1 */
137*77b55e8cSThomas Abraham #define VPLLSRC_SEL_FINPLL	0x0
138*77b55e8cSThomas Abraham #define VPLLSRC_SEL_SCLKHDMI24M	0x1
139*77b55e8cSThomas Abraham #define CLK_SRC_TOP1_VAL	(VPLLSRC_SEL_FINPLL)
140*77b55e8cSThomas Abraham 
141*77b55e8cSThomas Abraham /* CLK_DIV_TOP */
142*77b55e8cSThomas Abraham #define ONENAND_RATIO		0x0
143*77b55e8cSThomas Abraham #define ACLK_133_RATIO		0x5
144*77b55e8cSThomas Abraham #define ACLK_160_RATIO		0x4
145*77b55e8cSThomas Abraham #define ACLK_100_RATIO		0x7
146*77b55e8cSThomas Abraham #define ACLK_200_RATIO		0x3
147*77b55e8cSThomas Abraham #define CLK_DIV_TOP_VAL		((ONENAND_RATIO << 16)	\
148*77b55e8cSThomas Abraham 				| (ACLK_133_RATIO << 12)\
149*77b55e8cSThomas Abraham 				| (ACLK_160_RATIO << 8)	\
150*77b55e8cSThomas Abraham 				| (ACLK_100_RATIO << 4)	\
151*77b55e8cSThomas Abraham 				| (ACLK_200_RATIO << 0))
152*77b55e8cSThomas Abraham 
153*77b55e8cSThomas Abraham /* CLK_SRC_LEFTBUS */
154*77b55e8cSThomas Abraham #define MUX_GDL_SEL_SCLKMPLL	0x0
155*77b55e8cSThomas Abraham #define MUX_GDL_SEL_SCLKAPLL	0x1
156*77b55e8cSThomas Abraham #define CLK_SRC_LEFTBUS_VAL	(MUX_GDL_SEL_SCLKMPLL)
157*77b55e8cSThomas Abraham 
158*77b55e8cSThomas Abraham /* CLK_DIV_LEFTBUS */
159*77b55e8cSThomas Abraham #define GPL_RATIO		0x1
160*77b55e8cSThomas Abraham #define GDL_RATIO		0x3
161*77b55e8cSThomas Abraham #define CLK_DIV_LEFTBUS_VAL	((GPL_RATIO << 4) | (GDL_RATIO))
162*77b55e8cSThomas Abraham 
163*77b55e8cSThomas Abraham /* CLK_SRC_RIGHTBUS */
164*77b55e8cSThomas Abraham #define MUX_GDR_SEL_SCLKMPLL	0x0
165*77b55e8cSThomas Abraham #define MUX_GDR_SEL_SCLKAPLL	0x1
166*77b55e8cSThomas Abraham #define CLK_SRC_RIGHTBUS_VAL	(MUX_GDR_SEL_SCLKMPLL)
167*77b55e8cSThomas Abraham 
168*77b55e8cSThomas Abraham /* CLK_DIV_RIGHTBUS */
169*77b55e8cSThomas Abraham #define GPR_RATIO		0x1
170*77b55e8cSThomas Abraham #define GDR_RATIO		0x3
171*77b55e8cSThomas Abraham #define CLK_DIV_RIGHTBUS_VAL	((GPR_RATIO << 4) | (GDR_RATIO))
172*77b55e8cSThomas Abraham 
173*77b55e8cSThomas Abraham /* CLK_SRS_FSYS: 6 = SCLKMPLL */
174*77b55e8cSThomas Abraham #define SATA_SEL_SCLKMPLL	0
175*77b55e8cSThomas Abraham #define SATA_SEL_SCLKAPLL	1
176*77b55e8cSThomas Abraham 
177*77b55e8cSThomas Abraham #define MMC_SEL_XXTI		0
178*77b55e8cSThomas Abraham #define MMC_SEL_XUSBXTI		1
179*77b55e8cSThomas Abraham #define MMC_SEL_SCLK_HDMI24M	2
180*77b55e8cSThomas Abraham #define MMC_SEL_SCLK_USBPHY0	3
181*77b55e8cSThomas Abraham #define MMC_SEL_SCLK_USBPHY1	4
182*77b55e8cSThomas Abraham #define MMC_SEL_SCLK_HDMIPHY	5
183*77b55e8cSThomas Abraham #define MMC_SEL_SCLKMPLL	6
184*77b55e8cSThomas Abraham #define MMC_SEL_SCLKEPLL	7
185*77b55e8cSThomas Abraham #define MMC_SEL_SCLKVPLL	8
186*77b55e8cSThomas Abraham 
187*77b55e8cSThomas Abraham #define MMCC0_SEL		MMC_SEL_SCLKMPLL
188*77b55e8cSThomas Abraham #define MMCC1_SEL		MMC_SEL_SCLKMPLL
189*77b55e8cSThomas Abraham #define MMCC2_SEL		MMC_SEL_SCLKMPLL
190*77b55e8cSThomas Abraham #define MMCC3_SEL		MMC_SEL_SCLKMPLL
191*77b55e8cSThomas Abraham #define MMCC4_SEL		MMC_SEL_SCLKMPLL
192*77b55e8cSThomas Abraham #define CLK_SRC_FSYS_VAL	((SATA_SEL_SCLKMPLL << 24) \
193*77b55e8cSThomas Abraham 				| (MMCC4_SEL << 16) \
194*77b55e8cSThomas Abraham 				| (MMCC3_SEL << 12) \
195*77b55e8cSThomas Abraham 				| (MMCC2_SEL << 8) \
196*77b55e8cSThomas Abraham 				| (MMCC1_SEL << 4) \
197*77b55e8cSThomas Abraham 				| (MMCC0_SEL << 0))
198*77b55e8cSThomas Abraham 
199*77b55e8cSThomas Abraham /* SCLK_MMC[0-4] = MOUTMMC[0-4]/(MMC[0-4]_RATIO + 1)/(MMC[0-4]_PRE_RATIO +1) */
200*77b55e8cSThomas Abraham /* CLK_DIV_FSYS1 */
201*77b55e8cSThomas Abraham #define MMC0_RATIO		0xF
202*77b55e8cSThomas Abraham #define MMC0_PRE_RATIO		0x0
203*77b55e8cSThomas Abraham #define MMC1_RATIO		0xF
204*77b55e8cSThomas Abraham #define MMC1_PRE_RATIO		0x0
205*77b55e8cSThomas Abraham #define CLK_DIV_FSYS1_VAL	((MMC1_PRE_RATIO << 24) \
206*77b55e8cSThomas Abraham 				| (MMC1_RATIO << 16) \
207*77b55e8cSThomas Abraham 				| (MMC0_PRE_RATIO << 8) \
208*77b55e8cSThomas Abraham 				| (MMC0_RATIO << 0))
209*77b55e8cSThomas Abraham 
210*77b55e8cSThomas Abraham /* CLK_DIV_FSYS2 */
211*77b55e8cSThomas Abraham #define MMC2_RATIO		0xF
212*77b55e8cSThomas Abraham #define MMC2_PRE_RATIO		0x0
213*77b55e8cSThomas Abraham #define MMC3_RATIO		0xF
214*77b55e8cSThomas Abraham #define MMC3_PRE_RATIO		0x0
215*77b55e8cSThomas Abraham #define CLK_DIV_FSYS2_VAL	((MMC3_PRE_RATIO << 24) \
216*77b55e8cSThomas Abraham 				| (MMC3_RATIO << 16) \
217*77b55e8cSThomas Abraham 				| (MMC2_PRE_RATIO << 8) \
218*77b55e8cSThomas Abraham 				| (MMC2_RATIO << 0))
219*77b55e8cSThomas Abraham 
220*77b55e8cSThomas Abraham /* CLK_DIV_FSYS3 */
221*77b55e8cSThomas Abraham #define MMC4_RATIO		0xF
222*77b55e8cSThomas Abraham #define MMC4_PRE_RATIO		0x0
223*77b55e8cSThomas Abraham #define CLK_DIV_FSYS3_VAL	((MMC4_PRE_RATIO << 8) \
224*77b55e8cSThomas Abraham 				| (MMC4_RATIO << 0))
225*77b55e8cSThomas Abraham 
226*77b55e8cSThomas Abraham /* CLK_SRC_PERIL0 */
227*77b55e8cSThomas Abraham #define UART_SEL_XXTI		0
228*77b55e8cSThomas Abraham #define UART_SEL_XUSBXTI	1
229*77b55e8cSThomas Abraham #define UART_SEL_SCLK_HDMI24M	2
230*77b55e8cSThomas Abraham #define UART_SEL_SCLK_USBPHY0	3
231*77b55e8cSThomas Abraham #define UART_SEL_SCLK_USBPHY1	4
232*77b55e8cSThomas Abraham #define UART_SEL_SCLK_HDMIPHY	5
233*77b55e8cSThomas Abraham #define UART_SEL_SCLKMPLL	6
234*77b55e8cSThomas Abraham #define UART_SEL_SCLKEPLL	7
235*77b55e8cSThomas Abraham #define UART_SEL_SCLKVPLL	8
236*77b55e8cSThomas Abraham 
237*77b55e8cSThomas Abraham #define UART0_SEL		UART_SEL_SCLKMPLL
238*77b55e8cSThomas Abraham #define UART1_SEL		UART_SEL_SCLKMPLL
239*77b55e8cSThomas Abraham #define UART2_SEL		UART_SEL_SCLKMPLL
240*77b55e8cSThomas Abraham #define UART3_SEL		UART_SEL_SCLKMPLL
241*77b55e8cSThomas Abraham #define UART4_SEL		UART_SEL_SCLKMPLL
242*77b55e8cSThomas Abraham #define CLK_SRC_PERIL0_VAL	((UART4_SEL << 16) \
243*77b55e8cSThomas Abraham 				| (UART3_SEL << 12) \
244*77b55e8cSThomas Abraham 				| (UART2_SEL << 8) \
245*77b55e8cSThomas Abraham 				| (UART1_SEL << 4) \
246*77b55e8cSThomas Abraham 				| (UART0_SEL << 0))
247*77b55e8cSThomas Abraham 
248*77b55e8cSThomas Abraham /* SCLK_UART[0-4] = MOUTUART[0-4]/(UART[0-4]_RATIO + 1) */
249*77b55e8cSThomas Abraham /* CLK_DIV_PERIL0 */
250*77b55e8cSThomas Abraham #define UART0_RATIO		7
251*77b55e8cSThomas Abraham #define UART1_RATIO		7
252*77b55e8cSThomas Abraham #define UART2_RATIO		7
253*77b55e8cSThomas Abraham #define UART3_RATIO		7
254*77b55e8cSThomas Abraham #define UART4_RATIO		7
255*77b55e8cSThomas Abraham #define CLK_DIV_PERIL0_VAL	((UART4_RATIO << 16) \
256*77b55e8cSThomas Abraham 				| (UART3_RATIO << 12) \
257*77b55e8cSThomas Abraham 				| (UART2_RATIO << 8) \
258*77b55e8cSThomas Abraham 				| (UART1_RATIO << 4) \
259*77b55e8cSThomas Abraham 				| (UART0_RATIO << 0))
260*77b55e8cSThomas Abraham 
261*77b55e8cSThomas Abraham /* Clock Source CAM/FIMC */
262*77b55e8cSThomas Abraham /* CLK_SRC_CAM */
263*77b55e8cSThomas Abraham #define CAM0_SEL_XUSBXTI	1
264*77b55e8cSThomas Abraham #define CAM1_SEL_XUSBXTI	1
265*77b55e8cSThomas Abraham #define CSIS0_SEL_XUSBXTI	1
266*77b55e8cSThomas Abraham #define CSIS1_SEL_XUSBXTI	1
267*77b55e8cSThomas Abraham 
268*77b55e8cSThomas Abraham #define FIMC_SEL_SCLKMPLL	6
269*77b55e8cSThomas Abraham #define FIMC0_LCLK_SEL		FIMC_SEL_SCLKMPLL
270*77b55e8cSThomas Abraham #define FIMC1_LCLK_SEL		FIMC_SEL_SCLKMPLL
271*77b55e8cSThomas Abraham #define FIMC2_LCLK_SEL		FIMC_SEL_SCLKMPLL
272*77b55e8cSThomas Abraham #define FIMC3_LCLK_SEL		FIMC_SEL_SCLKMPLL
273*77b55e8cSThomas Abraham 
274*77b55e8cSThomas Abraham #define CLK_SRC_CAM_VAL		((CSIS1_SEL_XUSBXTI << 28) \
275*77b55e8cSThomas Abraham 				| (CSIS0_SEL_XUSBXTI << 24) \
276*77b55e8cSThomas Abraham 				| (CAM1_SEL_XUSBXTI << 20) \
277*77b55e8cSThomas Abraham 				| (CAM0_SEL_XUSBXTI << 16) \
278*77b55e8cSThomas Abraham 				| (FIMC3_LCLK_SEL << 12) \
279*77b55e8cSThomas Abraham 				| (FIMC2_LCLK_SEL << 8) \
280*77b55e8cSThomas Abraham 				| (FIMC1_LCLK_SEL << 4) \
281*77b55e8cSThomas Abraham 				| (FIMC0_LCLK_SEL << 0))
282*77b55e8cSThomas Abraham 
283*77b55e8cSThomas Abraham /* SCLK CAM */
284*77b55e8cSThomas Abraham /* CLK_DIV_CAM */
285*77b55e8cSThomas Abraham #define FIMC0_LCLK_RATIO	4
286*77b55e8cSThomas Abraham #define FIMC1_LCLK_RATIO	4
287*77b55e8cSThomas Abraham #define FIMC2_LCLK_RATIO	4
288*77b55e8cSThomas Abraham #define FIMC3_LCLK_RATIO	4
289*77b55e8cSThomas Abraham #define CLK_DIV_CAM_VAL		((FIMC3_LCLK_RATIO << 12) \
290*77b55e8cSThomas Abraham 				| (FIMC2_LCLK_RATIO << 8) \
291*77b55e8cSThomas Abraham 				| (FIMC1_LCLK_RATIO << 4) \
292*77b55e8cSThomas Abraham 				| (FIMC0_LCLK_RATIO << 0))
293*77b55e8cSThomas Abraham 
294*77b55e8cSThomas Abraham /* SCLK MFC */
295*77b55e8cSThomas Abraham /* CLK_SRC_MFC */
296*77b55e8cSThomas Abraham #define MFC_SEL_MPLL		0
297*77b55e8cSThomas Abraham #define MOUTMFC_0		0
298*77b55e8cSThomas Abraham #define MFC_SEL			MOUTMFC_0
299*77b55e8cSThomas Abraham #define MFC_0_SEL		MFC_SEL_MPLL
300*77b55e8cSThomas Abraham #define CLK_SRC_MFC_VAL		((MFC_SEL << 8) | (MFC_0_SEL))
301*77b55e8cSThomas Abraham 
302*77b55e8cSThomas Abraham 
303*77b55e8cSThomas Abraham /* CLK_DIV_MFC */
304*77b55e8cSThomas Abraham #define MFC_RATIO		3
305*77b55e8cSThomas Abraham #define CLK_DIV_MFC_VAL		(MFC_RATIO)
306*77b55e8cSThomas Abraham 
307*77b55e8cSThomas Abraham /* SCLK G3D */
308*77b55e8cSThomas Abraham /* CLK_SRC_G3D */
309*77b55e8cSThomas Abraham #define G3D_SEL_MPLL		0
310*77b55e8cSThomas Abraham #define MOUTG3D_0		0
311*77b55e8cSThomas Abraham #define G3D_SEL			MOUTG3D_0
312*77b55e8cSThomas Abraham #define G3D_0_SEL		G3D_SEL_MPLL
313*77b55e8cSThomas Abraham #define CLK_SRC_G3D_VAL		((G3D_SEL << 8) | (G3D_0_SEL))
314*77b55e8cSThomas Abraham 
315*77b55e8cSThomas Abraham /* CLK_DIV_G3D */
316*77b55e8cSThomas Abraham #define G3D_RATIO		1
317*77b55e8cSThomas Abraham #define CLK_DIV_G3D_VAL		(G3D_RATIO)
318*77b55e8cSThomas Abraham 
319*77b55e8cSThomas Abraham /* SCLK LCD0 */
320*77b55e8cSThomas Abraham /* CLK_SRC_LCD0 */
321*77b55e8cSThomas Abraham #define FIMD_SEL_SCLKMPLL	6
322*77b55e8cSThomas Abraham #define MDNIE0_SEL_XUSBXTI	1
323*77b55e8cSThomas Abraham #define MDNIE_PWM0_SEL_XUSBXTI	1
324*77b55e8cSThomas Abraham #define MIPI0_SEL_XUSBXTI	1
325*77b55e8cSThomas Abraham #define CLK_SRC_LCD0_VAL	((MIPI0_SEL_XUSBXTI << 12) \
326*77b55e8cSThomas Abraham 				| (MDNIE_PWM0_SEL_XUSBXTI << 8) \
327*77b55e8cSThomas Abraham 				| (MDNIE0_SEL_XUSBXTI << 4) \
328*77b55e8cSThomas Abraham 				| (FIMD_SEL_SCLKMPLL << 0))
329*77b55e8cSThomas Abraham 
330*77b55e8cSThomas Abraham /* CLK_DIV_LCD0 */
331*77b55e8cSThomas Abraham #define FIMD0_RATIO		4
332*77b55e8cSThomas Abraham #define CLK_DIV_LCD0_VAL	(FIMD0_RATIO)
333*77b55e8cSThomas Abraham 
334*77b55e8cSThomas Abraham /* Required period to generate a stable clock output */
335*77b55e8cSThomas Abraham /* PLL_LOCK_TIME */
336*77b55e8cSThomas Abraham #define PLL_LOCKTIME		0x1C20
337*77b55e8cSThomas Abraham 
338*77b55e8cSThomas Abraham /* PLL Values */
339*77b55e8cSThomas Abraham #define DISABLE			0
340*77b55e8cSThomas Abraham #define ENABLE			1
341*77b55e8cSThomas Abraham #define SET_PLL(mdiv, pdiv, sdiv)	((ENABLE << 31)\
342*77b55e8cSThomas Abraham 					| (mdiv << 16) \
343*77b55e8cSThomas Abraham 					| (pdiv << 8) \
344*77b55e8cSThomas Abraham 					| (sdiv << 0))
345*77b55e8cSThomas Abraham 
346*77b55e8cSThomas Abraham /* APLL_CON0 */
347*77b55e8cSThomas Abraham #define APLL_MDIV		0xFA
348*77b55e8cSThomas Abraham #define APLL_PDIV		0x6
349*77b55e8cSThomas Abraham #define APLL_SDIV		0x1
350*77b55e8cSThomas Abraham #define APLL_CON0_VAL		SET_PLL(APLL_MDIV, APLL_PDIV, APLL_SDIV)
351*77b55e8cSThomas Abraham 
352*77b55e8cSThomas Abraham /* APLL_CON1 */
353*77b55e8cSThomas Abraham #define APLL_AFC_ENB		0x1
354*77b55e8cSThomas Abraham #define APLL_AFC		0xC
355*77b55e8cSThomas Abraham #define APLL_CON1_VAL		((APLL_AFC_ENB << 31) | (APLL_AFC << 0))
356*77b55e8cSThomas Abraham 
357*77b55e8cSThomas Abraham /* MPLL_CON0 */
358*77b55e8cSThomas Abraham #define MPLL_MDIV		0xC8
359*77b55e8cSThomas Abraham #define MPLL_PDIV		0x6
360*77b55e8cSThomas Abraham #define MPLL_SDIV		0x1
361*77b55e8cSThomas Abraham #define MPLL_CON0_VAL		SET_PLL(MPLL_MDIV, MPLL_PDIV, MPLL_SDIV)
362*77b55e8cSThomas Abraham 
363*77b55e8cSThomas Abraham /* MPLL_CON1 */
364*77b55e8cSThomas Abraham #define MPLL_AFC_ENB		0x0
365*77b55e8cSThomas Abraham #define MPLL_AFC		0x1C
366*77b55e8cSThomas Abraham #define MPLL_CON1_VAL		((MPLL_AFC_ENB << 31) | (MPLL_AFC << 0))
367*77b55e8cSThomas Abraham 
368*77b55e8cSThomas Abraham /* EPLL_CON0 */
369*77b55e8cSThomas Abraham #define EPLL_MDIV		0x30
370*77b55e8cSThomas Abraham #define EPLL_PDIV		0x3
371*77b55e8cSThomas Abraham #define EPLL_SDIV		0x2
372*77b55e8cSThomas Abraham #define EPLL_CON0_VAL		SET_PLL(EPLL_MDIV, EPLL_PDIV, EPLL_SDIV)
373*77b55e8cSThomas Abraham 
374*77b55e8cSThomas Abraham /* EPLL_CON1 */
375*77b55e8cSThomas Abraham #define EPLL_K			0x0
376*77b55e8cSThomas Abraham #define EPLL_CON1_VAL		(EPLL_K >> 0)
377*77b55e8cSThomas Abraham 
378*77b55e8cSThomas Abraham /* VPLL_CON0 */
379*77b55e8cSThomas Abraham #define VPLL_MDIV		0x35
380*77b55e8cSThomas Abraham #define VPLL_PDIV		0x3
381*77b55e8cSThomas Abraham #define VPLL_SDIV		0x2
382*77b55e8cSThomas Abraham #define VPLL_CON0_VAL		SET_PLL(VPLL_MDIV, VPLL_PDIV, VPLL_SDIV)
383*77b55e8cSThomas Abraham 
384*77b55e8cSThomas Abraham /* VPLL_CON1 */
385*77b55e8cSThomas Abraham #define VPLL_SSCG_EN		DISABLE
386*77b55e8cSThomas Abraham #define VPLL_SEL_PF_DN_SPREAD	0x0
387*77b55e8cSThomas Abraham #define VPLL_MRR		0x11
388*77b55e8cSThomas Abraham #define VPLL_MFR		0x0
389*77b55e8cSThomas Abraham #define VPLL_K			0x400
390*77b55e8cSThomas Abraham #define VPLL_CON1_VAL		((VPLL_SSCG_EN << 31)\
391*77b55e8cSThomas Abraham 				| (VPLL_SEL_PF_DN_SPREAD << 29) \
392*77b55e8cSThomas Abraham 				| (VPLL_MRR << 24) \
393*77b55e8cSThomas Abraham 				| (VPLL_MFR << 16) \
394*77b55e8cSThomas Abraham 				| (VPLL_K << 0))
395*77b55e8cSThomas Abraham 
396*77b55e8cSThomas Abraham /* DMC */
397*77b55e8cSThomas Abraham #define DIRECT_CMD_NOP	0x07000000
398*77b55e8cSThomas Abraham #define DIRECT_CMD_ZQ	0x0a000000
399*77b55e8cSThomas Abraham #define DIRECT_CMD_CHIP1_SHIFT	(1 << 20)
400*77b55e8cSThomas Abraham #define MEM_TIMINGS_MSR_COUNT	4
401*77b55e8cSThomas Abraham #define CTRL_START	(1 << 0)
402*77b55e8cSThomas Abraham #define CTRL_DLL_ON	(1 << 1)
403*77b55e8cSThomas Abraham #define AREF_EN		(1 << 5)
404*77b55e8cSThomas Abraham #define DRV_TYPE	(1 << 6)
405*77b55e8cSThomas Abraham 
406*77b55e8cSThomas Abraham struct mem_timings {
407*77b55e8cSThomas Abraham 	unsigned direct_cmd_msr[MEM_TIMINGS_MSR_COUNT];
408*77b55e8cSThomas Abraham 	unsigned timingref;
409*77b55e8cSThomas Abraham 	unsigned timingrow;
410*77b55e8cSThomas Abraham 	unsigned timingdata;
411*77b55e8cSThomas Abraham 	unsigned timingpower;
412*77b55e8cSThomas Abraham 	unsigned zqcontrol;
413*77b55e8cSThomas Abraham 	unsigned control0;
414*77b55e8cSThomas Abraham 	unsigned control1;
415*77b55e8cSThomas Abraham 	unsigned control2;
416*77b55e8cSThomas Abraham 	unsigned concontrol;
417*77b55e8cSThomas Abraham 	unsigned prechconfig;
418*77b55e8cSThomas Abraham 	unsigned memcontrol;
419*77b55e8cSThomas Abraham 	unsigned memconfig0;
420*77b55e8cSThomas Abraham 	unsigned memconfig1;
421*77b55e8cSThomas Abraham 	unsigned dll_resync;
422*77b55e8cSThomas Abraham 	unsigned dll_on;
423*77b55e8cSThomas Abraham };
424*77b55e8cSThomas Abraham 
425*77b55e8cSThomas Abraham /* MIU */
426*77b55e8cSThomas Abraham /* MIU Config Register Offsets*/
427*77b55e8cSThomas Abraham #define APB_SFR_INTERLEAVE_CONF_OFFSET	0x400
428*77b55e8cSThomas Abraham #define APB_SFR_ARBRITATION_CONF_OFFSET	0xC00
429*77b55e8cSThomas Abraham #define ABP_SFR_SLV_ADDRMAP_CONF_OFFSET	0x800
430*77b55e8cSThomas Abraham #define ABP_SFR_INTERLEAVE_ADDRMAP_START_OFFSET	0x808
431*77b55e8cSThomas Abraham #define ABP_SFR_INTERLEAVE_ADDRMAP_END_OFFSET	0x810
432*77b55e8cSThomas Abraham #define ABP_SFR_SLV0_SINGLE_ADDRMAP_START_OFFSET	0x818
433*77b55e8cSThomas Abraham #define ABP_SFR_SLV0_SINGLE_ADDRMAP_END_OFFSET	0x820
434*77b55e8cSThomas Abraham #define ABP_SFR_SLV1_SINGLE_ADDRMAP_START_OFFSET	0x828
435*77b55e8cSThomas Abraham #define ABP_SFR_SLV1_SINGLE_ADDRMAP_END_OFFSET	0x830
436*77b55e8cSThomas Abraham 
437*77b55e8cSThomas Abraham #ifdef CONFIG_ORIGEN
438*77b55e8cSThomas Abraham /* Interleave: 2Bit, Interleave_bit1: 0x15, Interleave_bit0: 0x7 */
439*77b55e8cSThomas Abraham #define APB_SFR_INTERLEAVE_CONF_VAL	0x20001507
440*77b55e8cSThomas Abraham #define APB_SFR_ARBRITATION_CONF_VAL	0x00000001
441*77b55e8cSThomas Abraham #endif
442*77b55e8cSThomas Abraham 
443*77b55e8cSThomas Abraham #define INTERLEAVE_ADDR_MAP_START_ADDR	0x40000000
444*77b55e8cSThomas Abraham #define INTERLEAVE_ADDR_MAP_END_ADDR	0xbfffffff
445*77b55e8cSThomas Abraham #define INTERLEAVE_ADDR_MAP_EN		0x00000001
446*77b55e8cSThomas Abraham 
447*77b55e8cSThomas Abraham #ifdef CONFIG_MIU_1BIT_INTERLEAVED
448*77b55e8cSThomas Abraham /* Interleave_bit0: 0xC*/
449*77b55e8cSThomas Abraham #define APB_SFR_INTERLEAVE_CONF_VAL	0x0000000c
450*77b55e8cSThomas Abraham #endif
451*77b55e8cSThomas Abraham #ifdef CONFIG_MIU_2BIT_INTERLEAVED
452*77b55e8cSThomas Abraham /* Interleave: 2Bit, Interleave_bit1: 0x15, Interleave_bit0: 0xc */
453*77b55e8cSThomas Abraham #define APB_SFR_INTERLEAVE_CONF_VAL	0x2000150c
454*77b55e8cSThomas Abraham #endif
455*77b55e8cSThomas Abraham #define SLAVE0_SINGLE_ADDR_MAP_START_ADDR	0x40000000
456*77b55e8cSThomas Abraham #define SLAVE0_SINGLE_ADDR_MAP_END_ADDR		0x7fffffff
457*77b55e8cSThomas Abraham #define SLAVE1_SINGLE_ADDR_MAP_START_ADDR	0x80000000
458*77b55e8cSThomas Abraham #define SLAVE1_SINGLE_ADDR_MAP_END_ADDR		0xbfffffff
459*77b55e8cSThomas Abraham /* Enable SME0 and SME1*/
460*77b55e8cSThomas Abraham #define APB_SFR_SLV_ADDR_MAP_CONF_VAL		0x00000006
461*77b55e8cSThomas Abraham 
462*77b55e8cSThomas Abraham #define FORCE_DLL_RESYNC	3
463*77b55e8cSThomas Abraham #define DLL_CONTROL_ON		1
464*77b55e8cSThomas Abraham 
465*77b55e8cSThomas Abraham #define DIRECT_CMD1	0x00020000
466*77b55e8cSThomas Abraham #define DIRECT_CMD2	0x00030000
467*77b55e8cSThomas Abraham #define DIRECT_CMD3	0x00010002
468*77b55e8cSThomas Abraham #define DIRECT_CMD4	0x00000328
469*77b55e8cSThomas Abraham 
470*77b55e8cSThomas Abraham #define CTRL_ZQ_MODE_NOTERM	(0x1 << 0)
471*77b55e8cSThomas Abraham #define CTRL_ZQ_START		(0x1 << 1)
472*77b55e8cSThomas Abraham #define CTRL_ZQ_DIV		(0 << 4)
473*77b55e8cSThomas Abraham #define CTRL_ZQ_MODE_DDS	(0x7 << 8)
474*77b55e8cSThomas Abraham #define CTRL_ZQ_MODE_TERM	(0x2 << 11)
475*77b55e8cSThomas Abraham #define CTRL_ZQ_FORCE_IMPN	(0x5 << 14)
476*77b55e8cSThomas Abraham #define CTRL_ZQ_FORCE_IMPP	(0x6 << 17)
477*77b55e8cSThomas Abraham #define CTRL_DCC		(0xE38 << 20)
478*77b55e8cSThomas Abraham #define ZQ_CONTROL_VAL		(CTRL_ZQ_MODE_NOTERM | CTRL_ZQ_START\
479*77b55e8cSThomas Abraham 				| CTRL_ZQ_DIV | CTRL_ZQ_MODE_DDS\
480*77b55e8cSThomas Abraham 				| CTRL_ZQ_MODE_TERM | CTRL_ZQ_FORCE_IMPN\
481*77b55e8cSThomas Abraham 				| CTRL_ZQ_FORCE_IMPP | CTRL_DCC)
482*77b55e8cSThomas Abraham 
483*77b55e8cSThomas Abraham #define ASYNC			(0 << 0)
484*77b55e8cSThomas Abraham #define CLK_RATIO		(1 << 1)
485*77b55e8cSThomas Abraham #define DIV_PIPE		(1 << 3)
486*77b55e8cSThomas Abraham #define AWR_ON			(1 << 4)
487*77b55e8cSThomas Abraham #define AREF_DISABLE		(0 << 5)
488*77b55e8cSThomas Abraham #define DRV_TYPE_DISABLE	(0 << 6)
489*77b55e8cSThomas Abraham #define CHIP0_NOT_EMPTY		(0 << 8)
490*77b55e8cSThomas Abraham #define CHIP1_NOT_EMPTY		(0 << 9)
491*77b55e8cSThomas Abraham #define DQ_SWAP_DISABLE		(0 << 10)
492*77b55e8cSThomas Abraham #define QOS_FAST_DISABLE	(0 << 11)
493*77b55e8cSThomas Abraham #define RD_FETCH		(0x3 << 12)
494*77b55e8cSThomas Abraham #define TIMEOUT_LEVEL0		(0xFFF << 16)
495*77b55e8cSThomas Abraham #define CONCONTROL_VAL		(ASYNC | CLK_RATIO | DIV_PIPE | AWR_ON\
496*77b55e8cSThomas Abraham 				| AREF_DISABLE | DRV_TYPE_DISABLE\
497*77b55e8cSThomas Abraham 				| CHIP0_NOT_EMPTY | CHIP1_NOT_EMPTY\
498*77b55e8cSThomas Abraham 				| DQ_SWAP_DISABLE | QOS_FAST_DISABLE\
499*77b55e8cSThomas Abraham 				| RD_FETCH | TIMEOUT_LEVEL0)
500*77b55e8cSThomas Abraham 
501*77b55e8cSThomas Abraham #define CLK_STOP_DISABLE	(0 << 1)
502*77b55e8cSThomas Abraham #define DPWRDN_DISABLE		(0 << 2)
503*77b55e8cSThomas Abraham #define DPWRDN_TYPE		(0 << 3)
504*77b55e8cSThomas Abraham #define TP_DISABLE		(0 << 4)
505*77b55e8cSThomas Abraham #define DSREF_DIABLE		(0 << 5)
506*77b55e8cSThomas Abraham #define ADD_LAT_PALL		(1 << 6)
507*77b55e8cSThomas Abraham #define MEM_TYPE_DDR3		(0x6 << 8)
508*77b55e8cSThomas Abraham #define MEM_WIDTH_32		(0x2 << 12)
509*77b55e8cSThomas Abraham #define NUM_CHIP_2		(1 << 16)
510*77b55e8cSThomas Abraham #define BL_8			(0x3 << 20)
511*77b55e8cSThomas Abraham #define MEMCONTROL_VAL		(CLK_STOP_DISABLE | DPWRDN_DISABLE\
512*77b55e8cSThomas Abraham 				| DPWRDN_TYPE | TP_DISABLE | DSREF_DIABLE\
513*77b55e8cSThomas Abraham 				| ADD_LAT_PALL | MEM_TYPE_DDR3 | MEM_WIDTH_32\
514*77b55e8cSThomas Abraham 				| NUM_CHIP_2 | BL_8)
515*77b55e8cSThomas Abraham 
516*77b55e8cSThomas Abraham 
517*77b55e8cSThomas Abraham #define CHIP_BANK_8		(0x3 << 0)
518*77b55e8cSThomas Abraham #define CHIP_ROW_14		(0x2 << 4)
519*77b55e8cSThomas Abraham #define CHIP_COL_10		(0x3 << 8)
520*77b55e8cSThomas Abraham #define CHIP_MAP_INTERLEAVED	(1 << 12)
521*77b55e8cSThomas Abraham #define CHIP_MASK		(0xe0 << 16)
522*77b55e8cSThomas Abraham #ifdef CONFIG_MIU_LINEAR
523*77b55e8cSThomas Abraham #define CHIP0_BASE		(0x40 << 24)
524*77b55e8cSThomas Abraham #define CHIP1_BASE		(0x60 << 24)
525*77b55e8cSThomas Abraham #else
526*77b55e8cSThomas Abraham #define CHIP0_BASE		(0x20 << 24)
527*77b55e8cSThomas Abraham #define CHIP1_BASE		(0x40 << 24)
528*77b55e8cSThomas Abraham #endif
529*77b55e8cSThomas Abraham #define MEMCONFIG0_VAL		(CHIP_BANK_8 | CHIP_ROW_14 | CHIP_COL_10\
530*77b55e8cSThomas Abraham 				| CHIP_MAP_INTERLEAVED | CHIP_MASK | CHIP0_BASE)
531*77b55e8cSThomas Abraham #define MEMCONFIG1_VAL		(CHIP_BANK_8 | CHIP_ROW_14 | CHIP_COL_10\
532*77b55e8cSThomas Abraham 				| CHIP_MAP_INTERLEAVED | CHIP_MASK | CHIP1_BASE)
533*77b55e8cSThomas Abraham 
534*77b55e8cSThomas Abraham #define TP_CNT			(0xff << 24)
535*77b55e8cSThomas Abraham #define PRECHCONFIG		TP_CNT
536*77b55e8cSThomas Abraham 
537*77b55e8cSThomas Abraham #define CTRL_OFF		(0 << 0)
538*77b55e8cSThomas Abraham #define CTRL_DLL_OFF		(0 << 1)
539*77b55e8cSThomas Abraham #define CTRL_HALF		(0 << 2)
540*77b55e8cSThomas Abraham #define CTRL_DFDQS		(1 << 3)
541*77b55e8cSThomas Abraham #define DQS_DELAY		(0 << 4)
542*77b55e8cSThomas Abraham #define CTRL_START_POINT	(0x10 << 8)
543*77b55e8cSThomas Abraham #define CTRL_INC		(0x10 << 16)
544*77b55e8cSThomas Abraham #define CTRL_FORCE		(0x71 << 24)
545*77b55e8cSThomas Abraham #define CONTROL0_VAL		(CTRL_OFF | CTRL_DLL_OFF | CTRL_HALF\
546*77b55e8cSThomas Abraham 				| CTRL_DFDQS | DQS_DELAY | CTRL_START_POINT\
547*77b55e8cSThomas Abraham 				| CTRL_INC | CTRL_FORCE)
548*77b55e8cSThomas Abraham 
549*77b55e8cSThomas Abraham #define CTRL_SHIFTC		(0x6 << 0)
550*77b55e8cSThomas Abraham #define CTRL_REF		(8 << 4)
551*77b55e8cSThomas Abraham #define CTRL_SHGATE		(1 << 29)
552*77b55e8cSThomas Abraham #define TERM_READ_EN		(1 << 30)
553*77b55e8cSThomas Abraham #define TERM_WRITE_EN		(1 << 31)
554*77b55e8cSThomas Abraham #define CONTROL1_VAL		(CTRL_SHIFTC | CTRL_REF | CTRL_SHGATE\
555*77b55e8cSThomas Abraham 				| TERM_READ_EN | TERM_WRITE_EN)
556*77b55e8cSThomas Abraham 
557*77b55e8cSThomas Abraham #define CONTROL2_VAL		0x00000000
558*77b55e8cSThomas Abraham 
559*77b55e8cSThomas Abraham #ifdef CONFIG_ORIGEN
560*77b55e8cSThomas Abraham #define TIMINGREF_VAL		0x000000BB
561*77b55e8cSThomas Abraham #define TIMINGROW_VAL		0x4046654f
562*77b55e8cSThomas Abraham #define	TIMINGDATA_VAL		0x46400506
563*77b55e8cSThomas Abraham #define	TIMINGPOWER_VAL		0x52000A3C
564*77b55e8cSThomas Abraham #else
565*77b55e8cSThomas Abraham #define TIMINGREF_VAL		0x000000BC
566*77b55e8cSThomas Abraham #ifdef DRAM_CLK_330
567*77b55e8cSThomas Abraham #define TIMINGROW_VAL		0x3545548d
568*77b55e8cSThomas Abraham #define	TIMINGDATA_VAL		0x45430506
569*77b55e8cSThomas Abraham #define	TIMINGPOWER_VAL		0x4439033c
570*77b55e8cSThomas Abraham #endif
571*77b55e8cSThomas Abraham #ifdef DRAM_CLK_400
572*77b55e8cSThomas Abraham #define TIMINGROW_VAL		0x45430506
573*77b55e8cSThomas Abraham #define	TIMINGDATA_VAL		0x56500506
574*77b55e8cSThomas Abraham #define	TIMINGPOWER_VAL		0x5444033d
575*77b55e8cSThomas Abraham #endif
576*77b55e8cSThomas Abraham #endif
577*77b55e8cSThomas Abraham #endif
578