• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef PLAT_DT_UART_H
8 #define PLAT_DT_UART_H
9 
10 #define DT_UART_DCC_COMPAT	"arm,dcc"
11 #define DT_UART_CAD_COMPAT	"xlnx,zynqmp-uart"
12 #define DT_UART_PL011_COMPAT	"arm,pl011"
13 
14 /* Default console type is either CADENCE0 or CADENCE1 or PL011_0 or PL011_1
15  * Debug console type is DCC
16  */
17 #define CONSOLE_NONE	0
18 #define CONSOLE_CDNS	1
19 #define CONSOLE_PL011   2
20 #define CONSOLE_DCC	3
21 
22 typedef struct console_hd {
23 	uint32_t clk;
24 	uint32_t baud_rate;
25 	uintptr_t base;
26 	uint32_t console_scope;
27 	uint8_t console_type;
28 } console_holder;
29 
30 typedef struct dt_uart_info_s {
31 	char compatible[30];
32 	uintptr_t base;
33 	uint32_t baud_rate;
34 	uint8_t console_type;
35 } dt_uart_info_t;
36 
37 void setup_console(void);
38 
39 #endif /* PLAT_DT_UART_H */
40