Topic: DGND3700 switch configuration / Ethernet fail

Hopefully someone can tell me where I'm going wrong with this one, its not my first OpenWRT device but, I'm at a bit of a loss, firstly some details .... as the board has no working Ethernet configuration , I'm building from trunk so that I can include extra packages when flashing, the build is Bleeding Edge, r37482 and I am of course using ttl-serial access, my primary issue revolves around the Ethernet, or lack thereof. The switch behaves perfectly during CFE, accepting pings from all 'lan' ports but not the wan, and it functions quite happily as a 'dumb bridge' passing data between my pc and the rest of the network while they are both connected to the 'lan ports' ( no traffic passing by if one cable is connected to the 'wan' port ), but after CFE, the router will not respond at all to the Ethernet. it seems to be detected at boot indicated by :

 [    0.564000] b53_common: found switch: BCM63xx, rev 0 

but start to go haywire when the interface is brought 'UP', the command

swconfig dev eth0 show | grep port

gives

       ports: 0x0136
        link: port:0 link:down
        link: port:1 link:down
        link: port:2 link:down
        link: port:3 link:down
        link: port:4 link:down
        link: port:5 link:down
        link: port:6 link:down
        link: port:7 link:down
        link: port:8 link:up speed:1000baseT full-duplex

but if I remove the file /etc/config/network ( stopping it from automatically upping the interface ) it gives

    ports: 0x0136
        link: port:0 link:down
        link: port:1 link:up speed:10baseT half-duplex auto
        link: port:2 link:up speed:10baseT half-duplex auto
        link: port:3 link:down
        link: port:4 link:up speed:1000baseT full-duplex auto
        link: port:5 link:down
        link: port:6 link:down
        link: port:7 link:down
        link: port:8 link:up speed:1000baseT full-duplex

robocfg supplies the following error in any state

probing eth1
SIOCETHTOOL[   35.392000] bcm63xx_enet: could not find a used port with phy_id 0, assuming phy is external
: No such device
probing eth0
phyid: No such device
bcm53xx_probe: No such device

Leading me to wonder whether the devices 'board parameters' are correct in its description of the switch ?

Anything other than outright flaming would be appreciated ....

if you made it reading this far and understood any of that, thanks smile

Re: DGND3700 switch configuration / Ethernet fail

Take a look at this board because the SoC and the switch are basically the same:
http://wiki.openwrt.org/toh/comtrend/ct5813

In this repository is defined the CT-5813, that can help you to configure the Broadcom external switch:
https://github.com/Noltari/openwrt/blob … 231n.patch
https://github.com/Noltari/openwrt/blob … data.patch

Hope this info could help you.

Re: DGND3700 switch configuration / Ethernet fail

thanks for your help, I've managed to gain some ground and need some other users to confirm if my 'fix' fixes their issues, I've thrown the instructions into another thread

https://forum.openwrt.org/viewtopic.php?pid=212426#p212426

the fix may or may not work for all 96368MVWG's with Ethernet issues ....

Re: DGND3700 switch configuration / Ethernet fail

UTI_BAIT wrote:

need some other users to confirm if my 'fix' fixes their issues

Building an image now to test on my DGND3700. Will report back once I finish a build and get it installed.

Re: DGND3700 switch configuration / Ethernet fail

Have built and installed now on my DGND3700 and it works wonderfully. Looking at trying to get the WAN port up and running now.

6 (edited by kisa 2013-11-07 19:35:43)

Re: DGND3700 switch configuration / Ethernet fail

Try this additions in board_bcm963xx.c (inspired by Neufbox nb6 configuration)

#include <linux/rtl8367.h>
+#include <linux/platform_data/b53.h>
#include <asm/addrspace.h>

and

#ifdef CONFIG_BCM63XX_CPU_6368

+static struct b53_platform_data dgnd3700_bcm53115s_data = {
+};
+
+static struct spi_board_info dgnd3700_spi_devices[] = {
+    {
+        .modalias = "b53-switch",
+        .chip_select = 1,
+        .platform_data = &dgnd3700_bcm53115s_data
+    }
+};
+
static struct board_info __initdata board_96368mvwg = {
    .name                = "96368MVWG",
    .expected_cpu_id        = 0x6368,

+    .spis = dgnd3700_spi_devices,
+    .num_spis = ARRAY_SIZE(dgnd3700_spi_devices),

Also comment out all enetsw ports definitions except [5] (with phy_id = 0x11) and enable B53_SPI_DRIVER option in make kernel_menuconfig.

This will solve your problem. Later you will be able to configure VLANs in bcm53115 as you want.

Re: DGND3700 switch configuration / Ethernet fail

kisa wrote:

Try this additions in board_bcm963xx.c (inspired by Neufbox nb6 configuration)

#include <linux/rtl8367.h>
+#include <linux/platform_data/b53.h>
#include <asm/addrspace.h>

and

#ifdef CONFIG_BCM63XX_CPU_6368

+static struct b53_platform_data dgnd3700_bcm53115s_data = {
+};
+
+static struct spi_board_info dgnd3700_spi_devices[] = {
+    {
+        .modalias = "b53-switch",
+        .chip_select = 1,
+        .platform_data = &dgnd3700_bcm53115s_data
+    }
+};
+
static struct board_info __initdata board_96368mvwg = {
    .name                = "96368MVWG",
    .expected_cpu_id        = 0x6368,

+    .spis = dgnd3700_spi_devices,
+    .num_spis = ARRAY_SIZE(dgnd3700_spi_devices),

Also comment out all enetsw ports definitions except [5] (with phy_id = 0x11) and enable B53_SPI_DRIVER option in make kernel_menuconfig.

This will solve your problem. Later you will be able to configure VLANs in bcm53115 as you want.

I tried,but failed,my device is Qwest-Q1000,with the same switch.
some useful info:

b53-switch: probe of spi0.1 failed with error -22

8 (edited by Pteridium 2013-11-08 16:24:33)

Re: DGND3700 switch configuration / Ethernet fail

fuchenkai wrote:

Try this additions in board_bcm963xx.c (inspired by Neufbox nb6 configuration)
I tried,but failed,my device is Qwest-Q1000,with the same switch.
some useful info:

b53-switch: probe of spi0.1 failed with error -22

Some devices use spi to configure the switch ans others mdio, mmap, ...
¿Can you put the link of the source code of the Qwest? Also would be a good idea to to put the bootlog of the stock firmware and write a wiki of your router.

Edit: found the source code but now the board id is needed.
http://opensource.actiontec.com/q1000x.html

9 (edited by fuchenkai 2013-11-09 20:21:45)

Re: DGND3700 switch configuration / Ethernet fail

Pteridium wrote:
fuchenkai wrote:

Try this additions in board_bcm963xx.c (inspired by Neufbox nb6 configuration)
I tried,but failed,my device is Qwest-Q1000,with the same switch.
some useful info:

b53-switch: probe of spi0.1 failed with error -22

Some devices use spi to configure the switch ans others mdio, mmap, ...
¿Can you put the link of the source code of the Qwest? Also would be a good idea to to put the bootlog of the stock firmware and write a wiki of your router.

Edit: found the source code but now the board id is needed.
http://opensource.actiontec.com/q1000x.html

thx!I have both 2 kinds of Q1000,they have the same hardware,just diffirent CFE and firmware.I will try to read the source code,but it is not easy to me.And I guess Actiontec V1000h have the same board with my device,here is the bootlog of Actiontec V1000h :https://forum.openwrt.org/viewtopic.php?id=43037

10 (edited by kisa 2013-11-09 07:59:48)

Re: DGND3700 switch configuration / Ethernet fail

fuchenkai wrote:

I tried,but failed,my device is Qwest-Q1000,with the same switch.
some useful info:

b53-switch: probe of spi0.1 failed with error -22

Sadly, but it is Ok. My solution is for DGND3700 only, not for Qwest-Q1000.

DGND3700 board id is 96368MVWG. Qwest-Q1000 board id is VB784WG. Some more info here http://www.hurlster.com/wiki/index.php?title=Q1000.

So this devices have the same SoC chips and the same switch chips, but different schematic.

I have downloaded and investigated Qwest-Q1000 source code, provided by Actiontec. As far as I understand, for the Qwest-Q1000 MDIO version of b53 driver must be used. SPI is not used to control external switch.

Re: DGND3700 switch configuration / Ethernet fail

kisa wrote:

Try this additions in board_bcm963xx.c (inspired by Neufbox nb6 configuration)

#include <linux/rtl8367.h>
+#include <linux/platform_data/b53.h>
#include <asm/addrspace.h>

and

#ifdef CONFIG_BCM63XX_CPU_6368

+static struct b53_platform_data dgnd3700_bcm53115s_data = {
+};
+
+static struct spi_board_info dgnd3700_spi_devices[] = {
+    {
+        .modalias = "b53-switch",
+        .chip_select = 1,
+        .platform_data = &dgnd3700_bcm53115s_data
+    }
+};
+
static struct board_info __initdata board_96368mvwg = {
    .name                = "96368MVWG",
    .expected_cpu_id        = 0x6368,

+    .spis = dgnd3700_spi_devices,
+    .num_spis = ARRAY_SIZE(dgnd3700_spi_devices),

Also comment out all enetsw ports definitions except [5] (with phy_id = 0x11) and enable B53_SPI_DRIVER option in make kernel_menuconfig.

This will solve your problem. Later you will be able to configure VLANs in bcm53115 as you want.

Perfect, that did indeed solve the problem. Thanks

12 (edited by fuchenkai 2013-11-09 20:27:15)

Re: DGND3700 switch configuration / Ethernet fail

kisa wrote:
fuchenkai wrote:

I tried,but failed,my device is Qwest-Q1000,with the same switch.
some useful info:

b53-switch: probe of spi0.1 failed with error -22

Sadly, but it is Ok. My solution is for DGND3700 only, not for Qwest-Q1000.

DGND3700 board id is 96368MVWG. Qwest-Q1000 board id is VB784WG. Some more info here http://www.hurlster.com/wiki/index.php?title=Q1000.

So this devices have the same SoC chips and the same switch chips, but different schematic.

I have downloaded and investigated Qwest-Q1000 source code, provided by Actiontec. As far as I understand, for the Qwest-Q1000 must be used MDIO version of b53 driver. SPI is not used to control external switch.

I have changed the board id early.
I found 'B53 MDIO connection switch driver' in 'make kernel_menuconfig'.I think if i get the right code,the switch will work.Could you give me a help?Or i can send a Q1000 to you!

Re: DGND3700 switch configuration / Ethernet fail

fuchenkai wrote:

I have changed the board id early.
I found 'B53 MDIO connection switch driver' in 'make kernel_menuconfig'.I think if i get the right code,the switch will work.Could you give me a help?Or i can send a Q1000 to you!

As far as I know, b53 mdio will not work with bcm6368 because of specifics of the bcm63xx_enetsw driver. It seems that bcm63xx_enet driver initializes mdio bus, while bcm63xx_enetsw not.

To understand how to get switch in the Q1000 working, I will have to acquire such a device. But I think, the author of the bcm63xx_enetsw can make it better.

Acquiring Q1000 is not a problem for me, but it will take some time.

P.S. Must we start separate thread for Qwest Q1000?

14 (edited by danitool 2013-12-27 17:30:58)

Re: DGND3700 switch configuration / Ethernet fail

Hi, I built a working firmware for this router.

- Switch with vlans works
- Built firmware for upgrading via luci, or Netgear http firmware, works
- Both wifi radios work, I used broadcom wl drivers. I made light tests and can only say the performance is acceptable
- Bult against AA, 12.09 stable version, for compatibility of installing new packages.
- All leds working
- All buttons working
- Openwrt failsafe mode works using "Restore Factory Settings" button at the bottom of the router.
- The NAND flash still have no drivers, it doesn't work
- ADSL/VDSL doesn't work, and never will, no drivers available.
- SMP doesn't work, next versions of Openwrt may include support for  both CPU cores in BCM6368 SoCs, but currently there is a known bug causing corruption in the NOR flash. This is well known by Pteridium

The existing code for 96368MVWG board isn't for this router. It seems Netgear used this board ID but using a totally different board layout, the existing code for 96368MVWG shouldn't be used, it is already ok but it is for other routers. The firmware I provide is built with an overriding board ID through a CFEFIXUP.

I've included the firmware, patches and the Netgear utility to convert the OpenWrt firmware to a Netgear .chk firmware:
https://drive.google.com/file/d/0B-EMoBe-_OdBUEo2NHp6eWVjbmc/edit?usp=sharing