summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorMitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>2015-03-04 15:57:03 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2015-06-01 08:56:34 +0900
commitcae720420050a784ee7b8d6eccfdb65a70d1dd84 (patch)
treece2026cf9756664ab035c400b8c6c74e885e3e46 /board
parent012681b1fa822492bb8fdc5c2dd3d24d6092e110 (diff)
downloadblackbird-obmc-uboot-cae720420050a784ee7b8d6eccfdb65a70d1dd84.tar.gz
blackbird-obmc-uboot-cae720420050a784ee7b8d6eccfdb65a70d1dd84.zip
arm: rmobile: alt: Add ethernet function B support
Ethernet function of Alt board can select normal and B by DIP switch on board. But user need to set not only DIP switch but also pin function. This adds pin function of Ethernet function B. This can select from Kconfig. Signed-off-by: Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'board')
-rw-r--r--board/renesas/alt/Kconfig9
-rw-r--r--board/renesas/alt/alt.c17
2 files changed, 25 insertions, 1 deletions
diff --git a/board/renesas/alt/Kconfig b/board/renesas/alt/Kconfig
index 957962de20..39d53c185b 100644
--- a/board/renesas/alt/Kconfig
+++ b/board/renesas/alt/Kconfig
@@ -9,4 +9,13 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "alt"
+config R8A7794_ETHERNET_B
+ bool "Use ethernet B function"
+ depends on TARGET_ALT
+ default n
+ help
+ ALT board can use default ethernet and etnernet B function.
+ This config set pin function of ethenet B. You also needt to change
+ DIP switch of board in order to use this function.
+
endif
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index f0010db814..3501a17044 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -1,7 +1,7 @@
/*
* board/renesas/alt/alt.c
*
- * Copyright (C) 2014 Renesas Electronics Corporation
+ * Copyright (C) 2014, 2015 Renesas Electronics Corporation
*
* SPDX-License-Identifier: GPL-2.0
*/
@@ -94,6 +94,20 @@ int board_init(void)
r8a7794_pinmux_init();
/* Ether Enable */
+#if defined(CONFIG_R8A7794_ETHERNET_B)
+ gpio_request(GPIO_FN_ETH_CRS_DV_B, NULL);
+ gpio_request(GPIO_FN_ETH_RX_ER_B, NULL);
+ gpio_request(GPIO_FN_ETH_RXD0_B, NULL);
+ gpio_request(GPIO_FN_ETH_RXD1_B, NULL);
+ gpio_request(GPIO_FN_ETH_LINK_B, NULL);
+ gpio_request(GPIO_FN_ETH_REFCLK_B, NULL);
+ gpio_request(GPIO_FN_ETH_MDIO_B, NULL);
+ gpio_request(GPIO_FN_ETH_TXD1_B, NULL);
+ gpio_request(GPIO_FN_ETH_TX_EN_B, NULL);
+ gpio_request(GPIO_FN_ETH_MAGIC_B, NULL);
+ gpio_request(GPIO_FN_ETH_TXD0_B, NULL);
+ gpio_request(GPIO_FN_ETH_MDC_B, NULL);
+#else
gpio_request(GPIO_FN_ETH_CRS_DV, NULL);
gpio_request(GPIO_FN_ETH_RX_ER, NULL);
gpio_request(GPIO_FN_ETH_RXD0, NULL);
@@ -106,6 +120,7 @@ int board_init(void)
gpio_request(GPIO_FN_ETH_MAGIC, NULL);
gpio_request(GPIO_FN_ETH_TXD0, NULL);
gpio_request(GPIO_FN_ETH_MDC, NULL);
+#endif
gpio_request(GPIO_FN_IRQ8, NULL);
/* PHY reset */
OpenPOWER on IntegriCloud