Patchwork [U-Boot,1/2] avr32:grasshopper: fix PHY initialisation

login
register
mail settings
Submitter Andreas Bießmann
Date May 25, 2012, 10:29 a.m.
Message ID <1337941773-16272-1-git-send-email-andreas.devel@googlemail.com>
Download mbox | patch
Permalink /patch/161273/
State Accepted
Commit eba00ab4050bd1b39f20ed1186181ab727085bfc
Delegated to: Andreas Bießmann
Headers show

Comments

Andreas Bießmann - May 25, 2012, 10:29 a.m.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
---
 board/in-circuit/grasshopper/grasshopper.c |    7 +++++++
 1 file changed, 7 insertions(+)

Patch

diff --git a/board/in-circuit/grasshopper/grasshopper.c b/board/in-circuit/grasshopper/grasshopper.c
index 475a759..222fe43 100644
--- a/board/in-circuit/grasshopper/grasshopper.c
+++ b/board/in-circuit/grasshopper/grasshopper.c
@@ -72,6 +72,13 @@  int board_early_init_f(void)
 	portmux_enable_usart0(PORTMUX_DRIVE_MIN);
 	portmux_enable_usart1(PORTMUX_DRIVE_MIN);
 #if defined(CONFIG_MACB)
+	/* set PHY reset and pwrdown to low */
+	portmux_select_gpio(PORTMUX_PORT_B, (1 << 29) | (1 << 30),
+		PORTMUX_DIR_OUTPUT | PORTMUX_INIT_LOW);
+	udelay(100);
+	/* release PHYs reset */
+	gpio_set_value(GPIO_PIN_PB(29), 1);
+
 	portmux_enable_macb0(PORTMUX_MACB_MII, PORTMUX_DRIVE_LOW);
 #endif