aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx50_rdp.c
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2011-01-14 04:48:03 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-19 03:57:56 -0500
commit82c520dccf7fd5afcd95b941f48c25f38c162c77 (patch)
treeed72bdbe69635ebb7e0918c3b6d60b2009e45a5f /arch/arm/mach-mx5/board-mx50_rdp.c
parenta929dcf70ed74b8ff52b6fca54f6ebb463e829f4 (diff)
arm: mx50_rdp: add fec support
Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5/board-mx50_rdp.c')
-rw-r--r--arch/arm/mach-mx5/board-mx50_rdp.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c
index e5bb600b4cb2..3180d43aeced 100644
--- a/arch/arm/mach-mx5/board-mx50_rdp.c
+++ b/arch/arm/mach-mx5/board-mx50_rdp.c
@@ -37,6 +37,9 @@
37 37
38#include "devices-imx50.h" 38#include "devices-imx50.h"
39 39
40#define FEC_EN IMX_GPIO_NR(6, 23)
41#define FEC_RESET_B IMX_GPIO_NR(4, 12)
42
40static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { 43static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
41 /* SD1 */ 44 /* SD1 */
42 MX50_PAD_ECSPI2_SS0__GPIO_4_19, 45 MX50_PAD_ECSPI2_SS0__GPIO_4_19,
@@ -102,7 +105,7 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
102 MX50_PAD_I2C3_SCL__USBOTG_OC, 105 MX50_PAD_I2C3_SCL__USBOTG_OC,
103 106
104 MX50_PAD_SSI_RXC__FEC_MDIO, 107 MX50_PAD_SSI_RXC__FEC_MDIO,
105 MX50_PAD_SSI_RXC__FEC_MDIO, 108 MX50_PAD_SSI_RXFS__FEC_MDC,
106 MX50_PAD_DISP_D0__FEC_TXCLK, 109 MX50_PAD_DISP_D0__FEC_TXCLK,
107 MX50_PAD_DISP_D1__FEC_RX_ER, 110 MX50_PAD_DISP_D1__FEC_RX_ER,
108 MX50_PAD_DISP_D2__FEC_RX_DV, 111 MX50_PAD_DISP_D2__FEC_RX_DV,
@@ -111,7 +114,6 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
111 MX50_PAD_DISP_D5__FEC_TX_EN, 114 MX50_PAD_DISP_D5__FEC_TX_EN,
112 MX50_PAD_DISP_D6__FEC_TXD1, 115 MX50_PAD_DISP_D6__FEC_TXD1,
113 MX50_PAD_DISP_D7__FEC_TXD0, 116 MX50_PAD_DISP_D7__FEC_TXD0,
114 MX50_PAD_SSI_RXFS__FEC_MDC,
115 MX50_PAD_I2C3_SDA__GPIO_6_23, 117 MX50_PAD_I2C3_SDA__GPIO_6_23,
116 MX50_PAD_ECSPI1_SCLK__GPIO_4_12, 118 MX50_PAD_ECSPI1_SCLK__GPIO_4_12,
117 119
@@ -168,6 +170,20 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
168 .flags = IMXUART_HAVE_RTSCTS, 170 .flags = IMXUART_HAVE_RTSCTS,
169}; 171};
170 172
173static const struct fec_platform_data fec_data __initconst = {
174 .phy = PHY_INTERFACE_MODE_RMII,
175};
176
177static inline void mx50_rdp_fec_reset(void)
178{
179 gpio_request(FEC_EN, "fec-en");
180 gpio_direction_output(FEC_EN, 0);
181 gpio_request(FEC_RESET_B, "fec-reset_b");
182 gpio_direction_output(FEC_RESET_B, 0);
183 msleep(1);
184 gpio_set_value(FEC_RESET_B, 1);
185}
186
171/* 187/*
172 * Board specific initialization. 188 * Board specific initialization.
173 */ 189 */
@@ -178,6 +194,8 @@ static void __init mx50_rdp_board_init(void)
178 194
179 imx50_add_imx_uart(0, &uart_pdata); 195 imx50_add_imx_uart(0, &uart_pdata);
180 imx50_add_imx_uart(1, &uart_pdata); 196 imx50_add_imx_uart(1, &uart_pdata);
197 mx50_rdp_fec_reset();
198 imx50_add_fec(&fec_data);
181} 199}
182 200
183static void __init mx50_rdp_timer_init(void) 201static void __init mx50_rdp_timer_init(void)