From: Josef Schlehofer <pepe.schlehofer@gmail.com>
To: Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH ath-next 1/9] wifi: ath6kl: add AR6006 hw1.1 support
Date: Mon, 30 Nov 2026 10:50:34 +0100 [thread overview]
Message-ID: <20261130095042.41330-2-pepe.schlehofer@gmail.com> (raw)
In-Reply-To: <20261130095042.41330-1-pepe.schlehofer@gmail.com>
The AR6006 hw1.1 (version 0x31c80002, target type 6) is a USB chip,
for example the QCA6006 in the Xiaomi AIoT AC2350 router. It is close
to the AR6004 hw3.0, so most AR6004 branches apply to it as well.
Add a hw_list entry with its own host interest area at 0x00428800,
board data at 0x46e400 and a 40 MHz reference clock. The values come
from Qualcomm's ath6kl-3.5 driver. Like the AR6004 it needs no
BMI_SET_APP_START and no write to the analog PLL register.
ath6kl-3.5 skips both for the AR6004 and the AR6006.
The firmware does not use HTC credit flow control on USB. Add
ATH6KL_HW_NO_HTC_CREDIT_FLOW and set HTC_CONN_FLGS_DISABLE_CRED_FLOW_CTRL
on all service endpoints for it. The fw.ram.bin firmware (API 1)
carries no capability list, so enable 64BIT_RATES, MAP_LP_ENDPOINT
and NO_IP_CHECKSUM for it, as is done for older AR6004 firmware.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
---
The series ran on OpenWrt 25.12 (backports 6.18.55) on a big-endian
QCA9563 router. The firmware booted, station mode joined a WPA2
network and got a DHCP lease, and AP mode associated a WPA2 client
with unicast data both ways.
drivers/net/wireless/ath/ath6kl/bmi.h | 1 +
drivers/net/wireless/ath/ath6kl/core.c | 8 ++++
drivers/net/wireless/ath/ath6kl/core.h | 11 ++++++
drivers/net/wireless/ath/ath6kl/init.c | 50 ++++++++++++++++++++----
drivers/net/wireless/ath/ath6kl/target.h | 8 +++-
5 files changed, 69 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/bmi.h b/drivers/net/wireless/ath/ath6kl/bmi.h
index 397a52f26..af2f464ee 100644
--- a/drivers/net/wireless/ath/ath6kl/bmi.h
+++ b/drivers/net/wireless/ath/ath6kl/bmi.h
@@ -136,6 +136,7 @@
#define TARGET_VERSION_SENTINAL 0xffffffff
#define TARGET_TYPE_AR6003 3
#define TARGET_TYPE_AR6004 5
+#define TARGET_TYPE_AR6006 6
#define BMI_ROMPATCH_INSTALL 9
/*
* Semantics: Install a ROM Patch.
diff --git a/drivers/net/wireless/ath/ath6kl/core.c b/drivers/net/wireless/ath/ath6kl/core.c
index 1ed773eca..9762de89e 100644
--- a/drivers/net/wireless/ath/ath6kl/core.c
+++ b/drivers/net/wireless/ath/ath6kl/core.c
@@ -141,6 +141,14 @@ int ath6kl_core_init(struct ath6kl *ar, enum ath6kl_htc_type htc_type)
ar->fw_capabilities);
}
+ /* AR6006 fw.ram.bin (API 1) carries no capability list */
+ if (ar->target_type == TARGET_TYPE_AR6006 && ar->fw_api == 1) {
+ __set_bit(ATH6KL_FW_CAPABILITY_64BIT_RATES, ar->fw_capabilities);
+ __set_bit(ATH6KL_FW_CAPABILITY_MAP_LP_ENDPOINT,
+ ar->fw_capabilities);
+ __set_bit(ATH6KL_FW_CAPABILITY_NO_IP_CHECKSUM, ar->fw_capabilities);
+ }
+
/* Indicate that WMI is enabled (although not ready yet) */
set_bit(WMI_ENABLED, &ar->flag);
ar->wmi = ath6kl_wmi_init(ar);
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index a0b236eee..747ff2079 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -165,6 +165,8 @@ struct ath6kl_fw_ie {
enum ath6kl_hw_flags {
ATH6KL_HW_SDIO_CRC_ERROR_WAR = BIT(3),
+ /* the target does not use HTC credit flow control (USB) */
+ ATH6KL_HW_NO_HTC_CREDIT_FLOW = BIT(4),
};
#define ATH6KL_FW_API2_FILE "fw-2.bin"
@@ -244,6 +246,13 @@ enum ath6kl_hw_flags {
#define AR6004_HW_3_0_BOARD_DATA_FILE AR6004_HW_3_0_FW_DIR "/bdata.bin"
#define AR6004_HW_3_0_DEFAULT_BOARD_DATA_FILE AR6004_HW_3_0_FW_DIR "/bdata.bin"
+/* AR6006 1.1 definitions */
+#define AR6006_HW_1_1_VERSION 0x31c80002
+#define AR6006_HW_1_1_FW_DIR "ath6k/AR6006/hw1.1"
+#define AR6006_HW_1_1_FIRMWARE_FILE "fw.ram.bin"
+#define AR6006_HW_1_1_BOARD_DATA_FILE AR6006_HW_1_1_FW_DIR "/bdata.bin"
+#define AR6006_HW_1_1_DEFAULT_BOARD_DATA_FILE AR6006_HW_1_1_FW_DIR "/bdata.bin"
+
/* Per STA data, used in AP mode */
#define STA_PS_AWAKE BIT(0)
#define STA_PS_SLEEP BIT(1)
@@ -888,6 +897,8 @@ static inline u32 ath6kl_get_hi_item_addr(struct ath6kl *ar,
addr = ATH6KL_AR6003_HI_START_ADDR + item_offset;
else if (ar->target_type == TARGET_TYPE_AR6004)
addr = ATH6KL_AR6004_HI_START_ADDR + item_offset;
+ else if (ar->target_type == TARGET_TYPE_AR6006)
+ addr = ATH6KL_AR6006_HI_START_ADDR + item_offset;
return addr;
}
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index b91d96cb2..8d1a1aa8a 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -187,6 +187,27 @@ static const struct ath6kl_hw hw_list[] = {
.fw_board = AR6004_HW_3_0_BOARD_DATA_FILE,
.fw_default_board = AR6004_HW_3_0_DEFAULT_BOARD_DATA_FILE,
},
+ {
+ .id = AR6006_HW_1_1_VERSION,
+ .name = "ar6006 hw 1.1",
+ .dataset_patch_addr = 0,
+ .app_load_addr = 0x1234,
+ .board_ext_data_addr = 0,
+ .reserved_ram_size = 7168,
+ .board_addr = 0x46e400,
+ .refclk_hz = 40000000,
+ .testscript_addr = 0,
+ .uarttx_pin = 11,
+ .flags = ATH6KL_HW_NO_HTC_CREDIT_FLOW,
+
+ .fw = {
+ .dir = AR6006_HW_1_1_FW_DIR,
+ .fw = AR6006_HW_1_1_FIRMWARE_FILE,
+ },
+
+ .fw_board = AR6006_HW_1_1_BOARD_DATA_FILE,
+ .fw_default_board = AR6006_HW_1_1_DEFAULT_BOARD_DATA_FILE,
+ },
};
/*
@@ -327,6 +348,9 @@ static int ath6kl_init_service_ep(struct ath6kl *ar)
memset(&connect, 0, sizeof(connect));
+ if (ar->hw.flags & ATH6KL_HW_NO_HTC_CREDIT_FLOW)
+ connect.conn_flags |= HTC_CONN_FLGS_DISABLE_CRED_FLOW_CTRL;
+
/* these fields are the same for all service endpoints */
connect.ep_cb.tx_comp_multi = ath6kl_tx_complete;
connect.ep_cb.rx = ath6kl_rx;
@@ -624,7 +648,8 @@ int ath6kl_configure_target(struct ath6kl *ar)
if ((ar->target_type == TARGET_TYPE_AR6003) ||
(ar->version.target_ver == AR6004_HW_1_3_VERSION) ||
- (ar->version.target_ver == AR6004_HW_3_0_VERSION)) {
+ (ar->version.target_ver == AR6004_HW_3_0_VERSION) ||
+ (ar->version.target_ver == AR6006_HW_1_1_VERSION)) {
param = ar->hw.board_ext_data_addr;
ram_reserved_size = ar->hw.reserved_ram_size;
@@ -1247,6 +1272,10 @@ static int ath6kl_upload_board_file(struct ath6kl *ar)
board_data_size = AR6004_BOARD_DATA_SZ;
board_ext_data_size = AR6004_BOARD_EXT_DATA_SZ;
break;
+ case TARGET_TYPE_AR6006:
+ board_data_size = AR6006_BOARD_DATA_SZ;
+ board_ext_data_size = AR6006_BOARD_EXT_DATA_SZ;
+ break;
default:
WARN_ON(1);
return -EINVAL;
@@ -1293,7 +1322,8 @@ static int ath6kl_upload_board_file(struct ath6kl *ar)
/* record the fact that Board Data IS initialized */
if ((ar->version.target_ver == AR6004_HW_1_3_VERSION) ||
- (ar->version.target_ver == AR6004_HW_3_0_VERSION))
+ (ar->version.target_ver == AR6004_HW_3_0_VERSION) ||
+ (ar->version.target_ver == AR6006_HW_1_1_VERSION))
param = board_data_size;
else
param = 1;
@@ -1372,9 +1402,10 @@ static int ath6kl_upload_firmware(struct ath6kl *ar)
/*
* Set starting address for firmware
- * Don't need to setup app_start override addr on AR6004
+ * Don't need to setup app_start override addr on AR6004 and AR6006
*/
- if (ar->target_type != TARGET_TYPE_AR6004) {
+ if (ar->target_type != TARGET_TYPE_AR6004 &&
+ ar->target_type != TARGET_TYPE_AR6006) {
address = ar->hw.app_start_override_addr;
ath6kl_bmi_set_app_start(ar, address);
}
@@ -1431,7 +1462,8 @@ static int ath6kl_upload_testscript(struct ath6kl *ar)
ath6kl_bmi_write_hi32(ar, hi_ota_testscript, address);
if ((ar->version.target_ver != AR6004_HW_1_3_VERSION) &&
- (ar->version.target_ver != AR6004_HW_3_0_VERSION))
+ (ar->version.target_ver != AR6004_HW_3_0_VERSION) &&
+ (ar->version.target_ver != AR6006_HW_1_1_VERSION))
ath6kl_bmi_write_hi32(ar, hi_end_ram_reserve_sz, 4096);
ath6kl_bmi_write_hi32(ar, hi_test_apps_related, 1);
@@ -1445,7 +1477,8 @@ static int ath6kl_init_upload(struct ath6kl *ar)
int status = 0;
if (ar->target_type != TARGET_TYPE_AR6003 &&
- ar->target_type != TARGET_TYPE_AR6004)
+ ar->target_type != TARGET_TYPE_AR6004 &&
+ ar->target_type != TARGET_TYPE_AR6006)
return -EINVAL;
/* temporarily disable system sleep */
@@ -1477,8 +1510,9 @@ static int ath6kl_init_upload(struct ath6kl *ar)
options, sleep);
/* program analog PLL register */
- /* no need to control 40/44MHz clock on AR6004 */
- if (ar->target_type != TARGET_TYPE_AR6004) {
+ /* no need to control 40/44MHz clock on AR6004 and AR6006 */
+ if (ar->target_type != TARGET_TYPE_AR6004 &&
+ ar->target_type != TARGET_TYPE_AR6006) {
status = ath6kl_bmi_reg_write(ar, ATH6KL_ANALOG_PLL_REGISTER,
0xF9104001);
diff --git a/drivers/net/wireless/ath/ath6kl/target.h b/drivers/net/wireless/ath/ath6kl/target.h
index d5eeeae77..83a8bf0b5 100644
--- a/drivers/net/wireless/ath/ath6kl/target.h
+++ b/drivers/net/wireless/ath/ath6kl/target.h
@@ -25,6 +25,9 @@
#define AR6004_BOARD_DATA_SZ 6144
#define AR6004_BOARD_EXT_DATA_SZ 0
+#define AR6006_BOARD_DATA_SZ 6144
+#define AR6006_BOARD_EXT_DATA_SZ 0
+
#define RESET_CONTROL_ADDRESS 0x00004000
#define RESET_CONTROL_COLD_RST 0x00000100
#define RESET_CONTROL_MBOX_RST 0x00000004
@@ -143,6 +146,7 @@
*/
#define ATH6KL_AR6003_HI_START_ADDR 0x00540600
#define ATH6KL_AR6004_HI_START_ADDR 0x00400800
+#define ATH6KL_AR6006_HI_START_ADDR 0x00428800
/*
* These are items that the Host may need to access
@@ -332,10 +336,12 @@ struct host_interest {
/* Convert a Target virtual address into a Target physical address */
#define AR6003_VTOP(vaddr) ((vaddr) & 0x001fffff)
#define AR6004_VTOP(vaddr) (vaddr)
+#define AR6006_VTOP(vaddr) (vaddr)
#define TARG_VTOP(target_type, vaddr) \
(((target_type) == TARGET_TYPE_AR6003) ? AR6003_VTOP(vaddr) : \
- (((target_type) == TARGET_TYPE_AR6004) ? AR6004_VTOP(vaddr) : 0))
+ (((target_type) == TARGET_TYPE_AR6004) ? AR6004_VTOP(vaddr) : \
+ (((target_type) == TARGET_TYPE_AR6006) ? AR6006_VTOP(vaddr) : 0)))
#define ATH6KL_FWLOG_PAYLOAD_SIZE 1500
--
2.54.0 (Apple Git-157)
next prev parent reply other threads:[~2026-11-30 9:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 9:50 [PATCH ath-next 0/9] wifi: ath6kl: add AR6006 hw1.1 (QCA6006) support Josef Schlehofer
2026-11-30 9:50 ` Josef Schlehofer [this message]
2026-11-30 9:50 ` [PATCH ath-next 2/9] wifi: ath6kl: handle the AR6006 WMI layout Josef Schlehofer
2026-11-30 9:50 ` [PATCH ath-next 3/9] wifi: ath6kl: ignore AR6006 regulatory domain events Josef Schlehofer
2026-11-30 9:50 ` [PATCH ath-next 4/9] wifi: ath6kl: use per-device band and channel copies Josef Schlehofer
2026-11-30 9:50 ` [PATCH ath-next 5/9] dt-bindings: net: wireless: add QCA6006 binding Josef Schlehofer
2026-11-30 9:50 ` [PATCH ath-next 6/9] wifi: ath6kl: take the AR6006 MAC address from DT Josef Schlehofer
2026-11-30 9:50 ` [PATCH ath-next 7/9] wifi: ath6kl: handle unsupported connection frequencies Josef Schlehofer
2026-11-30 9:50 ` [PATCH ath-next 8/9] wifi: ath6kl: honour ieee80211-freq-limit from DT Josef Schlehofer
2026-11-30 9:50 ` [PATCH ath-next 9/9] wifi: ath6kl: add QCA6006 USB ID Josef Schlehofer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130095042.41330-2-pepe.schlehofer@gmail.com \
--to=pepe.schlehofer@gmail.com \
--cc=jjohnson@kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox