1/*
2 * Copyright 2017, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
8 * See "LICENSE_BSD2.txt" for details.
9 *
10 * @TAG(DATA61_BSD)
11 */
12
13#pragma once
14
15#include <autoconf.h>
16#include <platsupport/gen_config.h>
17
18#define EXYNOS_UART0_PADDR  0x12C00000
19#define EXYNOS_UART1_PADDR  0x12C10000
20#define EXYNOS_UART2_PADDR  0x12C20000
21#define EXYNOS_UART3_PADDR  0x12C30000
22
23#define EXYNOS_UART0_IRQ    83
24#define EXYNOS_UART1_IRQ    84
25#define EXYNOS_UART2_IRQ    85
26#define EXYNOS_UART3_IRQ    86
27
28#if defined(CONFIG_PLAT_EXYNOS5250)
29#define UART_DEFAULT_FIN    100000000
30#elif defined(CONFIG_PLAT_EXYNOS5410)
31#define UART_DEFAULT_FIN     64000000
32#elif defined(CONFIG_PLAT_EXYNOS5422)
33#define UART_DEFAULT_FIN  53200000
34#else
35#error Unknown platform
36#endif
37
38/* official device names */
39enum chardev_id {
40    PS_SERIAL0,
41    PS_SERIAL1,
42    PS_SERIAL2,
43    PS_SERIAL3,
44    PS_NSERIAL,
45    /* defaults */
46    PS_SERIAL_DEFAULT = PS_SERIAL2
47};
48
49#include <platsupport/mach/serial.h>
50
51#define DEFAULT_SERIAL_PADDR EXYNOS_UART2_PADDR
52#define DEFAULT_SERIAL_INTERRUPT EXYNOS_UART2_IRQ
53