summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2017-02-06 17:21:21 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 14:07:06 +0800
commitf8de583c3e948ae8a819b0b531ad17cf3cc713d7 (patch)
tree1edb6dd7f0a37213188eda4fffebb68284f1164f /board
parentaac43b28e50300214a02212fb8ccc1c2fdf070de (diff)
downloadu-boot-imx-f8de583c3e948ae8a819b0b531ad17cf3cc713d7.zip
u-boot-imx-f8de583c3e948ae8a819b0b531ad17cf3cc713d7.tar.gz
u-boot-imx-f8de583c3e948ae8a819b0b531ad17cf3cc713d7.tar.bz2
MLK-14418-5 imx: mx7dsabresd: reset ENET_RST_B
Reset ENET_RST_B to make ENET function stable. Since DM_GPIO enabled, we use "gpio_spi@0_5" which corresponds to ENET_RST_B. Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mx7dsabresd/mx7dsabresd.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 9796049..5c70b48 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -210,6 +210,22 @@ int mmc_map_to_kernel_blk(int dev_no)
int board_eth_init(bd_t *bis)
{
int ret;
+ unsigned int gpio;
+
+ ret = gpio_lookup_name("gpio_spi@0_5", NULL, NULL, &gpio);
+ if (ret) {
+ printf("GPIO: 'gpio_spi@0_5' not found\n");
+ }
+
+ ret = gpio_request(gpio, "fec_rst");
+ if (ret && ret != -EBUSY) {
+ printf("gpio: requesting pin %u failed\n", gpio);
+ return -1;
+ }
+
+ gpio_direction_output(gpio, 0);
+ udelay(500);
+ gpio_direction_output(gpio, 1);
setup_iomux_fec();