blob: d949ad27b848220b341f3c39430eaf7a189e967f [file] [log] [blame]
Chander Kashyap0e7ab682011-08-18 22:37:19 +00001/*
2 * Machine Specific Values for ORIGEN board based on S5PV310
3 *
4 * Copyright (C) 2011 Samsung Electronics
5 *
6 * See file CREDITS for list of people who contributed to this
7 * project.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 * MA 02111-1307 USA
23 */
24
25#ifndef _ORIGEN_SETUP_H
26#define _ORIGEN_SETUP_H
27
28#include <config.h>
29#include <version.h>
30#include <asm/arch/cpu.h>
31
32/* Offsets of clock registers (sources and dividers) */
33#define CLK_SRC_CPU_OFFSET 0x14200
34#define CLK_DIV_CPU0_OFFSET 0x14500
35#define CLK_DIV_CPU1_OFFSET 0x14504
36
37#define CLK_SRC_DMC_OFFSET 0x10200
38#define CLK_DIV_DMC0_OFFSET 0x10500
39#define CLK_DIV_DMC1_OFFSET 0x10504
40
41#define CLK_SRC_TOP0_OFFSET 0xC210
42#define CLK_SRC_TOP1_OFFSET 0xC214
43#define CLK_DIV_TOP_OFFSET 0xC510
44
45#define CLK_SRC_LEFTBUS_OFFSET 0x4200
46#define CLK_DIV_LEFTBUS_OFFSET 0x4500
47
48#define CLK_SRC_RIGHTBUS_OFFSET 0x8200
49#define CLK_DIV_RIGHTBUS_OFFSET 0x8500
50
51#define CLK_SRC_FSYS_OFFSET 0xC240
52#define CLK_DIV_FSYS1_OFFSET 0xC544
53#define CLK_DIV_FSYS2_OFFSET 0xC548
54#define CLK_DIV_FSYS3_OFFSET 0xC54C
55
56#define CLK_SRC_PERIL0_OFFSET 0xC250
57#define CLK_DIV_PERIL0_OFFSET 0xC550
58
59#define APLL_LOCK_OFFSET 0x14000
60#define MPLL_LOCK_OFFSET 0x14008
61#define APLL_CON0_OFFSET 0x14100
62#define APLL_CON1_OFFSET 0x14104
63#define MPLL_CON0_OFFSET 0x14108
64#define MPLL_CON1_OFFSET 0x1410C
65
66#define EPLL_LOCK_OFFSET 0xC010
67#define VPLL_LOCK_OFFSET 0xC020
68#define EPLL_CON0_OFFSET 0xC110
69#define EPLL_CON1_OFFSET 0xC114
70#define VPLL_CON0_OFFSET 0xC120
71#define VPLL_CON1_OFFSET 0xC124
72
73/* DMC: DRAM Controllor Register offsets */
74#define DMC_CONCONTROL 0x00
75#define DMC_MEMCONTROL 0x04
76#define DMC_MEMCONFIG0 0x08
77#define DMC_MEMCONFIG1 0x0C
78#define DMC_DIRECTCMD 0x10
79#define DMC_PRECHCONFIG 0x14
80#define DMC_PHYCONTROL0 0x18
81#define DMC_PHYCONTROL1 0x1C
82#define DMC_PHYCONTROL2 0x20
83#define DMC_TIMINGAREF 0x30
84#define DMC_TIMINGROW 0x34
85#define DMC_TIMINGDATA 0x38
86#define DMC_TIMINGPOWER 0x3C
87#define DMC_PHYZQCONTROL 0x44
88
89/* Bus Configuration Register Address */
90#define ASYNC_CONFIG 0x10010350
91
92/* MIU Config Register Offsets*/
93#define APB_SFR_INTERLEAVE_CONF_OFFSET 0x400
94#define APB_SFR_ARBRITATION_CONF_OFFSET 0xC00
95
96/* Offset for inform registers */
97#define INFORM0_OFFSET 0x800
98#define INFORM1_OFFSET 0x804
99
100/* GPIO Offsets for UART: GPIO Contol Register */
Chander Kashyap4131a772011-12-06 23:34:12 +0000101#define EXYNOS4_GPIO_A0_CON_OFFSET 0x00
102#define EXYNOS4_GPIO_A1_CON_OFFSET 0x20
Chander Kashyap0e7ab682011-08-18 22:37:19 +0000103
104/* UART Register offsets */
105#define ULCON_OFFSET 0x00
106#define UCON_OFFSET 0x04
107#define UFCON_OFFSET 0x08
108#define UBRDIV_OFFSET 0x28
109#define UFRACVAL_OFFSET 0x2C
110
111/* TZPC : Register Offsets */
112#define TZPC0_BASE 0x10110000
113#define TZPC1_BASE 0x10120000
114#define TZPC2_BASE 0x10130000
115#define TZPC3_BASE 0x10140000
116#define TZPC4_BASE 0x10150000
117#define TZPC5_BASE 0x10160000
118
119#define TZPC_DECPROT0SET_OFFSET 0x804
120#define TZPC_DECPROT1SET_OFFSET 0x810
121#define TZPC_DECPROT2SET_OFFSET 0x81C
122#define TZPC_DECPROT3SET_OFFSET 0x828
123
124/* CLK_SRC_CPU */
125#define MUX_HPM_SEL_MOUTAPLL 0x0
126#define MUX_HPM_SEL_SCLKMPLL 0x1
127#define MUX_CORE_SEL_MOUTAPLL 0x0
128#define MUX_CORE_SEL_SCLKMPLL 0x1
129#define MUX_MPLL_SEL_FILPLL 0x0
130#define MUX_MPLL_SEL_MOUTMPLLFOUT 0x1
131#define MUX_APLL_SEL_FILPLL 0x0
132#define MUX_APLL_SEL_MOUTMPLLFOUT 0x1
133#define CLK_SRC_CPU_VAL ((MUX_HPM_SEL_MOUTAPLL << 20) \
134 | (MUX_CORE_SEL_MOUTAPLL << 16) \
135 | (MUX_MPLL_SEL_MOUTMPLLFOUT << 8)\
136 | (MUX_APLL_SEL_MOUTMPLLFOUT << 0))
137
138/* CLK_DIV_CPU0 */
139#define APLL_RATIO 0x0
140#define PCLK_DBG_RATIO 0x1
141#define ATB_RATIO 0x3
142#define PERIPH_RATIO 0x3
143#define COREM1_RATIO 0x7
144#define COREM0_RATIO 0x3
145#define CORE_RATIO 0x0
146#define CLK_DIV_CPU0_VAL ((APLL_RATIO << 24) \
147 | (PCLK_DBG_RATIO << 20) \
148 | (ATB_RATIO << 16) \
149 | (PERIPH_RATIO << 12) \
150 | (COREM1_RATIO << 8) \
151 | (COREM0_RATIO << 4) \
152 | (CORE_RATIO << 0))
153
154/* CLK_DIV_CPU1 */
155#define HPM_RATIO 0x0
156#define COPY_RATIO 0x3
157#define CLK_DIV_CPU1_VAL ((HPM_RATIO << 4) | (COPY_RATIO))
158
159/* CLK_SRC_DMC */
160#define MUX_PWI_SEL_XXTI 0x0
161#define MUX_PWI_SEL_XUSBXTI 0x1
162#define MUX_PWI_SEL_SCLK_HDMI24M 0x2
163#define MUX_PWI_SEL_SCLK_USBPHY0 0x3
164#define MUX_PWI_SEL_SCLK_USBPHY1 0x4
165#define MUX_PWI_SEL_SCLK_HDMIPHY 0x5
166#define MUX_PWI_SEL_SCLKMPLL 0x6
167#define MUX_PWI_SEL_SCLKEPLL 0x7
168#define MUX_PWI_SEL_SCLKVPLL 0x8
169#define MUX_DPHY_SEL_SCLKMPLL 0x0
170#define MUX_DPHY_SEL_SCLKAPLL 0x1
171#define MUX_DMC_BUS_SEL_SCLKMPLL 0x0
172#define MUX_DMC_BUS_SEL_SCLKAPLL 0x1
173#define CLK_SRC_DMC_VAL ((MUX_PWI_SEL_XUSBXTI << 16) \
174 | (MUX_DPHY_SEL_SCLKMPLL << 8) \
175 | (MUX_DMC_BUS_SEL_SCLKMPLL << 4))
176
177/* CLK_DIV_DMC0 */
178#define CORE_TIMERS_RATIO 0x1
179#define COPY2_RATIO 0x3
180#define DMCP_RATIO 0x1
181#define DMCD_RATIO 0x1
182#define DMC_RATIO 0x1
183#define DPHY_RATIO 0x1
184#define ACP_PCLK_RATIO 0x1
185#define ACP_RATIO 0x3
186#define CLK_DIV_DMC0_VAL ((CORE_TIMERS_RATIO << 28) \
187 | (COPY2_RATIO << 24) \
188 | (DMCP_RATIO << 20) \
189 | (DMCD_RATIO << 16) \
190 | (DMC_RATIO << 12) \
191 | (DPHY_RATIO << 8) \
192 | (ACP_PCLK_RATIO << 4) \
193 | (ACP_RATIO << 0))
194
195/* CLK_DIV_DMC1 */
196#define DPM_RATIO 0x1
197#define DVSEM_RATIO 0x1
198#define PWI_RATIO 0x1
199#define CLK_DIV_DMC1_VAL ((DPM_RATIO << 24) \
200 | (DVSEM_RATIO << 16) \
201 | (PWI_RATIO << 8))
202
203/* CLK_SRC_TOP0 */
204#define MUX_ONENAND_SEL_ACLK_133 0x0
205#define MUX_ONENAND_SEL_ACLK_160 0x1
206#define MUX_ACLK_133_SEL_SCLKMPLL 0x0
207#define MUX_ACLK_133_SEL_SCLKAPLL 0x1
208#define MUX_ACLK_160_SEL_SCLKMPLL 0x0
209#define MUX_ACLK_160_SEL_SCLKAPLL 0x1
210#define MUX_ACLK_100_SEL_SCLKMPLL 0x0
211#define MUX_ACLK_100_SEL_SCLKAPLL 0x1
212#define MUX_ACLK_200_SEL_SCLKMPLL 0x0
213#define MUX_ACLK_200_SEL_SCLKAPLL 0x1
214#define MUX_VPLL_SEL_FINPLL 0x0
215#define MUX_VPLL_SEL_FOUTVPLL 0x1
216#define MUX_EPLL_SEL_FINPLL 0x0
217#define MUX_EPLL_SEL_FOUTEPLL 0x1
218#define MUX_ONENAND_1_SEL_MOUTONENAND 0x0
219#define MUX_ONENAND_1_SEL_SCLKVPLL 0x1
220#define CLK_SRC_TOP0_VAL ((MUX_ONENAND_SEL_ACLK_133 << 28) \
221 | (MUX_ACLK_133_SEL_SCLKMPLL << 24) \
222 | (MUX_ACLK_160_SEL_SCLKMPLL << 20) \
223 | (MUX_ACLK_100_SEL_SCLKMPLL << 16) \
224 | (MUX_ACLK_200_SEL_SCLKMPLL << 12) \
225 | (MUX_VPLL_SEL_FINPLL << 8) \
226 | (MUX_EPLL_SEL_FINPLL << 4)\
227 | (MUX_ONENAND_1_SEL_MOUTONENAND << 0))
228
229/* CLK_SRC_TOP1 */
230#define VPLLSRC_SEL_FINPLL 0x0
231#define VPLLSRC_SEL_SCLKHDMI24M 0x1
232#define CLK_SRC_TOP1_VAL (VPLLSRC_SEL_FINPLL)
233
234/* CLK_DIV_TOP */
235#define ONENAND_RATIO 0x0
236#define ACLK_133_RATIO 0x5
237#define ACLK_160_RATIO 0x4
238#define ACLK_100_RATIO 0x7
239#define ACLK_200_RATIO 0x3
240#define CLK_DIV_TOP_VAL ((ONENAND_RATIO << 16) \
241 | (ACLK_133_RATIO << 12)\
242 | (ACLK_160_RATIO << 8) \
243 | (ACLK_100_RATIO << 4) \
244 | (ACLK_200_RATIO << 0))
245
246/* CLK_SRC_LEFTBUS */
247#define MUX_GDL_SEL_SCLKMPLL 0x0
248#define MUX_GDL_SEL_SCLKAPLL 0x1
249#define CLK_SRC_LEFTBUS_VAL (MUX_GDL_SEL_SCLKMPLL)
250
251/* CLK_DIV_LEFTBUS */
252#define GPL_RATIO 0x1
253#define GDL_RATIO 0x3
254#define CLK_DIV_LEFTBUS_VAL ((GPL_RATIO << 4) | (GDL_RATIO))
255
256/* CLK_SRC_RIGHTBUS */
257#define MUX_GDR_SEL_SCLKMPLL 0x0
258#define MUX_GDR_SEL_SCLKAPLL 0x1
259#define CLK_SRC_RIGHTBUS_VAL (MUX_GDR_SEL_SCLKMPLL)
260
261/* CLK_DIV_RIGHTBUS */
262#define GPR_RATIO 0x1
263#define GDR_RATIO 0x3
264#define CLK_DIV_RIGHTBUS_VAL ((GPR_RATIO << 4) | (GDR_RATIO))
265
266/* CLK_SRS_FSYS: 6 = SCLKMPLL */
267#define SATA_SEL_SCLKMPLL 0
268#define SATA_SEL_SCLKAPLL 1
269
270#define MMC_SEL_XXTI 0
271#define MMC_SEL_XUSBXTI 1
272#define MMC_SEL_SCLK_HDMI24M 2
273#define MMC_SEL_SCLK_USBPHY0 3
274#define MMC_SEL_SCLK_USBPHY1 4
275#define MMC_SEL_SCLK_HDMIPHY 5
276#define MMC_SEL_SCLKMPLL 6
277#define MMC_SEL_SCLKEPLL 7
278#define MMC_SEL_SCLKVPLL 8
279
280#define MMCC0_SEL MMC_SEL_SCLKMPLL
281#define MMCC1_SEL MMC_SEL_SCLKMPLL
282#define MMCC2_SEL MMC_SEL_SCLKMPLL
283#define MMCC3_SEL MMC_SEL_SCLKMPLL
284#define MMCC4_SEL MMC_SEL_SCLKMPLL
285#define CLK_SRC_FSYS_VAL ((SATA_SEL_SCLKMPLL << 24) \
286 | (MMCC4_SEL << 16) \
287 | (MMCC3_SEL << 12) \
288 | (MMCC2_SEL << 8) \
289 | (MMCC1_SEL << 4) \
290 | (MMCC0_SEL << 0))
291
292/* SCLK_MMC[0-4] = MOUTMMC[0-4]/(MMC[0-4]_RATIO + 1)/(MMC[0-4]_PRE_RATIO +1) */
293/* CLK_DIV_FSYS1 */
294#define MMC0_RATIO 0xF
295#define MMC0_PRE_RATIO 0x0
296#define MMC1_RATIO 0xF
297#define MMC1_PRE_RATIO 0x0
298#define CLK_DIV_FSYS1_VAL ((MMC1_PRE_RATIO << 24) \
299 | (MMC1_RATIO << 16) \
300 | (MMC0_PRE_RATIO << 8) \
301 | (MMC0_RATIO << 0))
302
303/* CLK_DIV_FSYS2 */
304#define MMC2_RATIO 0xF
305#define MMC2_PRE_RATIO 0x0
306#define MMC3_RATIO 0xF
307#define MMC3_PRE_RATIO 0x0
308#define CLK_DIV_FSYS2_VAL ((MMC3_PRE_RATIO << 24) \
309 | (MMC3_RATIO << 16) \
310 | (MMC2_PRE_RATIO << 8) \
311 | (MMC2_RATIO << 0))
312
313/* CLK_DIV_FSYS3 */
314#define MMC4_RATIO 0xF
315#define MMC4_PRE_RATIO 0x0
316#define CLK_DIV_FSYS3_VAL ((MMC4_PRE_RATIO << 8) \
317 | (MMC4_RATIO << 0))
318
319/* CLK_SRC_PERIL0 */
320#define UART_SEL_XXTI 0
321#define UART_SEL_XUSBXTI 1
322#define UART_SEL_SCLK_HDMI24M 2
323#define UART_SEL_SCLK_USBPHY0 3
324#define UART_SEL_SCLK_USBPHY1 4
325#define UART_SEL_SCLK_HDMIPHY 5
326#define UART_SEL_SCLKMPLL 6
327#define UART_SEL_SCLKEPLL 7
328#define UART_SEL_SCLKVPLL 8
329
330#define UART0_SEL UART_SEL_SCLKMPLL
331#define UART1_SEL UART_SEL_SCLKMPLL
332#define UART2_SEL UART_SEL_SCLKMPLL
333#define UART3_SEL UART_SEL_SCLKMPLL
334#define UART4_SEL UART_SEL_SCLKMPLL
335#define CLK_SRC_PERIL0_VAL ((UART4_SEL << 16) \
336 | (UART3_SEL << 12) \
337 | (UART2_SEL << 8) \
338 | (UART1_SEL << 4) \
339 | (UART0_SEL << 0))
340
341/* SCLK_UART[0-4] = MOUTUART[0-4]/(UART[0-4]_RATIO + 1) */
342/* CLK_DIV_PERIL0 */
343#define UART0_RATIO 7
344#define UART1_RATIO 7
345#define UART2_RATIO 7
346#define UART3_RATIO 7
347#define UART4_RATIO 7
348#define CLK_DIV_PERIL0_VAL ((UART4_RATIO << 16) \
349 | (UART3_RATIO << 12) \
350 | (UART2_RATIO << 8) \
351 | (UART1_RATIO << 4) \
352 | (UART0_RATIO << 0))
353
354/* Required period to generate a stable clock output */
355/* PLL_LOCK_TIME */
356#define PLL_LOCKTIME 0x1C20
357
358/* PLL Values */
359#define DISABLE 0
360#define ENABLE 1
361#define SET_PLL(mdiv, pdiv, sdiv) ((ENABLE << 31)\
362 | (mdiv << 16) \
363 | (pdiv << 8) \
364 | (sdiv << 0))
365
366/* APLL_CON0 */
367#define APLL_MDIV 0xFA
368#define APLL_PDIV 0x6
369#define APLL_SDIV 0x1
370#define APLL_CON0_VAL SET_PLL(APLL_MDIV, APLL_PDIV, APLL_SDIV)
371
372/* APLL_CON1 */
373#define APLL_AFC_ENB 0x1
374#define APLL_AFC 0xC
375#define APLL_CON1_VAL ((APLL_AFC_ENB << 31) | (APLL_AFC << 0))
376
377/* MPLL_CON0 */
378#define MPLL_MDIV 0xC8
379#define MPLL_PDIV 0x6
380#define MPLL_SDIV 0x1
381#define MPLL_CON0_VAL SET_PLL(MPLL_MDIV, MPLL_PDIV, MPLL_SDIV)
382
383/* MPLL_CON1 */
384#define MPLL_AFC_ENB 0x0
385#define MPLL_AFC 0x1C
386#define MPLL_CON1_VAL ((MPLL_AFC_ENB << 31) | (MPLL_AFC << 0))
387
388/* EPLL_CON0 */
389#define EPLL_MDIV 0x30
390#define EPLL_PDIV 0x3
391#define EPLL_SDIV 0x2
392#define EPLL_CON0_VAL SET_PLL(EPLL_MDIV, EPLL_PDIV, EPLL_SDIV)
393
394/* EPLL_CON1 */
395#define EPLL_K 0x0
396#define EPLL_CON1_VAL (EPLL_K >> 0)
397
398/* VPLL_CON0 */
399#define VPLL_MDIV 0x35
400#define VPLL_PDIV 0x3
401#define VPLL_SDIV 0x2
402#define VPLL_CON0_VAL SET_PLL(VPLL_MDIV, VPLL_PDIV, VPLL_SDIV)
403
404/* VPLL_CON1 */
405#define VPLL_SSCG_EN DISABLE
406#define VPLL_SEL_PF_DN_SPREAD 0x0
407#define VPLL_MRR 0x11
408#define VPLL_MFR 0x0
409#define VPLL_K 0x400
410#define VPLL_CON1_VAL ((VPLL_SSCG_EN << 31)\
411 | (VPLL_SEL_PF_DN_SPREAD << 29) \
412 | (VPLL_MRR << 24) \
413 | (VPLL_MFR << 16) \
414 | (VPLL_K << 0))
415/*
416 * UART GPIO_A0/GPIO_A1 Control Register Value
417 * 0x2: UART Function
418 */
Chander Kashyap4131a772011-12-06 23:34:12 +0000419#define EXYNOS4_GPIO_A0_CON_VAL 0x22222222
420#define EXYNOS4_GPIO_A1_CON_VAL 0x222222
Chander Kashyap0e7ab682011-08-18 22:37:19 +0000421
422/* ULCON: UART Line Control Value 8N1 */
423#define WORD_LEN_5_BIT 0x00
424#define WORD_LEN_6_BIT 0x01
425#define WORD_LEN_7_BIT 0x02
426#define WORD_LEN_8_BIT 0x03
427
428#define STOP_BIT_1 0x00
429#define STOP_BIT_2 0x01
430
431#define NO_PARITY 0x00
432#define ODD_PARITY 0x4
433#define EVEN_PARITY 0x5
434#define FORCED_PARITY_CHECK_AS_1 0x6
435#define FORCED_PARITY_CHECK_AS_0 0x7
436
437#define INFRAMODE_NORMAL 0x00
438#define INFRAMODE_INFRARED 0x01
439
440#define ULCON_VAL ((INFRAMODE_NORMAL << 6) \
441 | (NO_PARITY << 3) \
442 | (STOP_BIT_1 << 2) \
443 | (WORD_LEN_8_BIT << 0))
444
445/*
446 * UCON: UART Control Value
447 * Tx_interrupt Type: Level
448 * Rx_interrupt Type: Level
449 * Rx Timeout Enabled: Yes
450 * Rx-Error Atatus_Int Enable: Yes
451 * Loop_Back: No
452 * Break Signal: No
453 * Transmit mode : Interrupt request/polling
454 * Receive mode : Interrupt request/polling
455 */
456#define TX_PULSE_INTERRUPT 0
457#define TX_LEVEL_INTERRUPT 1
458#define RX_PULSE_INTERRUPT 0
459#define RX_LEVEL_INTERRUPT 1
460
461#define RX_TIME_OUT ENABLE
462#define RX_ERROR_STATE_INT_ENB ENABLE
463#define LOOP_BACK DISABLE
464#define BREAK_SIGNAL DISABLE
465
466#define TX_MODE_DISABLED 0X00
467#define TX_MODE_IRQ_OR_POLL 0X01
468#define TX_MODE_DMA 0X02
469
470#define RX_MODE_DISABLED 0X00
471#define RX_MODE_IRQ_OR_POLL 0X01
472#define RX_MODE_DMA 0X02
473
474#define UCON_VAL ((TX_LEVEL_INTERRUPT << 9) \
475 | (RX_LEVEL_INTERRUPT << 8) \
476 | (RX_TIME_OUT << 7) \
477 | (RX_ERROR_STATE_INT_ENB << 6) \
478 | (LOOP_BACK << 5) \
479 | (BREAK_SIGNAL << 4) \
480 | (TX_MODE_IRQ_OR_POLL << 2) \
481 | (RX_MODE_IRQ_OR_POLL << 0))
482
483/*
484 * UFCON: UART FIFO Control Value
485 * Tx FIFO Trigger LEVEL: 2 Bytes (001)
486 * Rx FIFO Trigger LEVEL: 2 Bytes (001)
487 * Tx Fifo Reset: No
488 * Rx Fifo Reset: No
489 * FIFO Enable: Yes
490 */
491#define TX_FIFO_TRIGGER_LEVEL_0_BYTES 0x00
492#define TX_FIFO_TRIGGER_LEVEL_2_BYTES 0x1
493#define TX_FIFO_TRIGGER_LEVEL_4_BYTES 0x2
494#define TX_FIFO_TRIGGER_LEVEL_6_BYTES 0x3
495#define TX_FIFO_TRIGGER_LEVEL_8_BYTES 0x4
496#define TX_FIFO_TRIGGER_LEVEL_10_BYTES 0x5
497#define TX_FIFO_TRIGGER_LEVEL_12_BYTES 0x6
498#define TX_FIFO_TRIGGER_LEVEL_14_BYTES 0x7
499
500#define RX_FIFO_TRIGGER_LEVEL_2_BYTES 0x0
501#define RX_FIFO_TRIGGER_LEVEL_4_BYTES 0x1
502#define RX_FIFO_TRIGGER_LEVEL_6_BYTES 0x2
503#define RX_FIFO_TRIGGER_LEVEL_8_BYTES 0x3
504#define RX_FIFO_TRIGGER_LEVEL_10_BYTES 0x4
505#define RX_FIFO_TRIGGER_LEVEL_12_BYTES 0x5
506#define RX_FIFO_TRIGGER_LEVEL_14_BYTES 0x6
507#define RX_FIFO_TRIGGER_LEVEL_16_BYTES 0x7
508
509#define TX_FIFO_TRIGGER_LEVEL TX_FIFO_TRIGGER_LEVEL_2_BYTES
510#define RX_FIFO_TRIGGER_LEVEL RX_FIFO_TRIGGER_LEVEL_4_BYTES
511#define TX_FIFO_RESET DISABLE
512#define RX_FIFO_RESET DISABLE
513#define FIFO_ENABLE ENABLE
514#define UFCON_VAL ((TX_FIFO_TRIGGER_LEVEL << 8) \
515 | (RX_FIFO_TRIGGER_LEVEL << 4) \
516 | (TX_FIFO_RESET << 2) \
517 | (RX_FIFO_RESET << 1) \
518 | (FIFO_ENABLE << 0))
519/*
520 * Baud Rate Division Value
521 * 115200 BAUD:
522 * UBRDIV_VAL = SCLK_UART/((115200 * 16) - 1)
523 * UBRDIV_VAL = (800 MHz)/((115200 * 16) - 1)
524 */
525#define UBRDIV_VAL 0x35
526
527/*
528 * Fractional Part of Baud Rate Divisor:
529 * 115200 BAUD:
530 * UBRFRACVAL = ((((SCLK_UART*10/(115200*16) -10))%10)*16/10)
531 * UBRFRACVAL = ((((800MHz*10/(115200*16) -10))%10)*16/10)
532 */
533#define UFRACVAL_VAL 0x4
534
535/*
536 * TZPC Register Value :
537 * R0SIZE: 0x0 : Size of secured ram
538 */
539#define R0SIZE 0x0
540
541/*
542 * TZPC Decode Protection Register Value :
543 * DECPROTXSET: 0xFF : Set Decode region to non-secure
544 */
545#define DECPROTXSET 0xFF
546#endif