Mochabin NXP 9089

Hello,
I just got the Mochabin with the NXP wifi adapter. Did anyone got the NXP running?

Thanks.
J.

Given how the story with mwlwifi panned out, I'd forget about that.

2 Likes

Forget about that outside of Globalscales Ubuntu, it was made clear to them that NXP cards are not acceptable for open source as there are no drivers

2 Likes

If NXP is a no-go (I have no experience with them myself so have nothing to add about them), then you might consider picking up something based on a MediaTek 7915. MediaTek has pretty good Linux support in general. I use AsiaRF boards and like them. Your choices with them are

  • AW7915-NP1, 4T4R AX dual band, but not DBDC, so you're on one band at a time.
  • AW7915-NPD, 2T2R AX DBDC board

I have the former and like it a lot, but it's not DBDC. I don't have the latter, but I do have AsiaRF's DBDC 7615 board. I had a lot of trouble in the beginning getting DBDC to work stably, but now have it going pretty well.

1 Like

Thank you very much for your insights. I am currently mapping all the options, since I now have Mochabin at my table.

I just got the QCA6391 a week ago. Could not get it working... I see there is a problem with memory for the pcie2.
I have changed the dtb for mochabin to extend the memory range and built image with openwrt image builder.
Anybody had some success with Armada 7040?

You gotta expand the PCI memory range as the default one is not enough.

Sure, I did that. I also got a modified dtb from Globalscale to be sure. Placed that in the imagebuilder directory like so:

build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/image-armada-7040-mochabin.dtb

Built the image, and updated in luci. After reboot the card is not identified...

No, no, no, do not use the globalscale DTB.

Just add:

ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000
		  0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>;

To the Mochabin DTS, I am using that and it works just fine with QCA6390.

Also, does the card even show up on PCI, use lspci to check

Thanks for the help.

I have changed the mochabin DTS. Sorry for the lame question. Should it look like so?

/* miniPCI-E (J5) */
&cp0_pcie2 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&cp0_pcie_reset_pins>;
	phys = <&cp0_comphy5 2>;
	phy-names = "cp0-pcie2-x1-phy";
	reset-gpio = <&cp0_gpio1 9 GPIO_ACTIVE_LOW>;
	ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000
		  0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>;
};

Output of lspci after changes:

00:00.0 PCI bridge: Marvell Technology Group Ltd. 88F60x0/88F70x0/88F80x0/CN913x ARM SoC
01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless Network Adapter

Apologies for the even lamer questions but I'm having the same issues when I've tried using the Openwrt image builder to add the correct software and create me a fresh image. I can post more detail later, but what I see after rebuild is the qca card is no longer recognised and there's some keen.err entries mentioning ath11 in the system log. Looking at the posts above, I'm guessing that's the solution but:

  1. Jeroslav - has it worked
  2. How do I change the Mochabin.dts ? Is it a specific file I can find with SSH access, or is it something I can do through Luci?

Thanks very much

I have changed the dts file in the image builder here:

openwrt-imagebuilder-mvebu-cortexa72.Linux-x86_64/build_dir/target-aarch64_cortex-a72_musl/linux-mvebu_cortexa72/linux-5.15.90/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts

and then built the image using

make image PROFILE="globalscale_mochabin" PACKAGES="luci"

then you can use the bin file to flash using luci:

openwrt-imagebuilder-mvebu-cortexa72.Linux-x86_64/bin/targets/mvebu/cortexa72

But I am not sure, if those are the right steps. Maybe I am missing the ath11 module. So I think I need to build the image completely from source (my guess).

Ah, I didn't realise it was a file that needed changing before creating the image itself. I'm not that advanced so was actually using their web based tool found here - OpenWrt Firmware Selector

To try to get the wireless card working I then just added a shed load of packages under the "customize installed packages" part to try to match all the packages included on the Mochabin before I messed it up by tinkering with it and trying to see if I could run it on the stable version 22.03.3. Interesting (to me at least) I found that when I tried to add the ath11k-firmware-qca6390 package when creating a custom 22.03.3 image on that website it threw up an error. When I changed to snapshot, all the packages (which I'll copy as a list below) went through OK and it created a usable image. However, the wireless card still isn't recognised, which I guess is down to the changes required to that DTS file. I'm going to try my hand at using the image builder guidance here - https://openwrt.org/docs/guide-user/additional-software/imagebuilder - which I guess at some point will give me that option to make the necessary changes to .dts file. Just in case anyone's interested, what I think are the relevant errors that came up in the system log for the image I created using the web tool are as follows (I've included some extra errors that came up, but the ones I think are relevant are in the middle - I've not included much of the other log to save space):

Thu Feb  2 23:22:12 2023 kern.err kernel: [    0.581708] orion-mdio f212a200.mdio: Cannot register MDIO bus (-517)
Thu Feb  2 23:22:12 2023 kern.err kernel: [    0.752311] leds-is31fl319x 1-0064: Failed to get shutdown gpio: -517

Thu Feb  2 23:22:12 2023 kern.info kernel: [    6.832085] usbcore: registered new interface driver qmi_wwan
Thu Feb  2 23:22:12 2023 kern.info kernel: [    6.838390] usbcore: registered new interface driver rndis_host
Thu Feb  2 23:22:12 2023 kern.info kernel: [    6.871074] ath11k_pci 0000:01:00.0: BAR 0: can't assign [??? 0x00000000 flags 0x20000000] (bogus alignment)
Thu Feb  2 23:22:12 2023 kern.err kernel: [    6.881077] ath11k_pci 0000:01:00.0: failed to assign pci resource: -22
Thu Feb  2 23:22:12 2023 kern.err kernel: [    6.887753] ath11k_pci 0000:01:00.0: failed to claim device: -22
Thu Feb  2 23:22:12 2023 kern.warn kernel: [    6.893857] ath11k_pci: probe of 0000:01:00.0 failed with error -22
Thu Feb  2 23:22:12 2023 kern.info kernel: [    6.900727] usbcore: registered new interface driver cdc_mbim
Thu Feb  2 23:22:12 2023 user.info kernel: [    6.908629] kmodloader: done loading kernel modules from /etc/modules.d/*
Thu Feb  2 23:22:12 2023 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!

Thu Feb  2 23:22:12 2023 kern.warn kernel: [    0.971360] ahci f2540000.sata: supply ahci not found, using dummy regulator
Thu Feb  2 23:22:12 2023 kern.warn kernel: [    0.978738] ahci f2540000.sata: supply phy not found, using dummy regulator
Thu Feb  2 23:22:12 2023 kern.warn kernel: [    0.985825] platform f2540000.sata:sata-port@0: supply target not found, using dummy regulator
Thu Feb  2 23:22:12 2023 kern.warn kernel: [    0.994892] platform f2540000.sata:sata-port@1: supply target not found, using dummy regulator
Thu Feb  2 23:22:12 2023 kern.warn kernel: [    1.005899] ahci f2540000.sata: masking port_map 0x3 -> 0x3

So for info the package list I include are as below:
ath11k-firmware-qca6390 base-files busybox ca-bundle dnsmasq dropbear e2fsprogs ethtool-full firewall4 fstools hostapd-common iw-full kmod-ath kmod-ath11k kmod-ath11k-pci kmod-cfg80211 kmod-crypto-acompress kmod-crypto-aead kmod-crypto-ccm kmod-crypto-cmac kmod-crypto-ctr kmod-crypto-gcm kmod-crypto-gf128 kmod-crypto-ghash kmod-crypto-hmac kmod-crypto-manager kmod-crypto-michael-mic kmod-crypto-null kmod-crypto-rng kmod-crypto-seqiv kmod-crypto-sha256 kmod-fs-msdos kmod-fs-vfat kmod-gpio-button-hotplug kmod-hwmon-core kmod-lib-lzo kmod-mac80211 kmod-mhi-bus kmod-mii kmod-nft-offload kmod-nls-base kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 kmod-qrtr kmod-qrtr-mhi kmod-thermal kmod-usb-core kmod-usb-net kmod-usb-net-rndis kmod-usb-wdm libatomic1 libblkid1 libblobmsg-json20220515 libc libevdev libgcc libiwinfo-lua libkmod liblucihttp-lua libnl-tiny libpci libubus-lua libudev-zero libusb-1.0-0 libustream-wolfssl logd lua luci luci-lib-base luci-lib-ip luci-lib-jsonc luci-lib-nixio luci-ssl mkf2fs mtd netifd nftables odhcp6c odhcpd-ipv6only opkg partx-utils pciids pciutils ppp ppp-mod-pppoe procd procd-seccomp procd-ujail px5g-wolfssl uboot-envtools uci uclient-fetch umbim uqmi urandom-seed urngd usb-modeswitch usbids usbutils usign wireless-regdb wpad-wolfssl wwan zlib

I don't really know if I need them all, or have the foggiest what most of them mean, but it allowed me to match the software list on the Mochabin that I saw before I then messed it all up. I'm guessing that if I want to ensure all those packages get included when using the image builder I'll need to include them when I run the make image command as follows:

make image PROFILE="globalscale_mochabin" PACKAGES="ath11k-firmware-qca6390 base-files busybox ca-bundle ... AND SO ON"

If it looks to anyone that by doing that I'm going to completely destroy the build, please do warn me. Also as a warning to the less tech savvy people such as myself, if using the custom packages option on https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mvebu%2Fcortexa72&id=globalscale_mochabin - do make sure to add luci as one of the packages, otherwise you'll have to refresh your SSH skills like I did (and I didn't have many to start off with, so it was a challenge).

Hi Jeroslav

I'm kind of proud that I managed to use that image builder, and made the same changes to the mochabin DTS file as you before copying your "make image" script, but with all the added packages I mentioned (2 removed as explained below) and managed to make my own Openwrt image. The only issue is that after flashing that to my Mochabin I'm now not seeing any wireless adaptor listed under the network tab in Luci, so am a bit stuck. I've run the command suggested by Robimarko and am getting the same as you as copied below:

root@OpenWrt:~# lspci
00:00.0 PCI bridge: Marvell Technology Group Ltd. 88F60x0/88F70x0/88F80x0/CN913x ARM SoC
01:00.0 Unassigned class [ff00]: Qualcomm QCA6390 Wireless Network Adapter

I had a dig around to see if any other commands might help so have copied the output of these below as well:

root@OpenWrt:~# ip link show
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
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br-wan state DOWN qlen 2048
    link/ether f0##full mac addresses removed## brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq state UP qlen 2048
    link/ether f0########### brd ff:ff:ff:ff:ff:ff
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br-wan state DOWN qlen 2048
    link/ether f0########## brd ff:ff:ff:ff:ff:ff
5: lan0@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether f0:ad:4e:28:9d:c7 brd ff:ff:ff:ff:ff:ff
6: lan1@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether f0######### brd ff:ff:ff:ff:ff:ff
7: lan2@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether f0######### brd ff:ff:ff:ff:ff:ff
8: lan3@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether f0######### brd ff:ff:ff:ff:ff:ff
9: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether f0######### brd ff:ff:ff:ff:ff:ff
10: br-wan: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether f0:######### brd ff:ff:ff:ff:ff:ff

For info, when using the full image-builder tool I got errors linked to the following packages when I tried to include them so these were removed:
ethtool-full
libblobmsg-json20220515

And so my full script looked like this:
make image PROFILE="globalscale_mochabin" PACKAGES="ath11k-firmware-qca6390 base-files busybox ca-bundle dnsmasq dropbear e2fsprogs firewall4 fstools hostapd-common iw-full kmod-ath kmod-ath11k kmod-ath11k-pci kmod-cfg80211 kmod-crypto-acompress kmod-crypto-aead kmod-crypto-ccm kmod-crypto-cmac kmod-crypto-ctr kmod-crypto-gcm kmod-crypto-gf128 kmod-crypto-ghash kmod-crypto-hmac kmod-crypto-manager kmod-crypto-michael-mic kmod-crypto-null kmod-crypto-rng kmod-crypto-seqiv kmod-crypto-sha256 kmod-fs-msdos kmod-fs-vfat kmod-gpio-button-hotplug kmod-hwmon-core kmod-lib-lzo kmod-mac80211 kmod-mhi-bus kmod-mii kmod-nft-offload kmod-nls-base kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 kmod-qrtr kmod-qrtr-mhi kmod-thermal kmod-usb-core kmod-usb-net kmod-usb-net-rndis kmod-usb-wdm libatomic1 libblkid1 libc libevdev libgcc libiwinfo-lua libkmod liblucihttp-lua libnl-tiny libpci libubus-lua libudev-zero libusb-1.0-0 libustream-wolfssl logd lua luci luci-lib-base luci-lib-ip luci-lib-jsonc luci-lib-nixio luci-ssl mkf2fs mtd netifd nftables odhcp6c odhcpd-ipv6only opkg partx-utils pciids pciutils ppp ppp-mod-pppoe procd procd-seccomp procd-ujail px5g-wolfssl uboot-envtools uci uclient-fetch umbim uqmi urandom-seed urngd usb-modeswitch usbids usbutils usign wireless-regdb wpad-wolfssl wwan zlib"

I'm guessing that won't have made any difference leaving those two items out, but let me know if it could be relevant. I'm still getting the same ath11 errors in the system log as shown below:

Fri Feb  3 15:45:58 2023 kern.info kernel: [    6.912400] ath11k_pci 0000:01:00.0: BAR 0: can't assign [??? 0x00000000 flags 0x20000000] (bogus alignment)
Fri Feb  3 15:45:58 2023 kern.err kernel: [    6.922336] ath11k_pci 0000:01:00.0: failed to assign pci resource: -22
Fri Feb  3 15:45:58 2023 kern.err kernel: [    6.928996] ath11k_pci 0000:01:00.0: failed to claim device: -22
Fri Feb  3 15:45:58 2023 kern.warn kernel: [    6.935141] ath11k_pci: probe of 0000:01:00.0 failed with error -22

Any thoughts welcome?

Thanks :slight_smile:

I think the modification to the dts file I did is wrong. Because the issue with memory assignment for PCIe still persist (as you can see in the kernel logs). Well, back to the docs then...

I still dont know, why it is such a big issue for Globalscale to just publish a complete image with all necessary changes. I only got a hint from them, that I should modify the dts and dtb files myself and build the image...

I've still not managed to get the wifi card working - another lesson for me about leaving things be when they are working (for info it was all working OK when I received it from Globalscales). Anyways, in the meantime I've started considering another solution. It's a different enough proposition to warrant a separate topic, but just thought I'd link that other topic here because I'd be interested in the thoughts of some of the posters from this topic - TP Link Omada Controller install and run in Openwrt? - Installing and Using OpenWrt - OpenWrt Forum

Best of luck to anyone still fighting to get their wifi working in Mochabin, I'll be interested to see where you get with it.

Although I managed to get the wifi drivers working properly with a lot of help from Jeroslav and the advice from Robimarko about the ranges addition to the DTS file, I was still faced with numerous issues including getting Luci to install on the latest Snapshot (dated 08/02/23 - it was just hanging on the Luci page, no login box).

Since I'm pretty novice at this stuff I've decided to put the last stable build (22.03.3) on the Mochabin and just use it as a router without wifi for the moment. It's replacing a Brume, and I have a Netgear WAC124 as a dumb wifi AP attached to that anyway so I'll just keep that structure for now. Once a stable build is released that adopts the required drivers, I might revisit using the Mochabin as an all in one router and wifi. I might add external antennae as well, or dependent on what comes up on the forums might even swap the Qualcomm card out for the Mediatek based cards as mentioned by Lord Vader here - Mochabin NXP 9089 - Hardware Questions and Recommendations - again probably adding external antennae. Alternatively, I might go down the route of sticking with seperate WAPs such as the Ubiquiti Unifi 6 ones listed here - Table of Hardware: Full details - wifi 6 WAPs.

I'd still be interested in how anyone else gets on. Best of luck

1 Like

Please share how you got the wifi drivers working. Where do the ranges need to be added to the armada-7040-mochabin.dts?

ranges = <0x81000000 0x0 0xf9010000 0x0 0xf9010000 0x0 0x10000
		  0x82000000 0x0 0xc0000000 0x0 0xc0000000 0x0 0x20000000>;

Anything else that needs to be considered?

Hi Chriz

I got forwarded the rebuild instructions which had a link to a working image, but still had some issues with Luci install etc. I'll hopefully be on the computer I was using later and will send over the instructions along with further detail on some of the issues I faced.

I got a response from Globalscale engineers with built image and following guide. To enter the u-boot console (step 5) please open the serial communication (e.g. via USB-A to micro-USB cable and putty on Windows).

Image
Guide

Good luck. :wink: