Debian Codegraph @

src/ec/lenovo/mec1653/uart.h

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #ifndef EC_LENOVO_MEC1653_UART_H
4 #define EC_LENOVO_MEC1653_UART_H
5
6 #define MEC_CFG_ENTRY_KEY 0x55
7 #define MEC_CFG_EXIT_KEY 0xaa
8
9 #define UART_PORT 0x3f8
10 #define UART_IRQ 4
11
12 #define MEC1653_CFG_REG 0xf0c400
13 #define MEC1653_CFG_TX_GPIO_OFFSET 0x110
14 #define MEC1653_CFG_RX_GPIO_OFFSET 0x114
15
16 // EC configuration base address
17 #define EC_CFG_PORT 0x4e
18
19 // Chip global registers
20 #define PNP_LDN_SELECT 0x07
21 # define LDN_UART 0x07
22 # define LDN_LPCIF 0x0c
23
24 // LPC I/F registers
25 #define LPCIF_SIRQ(i) (0x40 + (i))
26
27 #define LPCIF_BAR_UART 0x80
28
29 // UART registers
30 #define UART_ACTIVATE 0x30
31 #define UART_CONFIG_SELECT 0xf0
32
33 void mec1653_configure_uart(void);
34
35 #endif /* EC_LENOVO_MEC1653_UART_H */