Add support for Netgear WAX630

Hi.

I have build an image for Netgear WAX630. It's has 3 radios with 4x4 on all radios.
It's similar to the wax620 in terms of mtd's etc as far as I can tell. I've got the board-2 file loading, LEDs are working, both LANs and all 3 radios are detected, and I can't see any errors in the boot log. So I'm wondering if anyone could help me and have a look, and see if I'm missing something in the boot log. Does it look OK?

This is the openwrt boot log. https://gist.github.com/skramstad/8037fc7a8f3af089d6da575140e89000

I have only tested with initramfs image.
One thing that I noticed in the log, is this message because I'm using initramfs?
Edit: found the answer about this.

[  512.107158] mtdblock: MTD device 'rootfs' is NAND, please consider using UBI block devices instead.
[  527.977862] mtdblock: MTD device 'rootfs_1' is NAND, please consider using UBI block devices instead.

And one more question. In the stock dts i found this:

aliases {
	sdhc1 = "/soc/sdhci@7824900";
};

is this something I need to add as well? I saw in the log it detected sdhc so I'm not sure...

[    0.862871] sdhci: Secure Digital Host Controller Interface driver
[    0.862917] sdhci: Copyright(c) Pierre Ossman
[    0.867953] sdhci-pltfm: SDHCI platform and OF driver helper

Thank you :slight_smile:

1 Like
IPQ807x# bdinfo
arch_number = 0x08010000
boot_params = 0x40000100
DRAM bank   = 0x00000000
-> start    = 0x40000000
-> size     = 0x40000000
eth0name    = eth0
ethaddr     = xx:xx:xx:xx:xx:xx
current eth = eth0
ip_addr     = 192.168.0.100
baudrate    = 115200 bps
TLB addr    = 0x4A990000
relocaddr   = 0x4A900000
reloc off   = 0x00000000
irq_sp      = 0x4A77FA90
sp start    = 0x4A77FA80
IPQ807x# smeminfo
flash_type:             0x2
flash_index:            0x0
flash_chip_select:      0x0
flash_block_size:       0x20000
flash_density:          0x100000
partition table offset  0x0
No.: Name             Attributes            Start             Size
  0: 0:SBL1           0x0000ffff              0x0         0x100000
  1: 0:MIBIB          0x0000ffff         0x100000         0x100000
  2: 0:BOOTCONFIG     0x0000ffff         0x200000          0x80000
  3: 0:BOOTCONFIG1    0x0000ffff         0x280000          0x80000
  4: 0:QSEE           0x0000ffff         0x300000         0x300000
  5: 0:QSEE_1         0x0000ffff         0x600000         0x300000
  6: 0:DEVCFG         0x0000ffff         0x900000          0x80000
  7: 0:DEVCFG_1       0x0000ffff         0x980000          0x80000
  8: 0:APDP           0x0000ffff         0xa00000          0x80000
  9: 0:APDP_1         0x0000ffff         0xa80000          0x80000
 10: 0:RPM            0x0000ffff         0xb00000          0x80000
 11: 0:RPM_1          0x0000ffff         0xb80000          0x80000
 12: 0:CDT            0x0000ffff         0xc00000          0x80000
 13: 0:CDT_1          0x0000ffff         0xc80000          0x80000
 14: 0:APPSBLENV      0x0000ffff         0xd00000          0x80000
 15: 0:APPSBL         0x0000ffff         0xd80000         0x100000
 16: 0:APPSBL_1       0x0000ffff         0xe80000         0x100000
 17: 0:ART            0x0000ffff         0xf80000          0x80000
 18: rootfs           0x0000ffff        0x1000000        0x3c00000
 19: 0:WIFIFW         0x0000ffff        0x4c00000         0x900000
 20: rootfs_1         0x0000ffff        0x5500000        0x3c00000
 21: 0:WIFIFW_1       0x0000ffff        0x9100000         0x900000
 22: 0:ETHPHYFW       0x0000ffff        0x9a00000          0x80000
 23: 0:MFGDATA        0x0000ffff        0x9a80000         0x180000
 24: 0:NTGRDATA       0x0000ffff        0x9c00000        0x8000000
 25: 0:Oops_log       0x0000ffff       0x11c00000        0x1c00000
 26: 0:RESERVED1      0x0000ffff       0x13800000        0x6400000
 27: 0:RESERVED2      0x0000ffff       0x19c00000        0x6400000

I guess that device doesn't even has sdhc/emmc (due to it's utilizing NAND) you can remove the sdhc alias.

Are you sure there are 3 radios detected?

I believe only the 2.4/5 Ghz radios are working, the 3rd radio is supposed to be connected via PCI.

So you need to add the proper PCI and wifi nodes/properties to the dts.

First check the stock dts and then have a look in the ax9000 dts to see how to add the required dts entries + add ath11k_pci to your build.
This would be the first ipq8074 device in OpenWrt with a 6 Ghz radio AFAIk

EDIT: according to the datasheet the device has 2 5 Ghz radios (lower and upper bands) so this isn't really a tri-band device.
So forget everything I said about the 6 Ghz radio.

BTW, posting the stock dts and your OpenWrt dts would be very helpful.

Hello. No this is wax630 and not wax630E. Yes, all 3 was detected in initramfs, but I got an issue with LAN after I flashed rootfs with ubiformat and after reboot I got the following messages.

[    0.724126] mdio_bus 90000.mdio-1: MDIO device at address 3 is missing.
[    0.724541] mdio_bus 90000.mdio-1: MDIO device at address 28 is missing.

So I'm trying to solve that. I've been looking at other dts and stock dts. But I find it very hard to find the correct reset for both LAN.

From stock dts.

mdio@90000 {
	#address-cells = <0x01>;
	#size-cells = <0x01>;
	compatible = "qcom,ipq40xx-mdio";
	linux,phandle = <0x59>;
	phandle = <0x59>;
	phy-reset-gpio = <0x1b 0x25 0x00 0x1b 0x19 0x01>;
	pinctrl-0 = <0x1a>;
	pinctrl-names = "default";
	reg = <0x90000 0x64>;

	ethernet-phy@0 {
		reg = <0x00>;
	};

	ethernet-phy@1 {
		reg = <0x01>;
	};

	ethernet-phy@2 {
		reg = <0x02>;
	};

	ethernet-phy@3 {
		reg = <0x03>;
	};

	ethernet-phy@4 {
		reg = <0x04>;
	};

	ethernet-phy@5 {
		reg = <0x1c>;
	};
};

Here is stock dts. https://gist.github.com/skramstad/787dd1a518a2a57d4986ac180b2f40a3

Here is openwrt dts. https://gist.github.com/skramstad/02998e79d7dd992bce3d8dfe83f18bd8

Edit: my last edit to LANs was this, and it was detected with correct mac address, but no link when ethernet is plugged in port.

qca8075_3: ethernet-phy@3 {
	compatible = "ethernet-phy-ieee802.3-c22";
	reg = <3>;
};

qca8081_28: ethernet-phy@28 {
	compatible = "ethernet-phy-id004d.d101";
	reg = <28>;
};

Huh, according to the stock dts they are using reset gpios 37 and 25.

Try adding this:

qca8081_28: ethernet-phy@28 {
		compatible = "ethernet-phy-id004d.d101";
		reg = <28>;
		reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
	};

In addition add mdio-tools to the build for further debuging

Thanks, I'll try that. I see now in the last log that there might be an issue with phy and reg 28.

[    2.667744] ssdk_phy_driver_init[369]:INFO:dev_id = 0, phy_adress = 28, phy_id = 0xffffffff phytype doesn't match

Do I need to set compatible = "ethernet-phy-id004d.d101"; etc? I did work with initramfs, so I don't know if it should be there. To be honest I dunno if this is the right compatible for phy_adress 28. I cant find any information about where and how to set the compatible for each LAN.

Yes keep that compatible (you can find the proper ids here:
https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk/-/blob/NHSS.QSDK.12.4.5.r1/include/hsl/phy/hsl_phy.h#L583)

It's working during initramfs 'cause u-boot is properly resetting the phys but thats not happening during boot from NAND. In this case, OpenWrt has to reset the phys.
And that's somehow not working in your case.

Can you post the fcc id of that device?
I want to have a look at the internal pictures.

EDIT: found it in the meantime

https://fccid.io/PY321100520

Sure. https://fccid.io/PY321100520 ,it was hard to find the correct one because of the name didn't seem correct(match).

I have one chip that says QVPR6014R. I believe that is the poe++ chip. Maybe the compatible is set wrong.

POE has nothing to do with that. It's about resetting the ethernet phy.
Did you try what I was suggesting?

I'm on it :slight_smile: need to build again.

Sorry, just to be on the same page, out of these two compared to my error message. I'll chose line QCA8081_PHY_V1_1 0x004DD101?

#define QCA8081_PHY_V1_1        0x004DD101
#define INVALID_PHY_ID          0xFFFFFFFF

My message was

[    2.667744] ssdk_phy_driver_init[369]:INFO:dev_id = 0, phy_adress = 28, phy_id = 0xffffffff phytype doesn't match

One of these?

compatible = "ethernet-phy-id004d.d101";
compatible = "ethernet-phy-idffff.ffff";

@kirdes that worked. :slight_smile: :+1: Thank you so much for helping me (again).

&mdio {
	status = "okay";

	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;

	qca8075: ethernet-phy@3 {
		compatible = "ethernet-phy-ieee802.3-c22";
		reg = <3>;
	};

	qca8081: ethernet-phy@28 {
		compatible = "ethernet-phy-id004d.d101";
		reg = <28>;
		reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
	};
};

@kirdes so after some testing I found out that 5ghz radios is not working as expected.
They are listed as ipq8074 high and low, but none of them will either broadcast the ssid or scan for other wlans.

Iā€™m not sure why. 2.4g can scan for wlans tho.

Have you any knowledge about this?

I see no errors in the logs. iw shows all capabilities and features btw for all 3 radios.

Edit: Booted into stock firmware to see how the radios performed. They did work and with ok rssi. The 5g high/low radios are not merged to one single radio.
Openwrt firmware shows rssi that is very high (around 90). The radios do show up when I'm scanning for wlans tho. But I'm unable to connect. Can't see any related stuff in the logs.
Changing power does not do anything either. 2.4g is better but not as stock. I did a dump of mtd24, because I saw in the stock log that it use that for some wifi stuff. I'm not sure, but looking at the size it reminds me of the bdwlan file. 131072 bytes (128 KiB)

[   10.001928] ubi1: attaching mtd24
[   10.505474] ubi1: scanning is finished
[   10.510884] ubi1: attached mtd24 (name "0:NTGRDATA", size 128 MiB)
[   10.510906] ubi1: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[   10.515959] ubi1: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[   10.522806] ubi1: VID header offset: 2048 (aligned 2048), data offset: 4096

This is what the stock is doing.

# Point bdwlan.b215 to bdwlan.bin (/etc/bdwlan points to bdwlan.bin) for WAX63
ln -sf /etc/bdwlan /lib/firmware/IPQ8074/WIFI_FW/bdwlan.b215
	if [ ${COUNTRY_CODE} = 36 ] || [ ${COUNTRY_CODE} = 554 ]; then
          ln -sf /lib/firmware/$arch/WIFI_FW/WAX630_BDF_AU.bin /etc/bdwlan
      elif [ ${COUNTRY_CODE} = 356 ]; then
          ln -sf /lib/firmware/$arch/WIFI_FW/WAX630_BDF_INDIA.bin /etc/bdwlan
      elif [ ${COUNTRY_CODE} = 124 ]; then
          ln -sf /lib/firmware/$arch/WIFI_FW/WAX630_BDF_CANADA.bin /etc/bdwlan
      elif [ ${COUNTRY_CODE} = 376 ]; then
          ln -sf /lib/firmware/$arch/WIFI_FW/WAX630_BDF_ISRAEL.bin /etc/bdwlan
		    else
          ln -sf /lib/firmware/$arch/WIFI_FW/WAX630_BDF.bin /etc/bdwlan
    fi
  fi

fi
	if [ -f /lib/firmware/$arch/WIFI_FW/q6_fw.mdt ]; then
		echo " WIFI FW mount is successful" > /dev/console 2>&1
	fi

	if [ -d /lib/firmware/$arch/WIFI_FW/qcn9000 ]; then
		cd  /lib/firmware/ && mkdir -p qcn9000
		cd qcn9000 && ln -sf /lib/firmware/$arch/WIFI_FW/qcn9000/*.* .
	fi

	cd  /lib/firmware/$arch && ln -sf WIFI_FW/*.* .

	if [ -e /sys/firmware/devicetree/base/MP_512 ]; then
		if [ -f /lib/firmware/$arch/WIFI_FW/firmware_rdp_feature_512P.ini ]; then
			cd /lib/firmware
			ln -sf /lib/firmware/$arch/WIFI_FW/firmware_rdp_feature_512P.ini .
		fi
	else
		if [ -f /lib/firmware/$arch/WIFI_FW/firmware_rdp_feature.ini ]; then
			cd /lib/firmware
			ln -sf /lib/firmware/$arch/WIFI_FW/firmware_rdp_feature.ini .
		fi
	fi

	. /lib/read_caldata_to_fs.sh
	do_load_ipq4019_board_bin

	mkdir -p /vendor/firmware
	mv /lib/firmware/$arch/WIFI_FW/Data.msc /vendor/firmware

Please have a look in the stock bootlog, you should find an entry regarding the right bdf / board id.
The wifi issue you describing sounds like you are using the wrong bdf.

I did, but all I could find was this:

[   23.069984] cnss[2]: INFO: No board_id entry in device tree
[   23.094943] cnss[2]: INFO: BDF location : 0x4b0c0000
[   23.095122] cnss[2]: INFO: BDF IPQ8074/bdwlan.bin size 131072

and as posted earlier the script pointing to b215.

# Point bdwlan.b215 to bdwlan.bin (/etc/bdwlan points to bdwlan.bin)

I'll see if I missed something. I clearly did since it's not working. :neutral_face:

Edit:

Location 0x4b0c0000 leads me to

wifi1@c0000000 {
	compatible = "qcom,cnss-qca8074v2\0qcom,ipq8074-wifi";
    qcom,bdf-addr = <0x4b0c0000 0x4b0c0000 0x4b0c0000>;
    ...
}

wifi2@f00000 {
	compatible = "qcom,cnss-qcn9000";
	mhi,max-channels = <0x1e>;
	mhi,timeout = <0x2710>;
	qca,auto-restart;
	qcom,wlan-ramdump-dynamic = <0x400000>;
	qrtr_node_id = <0x20>;
	status = "disabled";
};

wifi3@f00000 {
	compatible = "qcom,cnss-qcn9000";
	mhi,max-channels = <0x1e>;
	mhi,timeout = <0x2710>;
	qca,auto-restart;
	qcom,wlan-ramdump-dynamic = <0x400000>;
	qrtr_node_id = <0x21>;
	status = "disabled";
};

try WAX630_BDF.bin, they are overwriting /etc/bdwlan in the script with a symlink to WAX630_BDF.bin

That worked as all your advice do :+1: I didn't try this earlier because on WAX620 the board file WAX620_BDF.bin did not work so well, but bdwlan.b290 do. So i thought this time i would be the same. But I was wrong :slight_smile:

But everything is up and running now. Just testing STA in 5g-Low. Going to let it idle and see temps etc. But if it's working as the wax620 it will replace my master AP because of OpenWrt.

Again, thanks for helping out! :ok_hand:

Just for explanation: the 2.5G ethernet phy is the QCA8081, that's why you have to use id
0x004DD101 from ssdk.

INVALID_PHY_ID is just a fallback if the phy is not recognized (like in your first bootlog)