Porting guide ar71xx to ath79?

"all except wireless 2.4g is working…" strongly suggests that the AHB issue isn't sorted yet, the 5 GHz wlan is connected via PCIe, while the 2.4 GHz is part of the SOC and uses AHB.

It's still heavily work in progress and I published my working configuration here: https://github.com/DavideFioravanti/openwrt/commit/93de636bebc6e09b9b1b5fe4011f0ff2a3c7c92d. Later I enabled my second pcie interface with 5GHz wifi (here: https://github.com/openwrt/openwrt/pull/931#issuecomment-388659218), but I still don't know if it can create problem in the long term, because I didn't understand some bits in the configuration... If someone can confirm my configuration would be great.
Finally I am going to create a pull request when we'll get the 2,4GHz working.

However, according to Openwrt wiki, your Carambola2 is based on AR9331, while my router is based on QCA9558. There are other devices based on your same CPU here: https://github.com/openwrt/openwrt/tree/master/target/linux/ath79/dts

I thought that you were able to patch ath9k so that ahb would work enabling built in radios.
Thats why I asked,otherwise its all straightforward

made 1043nd-v1 work, no wifi of course
iperf with flow_ofloading

[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  72.5 MBytes   608 Mbits/sec
[  4]   1.00-2.00   sec  72.1 MBytes   605 Mbits/sec
[  4]   2.00-3.00   sec  72.8 MBytes   610 Mbits/sec
[  4]   3.00-4.00   sec  71.8 MBytes   602 Mbits/sec
[  4]   4.00-5.00   sec  71.5 MBytes   599 Mbits/sec
[  4]   5.00-6.00   sec  72.5 MBytes   608 Mbits/sec
[  4]   6.00-7.00   sec  71.8 MBytes   602 Mbits/sec
[  4]   7.00-8.00   sec  72.2 MBytes   606 Mbits/sec
[  4]   8.00-9.00   sec  71.5 MBytes   600 Mbits/sec
[  4]   9.00-10.00  sec  72.6 MBytes   608 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   721 MBytes   605 Mbits/sec                  sender
[  4]   0.00-10.00  sec   721 MBytes   605 Mbits/sec                  receiver

but I have strange problems with lzma-loader it hangs most of the times, compressing the kernel with gzip makes it 1M larger but will boot without the loader

1 Like

if someone is willing to test ath79-1043nd-v1 and report about it, there is something strange about it, if I ram boot via tftpboot the openwrt-ath79-generic-tl_wr1043nd_v1-initramfs-kernel.bin the network works but if I write the image on flash and normal boot, I can see packets with tcpdump but the network is not working
also the switch port1 starts after some time

1 Like

for 1043nd-v1 appending the loader-okli loader-tl-wr1043nd-v1.gz from ar71xx target makes the board boot every time, the loader image sizes are not the same, the source is not the same, copied the source of lzma-loader from ar71xx but still it doesn't boot so there is something still missing, the most curious thing is that the network will not work when booting from flash

edit:
it seems that CONFIG_KERNEL_CMDLINE= in the lzma-loader Makefile must have a value otherwise will not boot

@juppin
have you verified this https://git.openwrt.org/?p=openwrt/staging/blogic.git;a=shortlog;h=refs/heads/ath79 ?
wifi on 1043nd-v1 is working

Wow, great news :slight_smile:

@juppin on 841n I have a data bus error and on 1043nd-v3 I have

[   12.971434] ath9k 180c0000.gmac: request_irq failed
[   12.976476] ath9k: probe of 180c0000.gmac failed with error -22

maybe the address is not correct ?

I have that error if I use a wrong interrupt...
For example, for my QCA9558 device, the right values should be:

interrupt-parent = <&intc2>;
interrupts = <1>;

However as soon as I try the command ifconfig wlan0 up the router stops responding...

yes, I changed to cpuintc for now, I'll see about it after compile

On QCA9558 the register address 0x180C0000 is related to PCIE, i think this is also true for QCA9557...
Have you shared your dts(i) on github? Or could you share it here?

@juppin Yes I read just the "request_irq failed" part! :smiley:

@lucize If can help, this is my wmac and gmac section (I don't know if gmac is necessary)

		gmac: gmac@18070000 {
			compatible = "qca,qca9550-gmac";
			reg = <0x18070000 0x4>;
		};

		wmac: gmac@18100000 {
			compatible = "qca,qca9550-wmac";
			reg = <0x18100000 0x20000>;

			interrupt-parent = <&intc2>;
			interrupts = <1>;
			
			status = "disabled";
		};

Two nodes named gmac

gmac isn´t used for wmac...

so with this, it's crashing with data bus error

@juppin I also think that the address needs to be different because pcie, if enabled, it's starting but with no link

on qca9531 there are several registers related to wmac, @numero53 I'll tray the one you pointed out

acording to ar71xx_regs.h 0x18100000 should be reg address for wmac

#define QCA956X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)

@juppin
My first try was without the gmac section... but it didn't work.

So I followed what blogic did here and I added the gmac section, but it didn't work either.

only this was ok for it to be detected, but after enable, the serial input doesn't work anymore, but there is some output, and it will reboot itself after some seconds

I have a similar behaviour. When I enable the radio interface, the wlan led on the router lights up and also other lan leds are working... so I think that it don't crash completely.
But in thits state, serial interface don't work anymore and to restore it, I have to reboot the router manually.

However I sent my dtsi to blogic... hopefully he will solve this problem! :smiley:

this is ok for me


                wmac: gmac@18100000 {
                        compatible = "qca,qca9530-wmac";
                        reg = <0x18100000 0x230000>;

                        interrupt-parent = <&cpuintc>;
                        interrupts = <2>;

                        status = "disabled";
                };