>From linksys firmware : # et -i eth0 robord 0x0 0x0e 0x0000008b # et -i eth0 robord 0x0 0x12 0x0000020b
root@OpenWrt:/# robocfg robord 0x0e Page 0x00, Reg 0x0e: 00bb root@OpenWrt:/# robocfg robord 0x12 Page 0x00, Reg 0x12: 0321 1. Fix led control register: On normal ports only one led was used for both link and activity (green), internet port additionally had orange led on all the time. I compared the value of registry 0x12 on linksys firmware vs openwrt, and it showed a different value (0x20b for linksys vs 0x321 on openwrt). Now the green led is always used to signal link, the orange led (only) blinks on link activity. 2. Adjust IMP port status As I was comparing register values/bcmrobo.c source code, I noticed a difference for the IMP port status register (0x0e), linksys firmware showed 0x8b vs 0xbb for openwrt. >From bcmrobo.c - int bcm_robo_enable_switch: if ((robo->devid == DEVID53115) || (robo->devid == DEVID53125)) { /* Over ride IMP port status to make it link by default */ val8 = 0; robo->ops->read_reg(robo, PAGE_CTRL, REG_CTRL_MIIPO, &val8, sizeof(val8)); val8 |= 0x81; /* Make Link pass and override it. */ robo->ops->write_reg(robo, PAGE_CTRL, REG_CTRL_MIIPO, &val8, sizeof(val8)); } Hauke, did you use '0xb1' intentionally instead of '0x81'? Or do we want this to be the same? Signed-off-by: Tijs Van Buggenhout <t...@able.be> diff --git a/package/switch/src/switch-robo.c b/package/switch/src/switch- robo.c index f715972..ac4855a 100644 --- a/package/switch/src/switch-robo.c +++ b/package/switch/src/switch-robo.c @@ -252,8 +252,13 @@ static int robo_switch_enable(void) if (robo.devid == ROBO_DEVICE_ID_53125) { /* Make IM port status link by default */ - val = robo_read16(ROBO_CTRL_PAGE, ROBO_PORT_OVERRIDE_CTRL) | 0xb1; + val = robo_read16(ROBO_CTRL_PAGE, ROBO_PORT_OVERRIDE_CTRL) | 0x81; robo_write16(ROBO_CTRL_PAGE, ROBO_PORT_OVERRIDE_CTRL, val); + + /* Write LED control register */ + val = 0x020b; + robo_write16(ROBO_CTRL_PAGE, 0x12, val); + // TODO: init EEE feature }
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel