QCN9575 is a Wi-Fi 8 target that requires its own hardware-params entry to be matched at probe time. Add ATH12K_HW_QCN9575_HW20 to ath12k_hw_rev and populate the initial parameter set in wifi8/hw.c. Introduce ath12k_wifi8_hw_init() to walk the Wi-Fi 8 hw_params table and select the matching entry at runtime. Hardware-specific operation pointers (hw_ops, wmi_init, mhi_config) and CE config tables are left as NULL placeholders until the corresponding subsystem support is added. Explicitly initialize every top-level member of the hw_params entry, including zero/NULL/false defaults, rather than relying on implicit designated-initializer zero-fill, so the full set of fields is visible and easy to audit as later patches replace individual placeholders with real values. Add wifi8/hw.h and wire wifi8/hw.c into the wifi8/Makefile. Define QCN9575_QFPROM_RAW_RFA_PDET_ROW13_LSB with the correct OTP register address 0x1F90070 and set it as the otp_board_id_register in the QCN9575 hw_params. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Signed-off-by: Madhavan Ganesan --- drivers/net/wireless/ath/ath12k/core.h | 1 + drivers/net/wireless/ath/ath12k/qmi.h | 1 + drivers/net/wireless/ath/ath12k/wifi8/Makefile | 1 + drivers/net/wireless/ath/ath12k/wifi8/hw.c | 135 +++++++++++++++++++++++++ drivers/net/wireless/ath/ath12k/wifi8/hw.h | 14 +++ 5 files changed, 152 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 2a4b5e5e1af3..56b509841126 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -159,6 +159,7 @@ enum ath12k_hw_rev { ATH12K_HW_QCC2072_HW10, ATH12K_HW_IPQ5424_HW10, ATH12K_HW_QCN6432_HW10, + ATH12K_HW_QCN9575_HW20, }; #define ATH12K_IRQ_NUM_MAX 57 diff --git a/drivers/net/wireless/ath/ath12k/qmi.h b/drivers/net/wireless/ath/ath12k/qmi.h index fc68ff649352..438ab92802bf 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.h +++ b/drivers/net/wireless/ath/ath12k/qmi.h @@ -19,6 +19,7 @@ #define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_WCN7850 0x1 #define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9274 0x07 +#define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9575 0x07 #define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ5332 0x2 #define ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_QCN6432 0x60 #define ATH12K_QMI_WLANFW_MAX_TIMESTAMP_LEN_V01 32 diff --git a/drivers/net/wireless/ath/ath12k/wifi8/Makefile b/drivers/net/wireless/ath/ath12k/wifi8/Makefile index b8c5b6d3a7bd..277b5f13754d 100644 --- a/drivers/net/wireless/ath/ath12k/wifi8/Makefile +++ b/drivers/net/wireless/ath/ath12k/wifi8/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause-Clear obj-$(CONFIG_ATH12K) += ath12k_wifi8.o ath12k_wifi8-y += core.o \ + hw.o \ pci.o diff --git a/drivers/net/wireless/ath/ath12k/wifi8/hw.c b/drivers/net/wireless/ath/ath12k/wifi8/hw.c new file mode 100644 index 000000000000..6e89a42111b6 --- /dev/null +++ b/drivers/net/wireless/ath/ath12k/wifi8/hw.c @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: BSD-3-Clause-Clear +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#include +#include +#include + +#include "../core.h" +#include "../debug.h" +#include "../hw.h" +#include "../mhi.h" +#include "hw.h" + +static const struct ath12k_hw_params ath12k_wifi8_hw_params[] = { + { + .name = "qcn9575 hw2.0", + .hw_rev = ATH12K_HW_QCN9575_HW20, + .fw = { + .dir = "QCN9575/hw2.0", + .board_size = 256 * 1024, + .cal_offset = 128 * 1024, + .m3_loader = ath12k_m3_fw_loader_driver, + .download_aux_ucode = false, + }, + .max_radios = 2, + .single_pdev_only = false, + .qmi_service_ins_id = ATH12K_QMI_WLFW_SERVICE_INS_ID_V01_QCN9575, + .qmi_max_chunk_size = SZ_2M, + .internal_sleep_clock = false, + + .hw_ops = NULL, + .ring_mask = NULL, + + .host_ce_config = NULL, + .ce_count = 16, + .target_ce_config = NULL, + .target_ce_count = 0, + .svc_to_ce_map = NULL, + .svc_to_ce_map_len = 0, + + .rxdma1_enable = false, + .num_rxdma_per_pdev = 0, + .num_rxdma_dst_ring = 0, + .rx_mac_buf_ring = false, + .vdev_start_delay = false, + + .interface_modes = BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_AP) | + BIT(NL80211_IFTYPE_MESH_POINT), + .supports_monitor = false, + .supports_cong_ctrl_max_msdus = false, + + .idle_ps = false, + .download_calib = true, + .supports_suspend = false, + .tcl_ring_retry = false, + .reoq_lut_support = false, + .supports_shadow_regs = false, + + .num_tcl_banks = 0, + .max_tx_ring = 0, + + .mhi_config = NULL, + + .wmi_init = NULL, + + .qmi_cnss_feature_bitmap = BIT(CNSS_QDSS_CFG_MISS_V01), + + .rfkill_pin = 0, + .rfkill_cfg = 0, + .rfkill_on_level = 0, + + .rddm_size = 0x600000, + + .def_num_link = 0, + .max_mlo_peer = 256, + + .otp_board_id_register = QCN9575_QFPROM_RAW_RFA_PDET_ROW13_LSB, + + .supports_sta_ps = false, + + .acpi_guid = NULL, + .supports_dynamic_smps_6ghz = true, + + .iova_mask = 0, + + .supports_aspm = true, + + .ce_ie_addr = NULL, + .ce_remap = NULL, + .bdf_addr_offset = 0, + + .current_cc_support = false, + + .dp_primary_link_only = false, + .client = { + .max_client_single = 0, + .max_client_dbs = 0, + .max_client_dbs_sbs = 0, + }, + + .host_alloc_ml_id = false, + .advertise_iface_mac_pool = false, + .hybrid_bus_type = false, + + .support_hw_link_id = true, + }, +}; + +int ath12k_wifi8_hw_init(struct ath12k_base *ab) +{ + const struct ath12k_hw_params *hw_params = NULL; + int i; + + for (i = 0; i < ARRAY_SIZE(ath12k_wifi8_hw_params); i++) { + hw_params = &ath12k_wifi8_hw_params[i]; + + if (hw_params->hw_rev == ab->hw_rev) + break; + } + + if (i == ARRAY_SIZE(ath12k_wifi8_hw_params)) { + ath12k_err(ab, "Unsupported Wi-Fi 8 hardware version: 0x%x\n", + ab->hw_rev); + return -EINVAL; + } + + ab->hw_params = hw_params; + + ath12k_info(ab, "Wi-Fi 8 Hardware name: %s\n", ab->hw_params->name); + + return 0; +} diff --git a/drivers/net/wireless/ath/ath12k/wifi8/hw.h b/drivers/net/wireless/ath/ath12k/wifi8/hw.h new file mode 100644 index 000000000000..ad11370f9752 --- /dev/null +++ b/drivers/net/wireless/ath/ath12k/wifi8/hw.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause-Clear */ +/* + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. + */ + +#ifndef ATH12K_WIFI8_HW_H +#define ATH12K_WIFI8_HW_H + +#define QCN9575_QFPROM_RAW_RFA_PDET_ROW13_LSB 0x1F90070 + +struct ath12k_base; +int ath12k_wifi8_hw_init(struct ath12k_base *ab); + +#endif /* ATH12K_WIFI8_HW_H */ -- 2.34.1