diff options
author | Sudhakar Rajashekhara <sudhakar.raj@ti.com> | 2010-11-18 09:59:37 -0500 |
---|---|---|
committer | Sandeep Paulraj <s-paulraj@ti.com> | 2010-11-30 11:27:44 -0500 |
commit | d26074012b1ae28e4d593fabde389a3dc4471114 (patch) | |
tree | 7678e3a4733b9943df1b360e9781252a16844027 /board/davinci/da8xxevm/common.c | |
parent | 48571ff00526701c88cfcac1294adf20aeeade74 (diff) | |
download | u-boot-imx-d26074012b1ae28e4d593fabde389a3dc4471114.zip u-boot-imx-d26074012b1ae28e4d593fabde389a3dc4471114.tar.gz u-boot-imx-d26074012b1ae28e4d593fabde389a3dc4471114.tar.bz2 |
da850: Add RMII support for EMAC
This patch is a port of the work by Sudhakar Rajeshekhara in commit
ab3effbcad8851cc65dc5241a01c064d2030a3b2 of
git://arago-project.org/git/people/sandeep/u-boot-davinci.git.
The da850 UI board has on it an RMII PHY which can be used if the MDC line
to the MII PHY on the baseboard is disabled and the RMII PHY is enabled by
configuring the values of some GPIO pins on the IO expander of the UI board.
This patch implements disabling that line via GPIO2[6], configuring the UI
board's IO expander and setting only the pinmux settings that are needed for
RMII operation.
Tested on da850evm by adding a define for CONFIG_DRIVER_TI_EMAC_USE_RMII.
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Sandeep Paulraj <s-paulraj@ti.com>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'board/davinci/da8xxevm/common.c')
-rw-r--r-- | board/davinci/da8xxevm/common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/board/davinci/da8xxevm/common.c b/board/davinci/da8xxevm/common.c index 36bf693..2d9a64b 100644 --- a/board/davinci/da8xxevm/common.c +++ b/board/davinci/da8xxevm/common.c @@ -53,3 +53,17 @@ int da8xx_configure_lpsc_items(const struct lpsc_resource *item, return 0; } + +#if defined(CONFIG_DRIVER_TI_EMAC) && defined(CONFIG_MACH_DAVINCI_DA850_EVM) +void da850_emac_mii_mode_sel(int mode_sel) +{ + int val; + + val = readl(&davinci_syscfg_regs->cfgchip3); + if (mode_sel == 0) + val &= ~(1 << 8); + else + val |= (1 << 8); + writel(val, &davinci_syscfg_regs->cfgchip3); +} +#endif |