ソースを参照

qcacmn: Pebble bring-up changes in Umac and target_if layer

Add device Id and target type checks for qcn6432 target
compilation
Add CFR and spectral support for QCN6432

Change-Id: Ic908fa768aa1be7cfc40be7fcc7f9ca6aa85aaa6
CRs-Fixed: 3351747
Kannan Saravanan 2 年 前
コミット
e11f459ade

+ 2 - 1
gpio/dispatcher/src/wlan_gpio_tgt_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -106,6 +106,7 @@ static bool tgt_gpio_disabled(struct wlan_objmgr_psoc *psoc)
 	    (target_type == TARGET_TYPE_QCA8074V2) ||
 	    (target_type == TARGET_TYPE_QCA9574) ||
 	    (target_type == TARGET_TYPE_QCA5332) ||
+	    (target_type == TARGET_TYPE_QCN6432) ||
 	    (target_type == TARGET_TYPE_QCA5018) ||
 	    (target_type == TARGET_TYPE_QCA6018)) {
 		return true;

+ 17 - 1
target_if/cfr/inc/target_if_cfr_enh.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -131,6 +131,22 @@
 
 #define STREAMFS_NUM_SUBBUF_SPRUCE 255
 
+/* Max 4 users in MU case for QCN6432 */
+#define QCN6432_CFR_MU_USERS 4
+
+#define QCN6432_MAX_HEADER_LENGTH_WORDS 22
+
+#define QCN6432_MAX_DATA_LENGTH_BYTES 8192
+
+/* Max size :
+ * sizeof(csi_cfr_header) + 88 bytes(cfr header) + 8192 bytes(cfr payload)
+ */
+#define STREAMFS_MAX_SUBBUF_QCN6432 \
+	(sizeof(struct csi_cfr_header) + \
+	 (QCN6432_MAX_HEADER_LENGTH_WORDS * 4) + \
+	 QCN6432_MAX_DATA_LENGTH_BYTES)
+
+#define STREAMFS_NUM_SUBBUF_QCN6432 255
 /* enum macrx_freeze_tlv_version: Reported by uCode in enh_dma_header
  * MACRX_FREEZE_TLV_VERSION_1: Single MU UL user info reported by MAC.
  * This is used in Cypress/HastingsPrime chips. Corresponding structures are

+ 7 - 2
target_if/cfr/src/target_if_cfr.c

@@ -224,6 +224,7 @@ void target_if_cfr_fill_header(struct csi_cfr_header *hdr,
 		    (target_type == TARGET_TYPE_QCN9224))
 			hdr->cmn.cfr_metadata_version = CFR_META_VERSION_9;
 		else if (target_type == TARGET_TYPE_QCA5332 ||
+			 target_type == TARGET_TYPE_QCN6432 ||
 			 target_type == TARGET_TYPE_QCA6490 ||
 			 target_type == TARGET_TYPE_QCA6750 ||
 			 target_type == TARGET_TYPE_KIWI ||
@@ -244,6 +245,8 @@ void target_if_cfr_fill_header(struct csi_cfr_header *hdr,
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_SPRUCE;
 		else if (target_type == TARGET_TYPE_QCN9160)
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_YORK;
+		else if (target_type == TARGET_TYPE_QCN6432)
+			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_PEBBLE;
 		else if (target_type == TARGET_TYPE_QCN9224)
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_WAIKIKI;
 		else if (target_type == TARGET_TYPE_QCA5332)
@@ -451,7 +454,8 @@ target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
 		   (target_type == TARGET_TYPE_QCA5018) ||
 		   (target_type == TARGET_TYPE_QCA5332) ||
 		   (target_type == TARGET_TYPE_QCN9224) ||
-		   (target_type == TARGET_TYPE_QCN9160)) {
+		   (target_type == TARGET_TYPE_QCN9160) ||
+		   (target_type == TARGET_TYPE_QCN6432)) {
 		pa->is_cfr_capable = cfr_sc->is_cfr_capable;
 		return cfr_enh_init_pdev(psoc, pdev);
 	} else
@@ -480,7 +484,8 @@ target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
 		   (target_type == TARGET_TYPE_QCA5018) ||
 		   (target_type == TARGET_TYPE_QCA5332) ||
 		   (target_type == TARGET_TYPE_QCN9224) ||
-		   (target_type == TARGET_TYPE_QCN9160)) {
+		   (target_type == TARGET_TYPE_QCN9160) ||
+		   (target_type == TARGET_TYPE_QCN6432)) {
 		return cfr_enh_deinit_pdev(psoc, pdev);
 	} else
 		return QDF_STATUS_E_NOSUPPORT;

+ 10 - 0
target_if/cfr/src/target_if_cfr_enh.c

@@ -734,6 +734,11 @@ static QDF_STATUS check_dma_length(struct look_up_table *lut,
 		    lut->payload_length <= WAIKIKI_MAX_DATA_LENGTH_BYTES) {
 			return QDF_STATUS_SUCCESS;
 		}
+	} else if (target_type == TARGET_TYPE_QCN6432) {
+		if (lut->header_length <= QCN6432_MAX_HEADER_LENGTH_WORDS &&
+		    lut->payload_length <= QCN6432_MAX_DATA_LENGTH_BYTES) {
+			return QDF_STATUS_SUCCESS;
+		}
 	} else {
 		if (lut->header_length <= CYP_MAX_HEADER_LENGTH_WORDS &&
 		    lut->payload_length <= CYP_MAX_DATA_LENGTH_BYTES) {
@@ -2241,6 +2246,11 @@ QDF_STATUS cfr_enh_init_pdev(struct wlan_objmgr_psoc *psoc,
 		pcfr->num_subbufs = STREAMFS_NUM_SUBBUF_WAIKIKI;
 		pcfr->chip_type = CFR_CAPTURE_RADIO_WAIKIKI;
 		pcfr->max_mu_users = WAIKIKI_CFR_MU_USERS;
+	} else if (target_type == TARGET_TYPE_QCN6432) {
+		pcfr->subbuf_size = STREAMFS_MAX_SUBBUF_QCN6432;
+		pcfr->num_subbufs = STREAMFS_NUM_SUBBUF_QCN6432;
+		pcfr->chip_type = CFR_CAPTURE_RADIO_PEBBLE;
+		pcfr->max_mu_users = QCN6432_CFR_MU_USERS;
 	} else {
 		pcfr->subbuf_size = STREAMFS_MAX_SUBBUF_CYP;
 		pcfr->num_subbufs = STREAMFS_NUM_SUBBUF_CYP;

+ 10 - 1
target_if/core/inc/target_if.h

@@ -583,6 +583,14 @@ bool target_is_tgt_type_qcn6122(uint32_t target_type);
  */
 bool target_is_tgt_type_qcn9160(uint32_t target_type);
 
+/**
+ * target_is_tgt_type_qcn6432() - Check if the target type is QCN6432 (Pebble)
+ * @target_type: target type to be checked.
+ *
+ * Return: true if the target_type is QCN6432, else false.
+ */
+bool target_is_tgt_type_qcn6432(uint32_t target_type);
+
 /**
  * target_is_tgt_type_qcn7605() - Check if the target type is QCN7605
  * @target_type: target type to be checked.
@@ -2903,7 +2911,8 @@ static inline void target_if_set_reo_shared_qref_feature(struct wlan_objmgr_psoc
 	}
 
 	if (target_psoc_get_target_type(tgt_hdl) == TARGET_TYPE_QCN9224 ||
-	    target_psoc_get_target_type(tgt_hdl) == TARGET_TYPE_QCA5332)
+	    target_psoc_get_target_type(tgt_hdl) == TARGET_TYPE_QCA5332 ||
+	    target_psoc_get_target_type(tgt_hdl) == TARGET_TYPE_QCN6432)
 		info->wlan_res_cfg.reo_qdesc_shared_addr_table_enabled = true;
 	else
 		info->wlan_res_cfg.reo_qdesc_shared_addr_table_enabled = false;

+ 8 - 0
target_if/core/src/target_if_main.c

@@ -479,6 +479,9 @@ static void target_if_target_tx_ops_register(
 	target_tx_ops->tgt_is_tgt_type_qcn9160 =
 		target_is_tgt_type_qcn9160;
 
+	target_tx_ops->tgt_is_tgt_type_qcn6432 =
+		target_is_tgt_type_qcn6432;
+
 	target_tx_ops->tgt_is_tgt_type_qcn7605 =
 		target_is_tgt_type_qcn7605;
 
@@ -841,6 +844,11 @@ bool target_is_tgt_type_qcn9160(uint32_t target_type)
 	return target_type == TARGET_TYPE_QCN9160;
 }
 
+bool target_is_tgt_type_qcn6432(uint32_t target_type)
+{
+	return target_type == TARGET_TYPE_QCN6432;
+}
+
 bool target_is_tgt_type_qcn7605(uint32_t target_type)
 {
 	return target_type == TARGET_TYPE_QCN7605;

+ 2 - 1
target_if/init_deinit/src/service_ready_util.c

@@ -1051,7 +1051,8 @@ QDF_STATUS init_deinit_validate_160_80p80_fw_caps(
 	    (tgt_hdl->info.target_type == TARGET_TYPE_QCA8074V2) ||
 	    (tgt_hdl->info.target_type == TARGET_TYPE_QCN6122) ||
 	    (tgt_hdl->info.target_type == TARGET_TYPE_QCN9160) ||
-	    (tgt_hdl->info.target_type == TARGET_TYPE_QCA6290)) {
+	    (tgt_hdl->info.target_type == TARGET_TYPE_QCA6290) ||
+	    (tgt_hdl->info.target_type == TARGET_TYPE_QCN6432)) {
 		/**
 		 * Return true for now. This is not available in
 		 * qca8074 fw yet

+ 7 - 1
target_if/spectral/target_if_spectral.c

@@ -618,7 +618,8 @@ target_if_send_vdev_spectral_enable_cmd(struct target_if_spectral *spectral,
 static inline bool is_spectral_arch_beryllium(uint32_t target_tpe)
 {
 	if ((target_tpe == TARGET_TYPE_QCN9224) ||
-	    (target_tpe == TARGET_TYPE_QCA5332))
+	    (target_tpe == TARGET_TYPE_QCA5332) ||
+	    (target_tpe == TARGET_TYPE_QCN6432))
 		return true;
 
 	return false;
@@ -3161,6 +3162,7 @@ target_if_spectral_len_adj_swar_init(struct spectral_fft_bin_len_adj_swar *swar,
 	    target_type == TARGET_TYPE_QCA6018 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
 	    target_type == TARGET_TYPE_QCN9160 ||
+	    target_type == TARGET_TYPE_QCN6432 ||
 	    target_type == TARGET_TYPE_QCA5332 ||
 	    target_type == TARGET_TYPE_QCA5018 ||
 	    target_type == TARGET_TYPE_QCN9000 ||
@@ -3208,6 +3210,7 @@ target_if_spectral_report_params_init(
 	if (target_type == TARGET_TYPE_QCN9000 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
 	    target_type == TARGET_TYPE_QCN9160 ||
+	    target_type == TARGET_TYPE_QCN6432 ||
 	    target_type == TARGET_TYPE_QCA5018 ||
 	    target_type == TARGET_TYPE_QCA6750 ||
 	    target_type == TARGET_TYPE_QCA6490 ||
@@ -3253,6 +3256,7 @@ target_if_spectral_report_params_init(
 	if (target_type == TARGET_TYPE_QCN9000 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
 	    target_type == TARGET_TYPE_QCN9224 ||
+	    target_type == TARGET_TYPE_QCN6432 ||
 	    target_type == TARGET_TYPE_QCN9160 ||
 	    target_type == TARGET_TYPE_QCA6490 ||
 	    target_type == TARGET_TYPE_KIWI ||
@@ -3674,6 +3678,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
 	    target_type == TARGET_TYPE_QCA6390 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
 	    target_type == TARGET_TYPE_QCN9160 ||
+	    target_type == TARGET_TYPE_QCN6432 ||
 	    target_type == TARGET_TYPE_QCA6490 ||
 	    target_type == TARGET_TYPE_QCN9000 ||
 	    target_type == TARGET_TYPE_QCA6750 ||
@@ -3697,6 +3702,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
 	    (target_type == TARGET_TYPE_QCA5332) ||
 	    (target_type == TARGET_TYPE_QCN6122) ||
 	    (target_type == TARGET_TYPE_QCN9160) ||
+	    (target_type == TARGET_TYPE_QCN6432) ||
 	    (target_type == TARGET_TYPE_QCN9000) ||
 	    (target_type == TARGET_TYPE_QCA6290) ||
 	    (target_type == TARGET_TYPE_QCA6390) ||

+ 1 - 0
umac/cfr/dispatcher/inc/wlan_cfr_utils_api.h

@@ -123,6 +123,7 @@ enum cfrradiotype {
 	CFR_CAPTURE_RADIO_MIAMI,
 	CFR_CAPTURE_RADIO_YORK,
 	CFR_CAPTURE_RADIO_PEACH,
+	CFR_CAPTURE_RADIO_PEBBLE,
 	CFR_CAPTURE_RADIO_MAX = 0xFF,
 };
 

+ 5 - 0
umac/dfs/core/src/misc/dfs.c

@@ -873,6 +873,11 @@ bool dfs_is_true_160mhz_supported(struct wlan_dfs *dfs)
 	if (tgt_tx_ops->tgt_is_tgt_type_qcn9160 &&
 	    tgt_tx_ops->tgt_is_tgt_type_qcn9160(target_type))
 		return true;
+
+	if (tgt_tx_ops->tgt_is_tgt_type_qcn6432 &&
+	    tgt_tx_ops->tgt_is_tgt_type_qcn6432(target_type))
+		return true;
+
 	return false;
 }
 

+ 2 - 0
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -1293,6 +1293,7 @@ struct wlan_lmac_if_dfs_tx_ops {
  * @tgt_is_tgt_type_qcn6122: To check QCN6122 (Spruce) target type.
  * @tgt_is_tgt_type_qcn9160: To check QCN9160 target type.
  * @tgt_is_tgt_type_qcn7605: To check QCN7605 target type.
+ * @tgt_is_tgt_type_qcn6432: To check QCN6432 (Pebble) target type.
  * @tgt_get_tgt_type:        Get target type
  * @tgt_get_tgt_version:     Get target version
  * @tgt_get_tgt_revision:    Get target revision
@@ -1306,6 +1307,7 @@ struct wlan_lmac_if_target_tx_ops {
 	bool (*tgt_is_tgt_type_qcn6122)(uint32_t);
 	bool (*tgt_is_tgt_type_qcn9160)(uint32_t);
 	bool (*tgt_is_tgt_type_qcn7605)(uint32_t);
+	bool (*tgt_is_tgt_type_qcn6432)(uint32_t);
 	uint32_t (*tgt_get_tgt_type)(struct wlan_objmgr_psoc *psoc);
 	uint32_t (*tgt_get_tgt_version)(struct wlan_objmgr_psoc *psoc);
 	uint32_t (*tgt_get_tgt_revision)(struct wlan_objmgr_psoc *psoc);