aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx35_3ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx35_3ds.c')
-rw-r--r--arch/arm/mach-mx3/mach-mx35_3ds.c122
1 files changed, 122 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
new file mode 100644
index 000000000000..66ad2da36539
--- /dev/null
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -0,0 +1,122 @@
1/*
2 * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
4 * Author: Fabio Estevam <fabio.estevam@freescale.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * This machine is known as:
23 * - i.MX35 3-Stack Development System
24 * - i.MX35 Platform Development Kit (i.MX35 PDK)
25 */
26
27#include <linux/types.h>
28#include <linux/init.h>
29#include <linux/platform_device.h>
30#include <linux/memory.h>
31#include <linux/gpio.h>
32#include <linux/fsl_devices.h>
33
34#include <asm/mach-types.h>
35#include <asm/mach/arch.h>
36#include <asm/mach/time.h>
37#include <asm/mach/map.h>
38
39#include <mach/hardware.h>
40#include <mach/common.h>
41#include <mach/imx-uart.h>
42#include <mach/iomux-mx35.h>
43
44#include "devices.h"
45
46static struct imxuart_platform_data uart_pdata = {
47 .flags = IMXUART_HAVE_RTSCTS,
48};
49
50static struct platform_device *devices[] __initdata = {
51 &mxc_fec_device,
52};
53
54static struct pad_desc mx35pdk_pads[] = {
55 /* UART1 */
56 MX35_PAD_CTS1__UART1_CTS,
57 MX35_PAD_RTS1__UART1_RTS,
58 MX35_PAD_TXD1__UART1_TXD_MUX,
59 MX35_PAD_RXD1__UART1_RXD_MUX,
60 /* FEC */
61 MX35_PAD_FEC_TX_CLK__FEC_TX_CLK,
62 MX35_PAD_FEC_RX_CLK__FEC_RX_CLK,
63 MX35_PAD_FEC_RX_DV__FEC_RX_DV,
64 MX35_PAD_FEC_COL__FEC_COL,
65 MX35_PAD_FEC_RDATA0__FEC_RDATA_0,
66 MX35_PAD_FEC_TDATA0__FEC_TDATA_0,
67 MX35_PAD_FEC_TX_EN__FEC_TX_EN,
68 MX35_PAD_FEC_MDC__FEC_MDC,
69 MX35_PAD_FEC_MDIO__FEC_MDIO,
70 MX35_PAD_FEC_TX_ERR__FEC_TX_ERR,
71 MX35_PAD_FEC_RX_ERR__FEC_RX_ERR,
72 MX35_PAD_FEC_CRS__FEC_CRS,
73 MX35_PAD_FEC_RDATA1__FEC_RDATA_1,
74 MX35_PAD_FEC_TDATA1__FEC_TDATA_1,
75 MX35_PAD_FEC_RDATA2__FEC_RDATA_2,
76 MX35_PAD_FEC_TDATA2__FEC_TDATA_2,
77 MX35_PAD_FEC_RDATA3__FEC_RDATA_3,
78 MX35_PAD_FEC_TDATA3__FEC_TDATA_3,
79 /* USBOTG */
80 MX35_PAD_USBOTG_PWR__USB_TOP_USBOTG_PWR,
81 MX35_PAD_USBOTG_OC__USB_TOP_USBOTG_OC,
82};
83
84/* OTG config */
85static struct fsl_usb2_platform_data usb_pdata = {
86 .operating_mode = FSL_USB2_DR_DEVICE,
87 .phy_mode = FSL_USB2_PHY_UTMI_WIDE,
88};
89
90/*
91 * Board specific initialization.
92 */
93static void __init mxc_board_init(void)
94{
95 mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads));
96
97 platform_add_devices(devices, ARRAY_SIZE(devices));
98
99 mxc_register_device(&mxc_uart_device0, &uart_pdata);
100
101 mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
102}
103
104static void __init mx35pdk_timer_init(void)
105{
106 mx35_clocks_init();
107}
108
109struct sys_timer mx35pdk_timer = {
110 .init = mx35pdk_timer_init,
111};
112
113MACHINE_START(MX35_3DS, "Freescale MX35PDK")
114 /* Maintainer: Freescale Semiconductor, Inc */
115 .phys_io = MX35_AIPS1_BASE_ADDR,
116 .io_pg_offst = ((MX35_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
117 .boot_params = MX3x_PHYS_OFFSET + 0x100,
118 .map_io = mx35_map_io,
119 .init_irq = mx35_init_irq,
120 .init_machine = mxc_board_init,
121 .timer = &mx35pdk_timer,
122MACHINE_END