summaryrefslogtreecommitdiff
path: root/board/siemens
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2014-02-25 11:07:22 +0100
committerTom Rini <trini@ti.com>2014-03-04 09:42:07 -0500
commitcc07294bc704694ae33db75b25ac557e5917a83f (patch)
tree3cfb394522762122a581203fdd7a861c2018d8bd /board/siemens
parentb56b9a0884afab53f7c93cd3c90648437ca7e35e (diff)
downloadu-boot-imx-cc07294bc704694ae33db75b25ac557e5917a83f.zip
u-boot-imx-cc07294bc704694ae33db75b25ac557e5917a83f.tar.gz
u-boot-imx-cc07294bc704694ae33db75b25ac557e5917a83f.tar.bz2
arm: am335x: DXR2: Reset SMSC LAN9303 switch via GPIO upon bootup
Since the switch may be re-configured for VLAN usage in Linux (or any other OS), lets reset the switch to its default register values upon power-up. Otherwise network might not be available in U-Boot. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Roger Meier <r.meier@siemens.com> Cc: Lukas Stockmann <lukas.stockmann@siemens.com> Cc: Tom Rini <trini@ti.com>
Diffstat (limited to 'board/siemens')
-rw-r--r--board/siemens/dxr2/board.c7
-rw-r--r--board/siemens/dxr2/mux.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/board/siemens/dxr2/board.c b/board/siemens/dxr2/board.c
index 9b8f538..2172379 100644
--- a/board/siemens/dxr2/board.c
+++ b/board/siemens/dxr2/board.c
@@ -232,6 +232,13 @@ int board_eth_init(bd_t *bis)
factoryset_setenv();
+ /* Reset SMSC LAN9303 switch for default configuration */
+ gpio_request(GPIO_LAN9303_NRST, "nRST");
+ gpio_direction_output(GPIO_LAN9303_NRST, 0);
+ /* assert active low reset for 200us */
+ udelay(200);
+ gpio_set_value(GPIO_LAN9303_NRST, 1);
+
/* Set rgmii mode and enable rmii clock to be sourced from chip */
writel((RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE), &cdev->miisel);
diff --git a/board/siemens/dxr2/mux.c b/board/siemens/dxr2/mux.c
index 5c22999..f2314b5 100644
--- a/board/siemens/dxr2/mux.c
+++ b/board/siemens/dxr2/mux.c
@@ -221,6 +221,8 @@ static struct module_pin_mux gpios_pin_mux[] = {
{OFFSET(ain0), MODE(7) | RXACTIVE | PULLUDDIS},
{OFFSET(vrefp), MODE(7) | RXACTIVE | PULLUDDIS},
{OFFSET(vrefn), MODE(7) | RXACTIVE | PULLUDDIS},
+ /* nRST for SMSC LAN9303 switch - GPIO2_24 */
+ {OFFSET(lcd_pclk), MODE(7) }, /* LAN9303 nRST */
{-1},
};