Arista AP-C200 IPQ6018 Networking Driver Help

Hi everyone,

I got my hands on a couple Arista AP-C200s, which, to my dismay were locked down and required a subscription to use. Naturally, I decided I wanted to flash OpenWRT on these.

I've already rooted the stock firmware, opened up UBoot, and gotten OpenWRT to boot, but I immediately noticed no network interfaces would appear.

For the wifi, I've already grabbed the bdwlan.bin from the stock firmware and used ath11k-bdencoder on it and placed it in /lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin, I also made a board specific package and used the "files" folder like it says in the Makefile, but it didn't seem to actually put the file in the build, so I just added it manually for testing, but the driver still doesn't seem to even try to load it.

root@OpenWrt:/# ls /lib/firmware/ath11k/IPQ6018/hw1.0/
board-2.bin

As for the ethernet, it appears to be using the qualcomm NSS Dataplane driver, but it just errors

[   15.190207] nss-dp 3a001000.dp1 lan (uninitialized): failed to connect to phy device
[   15.230062] nss-dp: probe of 3a001000.dp1 failed with error -14

I'm assuming this has to do with my terrible hobbled together device tree file.

Here's the OpenWRT bootlog: https://clbin.com/4jRhw
And the stock firmware kern.log: https://clbin.com/eIvdn
The stock firmware DTS which I dumped using dtc: https://clbin.com/hCJnR
The openwrt dts I copied from the netgear wax214 and modified: https://clbin.com/D4KmM

Any guidance would appreciated.

This is the actual error in terms of ethernet:

[   14.523905] ssdk_dt_parse_mdio[881]:ERROR:mdio bus parse failed!
.....
[   14.600895] ssdk_phy_driver_init[371]:INFO:dev_id = 0, phy_adress = 4095, phy_id = 0x0 phytype doesn't match

Your mdio node looks like a c&p from the stock (QSDK) dts. Don't do that, use one from the OpenWrt devices (wax214 for example) and adapt that to your needs.

Post the board-2.bin so we can have a look at the json header.

I realized I messed up the json for the board-2.bin.
Now it's crashing when the wifi driver loads.

As for the ethernet, I took your advice and modified the device tree following another openwrt example, and now the driver doesn't error when it loads, but there are no interfaces present.

boot log: https://clbin.com/h5XfL

  1. your bdf doesn't contain an embedded regdb, that's why ath11k is crashing.

@lytr can you update the bdf?

  1. To get ethernet working, you also need a proper entry in target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network. Otherwise uci defaults apply (network interface eth0 that doesn't exist on your device))
    Just add your device to the netgear,wax214 entry.

But looking at the log, ssdk is still complaining about the mdio node.

BTW, please publish your code somethere, that makes it much easier to check.

I can't seem to find any documentation for adding the regdb, any ideas where I would be able to find that?

btw I went ahead and forked openwrt and merged my changes into it here

You can try this BDF with updated regdb: https://filebin.net/39b5eycya3ncdy1f

1 Like

Anyone know why adding the board to the ipq-wifi Makefile and then adding the board file to the files folder in the ipq-wifi package like it says in the make file, and then selecting it in menuconfig doesn't add the file to the image in /lib/firmware/?

I am happy to report that with this BDF with regdata, both wifi PHYs appear.

You can use this config: https://github.com/openwrt/openwrt/issues/14399#issuecomment-1896639893

1 Like

:+1:

Any ideas about the ethernet interface? The driver just happily loads without any explicit errors now, but I don't get any interfaces

bootlog: https://clbin.com/ZIKSi

Post the output of:

ip a
root@OpenWrt:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever

root@OpenWrt:/# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdda:304a:304d::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'


and /etc/config/network

1 Like

add your current dts

link to dts on github

That still contains c&p code from stock dts.

Try this:

&mdio {
	status = "okay";
	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
	reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
	
	phy6: ethernet-phy@6 {
		reg = <0x6>;
	};
};

&switch {
	status = "okay";

	switch_lan_bmp = ESS_PORT1;
	switch_mac_mode = MAC_MODE_SGMII_CHANNEL0;

	qcom,port_phyinfo {
		port@1 {
			port_id = 1>;
			phy_address = <6>;
		};
	};
};

@robimarko
according to the stock kernel log that device is using an at803x Ethernet phy.
Do we need to config something special in terms of mdio/switch or dp?
Should the dp1 configured to sgmii instead of the psgmii?

Yeah, phy-mode should be set to sgmii

Thanks

@LemonFruit

Also set the dp1 to

&dp1 {
		status = "okay";

		phy-handle = <&phy6>;
		phy-mode = "sgmii";
		label = "lan";
};
1 Like

Ayy, it worked! I've got a lan interface now!

Would you mind explaining how you were able to root the device? I've recently acquired a couple of them, and cannot find any info about this.