Supporting FritzBox 7272

Hello, I have an old AVM FritzBox 7272 where I want to run OpenWrt on. As this post already sais support for the 7272 isn't planned but because Freetz-NG (which has support) doesn't match my requirements I thought of building my own support.

Current situation

By copying together some device tree parts I was be able to ram boot the 7272 successfully. When I saw the bootlog of the 7490 (which is Lantiq VR9 based) I noticed similarities between those (both the OEM log and OpenWRT log) and tried using vr9.dtsi as the device trees base and it also worked. The most important parts of it the ethnernet ports, wifi chip and flash storage doesn't work at the time.

Through console access while Freetz-NG was loaded I was be able to find out that the wifi chip is connected via the pci bus. The 7272 and 7490 should (I think so) use the same ethernet driver in the OEM firmware because they boot have in their OEM boot log this line: [avmnet] [avmnet_swi_7port_init] Init on module swi_vr9 called.. Because of this line I tried the same ethernet device tree configuration and loading the same device packages but still ethernet didn't worked.

In the OpenWRT bootlog of the 7272 I didn't saw any ethernet initialization like in the one from the 7490 not even an error, altrough I used the same device packages selected every firmware that looked like something from lantiq.

I tried a lot to solve these issues with AIs like claude or ChatGPT but booth were not be able to help me solve any of this. It would be realy nice if someone could give me some advises how to continue and solve these things.

As said I have console access to both openwrt and freetz-ng system on the 7272 so if there is anything you may need for further investigation please say so.

The current device tree (based on VR9 and ethernet nodes from the 7490:

#include "vr9.dtsi"

#include <dt-bindings/input/input.h>
#include <dt-bindings/mips/lantiq_rcu_gphy.h>

/ {
 	compatible = "avm,fritz7272", "lantiq,xway", "lantiq,vr9", "lantiq,ar10";
 	model = "AVM FRITZ!Box 7272";

 	memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x8000000>;
 	};
};

&dma0 {
	interrupt-parent = <&icu0>;
	interrupts = <72 73 74 75 76 77 78 79 80 81 82 83 97 98 99 100 101 70 88 93>;     // from /proc/interrupts in Freetz-NG + offset of 6 because ASC RX and TX irq also had an offset of 6
	#dma-cells = <1>;
	lantiq,descriptors = <64>;
    lantiq,budget = <100>;
}

&gphy0 {
	lantiq,gphy-mode = <GPHY_MODE_GE>;
};

&gphy1 {
	lantiq,gphy-mode = <GPHY_MODE_GE>;
};

&gswip_mdio {
	phy0: ethernet-phy@0 {
		reg = <0x00>;
		reset-gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
	};
	
	phy1: ethernet-phy@1 {
		reg = <0x01>;
		reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
	};
	
	phy11: ethernet-phy@11 {
		reg = <0x11>;
	};
	
	phy13: ethernet-phy@13 {
		reg = <0x13>;
	};
};

&gswip_ports {
	port@0 {
		reg = <0>;
		label = "lan3";
		phy-mode = "rgmii-rxid";
		phy-handle = <&phy0>;
	};
	
	port@1 {
		reg = <1>;
		label = "lan4";
		phy-mode = "rgmii-rxid";
		phy-handle = <&phy1>;
	};
	
	port@2 {
		reg = <2>;
		label = "lan2";
		phy-mode = "internal";
		phy-handle = <&phy11>;
	};

	port@4 {
		reg = <4>;
		label = "lan1";
		phy-mode = "internal";
		phy-handle = <&phy13>;
	};
};

&gswip {
	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
};

&pcie0 {
	status = "okay";

	gpio-reset = <&gpio 21 GPIO_ACTIVE_LOW>;
	lantiq,switch-pcie-endianess;
};

The OpenWrt bootlog with the shown device tree:

[    0.000000] Linux version 5.15.167 (builder@8398a5a644d5) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r24106-10cc5fcd00) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 Mon Sep 23 12:34:46 2024
[    0.000000] SoC: xRX300 rev 1.2
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is AVM FRITZ!Box 7272
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyLTQ0,115200n8r
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=0005713a
[    0.000000] Readback ErrCtl register=0005713a
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 117068K/131072K available (6372K kernel code, 607K rwdata, 1364K rodata, 4120K init, 213K bss, 14004K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000002] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.007974] Calibrating delay loop... 331.77 BogoMIPS (lpj=1658880)
[    0.074013] pid_max: default: 32768 minimum: 301
[    0.080184] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.087404] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.103777] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.113525] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.120588] pinctrl core: initialized pinctrl subsystem
[    0.128320] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.144408] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 2040 mV
[    0.155594] pinctrl-xway 1e100b10.pinmux: Init done
[    0.170408] dma-xway 1e104100.dma: Init done - hw rev: 8, ports: 5, channels: 24
[    0.192742] usbcore: registered new interface driver usbfs
[    0.198169] usbcore: registered new interface driver hub
[    0.203621] usbcore: registered new device driver usb
[    0.208689] pps_core: LinuxPPS API ver. 1 registered
[    0.213657] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.224869] clocksource: Switched to clocksource MIPS
[    0.232003] NET: Registered PF_INET protocol family
[    0.237237] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.245403] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.253742] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.261571] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.269306] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.276414] TCP: Hash tables configured (established 1024 bind 1024)
[    0.282995] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.289481] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.297043] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.302626] PCI: CLS 0 bytes, default 32
[    0.306677] gptu: totally 6 16-bit timers/counters
[    0.311532] gptu: misc_register on minor 127
[    0.315847] gptu: succeeded to request irq 126
[    0.320281] gptu: succeeded to request irq 127
[    0.324794] gptu: succeeded to request irq 128
[    0.329436] gptu: succeeded to request irq 129
[    0.333827] gptu: succeeded to request irq 130
[    0.338405] gptu: succeeded to request irq 131
[    1.135003] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    1.150508] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.156276] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.171101] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[    1.180029] printk: console [ttyLTQ0] enabled
[    1.180029] printk: console [ttyLTQ0] enabled
[    1.188750] printk: bootconsole [early0] disabled
[    1.188750] printk: bootconsole [early0] disabled
[    1.205395] NET: Registered PF_INET6 protocol family
[    1.220209] Segment Routing with IPv6
[    1.222557] In-situ OAM (IOAM) with IPv6
[    1.226680] NET: Registered PF_PACKET protocol family
[    1.231479] 8021q: 802.1Q VLAN Support v1.8
[    7.748051] Freeing unused kernel image (initmem) memory: 4120K
[    7.752554] This architecture does not have kernel memory protection.
[    7.759036] Run /init as init process
[    8.590529] init: Console is alive
[    8.593176] init: - watchdog -
[    8.624617] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    8.638323] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    8.654852] init: - preinit -
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
[   11.097310] procd: - early -
[   11.099148] procd: - watchdog -
[   11.679873] procd: - watchdog -
[   11.683349] procd: - ubus -
[   11.697427] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.735798] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.741447] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.752183] procd: - init -
Please press Enter to activate this console.
[   12.642982] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.349087] IFXOS, Version 1.7.1 (c) Copyright 2009, Lantiq Deutschland GmbH
[   13.404400] Loading modules backported from Linux version v6.1.110-0-g5f55cad62cc9d
[   13.410728] Backport generated by backports.git v6.1.110-1-0-g965f73fc
[   13.741787] PPP generic driver version 2.4.2
[   13.757364] NET: Registered PF_PPPOX protocol family
[   13.857419] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.515458] random: jshn: uninitialized urandom read (4 bytes read)
[   15.842694] random: jshn: uninitialized urandom read (4 bytes read)
[   16.102846] random: jshn: uninitialized urandom read (4 bytes read)
[   16.235489] urngd: v1.0.2 started.
[   19.078357] random: jshn: uninitialized urandom read (4 bytes read)
[   19.137441] random: ubusd: uninitialized urandom read (4 bytes read)
[   19.142873] random: ubus: uninitialized urandom read (4 bytes read)
[   20.305140] random: crng init done
[   20.307113] random: 24 urandom warning(s) missed due to ratelimiting

I do not want to discourage you, but what's the particular selling point of the F!B 7272 that makes you want to go through with this?

As takimata implied, this is a quite 'special' SOC - so far OpenWrt only supports the AR9, not the AR10, so you are likely up to quite a few challenges. At the same time this particular F!B 7272 model doesn't really offer anything beyond the F!B 7262sl (but lacking its VDSL capabilities), ADSL2+, 21000 MBit/s, 2100 MBit/s, 2.4-GHz-only/ wifi4, none of the phone features are supported (no FXS, no DECT). Any of the supported vr9 devices do everything your ar10 can offer (they are VDSL2+vectoring capable, but backwards compatible with ADSL2+) - and these old EOLed models are a dime a dozen on the second hand markets.

Again, no one wants to discourage you from getting ar10 supported - but it's a lot of work, for a device that doesn't appear to offer anything special (at first glance).

1 Like

but what's the particular selling point of the F!B 7272 that makes you want to go through with this?

There is not special reason why exactly this one. Its just the fact that I got it from related who doesn't used since it was discontinued and I want to use or just for getting a bit into this hardware stuff.

but it's a lot of work, for a device that doesn't appear to offer anything special (at first glance).

I know that it might be a lot of work and that there are way better alternatives when you want to have a router but my point of doing this isn't to use all features like the DSL, DECT, ...

Its more or less just a try to get a new OS running on it.

2 Likes

With a lot of try and error and assistance from claude I got in my opinion pretty far. all four ethernet ports are working, NAND- and SPI-Flash are recognized (but I have to test them more) and GPIO LEDs and Buttons are fully functional.

I plan to get WiFi (altrough its only 2.4 GHz) and the USB port (also only USB 2.0) to work.

I thought about creating a fork, commiting to that and create a PR which would bring support for basic FritzBox 7272 usage to other people who would like to use it. I would also create an ToH entry for this FritzBox if this is okay.

I'm a bit unsure whether this is fine because I used a lot AI assistance in creating the device tree, because I have an understanding how these low level things work and but I'm not realy beable my self to write a device tree.

1 Like