OpenWrt support for Xiaomi AX9000

yes the one from pastebin ... ok understood ... it works on the lower 5g band channels

1 Like

from the ath11k-ahb IPQ8074 perspective there are two devices one for 20/40 mhz and another for higher frequencies. The latter one seems limited to channels over and including 149 on the 160mhz width. Is this right? i presume the regdb on the board files are the same as for other devices (qnap, dynalink ... as I don't any of these issues )

Kind of ...
For me the ax9000 has three types of Wifi
a) one for long range 2.4 Ghz (i.e. when I am in my garden, and all I care is to be within a range, throughput is less relevant)
b) IoT devices - I have a lot of them and I want them to be on an isolated wifi (different frequency) - but you are right it is NOT ath11k device
c) for all other devices I want a good range and maximum throughput available

I am not a betting man, but I would think embedded regdb into BFD varies between suppliers?

Guys want to see full working triband soon

1 Like

Waohh i love the attitude! Make it happen then :slight_smile:

4 Likes

well ... apart from the board-id i am assuming the ipq8074 firmware that uses the ath11k-ahb module is the same across all of the devices (qnap, dynalink, ax36000 etc) eg the embedded regdb is the same ...so don't understand why i am not seeing the same channels as the other devices. I get the issue with the QCN PCI device ... but not as i said the ipq8074 one

All the bands are working currently. At least on the Chinese model. They've been for months now.

Working but wifi channels are limited and 160 mhz shows as 80mhz in devices


Channels seem to be fine for me as well. Running at 160Mhz currently. What is the channel issue you are referring too?

1 Like

over channel 64 (width 160mhz) ... which country are you using ?

Oh that I'm not sure about. I mainly use Channel 36 with 160Mhz which works great for me. The upper 5Ghz radio is set to channel 149 though at 80Mhz. I'm using United States.

1 Like

Now its fine the modified bdf file was not in proper folder ,now i hope @robimarko solves the only 2 issues cooling fan and Turning off all leds lights on the ax9000...

I am trying to workaround the sysupgrade issue:

1 Like

does anyone have a dts extract of the stock device ?

2 Likes

did you configure the firewall?
Mine works fine urs firewall is set to lan

Hi guys! I'm owner of the chinese version so thru [guide on openwrt.org](https://openwrt.org/toh/xiaomi/ax9000#install_the_experimental_firmware) got the root on as in the main page stated then installed the [image of robimarco](https://github.com/robimarko/openwrt/releases/tag/ipq807x-2022-12-26-2149) that worked sucesfully. After that i desided to go to current snapshot an with sysupgrade got a brick. 
So i went back to stock firmware with the help of miwifirepairtool and try to install squashfs-factory.ubi from [openwrt repo](https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/) and i get brick again.
Reverted to miwifi back again i desided to go uart-way then as writen by [rdlvm](https://forum.openwrt.org/t/openwrt-support-for-xiaomi-ax9000/98908/1443). But when i try to flash with ftfpboot i constantly get Load: T T.
Has anyone come across a similar situation and how can I get out of it?
Is there something in uart that i miss or there is a way to upgrade to latest snapshot from robimarko's build?

brick-log:
  [    1.798466] 0x000001080000-0x000001180000 : "pstore"
  [    1.803697] 0x000001180000-0x000004980000 : "ubi_kernel"
  [    1.850501] 0x000004980000-0x000010000000 : "rootfs"
  [    1.989110] mtd: setting mtd21 (rootfs) as root device
  [    1.989407] mtdsplit: no squashfs found in "rootfs"
  [    2.000930] spmi spmi-0: PMIC arbiter version v2 (0x20010000)
  [    2.004104] s1:[   33.112380] l11: disabling


robimarko's build log:
 [    1.786887] 0x000001080000-0x000001180000 : "pstore"
 [    1.792193] 0x000001180000-0x000004980000 : "rootfs"
 [    1.838709] mtd: setting mtd20 (rootfs) as root device
 [    1.838995] mtdsplit: no squashfs found in "rootfs"
 [    1.842772] 0x000004980000-0x000008180000 : "rootfs_1"
 [    1.889926] 0x000008180000-0x000008280000 : "cfg_bak"
  *cut*
 [   33.110823] l11: disabling

Sorry, being stupid. Ive readed thread once again and found out that i was flashing with sysupgrade not initramfs. initramfs'ed it and then sysupgrade router sucessfully.

rdlvm instructions for tftpboot are for ax9000 international version. I think that you can just omit the load address from the command.

1 Like

so I backported the nvidia emc2305 from the 6.1 kernel and added to the ax9000 dts the emc2305 definition

created an emc2305 kernel package and compiled - below the kernel log

[    0.021405] i2c-core: driver [dummy] registered
[    1.729909] i2c_dev: i2c /dev entries driver
[    1.730628] i2c_qup 78ba000.i2c: Revision 20070000
[    1.730647] i2c_qup 78ba000.i2c: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    1.730802] i2c_dev: adapter [QUP I2C adapter] registered as minor 0
[    1.730870] i2c_qup 78ba000.i2c: pm_runtime: suspending...
[    1.730917] i2c i2c-0: adapter [QUP I2C adapter] registered
[    1.730934] i2c i2c-0: of_i2c: walking child nodes
[    1.730946] i2c i2c-0: of_i2c: register /soc/i2c@78ba000/emc2301@2f
[    1.731052] i2c_qup 78ba000.i2c: pm_runtime: resuming...
[    1.731077] i2c i2c-0: client [emc2301] registered with bus id 0-002f
[    1.732359] i2c-core: driver [pmbus] registered
[    2.949354] i2c_qup 78ba000.i2c: pm_runtime: suspending...
[    3.982982] i2c_qup 78ba000.i2c: pm_runtime: resuming...
[    3.984716] i2c-core: driver [emc2305] registered

the dts code snippet

&blsp1_i2c6 {
        status = "okay";

        pinctrl-0 = <&i2c_pins>;
        pinctrl-names = "default";


        emc2301@2f {
                compatible = "smsc,emc2301", "emc2301";
                reg = <0x2f>;
                model_name = "emc2301";
                #address-cells = <0x01>;
                #size-cells = <0x00>;
                        emc2305_fan@0 {
                                reg = <0>;
                                name = "emc2305_fan";
                                pwm-output-mode = <1>;
                        };
        };
};


i am able to control the fan speed and set it to max by issuing
i2cset -f -y 0 0x2f 0x30 0xff
or disabling it by issuing
i2cset -f -y 0 0x2f 0x30 0x00

here's the commit in case anyone is interested in testing / trying it

note I set the kernel to debug i2c messages ...

i haven't been able to stress the system to determine if the fan speeds increase automatically

6 Likes

actually the i2cset commands are not required ... i took the stock fancycle that inputs a number range 0-20 and sets the pwm1

here's the code

#!/bin/sh

# EMC2301, connected to GSBI0 I2C
HWMON_SYSFS_EMC2301=/sys/devices/platform/soc/78ba000.i2c/i2c-0/0-002f/hwmon/hwmon0
HWMON_SYSFS_LM63=/sys/devices/platform/soc/78ba000.i2c/i2c-0/0-002f/hwmon/hwmon0
MAXRPM=2500

if [ "$#" -ne 1 ]; then
        echo "error param" >&2
        exit 255
fi

if [ -d $HWMON_SYSFS_EMC2301/hwmon ]; then
        #echo "USE EMC2301" >&2
        HWMON_SYSFS=$HWMON_SYSFS_EMC2301
elif [ -d $HWMON_SYSFS_LM63 ]; then
        #echo "USE LM63" >&2
        HWMON_SYSFS=$HWMON_SYSFS_LM63
else
        echo "Fan controller is not present." >&2
        exit 1
fi

case $1 in
        [0-9]*)
                if [ $1 -gt 20 ]; then
                        echo "fan cycle 0-20" >&2
                        exit 255
                fi
                ;;
        *)
                echo "fan cycle 0-20" >&2
                exit 255
                ;;
esac
duty5p=$1
#echo 1 > $HWMON_SYSFS/pwm1_enable
echo $((255 * duty5p / 20)) > $HWMON_SYSFS/pwm1
echo "fan cycle - $((duty5p * MAXRPM / 20))" >&2

saying all this ... it is weird that i2cdetect doesn't show anything nor sensors-detect ...