1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * arch/arm/mach-ks8695/include/mach/regs-uart.h
5 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
6 * Copyright (C) 2006 Simtec Electronics
8 * KS8695 - UART register and bit definitions.
14 #define KS8695_UART_OFFSET (0xF0000 + 0xE000)
15 #define KS8695_UART_VA (KS8695_IO_VA + KS8695_UART_OFFSET)
16 #define KS8695_UART_PA (KS8695_IO_PA + KS8695_UART_OFFSET)
22 #define KS8695_URRB (0x00) /* Receive Buffer Register */
23 #define KS8695_URTH (0x04) /* Transmit Holding Register */
24 #define KS8695_URFC (0x08) /* FIFO Control Register */
25 #define KS8695_URLC (0x0C) /* Line Control Register */
26 #define KS8695_URMC (0x10) /* Modem Control Register */
27 #define KS8695_URLS (0x14) /* Line Status Register */
28 #define KS8695_URMS (0x18) /* Modem Status Register */
29 #define KS8695_URBD (0x1C) /* Baud Rate Divisor Register */
30 #define KS8695_USR (0x20) /* Status Register */
33 /* FIFO Control Register */
34 #define URFC_URFRT (3 << 6) /* Receive FIFO Trigger Level */
35 #define URFC_URFRT_1 (0 << 6)
36 #define URFC_URFRT_4 (1 << 6)
37 #define URFC_URFRT_8 (2 << 6)
38 #define URFC_URFRT_14 (3 << 6)
39 #define URFC_URTFR (1 << 2) /* Transmit FIFO Reset */
40 #define URFC_URRFR (1 << 1) /* Receive FIFO Reset */
41 #define URFC_URFE (1 << 0) /* FIFO Enable */
43 /* Line Control Register */
44 #define URLC_URSBC (1 << 6) /* Set Break Condition */
45 #define URLC_PARITY (7 << 3) /* Parity */
46 #define URPE_NONE (0 << 3)
47 #define URPE_ODD (1 << 3)
48 #define URPE_EVEN (3 << 3)
49 #define URPE_MARK (5 << 3)
50 #define URPE_SPACE (7 << 3)
51 #define URLC_URSB (1 << 2) /* Stop Bits */
52 #define URLC_URCL (3 << 0) /* Character Length */
53 #define URCL_5 (0 << 0)
54 #define URCL_6 (1 << 0)
55 #define URCL_7 (2 << 0)
56 #define URCL_8 (3 << 0)
58 /* Modem Control Register */
59 #define URMC_URLB (1 << 4) /* Loop-back mode */
60 #define URMC_UROUT2 (1 << 3) /* OUT2 signal */
61 #define URMC_UROUT1 (1 << 2) /* OUT1 signal */
62 #define URMC_URRTS (1 << 1) /* Request to Send */
63 #define URMC_URDTR (1 << 0) /* Data Terminal Ready */
65 /* Line Status Register */
66 #define URLS_URRFE (1 << 7) /* Receive FIFO Error */
67 #define URLS_URTE (1 << 6) /* Transmit Empty */
68 #define URLS_URTHRE (1 << 5) /* Transmit Holding Register Empty */
69 #define URLS_URBI (1 << 4) /* Break Interrupt */
70 #define URLS_URFE (1 << 3) /* Framing Error */
71 #define URLS_URPE (1 << 2) /* Parity Error */
72 #define URLS_URROE (1 << 1) /* Receive Overrun Error */
73 #define URLS_URDR (1 << 0) /* Receive Data Ready */
75 /* Modem Status Register */
76 #define URMS_URDCD (1 << 7) /* Data Carrier Detect */
77 #define URMS_URRI (1 << 6) /* Ring Indicator */
78 #define URMS_URDSR (1 << 5) /* Data Set Ready */
79 #define URMS_URCTS (1 << 4) /* Clear to Send */
80 #define URMS_URDDCD (1 << 3) /* Delta Data Carrier Detect */
81 #define URMS_URTERI (1 << 2) /* Trailing Edge Ring Indicator */
82 #define URMS_URDDST (1 << 1) /* Delta Data Set Ready */
83 #define URMS_URDCTS (1 << 0) /* Delta Clear to Send */
86 #define USR_UTI (1 << 0) /* Timeout Indication */