2010-09-21 02:28:40     Need help configuring RMII on new BF537 board

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-09-21 02:28:40     Need help configuring RMII on new BF537 board

Jay Ku (UNITED STATES)

Message: 93643   

 

I'm having some trouble configuring the MAC on my BF537 board.  I'm using SVN ver 9821.  When I boot the kernel I get:

 

.

.

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

brd: module loaded

pin grounp conflict! request pin 37 func 1 conflict with pin 32 func 0

bfin_mii_bus bfin_mii_bus.0: Requesting peripherals failed!

bfin_mii_bus: probe of bfin_mii_bus.0 failed with error -16

bfin_mac bfin_mac.0: Cannot get mii_bus!

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

TCP cubic registered

.

.

 

 

(The kernel continues to boot and otherwise runs ok.)  If I match those pin values up with arch/blackfin/mach-bf537/include/mach/gpio.h (is that right?), it looks like there's a conflict between PH0 (32) and PH5 (37), but I don't know how this could be - I can't find where I'm using either of these pins outside of the MAC configuration.

 

I've got pretty much everything disabled in my config.  Here's an excerpt from my board config - basically copied this out of the pnav10.c config file, which apparently also uses RMII:

 

 

#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)

#include <linux/bfin_mac.h>

static const unsigned short bfin_mac_peripherals[] = P_RMII0;

 

static struct bfin_phydev_platform_data bfin_phydev_data[] = {

    {

        .addr = 1,

        .irq = IRQ_MAC_PHYINT,

        // .irq = PHY_POLL, /* IRQ_MAC_PHYINT */

    },

};

 

static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {

    .phydev_number = 1,

    .phydev_data = bfin_phydev_data,

    .phy_mode = PHY_INTERFACE_MODE_RMII,

    .mac_peripherals = bfin_mac_peripherals,

};

 

static struct platform_device bfin_mii_bus = {

    .name = "bfin_mii_bus",

    .dev = {

        .platform_data = &bfin_mii_bus_data,

    }

};

 

static struct platform_device bfin_mac_device = {

    .name = "bfin_mac",

    .dev = {

        .platform_data = &bfin_mii_bus,

    }

};

#endif

 

 

Any pointers on how to debug this?

QuoteReplyEditDelete

 

 

2010-09-21 02:52:14     Re: Need help configuring RMII on new BF537 board

Mike Frysinger (UNITED STATES)

Message: 93644   

 

the problem isnt with a specific pin.  it's with a pin group (like the error says).

 

seems like it's a bug in the portmux group check though.  Steve will have to take a look.

QuoteReplyEditDelete

 

 

2010-09-24 23:54:46     Re: Need help configuring RMII on new BF537 board

steven miao (CHINA)

Message: 93827   

 

Hi Jay,

 

You can try this patch.

 

--- arch/blackfin/kernel/bfin_gpio.c    (revision 9160)

+++ arch/blackfin/kernel/bfin_gpio.c    (working copy)

@@ -269,6 +269,8 @@

     s8 offset;

     u16 function = P_FUNCT2MUX(per);

     offset = port_mux[P_IDENT(per)];

+    if (offset < 0)

+        return 0;

     ident = P_IDENT(per);

     pfunc = bfin_read_PORT_MUX();

     for (m = 0; m < ARRAY_SIZE(port_mux); m++) {

 

 

-steven

QuoteReplyEditDelete

 

 

2010-09-25 03:33:48     Re: Need help configuring RMII on new BF537 board

Jay Ku (UNITED STATES)

Message: 93839   

 

Steven,

 

Works ok now... thanks.

 

- Jay

Attachments

    Outcomes