Hi,
on a custom Am335x-board I have my ethernet 10/100 PHY (DP83848I) connected as follows to then GMII2-interface:
static struct module_pin_mux gmii2_pin_mux[] = {
{OFFSET(gpmc_wpn), MODE(1) | RXACTIVE}, /* GMII2_RXERR */
{OFFSET(gpmc_ad0), MODE(1)}, /* GMII2_TXEN */
{OFFSET(gpmc_ad1), MODE(1) | RXACTIVE}, /* GMII2_RXDV */
{OFFSET(gpmc_ad2), MODE(1)}, /* GMII2_TXD3 */
{OFFSET(gpmc_ad3), MODE(1)}, /* GMII2_TXD2 */
{OFFSET(gpmc_ad4), MODE(1)}, /* GMII2_TXD1 */
{OFFSET(gpmc_ad5), MODE(1)}, /* GMII2_TXD0 */
{OFFSET(gpmc_ad6), MODE(1) | RXACTIVE}, /* GMII2_TXCLK */
{OFFSET(gpmc_ad7), MODE(1) | RXACTIVE}, /* GMII2_RXCLK */
{OFFSET(gpmc_ad8), MODE(1) | RXACTIVE}, /* GMII2_RXD3 */
{OFFSET(gpmc_ad9), MODE(1) | RXACTIVE}, /* GMII2_RXD2 */
{OFFSET(gpmc_ad10), MODE(1) | RXACTIVE}, /* GMII2_RXD1 */
{OFFSET(gpmc_ad11), MODE(1) | RXACTIVE}, /* GMII2_RXD0 */
{OFFSET(gpmc_wait0), MODE(1) | RXACTIVE | PULLUP_EN}, /* GMII2_CRS */
{OFFSET(gpmc_be1n), MODE(1) | RXACTIVE | PULLUP_EN}, /* GMII2_COL */
{-1},
};
In my from am335xevm derived board setup for U-Boot (2013.07, upstream) I use unmodified content of cpsw_slaves and cpsw_data (board.c) and initialize with:
writel(MII_MODE_ENABLE, &cdev->miisel);
cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
PHY_INTERFACE_MODE_MII;
But this way the PHY is not detected and U-Boot produces a lot of "wait_for_user_access Timeout"-messages before giving up and coming to the prompt. What am I missing?
Thanks and Regards
Arndt