From 59ca4318ab4e1cfd39e6c1343e87eda481226552 Mon Sep 17 00:00:00 2001 From: "Ye.Li" Date: Mon, 20 Oct 2014 11:34:34 +0800 Subject: MLK-9706 imx: mx6sx19x19arm2: Fix ENET card MAX7322 reset issue The MAX7322 will fail to work on 19x19 arm2 revB board. This failure is caused by the MAX7322 reset pin is not released when calling the setup_fec function. The MAX7322 reset pin is same as PHY reset pin. This patch fixes the issue by moving the PHY reset from setup_iomux_fec1 to setup_fec. Signed-off-by: Ye.Li --- board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'board/freescale') diff --git a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c index 26fe120..285fdb4 100644 --- a/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c +++ b/board/freescale/mx6sx_19x19_arm2/mx6sx_19x19_arm2.c @@ -303,11 +303,6 @@ static iomux_v3_cfg_t const fec1_pads[] = { static void setup_iomux_fec1(void) { imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads)); - - /* Reset AR8031 PHY */ - gpio_direction_output(IMX_GPIO_NR(6, 18) , 0); - udelay(500); - gpio_set_value(IMX_GPIO_NR(6, 18), 1); } #endif @@ -599,6 +594,11 @@ static int setup_fec(void) enable_enet_clock(); + /* Reset AR8031 PHY */ + gpio_direction_output(IMX_GPIO_NR(6, 18) , 0); + udelay(500); + gpio_set_value(IMX_GPIO_NR(6, 18), 1); + #ifdef CONFIG_FEC_ENABLE_MAX7322 /* This is needed to drive the pads to 1.8V instead of 1.5V */ i2c_set_bus_num(CONFIG_MAX7322_I2C_BUS); -- cgit v1.1