aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx25/mach-mx25_3ds.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-03-04 10:43:31 -0500
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-06-02 15:33:15 -0400
commitc10ea4d60eb387dac4d3011e40d5536eb7642a93 (patch)
tree9f6f522a462d0d85ab072cf1e27f0db97e2edf68 /arch/arm/mach-mx25/mach-mx25_3ds.c
parent767c38b20e9b030acd42254a8010a54733629b0a (diff)
ARM: mx25: rename mach-mx25pdk.c to mach-mx25_3ds.c matching its arch number
Additionally document all known names of that machine. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx25/mach-mx25_3ds.c')
-rw-r--r--arch/arm/mach-mx25/mach-mx25_3ds.c180
1 files changed, 180 insertions, 0 deletions
diff --git a/arch/arm/mach-mx25/mach-mx25_3ds.c b/arch/arm/mach-mx25/mach-mx25_3ds.c
new file mode 100644
index 000000000000..26ba246c57ee
--- /dev/null
+++ b/arch/arm/mach-mx25/mach-mx25_3ds.c
@@ -0,0 +1,180 @@
1/*
2 * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 */
18
19/*
20 * This machine is known as:
21 * - i.MX25 3-Stack Development System
22 * - i.MX25 Platform Development Kit (i.MX25 PDK)
23 */
24
25#include <linux/types.h>
26#include <linux/init.h>
27#include <linux/delay.h>
28#include <linux/clk.h>
29#include <linux/irq.h>
30#include <linux/gpio.h>
31#include <linux/fec.h>
32#include <linux/platform_device.h>
33
34#include <mach/hardware.h>
35#include <asm/mach-types.h>
36#include <asm/mach/arch.h>
37#include <asm/mach/time.h>
38#include <asm/memory.h>
39#include <asm/mach/map.h>
40#include <mach/common.h>
41#include <mach/imx-uart.h>
42#include <mach/mx25.h>
43#include <mach/mxc_nand.h>
44#include <mach/imxfb.h>
45#include "devices.h"
46#include <mach/iomux-mx25.h>
47
48static struct imxuart_platform_data uart_pdata = {
49 .flags = IMXUART_HAVE_RTSCTS,
50};
51
52static struct pad_desc mx25pdk_pads[] = {
53 MX25_PAD_FEC_MDC__FEC_MDC,
54 MX25_PAD_FEC_MDIO__FEC_MDIO,
55 MX25_PAD_FEC_TDATA0__FEC_TDATA0,
56 MX25_PAD_FEC_TDATA1__FEC_TDATA1,
57 MX25_PAD_FEC_TX_EN__FEC_TX_EN,
58 MX25_PAD_FEC_RDATA0__FEC_RDATA0,
59 MX25_PAD_FEC_RDATA1__FEC_RDATA1,
60 MX25_PAD_FEC_RX_DV__FEC_RX_DV,
61 MX25_PAD_FEC_TX_CLK__FEC_TX_CLK,
62 MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */
63 MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */
64
65 /* LCD */
66 MX25_PAD_LD0__LD0,
67 MX25_PAD_LD1__LD1,
68 MX25_PAD_LD2__LD2,
69 MX25_PAD_LD3__LD3,
70 MX25_PAD_LD4__LD4,
71 MX25_PAD_LD5__LD5,
72 MX25_PAD_LD6__LD6,
73 MX25_PAD_LD7__LD7,
74 MX25_PAD_LD8__LD8,
75 MX25_PAD_LD9__LD9,
76 MX25_PAD_LD10__LD10,
77 MX25_PAD_LD11__LD11,
78 MX25_PAD_LD12__LD12,
79 MX25_PAD_LD13__LD13,
80 MX25_PAD_LD14__LD14,
81 MX25_PAD_LD15__LD15,
82 MX25_PAD_GPIO_E__LD16,
83 MX25_PAD_GPIO_F__LD17,
84 MX25_PAD_HSYNC__HSYNC,
85 MX25_PAD_VSYNC__VSYNC,
86 MX25_PAD_LSCLK__LSCLK,
87 MX25_PAD_OE_ACD__OE_ACD,
88 MX25_PAD_CONTRAST__CONTRAST,
89};
90
91static struct fec_platform_data mx25_fec_pdata = {
92 .phy = PHY_INTERFACE_MODE_RMII,
93};
94
95#define FEC_ENABLE_GPIO 35
96#define FEC_RESET_B_GPIO 104
97
98static void __init mx25pdk_fec_reset(void)
99{
100 gpio_request(FEC_ENABLE_GPIO, "FEC PHY enable");
101 gpio_request(FEC_RESET_B_GPIO, "FEC PHY reset");
102
103 gpio_direction_output(FEC_ENABLE_GPIO, 0); /* drop PHY power */
104 gpio_direction_output(FEC_RESET_B_GPIO, 0); /* assert reset */
105 udelay(2);
106
107 /* turn on PHY power and lift reset */
108 gpio_set_value(FEC_ENABLE_GPIO, 1);
109 gpio_set_value(FEC_RESET_B_GPIO, 1);
110}
111
112static struct mxc_nand_platform_data mx25pdk_nand_board_info = {
113 .width = 1,
114 .hw_ecc = 1,
115 .flash_bbt = 1,
116};
117
118static struct imx_fb_videomode mx25pdk_modes[] = {
119 {
120 .mode = {
121 .name = "CRT-VGA",
122 .refresh = 60,
123 .xres = 640,
124 .yres = 480,
125 .pixclock = 39683,
126 .left_margin = 45,
127 .right_margin = 114,
128 .upper_margin = 33,
129 .lower_margin = 11,
130 .hsync_len = 1,
131 .vsync_len = 1,
132 },
133 .bpp = 16,
134 .pcr = 0xFA208B80,
135 },
136};
137
138static struct imx_fb_platform_data mx25pdk_fb_pdata = {
139 .mode = mx25pdk_modes,
140 .num_modes = ARRAY_SIZE(mx25pdk_modes),
141 .pwmr = 0x00A903FF,
142 .lscr1 = 0x00120300,
143 .dmacr = 0x00020010,
144};
145
146static void __init mx25pdk_init(void)
147{
148 mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
149 ARRAY_SIZE(mx25pdk_pads));
150
151 mxc_register_device(&mxc_uart_device0, &uart_pdata);
152 mxc_register_device(&mxc_usbh2, NULL);
153 mxc_register_device(&mxc_nand_device, &mx25pdk_nand_board_info);
154 mxc_register_device(&mx25_rtc_device, NULL);
155 mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata);
156
157 mx25pdk_fec_reset();
158 mxc_register_device(&mx25_fec_device, &mx25_fec_pdata);
159}
160
161static void __init mx25pdk_timer_init(void)
162{
163 mx25_clocks_init();
164}
165
166static struct sys_timer mx25pdk_timer = {
167 .init = mx25pdk_timer_init,
168};
169
170MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
171 /* Maintainer: Freescale Semiconductor, Inc. */
172 .phys_io = MX25_AIPS1_BASE_ADDR,
173 .io_pg_offst = ((MX25_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
174 .boot_params = MX25_PHYS_OFFSET + 0x100,
175 .map_io = mx25_map_io,
176 .init_irq = mx25_init_irq,
177 .init_machine = mx25pdk_init,
178 .timer = &mx25pdk_timer,
179MACHINE_END
180