Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 1 | /* |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 2 | * arch/arm/plat-omap/include/mach/serial.h |
| 3 | * |
| 4 | * Copyright (C) 2009 Texas Instruments |
Justin P. Mattock | 42b2aa8 | 2011-11-28 20:31:00 -0800 | [diff] [blame] | 5 | * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef __ASM_ARCH_SERIAL_H |
| 14 | #define __ASM_ARCH_SERIAL_H |
| 15 | |
Paul Walmsley | b3c6df3 | 2009-09-03 20:14:02 +0300 | [diff] [blame] | 16 | #include <linux/init.h> |
| 17 | |
Tony Lindgren | 96554d7 | 2010-04-30 17:39:19 -0700 | [diff] [blame] | 18 | /* |
Nicolas Pitre | dd18545 | 2011-08-31 13:57:37 -0400 | [diff] [blame] | 19 | * Memory entry used for the DEBUG_LL UART configuration, relative to |
| 20 | * start of RAM. See also uncompress.h and debug-macro.S. |
Tony Lindgren | 96554d7 | 2010-04-30 17:39:19 -0700 | [diff] [blame] | 21 | * |
| 22 | * Note that using a memory location for storing the UART configuration |
| 23 | * has at least two limitations: |
| 24 | * |
| 25 | * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the |
| 26 | * uncompress code could then partially overwrite itself |
| 27 | * 2. We assume printascii is called at least once before paging_init, |
| 28 | * and addruart has a chance to read OMAP_UART_INFO |
| 29 | */ |
Nicolas Pitre | dd18545 | 2011-08-31 13:57:37 -0400 | [diff] [blame] | 30 | #define OMAP_UART_INFO_OFS 0x3ffc |
Tony Lindgren | 96554d7 | 2010-04-30 17:39:19 -0700 | [diff] [blame] | 31 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 32 | /* OMAP2 serial ports */ |
Tony Lindgren | 4f2c49f | 2010-02-15 08:48:53 -0800 | [diff] [blame] | 33 | #define OMAP2_UART1_BASE 0x4806a000 |
| 34 | #define OMAP2_UART2_BASE 0x4806c000 |
| 35 | #define OMAP2_UART3_BASE 0x4806e000 |
| 36 | |
Jouni Hogander | 6e81176 | 2008-10-06 15:49:15 +0300 | [diff] [blame] | 37 | /* OMAP3 serial ports */ |
Tony Lindgren | 0c8219f | 2010-02-15 08:49:01 -0800 | [diff] [blame] | 38 | #define OMAP3_UART1_BASE OMAP2_UART1_BASE |
| 39 | #define OMAP3_UART2_BASE OMAP2_UART2_BASE |
Tony Lindgren | 4f2c49f | 2010-02-15 08:48:53 -0800 | [diff] [blame] | 40 | #define OMAP3_UART3_BASE 0x49020000 |
| 41 | #define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */ |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 42 | #define OMAP3_UART4_AM35XX_BASE 0x4809E000 /* Only on AM35xx */ |
Tony Lindgren | 4f2c49f | 2010-02-15 08:48:53 -0800 | [diff] [blame] | 43 | |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 44 | /* OMAP4 serial ports */ |
Tony Lindgren | 0c8219f | 2010-02-15 08:49:01 -0800 | [diff] [blame] | 45 | #define OMAP4_UART1_BASE OMAP2_UART1_BASE |
| 46 | #define OMAP4_UART2_BASE OMAP2_UART2_BASE |
Tony Lindgren | 4f2c49f | 2010-02-15 08:48:53 -0800 | [diff] [blame] | 47 | #define OMAP4_UART3_BASE 0x48020000 |
| 48 | #define OMAP4_UART4_BASE 0x4806e000 |
| 49 | |
Hemant Pedanekar | a920360 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 50 | /* TI81XX serial ports */ |
| 51 | #define TI81XX_UART1_BASE 0x48020000 |
| 52 | #define TI81XX_UART2_BASE 0x48022000 |
| 53 | #define TI81XX_UART3_BASE 0x48024000 |
Hemant Pedanekar | 4d887a2 | 2011-02-15 23:06:17 +0530 | [diff] [blame] | 54 | |
Raphaël Assénat | 5686c4f | 2011-08-09 03:10:12 -0700 | [diff] [blame] | 55 | /* AM3505/3517 UART4 */ |
| 56 | #define AM35XX_UART4_BASE 0x4809E000 /* Only on AM3505/3517 */ |
| 57 | |
Afzal Mohammed | d0a9001 | 2012-05-10 14:23:01 +0530 | [diff] [blame] | 58 | /* AM33XX serial port */ |
| 59 | #define AM33XX_UART1_BASE 0x44E09000 |
| 60 | |
R Sricharan | 05e152c | 2012-06-05 16:21:32 +0530 | [diff] [blame] | 61 | /* OMAP5 serial ports */ |
| 62 | #define OMAP5_UART1_BASE OMAP2_UART1_BASE |
| 63 | #define OMAP5_UART2_BASE OMAP2_UART2_BASE |
| 64 | #define OMAP5_UART3_BASE OMAP4_UART3_BASE |
| 65 | #define OMAP5_UART4_BASE OMAP4_UART4_BASE |
| 66 | #define OMAP5_UART5_BASE 0x48066000 |
| 67 | #define OMAP5_UART6_BASE 0x48068000 |
| 68 | |
Tony Lindgren | 0c8219f | 2010-02-15 08:49:01 -0800 | [diff] [blame] | 69 | /* External port on Zoom2/3 */ |
| 70 | #define ZOOM_UART_BASE 0x10000000 |
Tony Lindgren | a4f57b8 | 2010-04-30 12:57:14 -0700 | [diff] [blame] | 71 | #define ZOOM_UART_VIRT 0xfa400000 |
Tony Lindgren | 0c8219f | 2010-02-15 08:49:01 -0800 | [diff] [blame] | 72 | |
Tony Lindgren | 4f2c49f | 2010-02-15 08:48:53 -0800 | [diff] [blame] | 73 | #define OMAP_PORT_SHIFT 2 |
Tony Lindgren | 0c8219f | 2010-02-15 08:49:01 -0800 | [diff] [blame] | 74 | #define ZOOM_PORT_SHIFT 1 |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 75 | |
Jouni Hogander | 6e81176 | 2008-10-06 15:49:15 +0300 | [diff] [blame] | 76 | #define OMAP24XX_BASE_BAUD (48000000/16) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 77 | |
Tony Lindgren | 0c8219f | 2010-02-15 08:49:01 -0800 | [diff] [blame] | 78 | /* |
| 79 | * DEBUG_LL port encoding stored into the UART1 scratchpad register by |
| 80 | * decomp_setup in uncompress.h |
| 81 | */ |
Tony Lindgren | 0c8219f | 2010-02-15 08:49:01 -0800 | [diff] [blame] | 82 | #define OMAP2UART1 21 |
| 83 | #define OMAP2UART2 22 |
| 84 | #define OMAP2UART3 23 |
| 85 | #define OMAP3UART1 OMAP2UART1 |
| 86 | #define OMAP3UART2 OMAP2UART2 |
| 87 | #define OMAP3UART3 33 |
| 88 | #define OMAP3UART4 34 /* Only on 36xx */ |
| 89 | #define OMAP4UART1 OMAP2UART1 |
| 90 | #define OMAP4UART2 OMAP2UART2 |
| 91 | #define OMAP4UART3 43 |
| 92 | #define OMAP4UART4 44 |
Hemant Pedanekar | a920360 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 93 | #define TI81XXUART1 81 |
| 94 | #define TI81XXUART2 82 |
| 95 | #define TI81XXUART3 83 |
Afzal Mohammed | d0a9001 | 2012-05-10 14:23:01 +0530 | [diff] [blame] | 96 | #define AM33XXUART1 84 |
R Sricharan | 05e152c | 2012-06-05 16:21:32 +0530 | [diff] [blame] | 97 | #define OMAP5UART3 OMAP4UART3 |
| 98 | #define OMAP5UART4 OMAP4UART4 |
Tony Lindgren | 0c8219f | 2010-02-15 08:49:01 -0800 | [diff] [blame] | 99 | #define ZOOM_UART 95 /* Only on zoom2/3 */ |
| 100 | |
Kevin Hilman | 4af4016 | 2009-02-04 10:51:40 -0800 | [diff] [blame] | 101 | #ifndef __ASSEMBLER__ |
Tony Lindgren | 40e4439 | 2010-12-22 18:42:35 -0800 | [diff] [blame] | 102 | |
| 103 | struct omap_board_data; |
Deepak K | c86845db | 2011-11-09 17:33:38 +0530 | [diff] [blame] | 104 | struct omap_uart_port_info; |
Tony Lindgren | 40e4439 | 2010-12-22 18:42:35 -0800 | [diff] [blame] | 105 | |
Kevin Hilman | 4af4016 | 2009-02-04 10:51:40 -0800 | [diff] [blame] | 106 | extern void omap_serial_init(void); |
Deepak K | c86845db | 2011-11-09 17:33:38 +0530 | [diff] [blame] | 107 | extern void omap_serial_board_init(struct omap_uart_port_info *platform_data); |
| 108 | extern void omap_serial_init_port(struct omap_board_data *bdata, |
| 109 | struct omap_uart_port_info *platform_data); |
Kevin Hilman | 4af4016 | 2009-02-04 10:51:40 -0800 | [diff] [blame] | 110 | #endif |
| 111 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 112 | #endif |