aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@mvista.com>2009-06-03 21:41:53 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-08-26 03:56:59 -0400
commit8593790d604c29a717d5914159ce78c7bb9899fb (patch)
tree68176675ac1f1931548cdb282c3cfbff7b69930f /arch/arm/mach-davinci
parent55c79a40e34566e9d198f6205b0cf06e3d89ac0a (diff)
davinci: da8xx: Add support for DA830/OMAP-L137 EVM board
Add support for the DA830/OMAP-L137 Evaluation Module (EVM) from TI. The EVM has User Interface (UI) and Audio cards that can be connected which contain various devices. Support for those devices and ones on the EVM will be added in subsequent patches. Additional generalizations for future SoCs in da8xx family done by Sudhakar Rajashekhara and Sekhar Nori. Signed-off-by: Steve Chen <schen@mvista.com> Signed-off-by: Mark A. Greer <mgreer@mvista.com> Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Cc: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/Kconfig6
-rw-r--r--arch/arm/mach-davinci/Makefile1
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c127
-rw-r--r--arch/arm/mach-davinci/include/mach/debug-macro.S7
-rw-r--r--arch/arm/mach-davinci/include/mach/uncompress.h6
5 files changed, 145 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 312228ed8489..646c569b75e7 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -89,6 +89,12 @@ config MACH_DAVINCI_DM365_EVM
89 Configure this option to specify whether the board used 89 Configure this option to specify whether the board used
90 for development is a DM365 EVM 90 for development is a DM365 EVM
91 91
92config MACH_DAVINCI_DA830_EVM
93 bool "TI DA830/OMAP-L137 Reference Platform"
94 default ARCH_DAVINCI_DA830
95 depends on ARCH_DAVINCI_DA830
96 help
97 Say Y here to select the TI DA830/OMAP-L137 Evaluation Module.
92 98
93config DAVINCI_MUX 99config DAVINCI_MUX
94 bool "DAVINCI multiplexing support" 100 bool "DAVINCI multiplexing support"
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 385638c0a711..d183b11da460 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -26,3 +26,4 @@ obj-$(CONFIG_MACH_DAVINCI_DM355_EVM) += board-dm355-evm.o
26obj-$(CONFIG_MACH_DM355_LEOPARD) += board-dm355-leopard.o 26obj-$(CONFIG_MACH_DM355_LEOPARD) += board-dm355-leopard.o
27obj-$(CONFIG_MACH_DAVINCI_DM6467_EVM) += board-dm646x-evm.o 27obj-$(CONFIG_MACH_DAVINCI_DM6467_EVM) += board-dm646x-evm.o
28obj-$(CONFIG_MACH_DAVINCI_DM365_EVM) += board-dm365-evm.o 28obj-$(CONFIG_MACH_DAVINCI_DM365_EVM) += board-dm365-evm.o
29obj-$(CONFIG_MACH_DAVINCI_DA830_EVM) += board-da830-evm.o
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
new file mode 100644
index 000000000000..0409eb67cfe1
--- /dev/null
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -0,0 +1,127 @@
1/*
2 * TI DA830/OMAP L137 EVM board
3 *
4 * Author: Mark A. Greer <mgreer@mvista.com>
5 * Derived from: arch/arm/mach-davinci/board-dm644x-evm.c
6 *
7 * 2007, 2009 (c) MontaVista Software, Inc. This file is licensed under
8 * the terms of the GNU General Public License version 2. This program
9 * is licensed "as is" without any warranty of any kind, whether express
10 * or implied.
11 */
12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/init.h>
15#include <linux/console.h>
16#include <linux/i2c.h>
17#include <linux/i2c/at24.h>
18
19#include <asm/mach-types.h>
20#include <asm/mach/arch.h>
21
22#include <mach/common.h>
23#include <mach/irqs.h>
24#include <mach/cp_intc.h>
25#include <mach/da8xx.h>
26
27#define DA830_EVM_PHY_MASK 0x0
28#define DA830_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
29
30static struct at24_platform_data da830_evm_i2c_eeprom_info = {
31 .byte_len = SZ_256K / 8,
32 .page_size = 64,
33 .flags = AT24_FLAG_ADDR16,
34 .setup = davinci_get_mac_addr,
35 .context = (void *)0x7f00,
36};
37
38static struct i2c_board_info __initdata da830_evm_i2c_devices[] = {
39 {
40 I2C_BOARD_INFO("24c256", 0x50),
41 .platform_data = &da830_evm_i2c_eeprom_info,
42 },
43};
44
45static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = {
46 .bus_freq = 100, /* kHz */
47 .bus_delay = 0, /* usec */
48};
49
50static struct davinci_uart_config da830_evm_uart_config __initdata = {
51 .enabled_uarts = 0x7,
52};
53
54static __init void da830_evm_init(void)
55{
56 struct davinci_soc_info *soc_info = &davinci_soc_info;
57 int ret;
58
59 ret = da8xx_register_edma();
60 if (ret)
61 pr_warning("da830_evm_init: edma registration failed: %d\n",
62 ret);
63
64 ret = da830_pinmux_setup(da830_i2c0_pins);
65 if (ret)
66 pr_warning("da830_evm_init: i2c0 mux setup failed: %d\n",
67 ret);
68
69 ret = da8xx_register_i2c(0, &da830_evm_i2c_0_pdata);
70 if (ret)
71 pr_warning("da830_evm_init: i2c0 registration failed: %d\n",
72 ret);
73
74 soc_info->emac_pdata->phy_mask = DA830_EVM_PHY_MASK;
75 soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY;
76 soc_info->emac_pdata->rmii_en = 1;
77
78 ret = da830_pinmux_setup(da830_cpgmac_pins);
79 if (ret)
80 pr_warning("da830_evm_init: cpgmac mux setup failed: %d\n",
81 ret);
82
83 ret = da8xx_register_emac();
84 if (ret)
85 pr_warning("da830_evm_init: emac registration failed: %d\n",
86 ret);
87
88 ret = da8xx_register_watchdog();
89 if (ret)
90 pr_warning("da830_evm_init: watchdog registration failed: %d\n",
91 ret);
92
93 davinci_serial_init(&da830_evm_uart_config);
94 i2c_register_board_info(1, da830_evm_i2c_devices,
95 ARRAY_SIZE(da830_evm_i2c_devices));
96}
97
98#ifdef CONFIG_SERIAL_8250_CONSOLE
99static int __init da830_evm_console_init(void)
100{
101 return add_preferred_console("ttyS", 2, "115200");
102}
103console_initcall(da830_evm_console_init);
104#endif
105
106static __init void da830_evm_irq_init(void)
107{
108 struct davinci_soc_info *soc_info = &davinci_soc_info;
109
110 cp_intc_init((void __iomem *)DA8XX_CP_INTC_VIRT, DA830_N_CP_INTC_IRQ,
111 soc_info->intc_irq_prios);
112}
113
114static void __init da830_evm_map_io(void)
115{
116 da830_init();
117}
118
119MACHINE_START(DAVINCI_DA8XX_EVM, "DaVinci DA830/OMAP L137 EVM")
120 .phys_io = IO_PHYS,
121 .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
122 .boot_params = (DA8XX_DDR_BASE + 0x100),
123 .map_io = da830_evm_map_io,
124 .init_irq = da830_evm_irq_init,
125 .timer = &davinci_timer,
126 .init_machine = da830_evm_init,
127MACHINE_END
diff --git a/arch/arm/mach-davinci/include/mach/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S
index de3fc2182b47..69837a67d5f5 100644
--- a/arch/arm/mach-davinci/include/mach/debug-macro.S
+++ b/arch/arm/mach-davinci/include/mach/debug-macro.S
@@ -24,7 +24,14 @@
24 tst \rx, #1 @ MMU enabled? 24 tst \rx, #1 @ MMU enabled?
25 moveq \rx, #0x01000000 @ physical base address 25 moveq \rx, #0x01000000 @ physical base address
26 movne \rx, #0xfe000000 @ virtual base 26 movne \rx, #0xfe000000 @ virtual base
27#if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx)
28#error Cannot enable DaVinci and DA8XX platforms concurrently
29#elif defined(CONFIG_MACH_DAVINCI_DA8XX_EVM)
30 orr \rx, \rx, #0x00d00000 @ physical base address
31 orr \rx, \rx, #0x0000d000 @ of UART 2
32#else
27 orr \rx, \rx, #0x00c20000 @ UART 0 33 orr \rx, \rx, #0x00c20000 @ UART 0
34#endif
28 .endm 35 .endm
29 36
30 .macro senduart,rd,rx 37 .macro senduart,rd,rx
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
index 1e27475f9a23..0f1f12b67875 100644
--- a/arch/arm/mach-davinci/include/mach/uncompress.h
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -21,8 +21,10 @@ static u32 *uart;
21 21
22static u32 *get_uart_base(void) 22static u32 *get_uart_base(void)
23{ 23{
24 /* Add logic here for new platforms, using __macine_arch_type */ 24 if (__machine_arch_type == MACH_TYPE_DAVINCI_DA8XX_EVM)
25 return (u32 *)DAVINCI_UART0_BASE; 25 return (u32 *)DA8XX_UART2_BASE;
26 else
27 return (u32 *)DAVINCI_UART0_BASE;
26} 28}
27 29
28/* PORT_16C550A, in polled non-fifo mode */ 30/* PORT_16C550A, in polled non-fifo mode */