提交 aba39249 编写于 作者: S Stefan Mavrodiev 提交者: Jagan Teki

sunxi: Fix A20-OLinuXino-MICRO LAN8710 support

>From revision J the board uses new phy chip LAN8710. Compared
with RTL8201, RA17 pin is TXERR. It has pullup which causes phy
not to work. To fix this PA17 is muxed with GMAC function. This
makes the pin output-low.
Signed-off-by: NStefan Mavrodiev <stefan@olimex.com>
Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: NJagan Teki <jagan@openedev.com>
上级 64089178
......@@ -33,7 +33,11 @@ void eth_init_board(void)
#ifndef CONFIG_MACH_SUN6I
/* Configure pin mux settings for GMAC */
#ifdef CONFIG_SUN7I_GMAC_FORCE_TXERR
for (pin = SUNXI_GPA(0); pin <= SUNXI_GPA(17); pin++) {
#else
for (pin = SUNXI_GPA(0); pin <= SUNXI_GPA(16); pin++) {
#endif
#ifdef CONFIG_RGMII
/* skip unused pins in RGMII mode */
if (pin == SUNXI_GPA(9) || pin == SUNXI_GPA(14))
......
......@@ -19,6 +19,7 @@ CONFIG_SPL_I2C_SUPPORT=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_ETH_DESIGNWARE=y
CONFIG_SUN7I_GMAC=y
CONFIG_SUN7I_GMAC_FORCE_TXERR=y
CONFIG_AXP_ALDO3_VOLT=2800
CONFIG_AXP_ALDO4_VOLT=2800
CONFIG_SCSI=y
......
......@@ -20,6 +20,7 @@ CONFIG_SPL_I2C_SUPPORT=y
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_ETH_DESIGNWARE=y
CONFIG_SUN7I_GMAC=y
CONFIG_SUN7I_GMAC_FORCE_TXERR=y
CONFIG_AXP_ALDO3_VOLT=2800
CONFIG_AXP_ALDO4_VOLT=2800
CONFIG_SCSI=y
......
......@@ -244,6 +244,14 @@ config SUN7I_GMAC
help
Enable the support for Sun7i GMAC Ethernet controller
config SUN7I_GMAC_FORCE_TXERR
bool "Force PA17 as gmac function"
depends on SUN7I_GMAC
help
Some ethernet phys needs TXERR control. Since the GMAC
doesn't have such signal, setting PA17 as GMAC function
makes the pin output low, which enables data transmission.
config SUN4I_EMAC
bool "Allwinner Sun4i Ethernet MAC support"
depends on DM_ETH
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册