OpenWrt Forum Archive

Topic: Linksys WRT300N-V1.1 Support

The content of this topic has been archived between 16 Apr 2018 and 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

So we have to focus on b53 and GPIO number it uses. By default b53 takes a GPIO number from the nvram looking for "gpioN=robo_reset". This is the first weird thing. In the output of "nvram show" you provided I can't see such nvram entry neutral It means that

  1. bcm47xx_nvram_gpio_pin should return -ENOENT

  2. b53_switch_get_reset_gpio should return -ENOENT

  3. dev->reset_gpio should be set to -ENOENT

  4. b53_switch_reset_gpio should never touch gpio because of dev->reset_gpio being negative number

I've also checked default NVRAM generated by CFE (I found WRT300Nv11-cfe.bin) and it also doesn't contain "gpioN=robo_reset". Maybe there was such entry earlier (only in "nvram" partition), but you or DD-WRT cleared the nvram? Or maybe there is some bug in b53/bcm47xx I can't notice? neutral

Anyway, according to the CFE logs this router uses (for real) GPIO 8 to reset switch:

Reset switch via GPIO 8 ...

For years OpenWrt was using GPIO 2 to reset switch on WRT300N V1.1 (see r18921). Hauke in his patch simply copied that to b53. It appears to be wrong. My guess is that GPIO 2 reboots device as well. It was never triggered by broadcom-diag, because it didn't try to reset switch for the second time.

P.S.
I've temporary removed "gpio7=robo_reset" from my device and b53 stopped touching GPIOs. So I think there had to be some wrong entry in your nvram before installing DD-WRT.

(Last edited by Zajec on 13 Apr 2014, 11:22)

@boblfoot: there is my final try. I'm not sure if you still have Hauke's patch applied or not, so I'll just describe how you should proceed.

Please open file target/linux/generic/files/drivers/net/phy/b53/b53_priv.h and replace first "b53_switch_get_reset_gpio" function with the following code:

static inline int b53_switch_get_reset_gpio(struct b53_device *dev)
{
    enum bcm47xx_board board = bcm47xx_board_get();

    switch (board) {
    case BCM47XX_BOARD_LINKSYS_WRT300NV11:
        pr_info("[%s] providing switch reset GPIO: %d\n", __FUNCTION__, 8);
        return 8;
    case BCM47XX_BOARD_LINKSYS_WRT310NV1:
        return 8;
    default:
        return bcm47xx_nvram_gpio_pin("robo_reset");
    }
}

Then recompile OpenWrt with tg3 enabled (you can use "Broadcom SoC, all Ethernet, No WiFi" for example).

@boblfoot: hey, did you have a moment to test code from my last post?

The discussion might have continued from here.