Adding OpenWrt support for Xiaomi AX6000

True, but apart from the significantly more expensive AX9000 (which also isn't supported all that well) they all only reach 2402 Mbps at 5 GHz, while the AX6000 reaches 4804 Mbps. IMHO that's quite a difference.

Sadly, most devices this fast seem to use Broadcom chipsets. :frowning:

I compiled a firmware using qsdk-11.5.When I burn into AX6000 ,ethernet chip qca8081 doesn't work.
I found that I can't read the correct phy id on mdio1.
log as follows:
[ 13.791953] ssdk_switch_device_num_init[1167]:INFO:ess-switch dts node number: 2
[ 13.792003] ssdk_dt_get_switch_node[978]:INFO:ess-switch DT exist!
[ 13.798478] ssdk_dt_parse_access_mode[864]:INFO:switch_access_mode: local bus
[ 13.804398] ssdk_dt_parse_access_mode[877]:INFO:switchreg_base_addr: 0x39c00000
[ 13.811628] ssdk_dt_parse_access_mode[878]:INFO:switchreg_size: 0x200000
[ 13.818736] ssdk_dt_parse_mac_mode[296]:INFO:mac mode = 0xf
[ 13.825679] ssdk_dt_parse_mac_mode[302]:INFO:mac mode1 doesn't exit!
[ 13.830960] ssdk_dt_parse_mac_mode[311]:INFO:mac mode2 doesn't exit!
[ 13.837606] of_get_named_gpiod_flags: can't parse 'phy-reset-gpio' property of node '/soc/mdio@88000[0]'
[ 13.837621] ssdk_dt_parse_phy_info[660]:INFO:[PORT 2] port_mac_sel = QGMAC_PORT
[ 13.843929] of_get_named_gpiod_flags: parsed 'phy-reset-gpio' property of node '/soc/mdio@90000[0]' - status (0)
[ 13.843937] ssdk_dt_parse_phy_info[686]:INFO:port2's phy-reset-gpio is GPIO39
[ 13.851017] ssdk_dt_parse_port_bmp[765]:INFO:port_bmp doesn't exist!
[ 13.858265] ssdk_dt_parse_uniphy[333]:INFO:ess-uniphy DT exist!
[ 13.864642] ssdk_dt_parse_led[951]:INFO:current dts led_source_num is 0
[ 13.870322] ssdk_plat_init start
[ 16.285488] ssdk_mp_reset_init[739]:INFO:MP reset successfully!
[ 16.285550] ssdk_gcc_clock_init[1044]:INFO:SSDK gcc clock init successfully!
[ 16.291558] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 255, phy_id = 0x0 phy
[ 16.297632] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 7, phy_id = 0x4dd0c0 phy
[ 16.314109] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 8, phy_id = 0x0 phy
[ 16.330627] ssdk_phy_driver_init[343]:INFO:dev_id = 0, phy_adress = 8, phy_id = 0x0 phytype doesn't match
[ 16.338976] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 2, phy_id = 0x0 phy
[ 16.348686] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 3, phy_id = 0x0 phy
[ 16.356495] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 4, phy_id = 0x0 phy
[ 16.364449] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 5, phy_id = 0x0 phy
[ 16.372479] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 6, phy_id = 0x0 phy
[ 16.380478] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 7, phy_id = 0x4dd0c0 phy
[ 16.388448] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 8, phy_id = 0x0 phy
[ 16.397134] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 9, phy_id = 0x8aa21ac8 phy
[ 16.405636] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 10, phy_id = 0x0 phy
[ 16.414422] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 11, phy_id = 0x0 phy
[ 16.423579] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 12, phy_id = 0x0 phy
[ 16.429887] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 13, phy_id = 0x0 phy
[ 16.437994] ssdk_phy_driver_init[325]:INFO:dev_id = 0, phy_adress = 14, phy_id = 0x0 phy
[ 16.445987] mpge_phy_api_ops_init[1089]:INFO:qca probe mpge phy driver succeeded!
[ 16.454386] mpge_phy_dac_set[917]:INFO:phy mdac is set as 0x10
[ 16.461480] mpge_phy_dac_set[929]:INFO:phy edac is set as 0x10
[ 16.467234] regi_init[3604]:INFO:Initializing SCOMPHY!
[ 17.805477] hsl_port_phy_gpio_reset[700]:INFO:GPIO39 reset PHY done
[ 17.915482] ssdk_switch_register[1714]:INFO:Chip version 0xee
[ 17.915524] qca_link_polling_select[1318]:INFO:link-polling-required node does not exist
[ 17.920193] ssdk_switch_register[1748]:INFO:polling is selected
[ 17.928371] regi_init[3614]:INFO:Initializing SCOMPHY Done!!
[ 17.934028] ssdk_dt_get_switch_node[978]:INFO:ess-switch DT exist!
[ 17.939917] ssdk_dt_parse_access_mode[864]:INFO:switch_access_mode: mdio
[ 17.945900] ssdk_dt_parse_mac_mode[293]:INFO:mac mode doesn't exit!
[ 17.952744] ssdk_dt_parse_mac_mode[302]:INFO:mac mode1 doesn't exit!
[ 17.958743] ssdk_dt_parse_mac_mode[311]:INFO:mac mode2 doesn't exit!
[ 17.965360] ssdk_dt_parse[1069]:INFO:switch node is qca83xx!
[ 17.971680] ssdk_plat_init start
[ 18.041247] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 255, phy_id = 0x0 phy
[ 18.041295] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 0, phy_id = 0x4dd036 phy
[ 18.056941] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 1, phy_id = 0x4dd036 phy
[ 18.074111] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 2, phy_id = 0x4dd036 phy
[ 18.091306] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 3, phy_id = 0x4dd036 phy
[ 18.108493] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 4, phy_id = 0x4dd036 phy
[ 18.117260] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 5, phy_id = 0xffffffff phy
[ 18.125680] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 6, phy_id = 0xffffffff phy
[ 18.134093] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 7, phy_id = 0xffffffff phy
[ 18.142693] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 8, phy_id = 0x4dd101 phy
[ 18.151287] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 9, phy_id = 0x8aa21ac8 phy
[ 18.159883] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 10, phy_id = 0xffffffff phy
[ 18.168303] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 11, phy_id = 0xffffffff phy
[ 18.176901] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 12, phy_id = 0xffffffff phy
[ 18.185586] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 13, phy_id = 0xffffffff phy
[ 18.194249] ssdk_phy_driver_init[325]:INFO:dev_id = 1, phy_adress = 14, phy_id = 0xffffffff phy
[ 18.202918] f1_phy_api_ops_init[1517]:INFO:qca probe f1 phy driver succeeded!
[ 18.211594] regi_init[3562]:INFO:Initializing ISISC!!
[ 18.218890] of_get_named_gpiod_flags: can't parse 'reset_gpio' property of node '/soc/ess-instance/ess-switch1@1[0]'
[ 18.218896] qca_ar8327_gpio_reset[3476]:INFO:reset_gpio node does not exist
[ 18.224068] ssdk_switch_register[1722]:INFO:Chip version 0x1302
[ 18.230713] qca_link_polling_select[1318]:INFO:link-polling-required node does not exist
[ 18.236595] ssdk_switch_register[1748]:INFO:polling is selected
[ 19.885485] regi_init[3567]:INFO:Initializing ISISC Done!!
[ 19.885678] regi_init[3637]:INFO:qca-ssdk module init succeeded!

and the device tree file is as follows:
ess-instance {
num_devices = <0x2>;
ess-switch@0x39c00000 {
compatible = "qcom,ess-switch-ipq50xx";
device_id = <0>;
reg = <0x39c00000 0x200000>;
switch_access_mode = "local bus";
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
qcom,port_phyinfo {
port@0 {
port_id = <1>;
mdiobus = <&mdio0>;
phy_address = <7>;
phy_dac= <0x10 0x10>;
};
port@1 {
port_id = <2>;
phy_address = <0x8>;
mdiobus = <&mdio1>;
port_mac_sel="QGMAC_PORT";
};
};
#if 0
led_source@0 {
source = <0>;
mode = "normal";
speed = "all";
blink_en = "enable";
active = "high";
};
#endif
};
ess-switch1@1 {
compatible = "qcom,ess-switch-qca83xx";
device_id = <1>;
switch_access_mode = "mdio";
mdio-bus = <&mdio1>;
//reset_gpio = <0x27>;
switch_cpu_bmp = <0x40>; /* cpu port bitmap /
switch_lan_bmp = <0x1e>; /
lan port bitmap /
switch_wan_bmp = <0x0>; /
wan port bitmap /
qca,ar8327-initvals = <
0x00004 0x7600000 /
PAD0_MODE /
0x00008 0x1000000 /
PAD5_MODE /
0x0000c 0x80 /
PAD6_MODE /
0x00010 0x2613a0 /
PORT6 FORCE MODE*/
0x000e4 0xaa545 /* MAC_POWER_SEL /
0x000e0 0xc74164de /
SGMII_CTRL /
0x0007c 0x4e /
PORT0_STATUS /
0x00094 0x4e /
PORT6_STATUS */
>;
qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <0>;
};
port@1 {
port_id = <2>;
phy_address = <1>;
};
port@2 {
port_id = <3>;
phy_address = <2>;
};
port@3 {
port_id = <4>;
phy_address = <3>;
};
};
};
};

I would like to know why this happens. thank you to all

Where did you get this dts file? Did you extract directly from the board or got it somewhere else? If you extracted from the board, do you have the dtsi as well?

By the looks of it, he extracted the dts file from the factory firmware.

Edit:
@josiah-tm I took a look at this post: Adding OpenWrt support for Xiaomi AX3600 - #2956 by robimarko and was able to observe that it uses a different phy_address for a similar interface. Perhaps you could try changing <0x8> to <0x1c> and other needed references to this interface. Maybe @robimarko has some additional suggestion for you.

I don't know if it will be officially supported, but this chip was introduced in ath11k and removed afterwards: https://github.com/kvalo/ath11k-firmware/commit/2a31d6edfe434112396ffb9a5ac1cacc7855072c (The latest commit containing the firmware is 7647745d2df5df8db605d4a43aa7d2e6b84088d1)
So it is very likely that someone will make it work somehow.

Edit: It`s available on quic repository as well: https://github.com/quic/upstream-wifi-fw/tree/main/ath11k-firmware/IPQ5018_QCN6122_QCN6122/