OpenWrt Forum Archive

Topic: Compiling CFE for TG784n?

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

Hi!
I have a Thomson TG784n router with UART and JTAG access.
I would like to flash OpenWRT for that router but it has a custom bootloader from thomson!
My question is: how can I customize and build a clean CFE for this router?
I tried to flash many CFEs downloaded from the net, but the ethernet switch is not working in none of them (it works perfectly with its original flash image).

Specs:
BCM6358 SoC
BCM5325EKQMG Ethernet Switch
HY5DU121622DTP-D43 64M Ram
Intel JS28F256 32M Flash

Thanks in advance,
Alex.

Up!

Hi alex.d93, I can help you for this task. I did it before with another BCM6358 based board. The HomeHub 2A had the same problem with the switch.

It turns out that, in some boards, the switch must be pulled out of reset state by setting a particular GPIO to HIGH state.

Did you try the bootloader from the HomeHub 2A?
https://drive.google.com/uc?export=down … W9VM1JWV2s

This bootloader comes with commands for managing GPIOs.

What you need to do is to guess which GPIO enables the switch. This can be done with the ethernet cable plugged to your computer or another device that indicates if the ethernet cable is connected/disconnected.

Then enable every GPIO with the command

gpioset 0 on
gpioset 1 on
gpioset 2 on
....

Do it with all GPIOs, 0 to 39 until the ethernet cable is marked as connected in your computer/device.

You can also check if the switch is enabled by checking the voltage on the #RST pin of the BCM5325 switch chip.

Once you locate the GPIO then I could compile another bootloader for your router to make the switch work, since it needs further configuration after enabling it.

(Last edited by danitool on 8 Feb 2016, 13:56)

Hi danitool! First of all thanks for the reply.

I tried to flash the HomeHub 2A bootloader...but I have bad news...
If I don't press any key, openwrt still boots (I flashed only your CFE without erase).
But if I do, I get this error:

web error -1: Could not create TCP socket.

Here is the bootloader's log:

Pulling BCM5325 out of reset (GPIO15 ON)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Mon Mar 16 20:04:31 CET 2015 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0x0
    new B53_SWITCH_MODE = 0x0
    REG_MII_PORT_CONTROL = 0x0
    new REG_MII_PORT_CONTROL = 0x0
    B53_GLOBAL_CONFIG = 0x0
    new B53_GLOBAL_CONFIG = 0x0
    REG_VLAN_CTRL5 = 0x0
    new REG_VLAN_CTRL5 = 0x0
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0x0
    new B53_SWITCH_MODE = 0x0
    B53_GLOBAL_CONFIG = 0x0
    new B53_GLOBAL_CONFIG = 0x0
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0x0
error on Ethernet Switch setup
Failed initializing enet hardware
...done

CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
Total memory: 67108864 bytes (64MB)

Total memory used by CFE:  0x80401000 - 0x80528880 (1210496)
Initialized Data:          0x8041D970 - 0x8041FF80 (9744)
BSS Area:                  0x8041FF80 - 0x80426880 (26880)
Local Heap:                0x80426880 - 0x80526880 (1048576)
Stack Area:                0x80526880 - 0x80528880 (8192)
Text (code) segment:       0x80401000 - 0x8041D970 (117104)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : HOMEHUB2A
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 4
Base MAC Address                  : 00:11:22:33:44:55
Ethernet PHY Type                 : Internal
Memory size in MB                 : 64
CMT Thread Number                 : 0

Could not activate network interface 'eth0': CFE error -1
***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 1
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.

It just never stops... how do I fix it?

If you can boot into Openwrt command line, then you will able to control GPIOs, exporting them via /sys/class interface. Use this script

https://wiki.openwrt.org/doc/hardware/p … #utilities

And set every GPIO to "1" until the switch gets enabled, as I explained previously with CFE, but this time in OpenWRT.

./gpiocontrol.sh 0 out 1
./gpiocontrol.sh 0 out 1
./gpiocontrol.sh 1 out 1
./gpiocontrol.sh 2 out 1
./gpiocontrol.sh 3 out 1
....
danitool wrote:

If you can boot into Openwrt command line, then you will able to control GPIOs, exporting them via /sys/class interface. Use this script

https://wiki.openwrt.org/doc/hardware/p … #utilities

And set every GPIO to "1" until the switch gets enabled, as I explained previously with CFE, but this time in OpenWRT.

./gpiocontrol.sh 0 out 1
./gpiocontrol.sh 0 out 1
./gpiocontrol.sh 1 out 1
./gpiocontrol.sh 2 out 1
./gpiocontrol.sh 3 out 1
....

Done! The GPIO is #15.
If I set it to 0, all 4 ethernet leds turn on, unless I set it to 1! So yes, that's the correct GPIO Pin.

Thanks for the bootloader, I'm flashing it right now.

danitool wrote:

GPIO15 is the one used by the HH2A too. Might be with inverted polarity?

Check if with this bootloader the switch works:
https://drive.google.com/file/d/0B-EMoB … sp=sharing

Nope..it doesn't work! all 4 leds are on...the router is not detected by my computer... sad

alex.d93 wrote:
danitool wrote:

GPIO15 is the one used by the HH2A too. Might be with inverted polarity?

Check if with this bootloader the switch works:
https://drive.google.com/file/d/0B-EMoB … sp=sharing

Nope..it doesn't work! all 4 leds are on...the router is not detected by my computer... sad

Paste the bootlog here, also check more gpios, might be GPIO15 only is enabling the board LEDs.

danitool wrote:

Paste the bootlog here, also check more gpios, might be GPIO15 only is enabling the board LEDs.

Bootloader log:

Pulling BCM5325 out of reset (GPIO15 OFF)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Mon Feb  8 23:53:12 CET 2016 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0x0
    new B53_SWITCH_MODE = 0x0
    REG_MII_PORT_CONTROL = 0x0
    new REG_MII_PORT_CONTROL = 0x0
    B53_GLOBAL_CONFIG = 0x0
    new B53_GLOBAL_CONFIG = 0x0
    REG_VLAN_CTRL5 = 0x0
    new REG_VLAN_CTRL5 = 0x0
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0x0
    new B53_SWITCH_MODE = 0x0
    B53_GLOBAL_CONFIG = 0x0
    new B53_GLOBAL_CONFIG = 0x0
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0x0
error on Ethernet Switch setup
Failed initializing enet hardware
...done

CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
Total memory: 67108864 bytes (64MB)

Total memory used by CFE:  0x80401000 - 0x80528850 (1210448)
Initialized Data:          0x8041D950 - 0x8041FF50 (9728)
BSS Area:                  0x8041FF50 - 0x80426850 (26880)
Local Heap:                0x80426850 - 0x80526850 (1048576)
Stack Area:                0x80526850 - 0x80528850 (8192)
Text (code) segment:       0x80401000 - 0x8041D944 (117060)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : HOMEHUB2A
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 4
Base MAC Address                  : 00:11:22:33:44:55
Ethernet PHY Type                 : Internal
Memory size in MB                 : 64
CMT Thread Number                 : 0

Could not activate network interface 'eth0': CFE error -1
***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 0
Code Address: 0x80A00000, Entry Address: 0x80a00000
Decompression OK!
Entry at 0x80a00000
Starting program at 0x80a00000

OpenWRT log:

[    0.000000] Linux version 3.18.20 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r46450) ) #1 Fri Sep 4 15:12:19 CEST 2015
[    0.000000] Detected Broadcom 0x6358 CPU revision a1
[    0.000000] CPU frequency is 300 MHz
[    0.000000] 64MB of RAM installed
[    0.000000] board_bcm963xx: Boot address 0xbe000000
[    0.000000] board_bcm963xx: CFE version: 1.0.37-6.4
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0002a010 (Broadcom BMIPS4350)
[    0.000000] board: board name: 96358VW2
[    0.000000] MIPS: machine is Broadcom BCM96358VW2 reference board
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]
[    0.000000] Primary instruction cache 32kB, VIPT, 2-way, linesize 16 bytes.
[    0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 59908K/65536K available (2805K kernel code, 139K rwdata, 464K rodata, 1320K init, 192K bss, 5628K reserved)
[    0.000000] NR_IRQS:256
[    0.000000] Calibrating delay loop... 299.26 BogoMIPS (lpj=598528)
[    0.040000] pid_max: default: 32768 minimum: 301
[    0.044000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.048000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060000] NET: Registered protocol family 16
[    0.068000] registering PCI controller with io_map_base unset
[    0.072000] registering PCI controller with io_map_base unset
[    0.088000] PCI host bridge to bus 0000:00
[    0.092000] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[    0.096000] pci_bus 0000:00: root bus resource [io  0x8000000-0x8007fff]
[    0.100000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.108000] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30003fff]
[    0.112000] PCI host bridge to bus 0000:01
[    0.116000] pci_bus 0000:01: root bus resource [mem 0x38000000-0x3fffffff]
[    0.120000] pci_bus 0000:01: root bus resource [io  0x8008000-0x800ffff]
[    0.124000] pci_bus 0000:01: No busn resource found for root bus, will use [bus 01-ff]
[    0.128000] pci 0000:01:1e.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.132000] pci 0000:01:1e.0: BAR 10: assigned [mem 0x38000000-0x3fffffff]
[    0.136000] pci 0000:01:1e.0: BAR 7: assigned [io  0x8008000-0x80080ff]
[    0.140000] pci 0000:01:1e.0: BAR 8: assigned [io  0x8008400-0x80084ff]
[    0.144000] pci 0000:01:1e.0: CardBus bridge to [bus 02-05]
[    0.148000] pci 0000:01:1e.0:   bridge window [io  0x8008000-0x80080ff]
[    0.152000] pci 0000:01:1e.0:   bridge window [io  0x8008400-0x80084ff]
[    0.156000] pci 0000:01:1e.0:   bridge window [mem 0x38000000-0x3fffffff]
[    0.160000] Switched to clocksource MIPS
[    0.164000] PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
[    0.196000] ssb: Found chip with id 0xA8D6, rev 0x00 and package 0x08
[    0.224000] ssb_fallback_sprom: pci bus/device num mismatch: expected 0/0, but got 0/1
[    0.252000] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
[    0.260000] NET: Registered protocol family 2
[    0.268000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.276000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.280000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.288000] TCP: reno registered
[    0.292000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.300000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.304000] NET: Registered protocol family 1
[    0.312000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.320000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.328000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.336000] msgmni has been set to 117
[    0.344000] io scheduler noop registered
[    0.348000] io scheduler deadline registered (default)
[    0.356000] bcm63xx_uart.0: ttyS0 at MMIO 0xfffe0100 (irq = 10, base_baud = 1562500) is a bcm63xx_uart
[    0.364000] console [ttyS0] enabled
[    0.364000] console [ttyS0] enabled
[    0.372000] bootconsole [early0] disabled
[    0.372000] bootconsole [early0] disabled
[    0.380000] physmap platform flash device: 02000000 at 1e000000
[    0.388000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00227e
[    0.400000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.404000]   Amd/Fujitsu Extended Query version 1.3.
[    0.408000] number of CFI chips: 1
[    0.412000] bcm63xxpart: CFE boot tag found with version 6 and board type 96358VW2
[    0.420000] bcm63xxpart: Partition 0 is CFE offset 0 and length 20000
[    0.428000] bcm63xxpart: Partition 1 is kernel offset 20100 and length 11eba4
[    0.436000] bcm63xxpart: Partition 2 is rootfs offset 13eca4 and length 1ea135c
[    0.444000] bcm63xxpart: Partition 3 is nvram offset 1fe0000 and length 20000
[    0.448000] bcm63xxpart: Partition 4 is linux offset 20000 and length 1fc0000
[    0.456000] 5 bcm63xxpart partitions found on MTD device physmap-flash.0
[    0.464000] Creating 5 MTD partitions on "physmap-flash.0":
[    0.468000] 0x000000000000-0x000000020000 : "CFE"
[    0.476000] 0x000000020100-0x00000013eca4 : "kernel"
[    0.484000] 0x00000013eca4-0x000001fe0000 : "rootfs"
[    0.492000] mtd: device 2 (rootfs) set to be root filesystem
[    0.496000] 1 squashfs-split partitions found on MTD device rootfs
[    0.504000] 0x0000002e0000-0x000001fe0000 : "rootfs_data"
[    0.512000] 0x000001fe0000-0x000002000000 : "nvram"
[    0.520000] 0x000000020000-0x000001fe0000 : "linux"
[    0.528000] bcm63xx-spi bcm63xx-spi: at 0xfffe0800 (irq 9, FIFOs size 542)
[    0.564000] libphy: bcm63xx_enet MII bus: probed
[    0.632000] bcm63xx_enet bcm63xx_enet.0: attached PHY at address 1 [Broadcom BCM63XX (2)]
[    0.644000] libphy: bcm63xx_enet MII bus: probed
[    0.648000] bcm63xx_enet bcm63xx_enet.1: attached PHY at address 0 [Generic PHY]
[    0.660000] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    0.668000] TCP: cubic registered
[    0.672000] NET: Registered protocol family 17
[    0.676000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.688000] Bridge firewalling registered
[    0.692000] 8021q: 802.1Q VLAN Support v1.8
[    0.712000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    0.740000] Freeing unused kernel memory: 1320K (80366000 - 804b0000)
[    2.336000] init: Console is alive
[    2.340000] init: - watchdog -
[    3.348000] init: - preinit -
[    4.212000] random: mktemp urandom read with 16 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.884000] jffs2: notice: (227) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.908000] mount_root: switching to jffs2 overlay
ifconfig: SIOCGIFFLAGS: No such device
[    7.972000] procd: - early -
[    7.976000] procd: - watchdog -
[    9.088000] procd: - ubus -
[   10.160000] procd: - init -
Please press Enter to activate this console.
[   15.104000] NET: Registered protocol family 10
[   15.172000] usbcore: registered new interface driver usbfs
[   15.176000] usbcore: registered new interface driver hub
[   15.180000] usbcore: registered new device driver usb
[   15.224000] Button Hotplug driver version 0.4.1
[   15.328000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   15.336000] ehci-platform: EHCI generic platform driver
[   15.344000] ehci-platform ehci-platform: EHCI Host Controller
[   15.348000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[   15.360000] ehci-platform ehci-platform: irq 18, io mem 0xfffe1300
[   15.376000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00, overcurrent ignored
[   15.388000] hub 1-0:1.0: USB hub found
[   15.392000] hub 1-0:1.0: 2 ports detected
[   15.416000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   15.472000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   15.480000] ohci-platform: OHCI generic platform driver
[   15.488000] ohci-platform ohci-platform: Generic Platform OHCI controller
[   15.492000] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[   15.500000] ohci-platform ohci-platform: irq 13, io mem 0xfffe1400
[   15.572000] hub 2-0:1.0: USB hub found
[   15.576000] hub 2-0:1.0: 2 ports detected
[   15.596000] uhci_hcd: USB Universal Host Controller Interface driver
[   15.612000] i2c /dev entries driver
[   15.688000] usbcore: registered new interface driver usbserial
[   15.692000] usbcore: registered new interface driver usbserial_generic
[   15.700000] usbserial: USB Serial support registered for generic
[   15.748000] Linux video capture interface: v2.00
[   15.788000] hidraw: raw HID events driver (C) Jiri Kosina
[   15.852000] usbcore: registered new interface driver cdc_acm
[   15.856000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   15.872000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   15.880000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   15.900000] gspca_main: v2.14.0 registered
[   15.912000] usbcore: registered new interface driver ov519
[   15.932000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.976000] nf_conntrack version 0.5.0 (956 buckets, 3824 max)
[   16.092000] usbcore: registered new interface driver usbhid
[   16.096000] usbhid: USB HID core driver
[   16.124000] usbcore: registered new interface driver uvcvideo
[   16.132000] USB Video Class driver (1.1.1)
[   16.348000] xt_time: kernel timezone is -0000
[   16.416000] cfg80211: Calling CRDA to update world regulatory domain
[   16.436000] cfg80211: World regulatory domain updated:
[   16.440000] cfg80211:  DFS Master region: unset
[   16.444000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   16.456000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   16.464000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   16.472000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   16.480000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   16.488000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   16.496000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   16.504000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   16.516000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   17.080000] usbcore: registered new interface driver option
[   17.084000] usbserial: USB Serial support registered for GSM modem (1-port)
[   17.104000] PPP generic driver version 2.4.2
[   17.116000] NET: Registered protocol family 24
[   17.152000] usbcore: registered new interface driver snd-usb-audio
[   17.740000] b43-phy0: Broadcom 43222 WLAN found (core revision 16)
[   17.792000] b43-phy0: Found PHY: Analog 8, Type 4 (N), Revision 6
[   17.796000] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2056, Revision 6, Version 0
[   17.820000] Broadcom 43xx driver loaded [ Features: PNL ]
[   23.852000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   33.136000] random: nonblocking pool is initialized
[   39.332000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Anyway, I think that the 4 green LEDs are connected to BCM5325 switch. I'll check it.

I checked the #RESET pin.
It always is 0V with 4 leds on.
If I set GPIO 15 to 1 I get 3.25V on #RESET pin.

Here are some pictures:
PunBB bbcode test
PunBB bbcode test

I'm afraid the switch isn wired to MDIO/MDC (pins number 1 and 2 at the switch), and can only be configured via SPI. Test this bootloader

https://drive.google.com/file/d/0B-EMoB … sp=sharing

It's an attempt to configure the switch via SPI. I don't know if the switch uses spi slave 0 or other. Furthermore, SPI might be broken for BCM6358 in CFE bootloaders.

Put here the bootlog of this new CFE.

(Last edited by danitool on 9 Feb 2016, 02:54)

Yes....that's so weird...I think they are communicating differently.

Here is the full log:

Pulling BCM5325 out of reset (GPIO15 ON)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Tue Feb  9 01:47:37 CET 2016 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0xa0
    new B53_SWITCH_MODE = 0xa0
    REG_MII_PORT_CONTROL = 0xa0
    new REG_MII_PORT_CONTROL = 0xa0
    B53_GLOBAL_CONFIG = 0xa0
    new B53_GLOBAL_CONFIG = 0xa0
    REG_VLAN_CTRL5 = 0xa0
    new REG_VLAN_CTRL5 = 0xa0
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0xa0
    new B53_SWITCH_MODE = 0xa0
    B53_GLOBAL_CONFIG = 0xa0
    new B53_GLOBAL_CONFIG = 0xa0
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0xa0
error on Ethernet Switch setup
Failed initializing enet hardware
...done

CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
Total memory: 67108864 bytes (64MB)

Total memory used by CFE:  0x80401000 - 0x80528880 (1210496)
Initialized Data:          0x8041D970 - 0x8041FF80 (9744)
BSS Area:                  0x8041FF80 - 0x80426880 (26880)
Local Heap:                0x80426880 - 0x80526880 (1048576)
Stack Area:                0x80526880 - 0x80528880 (8192)
Text (code) segment:       0x80401000 - 0x8041D970 (117104)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : HOMEHUB2A
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 4
Base MAC Address                  : 00:11:22:33:44:55
Ethernet PHY Type                 : Internal
Memory size in MB                 : 64
CMT Thread Number                 : 0

Could not activate network interface 'eth0': CFE error -1
***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 0
Code Address: 0x80A00000, Entry Address: 0x80a00000
Decompression OK!
Entry at 0x80a00000
Starting program at 0x80a00000
[    0.000000] Linux version 3.18.20 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r46450) ) #1 Fri Sep 4 15:12:19 CEST 2015
[    0.000000] Detected Broadcom 0x6358 CPU revision a1
[    0.000000] CPU frequency is 300 MHz
[    0.000000] 64MB of RAM installed
[    0.000000] board_bcm963xx: Boot address 0xbe000000
[    0.000000] board_bcm963xx: CFE version: 1.0.37-6.4
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0002a010 (Broadcom BMIPS4350)
[    0.000000] board: board name: 96358VW2
[    0.000000] MIPS: machine is Broadcom BCM96358VW2 reference board
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]
[    0.000000] Primary instruction cache 32kB, VIPT, 2-way, linesize 16 bytes.
[    0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 59908K/65536K available (2805K kernel code, 139K rwdata, 464K rodata, 1320K init, 192K bss, 5628K reserved)
[    0.000000] NR_IRQS:256
[    0.000000] Calibrating delay loop... 299.26 BogoMIPS (lpj=598528)
[    0.040000] pid_max: default: 32768 minimum: 301
[    0.044000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.048000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060000] NET: Registered protocol family 16
[    0.068000] registering PCI controller with io_map_base unset
[    0.072000] registering PCI controller with io_map_base unset
[    0.088000] PCI host bridge to bus 0000:00
[    0.092000] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[    0.096000] pci_bus 0000:00: root bus resource [io  0x8000000-0x8007fff]
[    0.100000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.108000] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30003fff]
[    0.112000] PCI host bridge to bus 0000:01
[    0.116000] pci_bus 0000:01: root bus resource [mem 0x38000000-0x3fffffff]
[    0.120000] pci_bus 0000:01: root bus resource [io  0x8008000-0x800ffff]
[    0.124000] pci_bus 0000:01: No busn resource found for root bus, will use [bus 01-ff]
[    0.128000] pci 0000:01:1e.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.132000] pci 0000:01:1e.0: BAR 10: assigned [mem 0x38000000-0x3fffffff]
[    0.136000] pci 0000:01:1e.0: BAR 7: assigned [io  0x8008000-0x80080ff]
[    0.140000] pci 0000:01:1e.0: BAR 8: assigned [io  0x8008400-0x80084ff]
[    0.144000] pci 0000:01:1e.0: CardBus bridge to [bus 02-05]
[    0.148000] pci 0000:01:1e.0:   bridge window [io  0x8008000-0x80080ff]
[    0.152000] pci 0000:01:1e.0:   bridge window [io  0x8008400-0x80084ff]
[    0.156000] pci 0000:01:1e.0:   bridge window [mem 0x38000000-0x3fffffff]
[    0.160000] Switched to clocksource MIPS
[    0.164000] PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
[    0.196000] ssb: Found chip with id 0xA8D6, rev 0x00 and package 0x08
[    0.224000] ssb_fallback_sprom: pci bus/device num mismatch: expected 0/0, but got 0/1
[    0.252000] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
[    0.260000] NET: Registered protocol family 2
[    0.268000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.276000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.280000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.288000] TCP: reno registered
[    0.292000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.300000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.304000] NET: Registered protocol family 1
[    0.312000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.320000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.328000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.336000] msgmni has been set to 117
[    0.344000] io scheduler noop registered
[    0.348000] io scheduler deadline registered (default)
[    0.356000] bcm63xx_uart.0: ttyS0 at MMIO 0xfffe0100 (irq = 10, base_baud = 1562500) is a bcm63xx_uart
[    0.364000] console [ttyS0] enabled
[    0.364000] console [ttyS0] enabled
[    0.372000] bootconsole [early0] disabled
[    0.372000] bootconsole [early0] disabled
[    0.380000] physmap platform flash device: 02000000 at 1e000000
[    0.388000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000089 Chip ID 0x00227e
[    0.400000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.404000]   Amd/Fujitsu Extended Query version 1.3.
[    0.408000] number of CFI chips: 1
[    0.412000] bcm63xxpart: CFE boot tag found with version 6 and board type 96358VW2
[    0.420000] bcm63xxpart: Partition 0 is CFE offset 0 and length 20000
[    0.428000] bcm63xxpart: Partition 1 is kernel offset 20100 and length 11eba4
[    0.436000] bcm63xxpart: Partition 2 is rootfs offset 13eca4 and length 1ea135c
[    0.444000] bcm63xxpart: Partition 3 is nvram offset 1fe0000 and length 20000
[    0.448000] bcm63xxpart: Partition 4 is linux offset 20000 and length 1fc0000
[    0.456000] 5 bcm63xxpart partitions found on MTD device physmap-flash.0
[    0.464000] Creating 5 MTD partitions on "physmap-flash.0":
[    0.468000] 0x000000000000-0x000000020000 : "CFE"
[    0.476000] 0x000000020100-0x00000013eca4 : "kernel"
[    0.484000] 0x00000013eca4-0x000001fe0000 : "rootfs"
[    0.492000] mtd: device 2 (rootfs) set to be root filesystem
[    0.496000] 1 squashfs-split partitions found on MTD device rootfs
[    0.504000] 0x0000002e0000-0x000001fe0000 : "rootfs_data"
[    0.512000] 0x000001fe0000-0x000002000000 : "nvram"
[    0.520000] 0x000000020000-0x000001fe0000 : "linux"
[    0.528000] bcm63xx-spi bcm63xx-spi: at 0xfffe0800 (irq 9, FIFOs size 542)
[    0.564000] libphy: bcm63xx_enet MII bus: probed
[    0.632000] bcm63xx_enet bcm63xx_enet.0: attached PHY at address 1 [Broadcom BCM63XX (2)]
[    0.644000] libphy: bcm63xx_enet MII bus: probed
[    0.648000] bcm63xx_enet bcm63xx_enet.1: attached PHY at address 0 [Generic PHY]
[    0.660000] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    0.668000] TCP: cubic registered
[    0.672000] NET: Registered protocol family 17
[    0.676000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.688000] Bridge firewalling registered
[    0.692000] 8021q: 802.1Q VLAN Support v1.8
[    0.712000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    0.740000] Freeing unused kernel memory: 1320K (80366000 - 804b0000)
[    2.332000] init: Console is alive
[    2.336000] init: - watchdog -
[    3.340000] init: - preinit -
[    4.204000] random: mktemp urandom read with 15 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.872000] jffs2: notice: (227) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.896000] mount_root: switching to jffs2 overlay
ifconfig: SIOCGIFFLAGS: No such device
[    7.960000] procd: - early -
[    7.964000] procd: - watchdog -
[    9.072000] procd: - ubus -
[   10.144000] procd: - init -
Please press Enter to activate this console.
[   15.068000] NET: Registered protocol family 10
[   15.132000] usbcore: registered new interface driver usbfs
[   15.140000] usbcore: registered new interface driver hub
[   15.144000] usbcore: registered new device driver usb
[   15.188000] Button Hotplug driver version 0.4.1
[   15.292000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   15.300000] ehci-platform: EHCI generic platform driver
[   15.308000] ehci-platform ehci-platform: EHCI Host Controller
[   15.312000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[   15.320000] ehci-platform ehci-platform: irq 18, io mem 0xfffe1300
[   15.340000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00, overcurrent ignored
[   15.352000] hub 1-0:1.0: USB hub found
[   15.356000] hub 1-0:1.0: 2 ports detected
[   15.380000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   15.432000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   15.444000] ohci-platform: OHCI generic platform driver
[   15.452000] ohci-platform ohci-platform: Generic Platform OHCI controller
[   15.460000] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[   15.468000] ohci-platform ohci-platform: irq 13, io mem 0xfffe1400
[   15.536000] hub 2-0:1.0: USB hub found
[   15.540000] hub 2-0:1.0: 2 ports detected
[   15.560000] uhci_hcd: USB Universal Host Controller Interface driver
[   15.576000] i2c /dev entries driver
[   15.644000] usbcore: registered new interface driver usbserial
[   15.648000] usbcore: registered new interface driver usbserial_generic
[   15.656000] usbserial: USB Serial support registered for generic
[   15.712000] Linux video capture interface: v2.00
[   15.752000] hidraw: raw HID events driver (C) Jiri Kosina
[   15.820000] usbcore: registered new interface driver cdc_acm
[   15.824000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   15.840000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   15.848000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   15.868000] gspca_main: v2.14.0 registered
[   15.880000] usbcore: registered new interface driver ov519
[   15.900000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.944000] nf_conntrack version 0.5.0 (956 buckets, 3824 max)
[   16.060000] usbcore: registered new interface driver usbhid
[   16.064000] usbhid: USB HID core driver
[   16.096000] usbcore: registered new interface driver uvcvideo
[   16.104000] USB Video Class driver (1.1.1)
[   16.308000] xt_time: kernel timezone is -0000
[   16.396000] cfg80211: Calling CRDA to update world regulatory domain
[   16.412000] cfg80211: World regulatory domain updated:
[   16.416000] cfg80211:  DFS Master region: unset
[   16.420000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   16.432000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   16.440000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   16.448000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   16.456000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   16.464000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   16.472000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   16.480000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   16.488000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   17.112000] usbcore: registered new interface driver option
[   17.116000] usbserial: USB Serial support registered for GSM modem (1-port)
[   17.144000] PPP generic driver version 2.4.2
[   17.176000] NET: Registered protocol family 24
[   17.272000] usbcore: registered new interface driver snd-usb-audio
[   17.768000] b43-phy0: Broadcom 43222 WLAN found (core revision 16)
[   17.820000] b43-phy0: Found PHY: Analog 8, Type 4 (N), Revision 6
[   17.824000] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2056, Revision 6, Version 0
[   17.848000] Broadcom 43xx driver loaded [ Features: PNL ]
[   23.788000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   33.136000] random: nonblocking pool is initialized
[   39.224000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

P.S: I noticed that if I connect my computer to that switch, the led X blinks (where the X is the number of ethernet port). So I guess there is communication between my compuer and the switch, but not to SoC...uhm.

P.P.S: If I press any key while bootloader is booting, I still get the web error:

Could not activate network interface 'eth0': CFE error -1
***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 1
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.

Well, at least now is reading something from the SPI interface. But not sure if the slave select 0 is correct. Test this one using slave select 1

https://drive.google.com/file/d/0B-EMoB … sp=sharing

Paste again the CFE bootlog. For the slave 2 and 3 I need to enable a gpio mux, might be tomorrow I'll build 2 more bootloaders with them enabled.

danitool wrote:

Paste again the CFE bootlog. For the slave 2 and 3 I need to enable a gpio mux, might be tomorrow I'll build 2 more bootloaders with them enabled.

I just get many exceptions, openwrt is not booting anymore.

Pulling BCM5325 out of reset (GPIO15 ON)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Tue Feb  9 02:34:57 CET 2016 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0xff
    new B53_SWITCH_MODE = 0xff
    REG_MII_PORT_CONTROL = 0xff
    new REG_MII_PORT_CONTROL = 0xff
    B53_GLOBAL_CONFIG = 0xff
    new B53_GLOBAL_CONFIG = 0xff
    REG_VLAN_CTRL5 = 0xff
    new REG_VLAN_CTRL5 = 0xff
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0xff
    new B53_SWITCH_MODE = 0xff
    B53_GLOBAL_CONFIG = 0xff
    new B53_GLOBAL_CONFIG = 0xff
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0xff
**Exception 32: EPC=504F5254, Cause=8040F7AC (CoProcUnu)
                RA=00000100, VAddr=52524944

        0  ($00) = 00000000     AT ($01) = 00000000
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 805285F0     s1 ($17) = 00000000
        s2 ($18) = FFFE1000     s3 ($19) = 79BECB38
        s4 ($20) = FFFE1000     s5 ($21) = 79BECB38
        s6 ($22) = FFFE1000     s7 ($23) = 79BECB38
        t8 ($24) = FFFE1000     t9 ($25) = 20696E69
        k0 ($26) = 697A696E     k1 ($27) = 65207377
        gp ($28) = 2E2E2E0A     sp ($29) = 80420030
        fp ($30) = 80426608     ra ($31) = 00000100

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 006E7529
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 8040F7AC
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 8040F7AC     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000002
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000002
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 ($19) = 00000000
        s4 ($20) = 00000000     s5 ($21) = 00000000
        s6 ($22) = 00000000     s7 ($23) = 00000000
        t8 ($24) = 00000000     t9 ($25) = 00000000
        k0 ($26) = 00000000     k1 ($27) = 00000000
        gp ($28) = 00000000     sp ($29) = 00000000
        fp ($30) = 00000000     ra ($31) = 00000000

**Exception 32: EPC=00000000, Cause=00000000 (Interrupt)
                RA=00000000, VAddr=20202020

        0  ($00) = 30303030     AT ($01) = 00707429
        v0 ($02) = 00000000     v1 ($03) = 00000000
        a0 ($04) = 00000000     a1 ($05) = 00000000
        a2 ($06) = 00000000     a3 ($07) = 00000000
        t0 ($08) = 00000000     t1 ($09) = 00000000
        t2 ($10) = 00000000     t3 ($11) = 00000000
        t4 ($12) = 00000000     t5 ($13) = 00000000
        t6 ($14) = 00000000     t7 ($15) = 00000000
        s0 ($16) = 00000000     s1 ($17) = 00000000
        s2 ($18) = 00000000     s3 (
danitool wrote:

Hi, I've made 4 more different bootloaders, every one uses a different SPI slave select.

https://drive.google.com/file/d/0B-EMoB … sp=sharing

Let me know what happens with each one.

SS0 = webserver errors
SS1 = still no working switch
SS2 = still no working switch
SS3 = still no working switch

LOGS:

SS0 BOOTLOADER:

Pulling BCM5325 out of reset (GPIO15 ON)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Tue Feb  9 20:07:10 CET 2016 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0xa0
    new B53_SWITCH_MODE = 0xa0
    REG_MII_PORT_CONTROL = 0xa0
    new REG_MII_PORT_CONTROL = 0xa0
    B53_GLOBAL_CONFIG = 0xa0
    new B53_GLOBAL_CONFIG = 0xa0
    REG_VLAN_CTRL5 = 0xa0
    new REG_VLAN_CTRL5 = 0xa0
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0xa0
    new B53_SWITCH_MODE = 0xa0
    B53_GLOBAL_CONFIG = 0xa0
    new B53_GLOBAL_CONFIG = 0xa0
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0xa0
error on Ethernet Switch setup
Failed initializing enet hardware
...done

CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
Total memory: 67108864 bytes (64MB)

Total memory used by CFE:  0x80401000 - 0x805288C0 (1210560)
Initialized Data:          0x8041D9B0 - 0x8041FFC0 (9744)
BSS Area:                  0x8041FFC0 - 0x804268C0 (26880)
Local Heap:                0x804268C0 - 0x805268C0 (1048576)
Stack Area:                0x805268C0 - 0x805288C0 (8192)
Text (code) segment:       0x80401000 - 0x8041D9AC (117164)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : HOMEHUB2A
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 4
Base MAC Address                  : 00:11:22:33:44:55
Ethernet PHY Type                 : Internal
Memory size in MB                 : 64
CMT Thread Number                 : 0

Could not activate network interface 'eth0': CFE error -1
***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 1
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not@


SS1 BOOTLOADER:

Pulling BCM5325 out of reset (GPIO15 ON)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Tue Feb  9 20:09:25 CET 2016 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0xff
    new B53_SWITCH_MODE = 0xff
    REG_MII_PORT_CONTROL = 0xff
    new REG_MII_PORT_CONTROL = 0xff
    B53_GLOBAL_CONFIG = 0xff
    new B53_GLOBAL_CONFIG = 0xff
    REG_VLAN_CTRL5 = 0xff
    new REG_VLAN_CTRL5 = 0xff
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0xff
    new B53_SWITCH_MODE = 0xff
    B53_GLOBAL_CONFIG = 0xff
    new B53_GLOBAL_CONFIG = 0xff
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0xff
...done

CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
Total memory: 67108864 bytes (64MB)

Total memory used by CFE:  0x80401000 - 0x805288C0 (1210560)
Initialized Data:          0x8041D9B0 - 0x8041FFC0 (9744)
BSS Area:                  0x8041FFC0 - 0x804268C0 (26880)
Local Heap:                0x804268C0 - 0x805268C0 (1048576)
Stack Area:                0x805268C0 - 0x805288C0 (8192)
Text (code) segment:       0x80401000 - 0x8041D9AC (117164)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : HOMEHUB2A
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 4
Base MAC Address                  : 00:11:22:33:44:55
Ethernet PHY Type                 : Internal
Memory size in MB                 : 64
CMT Thread Number                 : 0

***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 1
web info: Waiting for connection on socket 0.
CFE>
CFE>

SS2 BOOTLOADER:

Pulling BCM5325 out of reset (GPIO15 ON)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Tue Feb  9 20:10:02 CET 2016 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0xff
    new B53_SWITCH_MODE = 0xff
    REG_MII_PORT_CONTROL = 0xff
    new REG_MII_PORT_CONTROL = 0xff
    B53_GLOBAL_CONFIG = 0xff
    new B53_GLOBAL_CONFIG = 0xff
    REG_VLAN_CTRL5 = 0xff
    new REG_VLAN_CTRL5 = 0xff
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0xff
    new B53_SWITCH_MODE = 0xff
    B53_GLOBAL_CONFIG = 0xff
    new B53_GLOBAL_CONFIG = 0xff
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0xff
...done

CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
Total memory: 67108864 bytes (64MB)

Total memory used by CFE:  0x80401000 - 0x805288C0 (1210560)
Initialized Data:          0x8041D9B0 - 0x8041FFC0 (9744)
BSS Area:                  0x8041FFC0 - 0x804268C0 (26880)
Local Heap:                0x804268C0 - 0x805268C0 (1048576)
Stack Area:                0x805268C0 - 0x805288C0 (8192)
Text (code) segment:       0x80401000 - 0x8041D9AC (117164)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : HOMEHUB2A
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 4
Base MAC Address                  : 00:11:22:33:44:55
Ethernet PHY Type                 : Internal
Memory size in MB                 : 64
CMT Thread Number                 : 0

***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 1
web info: Waiting for connection on socket 0.
CFE>
CFE>
CFE>

SS3 BOOTLOADER:

Pulling BCM5325 out of reset (GPIO15 ON)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Tue Feb  9 20:10:34 CET 2016 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0xff
    new B53_SWITCH_MODE = 0xff
    REG_MII_PORT_CONTROL = 0xff
    new REG_MII_PORT_CONTROL = 0xff
    B53_GLOBAL_CONFIG = 0xff
    new B53_GLOBAL_CONFIG = 0xff
    REG_VLAN_CTRL5 = 0xff
    new REG_VLAN_CTRL5 = 0xff
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0xff
    new B53_SWITCH_MODE = 0xff
    B53_GLOBAL_CONFIG = 0xff
    new B53_GLOBAL_CONFIG = 0xff
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0xff
...done

CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
Total memory: 67108864 bytes (64MB)

Total memory used by CFE:  0x80401000 - 0x805288C0 (1210560)
Initialized Data:          0x8041D9B0 - 0x8041FFC0 (9744)
BSS Area:                  0x8041FFC0 - 0x804268C0 (26880)
Local Heap:                0x804268C0 - 0x805268C0 (1048576)
Stack Area:                0x805268C0 - 0x805288C0 (8192)
Text (code) segment:       0x80401000 - 0x8041D9AC (117164)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : HOMEHUB2A
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 4
Base MAC Address                  : 00:11:22:33:44:55
Ethernet PHY Type                 : Internal
Memory size in MB                 : 64
CMT Thread Number                 : 0

***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 1
web info: Waiting for connection on socket 0.
CFE>
CFE>

I guess it's connected to SS0, but it seems that the SPI code, for comunicating the SoC with the switch, is not working in CFE. There isn't much I can do for solving this problem.

(Last edited by danitool on 10 Feb 2016, 00:57)

danitool wrote:

I made another CFE with some minor modifications on the spi part that could help

https://drive.google.com/file/d/0B-EMoB … sp=sharing

can you test it?

Done.

1) It gives me the web error again when pressing any key...
2) The switch isn't detected by openwrt

Anyway, I'm pretty sure that the switch is connected to SoC through SPI...because the first 2 pins (MDIO, MDC) looks like they are not connected anywhere. I'll check them later with a multimeter.

P.S: Log

Bootloader

Pulling BCM5325 out of reset (GPIO15 ON)......done


CFE version 1.0.37-6.4 for BCM96358 (32bit,SP,BE)
Build Date: Wed Feb 10 15:44:11 CET 2016 (dani@tool)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbe000000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB

Now initializing the switch...
GPIO_MODE_EMAC2_MII_CLK_INV pinmux enabled
Setting BCM5325 managed mode
    B53_SWITCH_MODE = 0xa0
    new B53_SWITCH_MODE = 0xa0
    REG_MII_PORT_CONTROL = 0xa0
    new REG_MII_PORT_CONTROL = 0xa0
bcmsw_spi_select: SPIF set, not ready
    B53_GLOBAL_CONFIG = 0xa0
    new B53_GLOBAL_CONFIG = 0xa0
bcmsw_spi_select: SPIF set, not ready
    REG_VLAN_CTRL5 = 0xa0
    new REG_VLAN_CTRL5 = 0xa0
done
Setting BCM5325 unmanaged mode
    B53_SWITCH_MODE = 0xa0
    new B53_SWITCH_MODE = 0xa0
bcmsw_spi_select: SPIF set, not ready
    B53_GLOBAL_CONFIG = 0xa0
    new B53_GLOBAL_CONFIG = 0xa0
done
Clearing B53_PORT_CTRL(i) registers at ports 0, 1, 2, 3, 4, 5, 6, 7, 8,  done
B53_PORT_OVERRIDE_CTRL = 0xa0
error on Ethernet Switch setup
Failed initializing enet hardware
...done

CPU type 0x2A010: 300MHz, Bus: 133MHz, Ref: 64MHz
Total memory: 67108864 bytes (64MB)

Total memory used by CFE:  0x80401000 - 0x805289E0 (1210848)
Initialized Data:          0x8041DAD0 - 0x804200E0 (9744)
BSS Area:                  0x804200E0 - 0x804269E0 (26880)
Local Heap:                0x804269E0 - 0x805269E0 (1048576)
Stack Area:                0x805269E0 - 0x805289E0 (8192)
Text (code) segment:       0x80401000 - 0x8041DAC8 (117448)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : HOMEHUB2A
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 4
Base MAC Address                  : 00:11:22:33:44:55
Ethernet PHY Type                 : Internal
Memory size in MB                 : 64
CMT Thread Number                 : 0

Could not activate network interface 'eth0': CFE error -1
***  Press any key to stop auto run (1 seconds) ***
 Auto run second count down: 1
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
CFE>
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.
web error -1: Could not create TCP socket.

The discussion might have continued from here.