Fritzbox 7362 (SL) OpenWrt port


#1

I'm porting OpenWRT to Fritzbox 7362 SL. It has VRX288 SoC and both SPI (eva and tffs) and NAND flash (kernel and rootfs).
I got to the point where most of the hardware is detected in early boot - switch, DSL, PCIe/WLAN and SPI - but I'm having trouble with NAND.

I looked at AVM's 6.xx (Linux 2.6.32) and 7.01 (Linux 3.10) sources, and this board (HW202/HW203) has no references to NAND anywhere - neither in old header files, nor in the new device tree.
I tried to brute force it by taking NAND definition from other devices' DTS, but without luck.

Any ideas? Thanks


#2

Theres another project called Feetz.
Their overview page mentions the 7362 and 7490 being quite similar, and linked to this oem location for sources. The 7362 may not work exactly the same way but may give some clues on what else is worth trying/testing: ftp://ftp.avm.de/fritz.box/fritzbox.7490/x_misc/opensrc/source-files-FRITZ.Box_7490-06.80.tar.gz


#3

I already tried NAND pinout from HW185 and HW223. Actually, all Fritz NAND boards (where it's defined) share the same pinout: ALE - pin 13, CLE - pin 24, RD - pin 49, RD_BY - pin 48, CS1 - pin 23, with active low.

My main suspect is the wrong reg value, but I don't know where should I look to find the memory address, or how could I calculate it?


#4

Ah i completely missed you were already looking at the sources.

This is all very new to me, but I found a reference that the flash chip in the 7362 was this MT29F1G08ABADAWP, and googling that lead me to here:


#5

I already found that datasheet, and it didn't help me too much. I believe that the problematic part of the device tree is this:

&localbus {
	nand@1 {
		compatible = "lantiq,nand-xway";
		bank-width = <1>;
		reg = <1 0x0 0x2000000>;
		#address-cells = <1>;
		#size-cells = <1>;

I can determine bank width (1 byte) from the chip model (*ABADAWP), but how do I know what are the reg, address-cells and size-cells parameters? It appears to vary between architectures and boards, according to Device Tree Usage - eLinux.org.


#6

It was a typo in the device tree (my mistake). I fixed it and now NAND is detected and OpenWRT can boot from it.
openwrt_7362sl


#7

Please provide a pull request against OpenWrt master, once you're happy with it.


#8

Awesome mate, well done.
I have a 7490 arriving in the mail next week, and will have a go adding support for it.


#9

I'm currently posting this via internet connection on OpenWrt. VDSL2 (G.993.2) works out of the box, as well as VLAN tagging on dsl0 device for the PPPoE data connection.

I will test VoIP (Asterisk) later, but initial tests showed that kmod-ltq-tapi and vmmc load fine, so it will probably work.


#10

I happen to expect a 7490 myself so I'll be keeping an eye out for any OpenWrt support. Would be very neat.


#11

VoIP unfortunately doesn't work. Same problems as with every other AVM device when it comes to vmmc, unknown GPIO pinout and functionality. Just when I thought i finally had all-in-one OpenWRT device...


#12

I just noticed that the switch doesn't work out of the box (no traffic between ports). It works if I add switch manually to /etc/config/network like this:

config switch 'eth0'
        option name 'switch0'

Is this the expected behavior or am I missing something in the device tree?

EDIT: It has to be added to /etc/board.d/02_network


#13

I just created a pull request. It renames 7360SL to something more sane than "1&1 HomeServer" and adds support for 7362SL.


#14

Nice one!!
If im understanding the changes - this will remove the dual kernel boot structure that oem has.

If someone wanted to restore back to oem firmware, what would the process be?


#15

I did it because there's no simple way to switch images anyway.

Simply run recovery app from AVM to flash FRITZ!OS. Original partition table is hardcoded in EVA (urlader partition) so it will always work.


#16

Awesome. I’ll use this approach for 7490 too then.