aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx53_evk.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx5/board-mx53_evk.c')
-rw-r--r--arch/arm/mach-mx5/board-mx53_evk.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
index fa97d0d5dd05..8a744ae09f6f 100644
--- a/arch/arm/mach-mx5/board-mx53_evk.c
+++ b/arch/arm/mach-mx5/board-mx53_evk.c
@@ -21,6 +21,9 @@
21 21
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/fec.h>
25#include <linux/delay.h>
26#include <linux/gpio.h>
24#include <mach/common.h> 27#include <mach/common.h>
25#include <mach/hardware.h> 28#include <mach/hardware.h>
26#include <asm/mach-types.h> 29#include <asm/mach-types.h>
@@ -29,6 +32,8 @@
29#include <mach/imx-uart.h> 32#include <mach/imx-uart.h>
30#include <mach/iomux-mx53.h> 33#include <mach/iomux-mx53.h>
31 34
35#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)
36
32#include "crm_regs.h" 37#include "crm_regs.h"
33#include "devices-imx53.h" 38#include "devices-imx53.h"
34 39
@@ -60,11 +65,33 @@ static inline void mx53_evk_init_uart(void)
60 imx53_add_imx_uart(2, &mx53_evk_uart_pdata); 65 imx53_add_imx_uart(2, &mx53_evk_uart_pdata);
61} 66}
62 67
68static inline void mx53_evk_fec_reset(void)
69{
70 int ret;
71
72 /* reset FEC PHY */
73 ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset");
74 if (ret) {
75 printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret);
76 return;
77 }
78 gpio_direction_output(SMD_FEC_PHY_RST, 0);
79 gpio_set_value(SMD_FEC_PHY_RST, 0);
80 msleep(1);
81 gpio_set_value(SMD_FEC_PHY_RST, 1);
82}
83
84static struct fec_platform_data mx53_evk_fec_pdata = {
85 .phy = PHY_INTERFACE_MODE_RMII,
86};
87
63static void __init mx53_evk_board_init(void) 88static void __init mx53_evk_board_init(void)
64{ 89{
65 mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads, 90 mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads,
66 ARRAY_SIZE(mx53_evk_pads)); 91 ARRAY_SIZE(mx53_evk_pads));
67 mx53_evk_init_uart(); 92 mx53_evk_init_uart();
93 mx53_evk_fec_reset();
94 imx53_add_fec(&mx53_evk_fec_pdata);
68} 95}
69 96
70static void __init mx53_evk_timer_init(void) 97static void __init mx53_evk_timer_init(void)