ath10k: Add support for QCA9887
cover ath10k: Add support for QCA9887
Hi,
the QCA9887 chip is similar to the QCA988x chips. But it requires a special firmware and uses a different calibration data source. Unfortunately, no working firmware currently exists. But it is possible to create a semi working one by binary patching the current version.
# download new fw + set ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX+ATH10K_FW_FEATURE_NO_P2P
curl -o firmware-5.bin https://raw.githubusercontent.com/kvalo/ath10k-firmware/master/QCA9887/firmware-5.bin_10.2.3.31.7-1
echo -en '\x0c'|dd conv=notrunc bs=1 seek=231112 of=firmware-5.bin
mkdir -p /lib/firmware/ath10k/QCA9887/hw1.0/
mv firmware-5.bin /lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.binI am also guessing that ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT should also be set but this would require a ie_len of 2.
The QCA9887 support should be considered really experimental because we don't have any information how the interface to firmware actually looks like. The workarounds mentioned above were just implemented because we saw the firmware crashing and then guessed the most plausible reason for it.
We are also guessing that there is no HTT_10X_T2H_MSG_TYPE_MGMT_TX_COMPL_IND in this firmware and WMI_10X_VDEV_PARAM_RTS_FIXED_RATE maybe is also not existing (which would reduce the value of every entry in wmi_10x_vdev_param after that by one). But this is just a wild guess and we don't have any real information about that.
Kind regards,
Sven
PATCH 1/2 ath10k: add QCA9887 chipset support
Add the hardware name, revision, firmware names and update the pci_id table.
QA9887 HW1.0 is supposed to be similar to QCA988X HW2.0 . Details about he firmware interface are currently unknown.
--- drivers/net/wireless/ath/ath10k/core.c | 20 ++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 10 ++++++++++ drivers/net/wireless/ath/ath10k/pci.c | 20 ++++++++++++++++++-- drivers/net/wireless/ath/ath10k/targaddrs.h | 3 +++ 4 files changed, 51 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +20 -0
@@ -69,6 +69,25 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { }, }, { + .id = QCA9887_HW_1_0_VERSION, + .dev_id = QCA9887_1_0_DEVICE_ID, + .name = "qca9887 hw1.0", + .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, + .uart_pin = 7, + .has_shifted_cc_wraparound = true, + .otp_exe_param = 0, + .channel_counters_freq_hz = 88000, + .max_probe_resp_desc_thres = 0, + .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER, + .cal_data_len = 2116, + .fw = { + .dir = QCA9887_HW_1_0_FW_DIR, + .board = QCA9887_HW_1_0_BOARD_DATA_FILE, + .board_size = QCA9887_BOARD_DATA_SZ, + .board_ext_size = QCA9887_BOARD_EXT_DATA_SZ, + }, + }, + { .id = QCA6174_HW_2_1_VERSION, .dev_id = QCA6164_2_1_DEVICE_ID, .name = "qca6164 hw2.1",
@@ -2062,6 +2081,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,switch (hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 : ar->regs = &qca988x_regs; ar->hw_values = &qca988x_values;break ;
drivers/net/wireless/ath/ath10k/hw.h +10 -0
@@ -27,6 +27,7 @@#define QCA6174_2_1_DEVICE_ID (0x003e)#define QCA99X0_2_0_DEVICE_ID (0x0040)#define QCA9377_1_0_DEVICE_ID (0x0042) +#define QCA9887_1_0_DEVICE_ID (0x0050)/* QCA988X 1.0 definitions (unsupported) */ #define QCA988X_HW_1_0_CHIP_ID_REV 0x0
@@ -38,6 +39,13 @@#define QCA988X_HW_2_0_BOARD_DATA_FILE "board.bin"#define QCA988X_HW_2_0_PATCH_LOAD_ADDR 0x1234 +/* QCA9887 1.0 definitions */ +#define QCA9887_HW_1_0_VERSION 0x4100016d +#define QCA9887_HW_1_0_CHIP_ID_REV 0 +#define QCA9887_HW_1_0_FW_DIR ATH10K_FW_DIR "/QCA9887/hw1.0" +#define QCA9887_HW_1_0_BOARD_DATA_FILE "board.bin" +#define QCA9887_HW_1_0_PATCH_LOAD_ADDR 0x1234 +/* QCA6174 target BMI version signatures */ #define QCA6174_HW_1_0_VERSION 0x05000000#define QCA6174_HW_1_1_VERSION 0x05000001
@@ -195,6 +203,7 @@ enum ath10k_hw_rev {ATH10K_HW_QCA99X0 ,ATH10K_HW_QCA9377 ,ATH10K_HW_QCA4019 , + ATH10K_HW_QCA9887, }; struct ath10k_hw_regs {
@@ -247,6 +256,7 @@ void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey, u32 cc, u32 rcc, u32 cc_prev, u32 rcc_prev);#define QCA_REV_988X (ar) ((ar)->hw_rev == ATH10K_HW_QCA988X) +#define QCA_REV_9887 (ar) ((ar)->hw_rev == ATH10K_HW_QCA9887)#define QCA_REV_6174 (ar) ((ar)->hw_rev == ATH10K_HW_QCA6174)#define QCA_REV_99X0 (ar) ((ar)->hw_rev == ATH10K_HW_QCA99X0)#define QCA_REV_9377 (ar) ((ar)->hw_rev == ATH10K_HW_QCA9377)
drivers/net/wireless/ath/ath10k/pci.c +18 -2
@@ -57,6 +57,7 @@ static const struct pci_device_id ath10k_pci_id_table[] = { { PCI_VDEVICE(ATHEROS, QCA6174_2_1_DEVICE_ID) }, /* PCI-E QCA6174 V2.1 */ { PCI_VDEVICE(ATHEROS, QCA99X0_2_0_DEVICE_ID) }, /* PCI-E QCA99X0 V2 */ { PCI_VDEVICE(ATHEROS, QCA9377_1_0_DEVICE_ID) }, /* PCI-E QCA9377 V1 */ + { PCI_VDEVICE(ATHEROS, QCA9887_1_0_DEVICE_ID) }, /* PCI-E QCA9887 */ {0} };
@@ -83,6 +84,8 @@ static const struct ath10k_pci_supp_chip ath10k_pci_supp_chips[] = { { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_0_CHIP_ID_REV }, { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_1_CHIP_ID_REV }, + + { QCA9887_1_0_DEVICE_ID, QCA9887_HW_1_0_CHIP_ID_REV }, };static void ath10k_pci_buffer_cleanup (struct ath10k *ar);
@@ -837,6 +840,7 @@ static u32 ath10k_pci_targ_cpu_to_ce_addr(struct ath10k *ar, u32 addr)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
@@ -1560,6 +1564,7 @@ static void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
@@ -1583,6 +1588,7 @@ static void ath10k_pci_irq_msi_fw_unmask(struct ath10k *ar)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
@@ -1932,6 +1938,7 @@ static int ath10k_pci_get_num_banks(struct ath10k *ar)switch (ar_pci->pdev->device) {case QCA988X_2_0_DEVICE_ID :case QCA99X0_2_0_DEVICE_ID : +case QCA9887_1_0_DEVICE_ID :return 1 ;case QCA6164_2_1_DEVICE_ID :case QCA6174_2_1_DEVICE_ID :
@@ -2295,7 +2302,7 @@ static int ath10k_pci_warm_reset(struct ath10k *ar)static int ath10k_pci_safe_chip_reset (struct ath10k *ar) { -if (QCA_REV_988X (ar) ||QCA_REV_6174 (ar)) { +if (QCA_REV_988X (ar) ||QCA_REV_9887 (ar) ||QCA_REV_6174 (ar)) {return ath10k_pci_warm_reset (ar); }else if (QCA_REV_99X0 (ar)) {ath10k_pci_irq_disable (ar);
@@ -2437,7 +2444,7 @@ static int ath10k_pci_qca99x0_chip_reset(struct ath10k *ar)static int ath10k_pci_chip_reset (struct ath10k *ar) { -if (QCA_REV_988X (ar)) +if (QCA_REV_988X (ar) ||QCA_REV_9887 (ar))return ath10k_pci_qca988x_chip_reset (ar);else if (QCA_REV_6174 (ar))return ath10k_pci_qca6174_chip_reset (ar);
@@ -2982,6 +2989,10 @@ static int ath10k_pci_probe(struct pci_dev *pdev, hw_rev =ATH10K_HW_QCA988X ; pci_ps = false;break ; +case QCA9887_1_0_DEVICE_ID : + hw_rev =ATH10K_HW_QCA9887 ; + pci_ps = false; +break ;case QCA6164_2_1_DEVICE_ID :case QCA6174_2_1_DEVICE_ID : hw_rev =ATH10K_HW_QCA6174 ;
@@ -3180,6 +3191,11 @@ MODULE_FIRMWARE(QCA988X_HW_2_0_FW_DIR "/" ATH10K_FW_API5_FILE);MODULE_FIRMWARE (QCA988X_HW_2_0_FW_DIR "/" QCA988X_HW_2_0_BOARD_DATA_FILE );MODULE_FIRMWARE (QCA988X_HW_2_0_FW_DIR "/" ATH10K_BOARD_API2_FILE ); +/* QCA9887 1.0 firmware files */ +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" ATH10K_FW_API5_FILE ); +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" QCA9887_HW_1_0_BOARD_DATA_FILE ); +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" ATH10K_BOARD_API2_FILE ); +/* QCA6174 2.1 firmware files */ MODULE_FIRMWARE (QCA6174_HW_2_1_FW_DIR "/" ATH10K_FW_API4_FILE );MODULE_FIRMWARE (QCA6174_HW_2_1_FW_DIR "/" ATH10K_FW_API5_FILE );
drivers/net/wireless/ath/ath10k/targaddrs.h +3 -0
@@ -447,6 +447,9 @@ Fw Mode/SubMode Mask#define QCA988X_BOARD_DATA_SZ 7168#define QCA988X_BOARD_EXT_DATA_SZ 0 +#define QCA9887_BOARD_DATA_SZ 7168 +#define QCA9887_BOARD_EXT_DATA_SZ 0 +#define QCA6174_BOARD_DATA_SZ 8192#define QCA6174_BOARD_EXT_DATA_SZ 0
Signature · 1 line
2.8.1
Re: [PATCH 1/2] ath10k: add QCA9887 chipset support
Hi Sven,
Quoted 23 lines · Sven Eckelmann
Add the hardware name, revision, firmware names and update the
pci_idtable.QA9887 HW1.0 is supposed to be similar to QCA988X HW2.0 . Details about he firmware interface are currently unknown.
Signed-off-by Sven Eckelmann <[email protected]>--- drivers/net/wireless/ath/ath10k/core.c | 20 ++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 10 ++++++++++ drivers/net/wireless/ath/ath10k/pci.c | 20 ++++++++++++++++++-- drivers/net/wireless/ath/ath10k/targaddrs.h | 3 +++ 4 files changed, 51 insertions(+), 2 deletions(-)drivers/net/wireless/ath/ath10k/core.c +1
-0@@ -69,6 +69,25 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { }, }, { + .id = QCA9887_HW_1_0_VERSION,
drivers/net/wireless/ath/ath10k/core.c static const struct ath10k_hw_params ath10k_hw_params_list[] = { · line 82
Quoted 10 lines
drivers/net/wireless/ath/ath10k/core.c +10
-0+ .dev_id = QCA9887_1_0_DEVICE_ID, + .name = "qca9887 hw1.0", + .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, + .uart_pin = 7, + .has_shifted_cc_wraparound = true, + .otp_exe_param = 0, + .channel_counters_freq_hz = 88000, + .max_probe_resp_desc_thres = 0, + .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER, + .cal_data_len = 2116,
[shafi] i think we can re-use QCA988X_CAL_DATA_LEN instead of a new h/w param
Quoted 176 lines
drivers/net/wireless/ath/ath10k/core.c +9
-0+ .fw = { + .dir = QCA9887_HW_1_0_FW_DIR, + .board = QCA9887_HW_1_0_BOARD_DATA_FILE, + .board_size = QCA9887_BOARD_DATA_SZ, + .board_ext_size = QCA9887_BOARD_EXT_DATA_SZ, + }, + }, + { .id = QCA6174_HW_2_1_VERSION, .dev_id = QCA6164_2_1_DEVICE_ID, .name = "qca6164 hw2.1",@@ -2062,6 +2081,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,switch (hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 : ar->regs = &qca988x_regs; ar->hw_values = &qca988x_values;break ;drivers/net/wireless/ath/ath10k/hw.h +10
-0@@ -27,6 +27,7 @@#define QCA6174_2_1_DEVICE_ID (0x003e)#define QCA99X0_2_0_DEVICE_ID (0x0040)#define QCA9377_1_0_DEVICE_ID (0x0042) +#define QCA9887_1_0_DEVICE_ID (0x0050)/* QCA988X 1.0 definitions (unsupported) */ #define QCA988X_HW_1_0_CHIP_ID_REV 0x0@@ -38,6 +39,13 @@#define QCA988X_HW_2_0_BOARD_DATA_FILE "board.bin"#define QCA988X_HW_2_0_PATCH_LOAD_ADDR 0x1234 +/* QCA9887 1.0 definitions */ +#define QCA9887_HW_1_0_VERSION 0x4100016d +#define QCA9887_HW_1_0_CHIP_ID_REV 0 +#define QCA9887_HW_1_0_FW_DIR ATH10K_FW_DIR "/QCA9887/hw1.0" +#define QCA9887_HW_1_0_BOARD_DATA_FILE "board.bin" +#define QCA9887_HW_1_0_PATCH_LOAD_ADDR 0x1234 +/* QCA6174 target BMI version signatures */ #define QCA6174_HW_1_0_VERSION 0x05000000#define QCA6174_HW_1_1_VERSION 0x05000001@@ -195,6 +203,7 @@ enum ath10k_hw_rev {ATH10K_HW_QCA99X0 ,ATH10K_HW_QCA9377 ,ATH10K_HW_QCA4019 , + ATH10K_HW_QCA9887, }; struct ath10k_hw_regs {@@ -247,6 +256,7 @@ void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey, u32 cc, u32 rcc, u32 cc_prev, u32 rcc_prev);#define QCA_REV_988X (ar) ((ar)->hw_rev == ATH10K_HW_QCA988X) +#define QCA_REV_9887 (ar) ((ar)->hw_rev == ATH10K_HW_QCA9887)#define QCA_REV_6174 (ar) ((ar)->hw_rev == ATH10K_HW_QCA6174)#define QCA_REV_99X0 (ar) ((ar)->hw_rev == ATH10K_HW_QCA99X0)#define QCA_REV_9377 (ar) ((ar)->hw_rev == ATH10K_HW_QCA9377)drivers/net/wireless/ath/ath10k/pci.c +18
-2@@ -57,6 +57,7 @@ static const struct pci_device_id ath10k_pci_id_table[] = { { PCI_VDEVICE(ATHEROS, QCA6174_2_1_DEVICE_ID) }, /* PCI-E QCA6174 V2.1 */ { PCI_VDEVICE(ATHEROS, QCA99X0_2_0_DEVICE_ID) }, /* PCI-E QCA99X0 V2 */ { PCI_VDEVICE(ATHEROS, QCA9377_1_0_DEVICE_ID) }, /* PCI-E QCA9377 V1 */ + { PCI_VDEVICE(ATHEROS, QCA9887_1_0_DEVICE_ID) }, /* PCI-E QCA9887 */ {0} };@@ -83,6 +84,8 @@ static const struct ath10k_pci_supp_chip ath10k_pci_supp_chips[] = { { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_0_CHIP_ID_REV }, { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_1_CHIP_ID_REV }, + + { QCA9887_1_0_DEVICE_ID, QCA9887_HW_1_0_CHIP_ID_REV }, };static void ath10k_pci_buffer_cleanup (struct ath10k *ar);@@ -837,6 +840,7 @@ static u32 ath10k_pci_targ_cpu_to_ce_addr(struct ath10k *ar, u32 addr)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +@@ -1560,6 +1564,7 @@ static void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +@@ -1583,6 +1588,7 @@ static void ath10k_pci_irq_msi_fw_unmask(struct ath10k *ar)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +@@ -1932,6 +1938,7 @@ static int ath10k_pci_get_num_banks(struct ath10k *ar)switch (ar_pci->pdev->device) {case QCA988X_2_0_DEVICE_ID :case QCA99X0_2_0_DEVICE_ID : +case QCA9887_1_0_DEVICE_ID :return 1 ;case QCA6164_2_1_DEVICE_ID :case QCA6174_2_1_DEVICE_ID :@@ -2295,7 +2302,7 @@ static int ath10k_pci_warm_reset(struct ath10k *ar)static int ath10k_pci_safe_chip_reset (struct ath10k *ar) { -if (QCA_REV_988X (ar) ||QCA_REV_6174 (ar)) { +if (QCA_REV_988X (ar) ||QCA_REV_9887 (ar) ||QCA_REV_6174 (ar)) {return ath10k_pci_warm_reset (ar); }else if (QCA_REV_99X0 (ar)) {ath10k_pci_irq_disable (ar);@@ -2437,7 +2444,7 @@ static int ath10k_pci_qca99x0_chip_reset(struct ath10k *ar)static int ath10k_pci_chip_reset (struct ath10k *ar) { -if (QCA_REV_988X (ar)) +if (QCA_REV_988X (ar) ||QCA_REV_9887 (ar))return ath10k_pci_qca988x_chip_reset (ar);else if (QCA_REV_6174 (ar))return ath10k_pci_qca6174_chip_reset (ar);@@ -2982,6 +2989,10 @@ static int ath10k_pci_probe(struct pci_dev *pdev, hw_rev =ATH10K_HW_QCA988X ; pci_ps = false;break ; +case QCA9887_1_0_DEVICE_ID : + hw_rev =ATH10K_HW_QCA9887 ; + pci_ps = false; +break ;case QCA6164_2_1_DEVICE_ID :case QCA6174_2_1_DEVICE_ID : hw_rev =ATH10K_HW_QCA6174 ;@@ -3180,6 +3191,11 @@ MODULE_FIRMWARE(QCA988X_HW_2_0_FW_DIR "/" ATH10K_FW_API5_FILE);MODULE_FIRMWARE (QCA988X_HW_2_0_FW_DIR "/" QCA988X_HW_2_0_BOARD_DATA_FILE );MODULE_FIRMWARE (QCA988X_HW_2_0_FW_DIR "/" ATH10K_BOARD_API2_FILE ); +/* QCA9887 1.0 firmware files */ +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" ATH10K_FW_API5_FILE ); +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" QCA9887_HW_1_0_BOARD_DATA_FILE ); +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" ATH10K_BOARD_API2_FILE ); +/* QCA6174 2.1 firmware files */ MODULE_FIRMWARE (QCA6174_HW_2_1_FW_DIR "/" ATH10K_FW_API4_FILE );MODULE_FIRMWARE (QCA6174_HW_2_1_FW_DIR "/" ATH10K_FW_API5_FILE );drivers/net/wireless/ath/ath10k/targaddrs.h +3
-0@@ -447,6 +447,9 @@ Fw Mode/SubMode Mask#define QCA988X_BOARD_DATA_SZ 7168#define QCA988X_BOARD_EXT_DATA_SZ 0 +#define QCA9887_BOARD_DATA_SZ 7168 +#define QCA9887_BOARD_EXT_DATA_SZ 0 +#define QCA6174_BOARD_DATA_SZ 8192#define QCA6174_BOARD_EXT_DATA_SZ 0Signature · 6 lines
2.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] ath10k: add QCA9887 chipset support
Quoted 30 lines · Mohammed Shafi Shajakhan
Hi Sven,
Quoted 27 lines · Sven Eckelmann
Add the hardware name, revision, firmware names and update the
pci_idtable.QA9887 HW1.0 is supposed to be similar to QCA988X HW2.0 . Details about he firmware interface are currently unknown.
Signed-off-by Sven Eckelmann <[email protected]>--- drivers/net/wireless/ath/ath10k/core.c | 20 ++++++++++++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 10 ++++++++++ drivers/net/wireless/ath/ath10k/pci.c | 20 ++++++++++++++++++-- drivers/net/wireless/ath/ath10k/targaddrs.h | 3 +++ 4 files changed, 51 insertions(+), 2 deletions(-)drivers/net/wireless/ath/ath10k/core.c +5
-0@@ -69,6 +69,25 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = { }, }, { + .id = QCA9887_HW_1_0_VERSION, + .dev_id = QCA9887_1_0_DEVICE_ID, + .name = "qca9887 hw1.0", + .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, + .uart_pin = 7,
Quoted 8 lines
drivers/net/wireless/ath/ath10k/core.c static const struct ath10k_hw_params ath10k_hw_params_list[] = { · line 82
Quoted 6 lines
drivers/net/wireless/ath/ath10k/core.c +6
-0+ .has_shifted_cc_wraparound = true, + .otp_exe_param = 0, + .channel_counters_freq_hz = 88000, + .max_probe_resp_desc_thres = 0, + .hw_4addr_pad = ATH10K_HW_4ADDR_PAD_AFTER, + .cal_data_len = 2116,[shafi] i think we can re-use
QCA988X_CAL_DATA_LENinstead of a new h/w param
sorry ignore this comment, i was looking into some old code, this change looks fine to me
Quoted 181 lines
Quoted 177 lines
drivers/net/wireless/ath/ath10k/core.c +9
-0+ .fw = { + .dir = QCA9887_HW_1_0_FW_DIR, + .board = QCA9887_HW_1_0_BOARD_DATA_FILE, + .board_size = QCA9887_BOARD_DATA_SZ, + .board_ext_size = QCA9887_BOARD_EXT_DATA_SZ, + }, + }, + { .id = QCA6174_HW_2_1_VERSION, .dev_id = QCA6164_2_1_DEVICE_ID, .name = "qca6164 hw2.1",@@ -2062,6 +2081,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,switch (hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 : ar->regs = &qca988x_regs; ar->hw_values = &qca988x_values;break ;drivers/net/wireless/ath/ath10k/hw.h +10
-0@@ -27,6 +27,7 @@#define QCA6174_2_1_DEVICE_ID (0x003e)#define QCA99X0_2_0_DEVICE_ID (0x0040)#define QCA9377_1_0_DEVICE_ID (0x0042) +#define QCA9887_1_0_DEVICE_ID (0x0050)/* QCA988X 1.0 definitions (unsupported) */ #define QCA988X_HW_1_0_CHIP_ID_REV 0x0@@ -38,6 +39,13 @@#define QCA988X_HW_2_0_BOARD_DATA_FILE "board.bin"#define QCA988X_HW_2_0_PATCH_LOAD_ADDR 0x1234 +/* QCA9887 1.0 definitions */ +#define QCA9887_HW_1_0_VERSION 0x4100016d +#define QCA9887_HW_1_0_CHIP_ID_REV 0 +#define QCA9887_HW_1_0_FW_DIR ATH10K_FW_DIR "/QCA9887/hw1.0" +#define QCA9887_HW_1_0_BOARD_DATA_FILE "board.bin" +#define QCA9887_HW_1_0_PATCH_LOAD_ADDR 0x1234 +/* QCA6174 target BMI version signatures */ #define QCA6174_HW_1_0_VERSION 0x05000000#define QCA6174_HW_1_1_VERSION 0x05000001@@ -195,6 +203,7 @@ enum ath10k_hw_rev {ATH10K_HW_QCA99X0 ,ATH10K_HW_QCA9377 ,ATH10K_HW_QCA4019 , + ATH10K_HW_QCA9887, }; struct ath10k_hw_regs {@@ -247,6 +256,7 @@ void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey, u32 cc, u32 rcc, u32 cc_prev, u32 rcc_prev);#define QCA_REV_988X (ar) ((ar)->hw_rev == ATH10K_HW_QCA988X) +#define QCA_REV_9887 (ar) ((ar)->hw_rev == ATH10K_HW_QCA9887)#define QCA_REV_6174 (ar) ((ar)->hw_rev == ATH10K_HW_QCA6174)#define QCA_REV_99X0 (ar) ((ar)->hw_rev == ATH10K_HW_QCA99X0)#define QCA_REV_9377 (ar) ((ar)->hw_rev == ATH10K_HW_QCA9377)drivers/net/wireless/ath/ath10k/pci.c +18
-2@@ -57,6 +57,7 @@ static const struct pci_device_id ath10k_pci_id_table[] = { { PCI_VDEVICE(ATHEROS, QCA6174_2_1_DEVICE_ID) }, /* PCI-E QCA6174 V2.1 */ { PCI_VDEVICE(ATHEROS, QCA99X0_2_0_DEVICE_ID) }, /* PCI-E QCA99X0 V2 */ { PCI_VDEVICE(ATHEROS, QCA9377_1_0_DEVICE_ID) }, /* PCI-E QCA9377 V1 */ + { PCI_VDEVICE(ATHEROS, QCA9887_1_0_DEVICE_ID) }, /* PCI-E QCA9887 */ {0} };@@ -83,6 +84,8 @@ static const struct ath10k_pci_supp_chip ath10k_pci_supp_chips[] = { { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_0_CHIP_ID_REV }, { QCA9377_1_0_DEVICE_ID, QCA9377_HW_1_1_CHIP_ID_REV }, + + { QCA9887_1_0_DEVICE_ID, QCA9887_HW_1_0_CHIP_ID_REV }, };static void ath10k_pci_buffer_cleanup (struct ath10k *ar);@@ -837,6 +840,7 @@ static u32 ath10k_pci_targ_cpu_to_ce_addr(struct ath10k *ar, u32 addr)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +@@ -1560,6 +1564,7 @@ static void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +@@ -1583,6 +1588,7 @@ static void ath10k_pci_irq_msi_fw_unmask(struct ath10k *ar)switch (ar->hw_rev) {case ATH10K_HW_QCA988X : +case ATH10K_HW_QCA9887 :case ATH10K_HW_QCA6174 :case ATH10K_HW_QCA9377 : val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +@@ -1932,6 +1938,7 @@ static int ath10k_pci_get_num_banks(struct ath10k *ar)switch (ar_pci->pdev->device) {case QCA988X_2_0_DEVICE_ID :case QCA99X0_2_0_DEVICE_ID : +case QCA9887_1_0_DEVICE_ID :return 1 ;case QCA6164_2_1_DEVICE_ID :case QCA6174_2_1_DEVICE_ID :@@ -2295,7 +2302,7 @@ static int ath10k_pci_warm_reset(struct ath10k *ar)static int ath10k_pci_safe_chip_reset (struct ath10k *ar) { -if (QCA_REV_988X (ar) ||QCA_REV_6174 (ar)) { +if (QCA_REV_988X (ar) ||QCA_REV_9887 (ar) ||QCA_REV_6174 (ar)) {return ath10k_pci_warm_reset (ar); }else if (QCA_REV_99X0 (ar)) {ath10k_pci_irq_disable (ar);@@ -2437,7 +2444,7 @@ static int ath10k_pci_qca99x0_chip_reset(struct ath10k *ar)static int ath10k_pci_chip_reset (struct ath10k *ar) { -if (QCA_REV_988X (ar)) +if (QCA_REV_988X (ar) ||QCA_REV_9887 (ar))return ath10k_pci_qca988x_chip_reset (ar);else if (QCA_REV_6174 (ar))return ath10k_pci_qca6174_chip_reset (ar);@@ -2982,6 +2989,10 @@ static int ath10k_pci_probe(struct pci_dev *pdev, hw_rev =ATH10K_HW_QCA988X ; pci_ps = false;break ; +case QCA9887_1_0_DEVICE_ID : + hw_rev =ATH10K_HW_QCA9887 ; + pci_ps = false; +break ;case QCA6164_2_1_DEVICE_ID :case QCA6174_2_1_DEVICE_ID : hw_rev =ATH10K_HW_QCA6174 ;@@ -3180,6 +3191,11 @@ MODULE_FIRMWARE(QCA988X_HW_2_0_FW_DIR "/" ATH10K_FW_API5_FILE);MODULE_FIRMWARE (QCA988X_HW_2_0_FW_DIR "/" QCA988X_HW_2_0_BOARD_DATA_FILE );MODULE_FIRMWARE (QCA988X_HW_2_0_FW_DIR "/" ATH10K_BOARD_API2_FILE ); +/* QCA9887 1.0 firmware files */ +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" ATH10K_FW_API5_FILE ); +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" QCA9887_HW_1_0_BOARD_DATA_FILE ); +MODULE_FIRMWARE (QCA9887_HW_1_0_FW_DIR "/" ATH10K_BOARD_API2_FILE ); +/* QCA6174 2.1 firmware files */ MODULE_FIRMWARE (QCA6174_HW_2_1_FW_DIR "/" ATH10K_FW_API4_FILE );MODULE_FIRMWARE (QCA6174_HW_2_1_FW_DIR "/" ATH10K_FW_API5_FILE );drivers/net/wireless/ath/ath10k/targaddrs.h +3
-0@@ -447,6 +447,9 @@ Fw Mode/SubMode Mask#define QCA988X_BOARD_DATA_SZ 7168#define QCA988X_BOARD_EXT_DATA_SZ 0 +#define QCA9887_BOARD_DATA_SZ 7168 +#define QCA9887_BOARD_EXT_DATA_SZ 0 +#define QCA6174_BOARD_DATA_SZ 8192#define QCA6174_BOARD_EXT_DATA_SZ 0Signature · 6 lines
2.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] ath10k: add QCA9887 chipset support
In reply to Sven EckelmannQuoted 7 lines · Sven Eckelmann
Add the hardware name, revision, firmware names and update the
pci_idtable.QA9887 HW1.0 is supposed to be similar to QCA988X HW2.0 . Details about he firmware interface are currently unknown.
Signed-off-by Sven Eckelmann <[email protected]>
I added the warning we talked about, diff below. Full patch in the pending branch:
drivers/net/wireless/ath/ath10k/pci.c +1 -0
@@ -3005,6 +3005,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev, pci_hard_reset = ath10k_pci_qca988x_chip_reset;break ;case QCA9887_1_0_DEVICE_ID : +dev_warn (&pdev->dev,"QCA9887 support is still experimental, there are likely bugs. You have been warned.\n" ); hw_rev =ATH10K_HW_QCA9887 ; pci_ps = false; pci_soft_reset = ath10k_pci_warm_reset;
Signature · 1 line
Kalle Valo
Re: [1/2] ath10k: add QCA9887 chipset support
In reply to Sven EckelmannQuoted 7 lines · Sven Eckelmann
Add the hardware name, revision, firmware names and update the
pci_idtable.QA9887 HW1.0 is supposed to be similar to QCA988X HW2.0 . Details about he firmware interface are currently unknown.
Signed-off-by Sven Eckelmann <[email protected]>
Thanks, 2 patches applied to ath-next branch of ath.git:
6fd3dd716091 ath10k: add QCA9887 chipset support 6847f9673391 ath10k: add board data download from target
Signature · 2 lines
Sent by pwcli https://patchwork.kernel.org/patch/9129717/
PATCH 2/2 ath10k: Add board data download from target
In reply to Sven EckelmannThe QCA9887 stores its calibration data (board.bin) inside the EEPROM of the target. This has to be downloaded manually to allow the device to initialize correctly.
--- drivers/net/wireless/ath/ath10k/core.c | 41 +++++++++- drivers/net/wireless/ath/ath10k/core.h | 3 + drivers/net/wireless/ath/ath10k/hif.h | 14 ++++ drivers/net/wireless/ath/ath10k/hw.h | 22 ++++++ drivers/net/wireless/ath/ath10k/pci.c | 139 +++++++++++++++++++++++++++++++++ 5 files changed, 218 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/core.c +40 -1
@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/firmware.h> #include <linux/of.h> +#include <asm/byteorder.h> #include "core.h" #include "mac.h"
@@ -550,6 +551,34 @@ out:return ret; } +static int ath10k_download_cal_eeprom (struct ath10k *ar) +{ +size_t data_len; +void *data =NULL ; +int ret; + + ret =ath10k_hif_fetch_target_board_data (ar, &data, &data_len); +if (ret) { +ath10k_warn (ar,"failed to read calibration data from EEPROM: %d\n" , + ret); + goto out_free; + } + + ret =ath10k_download_board_data (ar, data, data_len); +if (ret) { +ath10k_warn (ar,"failed to download calibration data from EEPROM: %d\n" , + ret); + goto out_free; + } + + ret =0 ; + +out_free: +kfree (data); + +return ret; +} +static int ath10k_core_get_board_id_from_otp (struct ath10k *ar) {u32 result, address;
@@ -1312,7 +1341,17 @@ static int ath10k_download_cal_data(struct ath10k *ar) }ath10k_dbg (ar,ATH10K_DBG_BOOT , -"boot did not find DT entry, try OTP next: %d\n" , +"boot did not find DT entry, try target EEPROM next: %d\n" , + ret); + + ret =ath10k_download_cal_eeprom (ar); +if (ret ==0 ) { + ar->cal_mode =ATH10K_CAL_MODE_EEPROM ; + goto done; + } + +ath10k_dbg (ar,ATH10K_DBG_BOOT , +"boot did not find target EEPROM entry, try OTP next: %d\n" , ret); ret =ath10k_download_and_run_otp (ar);
drivers/net/wireless/ath/ath10k/core.h +3 -0
@@ -571,6 +571,7 @@ enum ath10k_cal_mode {ATH10K_CAL_MODE_DT ,ATH10K_PRE_CAL_MODE_FILE ,ATH10K_PRE_CAL_MODE_DT , + ATH10K_CAL_MODE_EEPROM, }; enum ath10k_crypt_mode {
@@ -593,6 +594,8 @@ static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode)return "pre-cal-file" ;case ATH10K_PRE_CAL_MODE_DT :return "pre-cal-dt" ; +case ATH10K_CAL_MODE_EEPROM : +return "eeprom" ; }return "unknown" ;
drivers/net/wireless/ath/ath10k/hif.h +14 -0
@@ -87,6 +87,10 @@ struct ath10k_hif_ops {int (*suspend)(struct ath10k *ar);int (*resume)(struct ath10k *ar); + +/* fetch board data from target eeprom */ +int (*fetch_target_board_data)(struct ath10k *ar,void **data, +size_t *data_len); }; static inline int ath10k_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
@@ -202,4 +206,14 @@ static inline void ath10k_hif_write32(struct ath10k *ar, ar->hif.ops->write32(ar, address, data); } +static inline int ath10k_hif_fetch_target_board_data (struct ath10k *ar, +void **data, +size_t *data_len) +{ +if (!ar->hif.ops->fetch_target_board_data) +return -EOPNOTSUPP ; + +return ar->hif.ops->fetch_target_board_data (ar, data, data_len); +} +#endif /* _HIF_H_ */
drivers/net/wireless/ath/ath10k/hw.h +22 -0
@@ -557,7 +557,10 @@ enum ath10k_hw_4addr_pad {#define WLAN_SYSTEM_SLEEP_DISABLE_MASK 0x00000001#define WLAN_GPIO_PIN0_ADDRESS 0x00000028 +#define WLAN_GPIO_PIN0_CONFIG_LSB 11#define WLAN_GPIO_PIN0_CONFIG_MASK 0x00007800 +#define WLAN_GPIO_PIN0_PAD_PULL_LSB 5 +#define WLAN_GPIO_PIN0_PAD_PULL_MASK 0x00000060#define WLAN_GPIO_PIN1_ADDRESS 0x0000002c#define WLAN_GPIO_PIN1_CONFIG_MASK 0x00007800#define WLAN_GPIO_PIN10_ADDRESS 0x00000050
@@ -570,6 +573,8 @@ enum ath10k_hw_4addr_pad {#define CLOCK_GPIO_BT_CLK_OUT_EN_MASK 0#define SI_CONFIG_OFFSET 0x00000000 +#define SI_CONFIG_ERR_INT_LSB 19 +#define SI_CONFIG_ERR_INT_MASK 0x00080000#define SI_CONFIG_BIDIR_OD_DATA_LSB 18#define SI_CONFIG_BIDIR_OD_DATA_MASK 0x00040000#define SI_CONFIG_I2C_LSB 16
@@ -583,7 +588,9 @@ enum ath10k_hw_4addr_pad {#define SI_CONFIG_DIVIDER_LSB 0#define SI_CONFIG_DIVIDER_MASK 0x0000000f#define SI_CS_OFFSET 0x00000004 +#define SI_CS_DONE_ERR_LSB 10#define SI_CS_DONE_ERR_MASK 0x00000400 +#define SI_CS_DONE_INT_LSB 9#define SI_CS_DONE_INT_MASK 0x00000200#define SI_CS_START_LSB 8#define SI_CS_START_MASK 0x00000100
@@ -634,7 +641,10 @@ enum ath10k_hw_4addr_pad {#define GPIO_BASE_ADDRESS WLAN_GPIO_BASE_ADDRESS#define GPIO_PIN0_OFFSET WLAN_GPIO_PIN0_ADDRESS#define GPIO_PIN1_OFFSET WLAN_GPIO_PIN1_ADDRESS +#define GPIO_PIN0_CONFIG_LSB WLAN_GPIO_PIN0_CONFIG_LSB#define GPIO_PIN0_CONFIG_MASK WLAN_GPIO_PIN0_CONFIG_MASK +#define GPIO_PIN0_PAD_PULL_LSB WLAN_GPIO_PIN0_PAD_PULL_LSB +#define GPIO_PIN0_PAD_PULL_MASK WLAN_GPIO_PIN0_PAD_PULL_MASK#define GPIO_PIN1_CONFIG_MASK WLAN_GPIO_PIN1_CONFIG_MASK#define SI_BASE_ADDRESS WLAN_SI_BASE_ADDRESS#define SCRATCH_BASE_ADDRESS SOC_CORE_BASE_ADDRESS
@@ -689,6 +699,18 @@ enum ath10k_hw_4addr_pad {#define WINDOW_READ_ADDR_ADDRESS MISSING#define WINDOW_WRITE_ADDR_ADDRESS MISSING +#define QCA9887_1_0_I2C_SDA_GPIO_PIN 5 +#define QCA9887_1_0_I2C_SDA_PIN_CONFIG 3 +#define QCA9887_1_0_SI_CLK_GPIO_PIN 17 +#define QCA9887_1_0_SI_CLK_PIN_CONFIG 3 +#define QCA9887_1_0_GPIO_ENABLE_W1TS_LOW_ADDRESS 0x00000010 + +#define QCA9887_EEPROM_SELECT_READ 0xa10000a0 +#define QCA9887_EEPROM_ADDR_HI_MASK 0x0000ff00 +#define QCA9887_EEPROM_ADDR_HI_LSB 8 +#define QCA9887_EEPROM_ADDR_LO_MASK 0x00ff0000 +#define QCA9887_EEPROM_ADDR_LO_LSB 16 +#define RTC_STATE_V_GET (x) (((x) & RTC_STATE_V_MASK) >> RTC_STATE_V_LSB)#endif /* _HW_H_ */
drivers/net/wireless/ath/ath10k/pci.c +139 -0
151 lines not on this page · raw message
Signature · 1 line
2.8.1
Re: [PATCH 2/2] ath10k: Add board data download from target
Quoted 5 lines · Sven Eckelmann
The QCA9887 stores its calibration data (board.bin) inside the EEPROM of the target. This has to be downloaded manually to allow the device to initialize correctly.
Signed-off-by Sven Eckelmann <[email protected]>
[...]
Quoted 16 lines
drivers/net/wireless/ath/ath10k/core.c +3
-0@@ -18,6 +18,7 @@#include <linux/module.h> #include <linux/firmware.h> #include <linux/of.h> +#include <asm/byteorder.h> #include "core.h" #include "mac.h" @@ -550,6 +551,34 @@ out:return ret; } +static int ath10k_download_cal_eeprom (struct ath10k *ar) +{
drivers/net/wireless/ath/ath10k/core.c out: · line 565
Quoted 10 lines
drivers/net/wireless/ath/ath10k/core.c +10
-0+size_t data_len; +void *data =NULL ; +int ret; + + ret =ath10k_hif_fetch_target_board_data (ar, &data, &data_len); +if (ret) { +ath10k_warn (ar,"failed to read calibration data from EEPROM: %d\n" , + ret); + goto out_free; + }
Looking at this again I noticed that we issue this warning even if EEPROM is not supported, which I think is wrong. I fixed this in the pending branch, the diff is below.
I also renamed target_board_data to cal_eeprom because, at least to my understanding, the eeprom actually contains the real calibration data, not the board data file.
Please review so that I didn't break anything.
drivers/net/wireless/ath/ath10k/core.c +4 -3
@@ -580,10 +580,11 @@ static int ath10k_download_cal_eeprom(struct ath10k *ar)void *data =NULL ;int ret; - ret =ath10k_hif_fetch_target_board_data (ar, &data, &data_len); + ret =ath10k_hif_fetch_cal_eeprom (ar, &data, &data_len);if (ret) { -ath10k_warn (ar,"failed to read calibration data from EEPROM: %d\n" , - ret); +if (ret != -EOPNOTSUPP ) +ath10k_warn (ar,"failed to read calibration data from EEPROM: %d\n" , + ret); goto out_free; }
drivers/net/wireless/ath/ath10k/hif.h +8 -8
@@ -88,9 +88,9 @@ struct ath10k_hif_ops {int (*suspend)(struct ath10k *ar);int (*resume)(struct ath10k *ar); -/* fetch board data from target eeprom */ -int (*fetch_target_board_data)(struct ath10k *ar,void **data, -size_t *data_len); +/* fetch calibration data from target eeprom */ +int (*fetch_cal_eeprom)(struct ath10k *ar,void **data, +size_t *data_len); }; static inline int ath10k_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
@@ -206,14 +206,14 @@ static inline void ath10k_hif_write32(struct ath10k *ar, ar->hif.ops->write32(ar, address, data); } -static inline int ath10k_hif_fetch_target_board_data (struct ath10k *ar, -void **data, -size_t *data_len) +static inline int ath10k_hif_fetch_cal_eeprom (struct ath10k *ar, +void **data, +size_t *data_len) { -if (!ar->hif.ops->fetch_target_board_data) +if (!ar->hif.ops->fetch_cal_eeprom)return -EOPNOTSUPP ; -return ar->hif.ops->fetch_target_board_data (ar, data, data_len); +return ar->hif.ops->fetch_cal_eeprom (ar, data, data_len); }#endif /* _HIF_H_ */
drivers/net/wireless/ath/ath10k/pci.c +3 -3
@@ -2678,8 +2678,8 @@ static int ath10k_pci_read_eeprom(struct ath10k *ar, u16 addr, u8 *out)return 0 ; } -static int ath10k_pci_fetch_target_board_data (struct ath10k *ar,void **data, -size_t *data_len) +static int ath10k_pci_hif_fetch_cal_eeprom (struct ath10k *ar,void **data, +size_t *data_len) {u8 *caldata =NULL ;size_t calsize, i;
@@ -2734,7 +2734,7 @@ static const struct ath10k_hif_ops ath10k_pci_hif_ops = { .suspend = ath10k_pci_hif_suspend, .resume = ath10k_pci_hif_resume, #endif - .fetch_target_board_data = ath10k_pci_fetch_target_board_data, + .fetch_cal_eeprom = ath10k_pci_hif_fetch_cal_eeprom, };/*
Signature · 1 line
Kalle Valo
Re: [PATCH 2/2] ath10k: Add board data download from target
On Saturday 04 June 2016 13:26:39 you wrote:
[...]
Quoted 9 lines
Looking at this again I noticed that we issue this warning even if EEPROM is not supported, which I think is wrong. I fixed this in the pending branch, the diff is below.
I also renamed
target_board_datatocal_eeprombecause, at least to my understanding, the eeprom actually contains the real calibration data, not the board data file.Please review so that I didn't break anything.
Thanks for the changes. Looks good to me.
Kind regards,
Sven
Quoted 4 lines · Sven Eckelmann
the QCA9887 chip is similar to the QCA988x chips. But it requires a special firmware and uses a different calibration data source. Unfortunately, no working firmware currently exists. But it is possible to create a semi working one by binary patching the current version.
So what works and what doesn't?
Quoted 8 lines
# download new fw + set ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX+ATH10K_FW_FEATURE_NO_P2P curl -o firmware-5.bin https://raw.githubusercontent.com/kvalo/ath10k-firmware/master/QCA9887/firmware-5.bin_10.2.3.31.7-1 echo -en '\x0c'|dd conv=notrunc bs=1 seek=231112 of=firmware-5.bin mkdir -p /lib/firmware/ath10k/QCA9887/hw1.0/ mv firmware-5.bin /lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.binI am also guessing that
ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INITshould also be set but this would require aie_lenof 2.
I can upload a new version. So I need to add these flags:
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TXATH10K_FW_FEATURE_NO_P2PATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT
Anything else?
Quoted 4 lines
The QCA9887 support should be considered really experimental because we don't have any information how the interface to firmware actually looks like. The workarounds mentioned above were just implemented because we saw the firmware crashing and then guessed the most plausible reason for it.
Should we add a warning message to ath10k that the QCA9887 support is experimental? That way users don't need to wonder why there are so many problems.
There were some conflicts in patch 1. I fixed those now and pushed the patches to the pending branch for further testing:
https://git.kernel.org/cgit/linux/kernel/git/kvalo/ath.git/log/?h=master-pending
Unfortunately I don't have QCA9887 myself so I can't test these myself. I hope I didn't break anything.
Signature · 1 line
Kalle Valo
Quoted 8 lines · Kalle
Quoted 4 lines · Sven Eckelmann
the QCA9887 chip is similar to the QCA988x chips. But it requires a special firmware and uses a different calibration data source. Unfortunately, no working firmware currently exists. But it is possible to create a semi working one by binary patching the current version.
So what works and what doesn't?
We currently stopped everything related to QCA9887 and so I cannot give you an exhaustive list. But right now basic AP functionality seems to work. The signal level, coverage and performance was rather bad. I cannot give you numbers anymore because the two actual tests with QCA9887 were done 1 year ago and 1/2 year ago (you know why ;) ).
But maybe I should add that the results with the original AP147 firmware also wasn't better.
The hardware also doesn't seem to be able to produce spectral frame results. It is unknown whether it uses an incompatible format or whether the firmware/hardware is just not capable to produce spectral results.
[...]
Quoted 7 lines
I can upload a new version. So I need to add these flags:
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TXATH10K_FW_FEATURE_NO_P2PATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INITAnything else?
At least I didn't find more. Possible that more are needed - I would guess that the question to the QCA firmware team is still pending.
[...]
Quoted 3 lines
Should we add a warning message to ath10k that the QCA9887 support is experimental? That way users don't need to wonder why there are so many problems.
Yes, this would be a good idea. I personally wouldn't know where you want to have this warning added. So maybe you just add it? Thanks
Quoted 7 lines
There were some conflicts in patch 1. I fixed those now and pushed the patches to the pending branch for further testing:
https://git.kernel.org/cgit/linux/kernel/git/kvalo/ath.git/log/?h=master-pending
Unfortunately I don't have QCA9887 myself so I can't test these myself. I hope I didn't break anything.
Ah, yes. The new patches "clean up growing hw checks during safe and full reset" and some QCA9884 stuff seems to have created some conflicts. I have redone my patches on top of them and compared with your solution. We came up with the exact same conflict resolution. So you can at least say that I would also have broken it ;)
I have just created a compat-wireless based on your branch which I've tested it with my QCA9887 test card. No new problems were detected.
Kind regards,
Sven
Quoted 10 lines · Sven Eckelmann
Quoted 8 lines · Kalle
Quoted 4 lines · Sven Eckelmann
the QCA9887 chip is similar to the QCA988x chips. But it requires a special firmware and uses a different calibration data source. Unfortunately, no working firmware currently exists. But it is possible to create a semi working one by binary patching the current version.
So what works and what doesn't?
Quoted 8 lines
We currently stopped everything related to QCA9887 and so I cannot give you an exhaustive list. But right now basic AP functionality seems to work. The signal level, coverage and performance was rather bad. I cannot give you numbers anymore because the two actual tests with QCA9887 were done 1 year ago and 1/2 year ago (you know why ;) ).
But maybe I should add that the results with the original AP147 firmware also wasn't better.
That doesn't sound good. Maybe a calibration issue?
Quoted 9 lines
Quoted 7 lines
I can upload a new version. So I need to add these flags:
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TXATH10K_FW_FEATURE_NO_P2PATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INITAnything else?
At least I didn't find more.
I pushed a new firmware image firmware-5.bin_10.2.3.31.7-2 with those enabled:
https://github.com/kvalo/ath10k-firmware/tree/master/QCA9887
Quoted 6 lines
Quoted 3 lines
Should we add a warning message to ath10k that the QCA9887 support is experimental? That way users don't need to wonder why there are so many problems.
Yes, this would be a good idea. I personally wouldn't know where you want to have this warning added. So maybe you just add it? Thanks
Sure, I can add it.
Quoted 5 lines
Quoted 5 lines
There were some conflicts in patch 1. I fixed those now and pushed the patches to the pending branch for further testing:
https://git.kernel.org/cgit/linux/kernel/git/kvalo/ath.git/log/?h=master-pending
Quoted 8 lines
Quoted 2 lines
Unfortunately I don't have QCA9887 myself so I can't test these myself. I hope I didn't break anything.
Ah, yes. The new patches "clean up growing hw checks during safe and full reset" and some QCA9884 stuff seems to have created some conflicts. I have redone my patches on top of them and compared with your solution. We came up with the exact same conflict resolution. So you can at least say that I would also have broken it ;)
Good, so I would not get the blame myself ;)
Quoted 2 lines
I have just created a compat-wireless based on your branch which I've tested it with my QCA9887 test card. No new problems were detected.
Great, thanks for testing!
Signature · 1 line
Kalle Valo
On Friday 27 May 2016 12:44:52 Valo, Kalle wrote:
[...]
Quoted 4 lines
Quoted 2 lines
But maybe I should add that the results with the original AP147 firmware also wasn't better.
That doesn't sound good. Maybe a calibration issue?
Maybe but I don't have a different card to compare it to.
[...]
Quoted 4 lines
I pushed a new firmware image firmware-5.bin_10.2.3.31.7-2 with those enabled:
https://github.com/kvalo/ath10k-firmware/tree/master/QCA9887
Thanks for the updated firmware file. I have done some basic tests and seems to work fine. Bindiff also looks fine
Kind regards,
Sven
Hi Sven,
Quoted 9 lines · Sven Eckelmann
On Friday 27 May 2016 12:44:52 Valo, Kalle wrote:
[...]Quoted 4 lines
Quoted 2 lines
But maybe I should add that the results with the original AP147 firmware also wasn't better.
That doesn't sound good. Maybe a calibration issue?
Maybe but I don't have a different card to compare it to.
Quoted 9 lines
[...]
Quoted 4 lines
I pushed a new firmware image firmware-5.bin_10.2.3.31.7-2 with those enabled:
https://github.com/kvalo/ath10k-firmware/tree/master/QCA9887
Thanks for the updated firmware file. I have done some basic tests and seems to work fine. Bindiff also looks fine
[shafi] it would be helpful if you can share your basic test results (if its possible to share). Have you tried to bring up the card in 5ghz (or) 2ghz. Or both of them were tried ?
regards
shafi
On Tuesday 07 June 2016 20:20:02 Mohammed Shafi Shajakhan wrote:
[...]
Quoted 3 lines
[shafi] it would be helpful if you can share your basic test results (if its possible to share). Have you tried to bring up the card in 5ghz (or) 2ghz. Or both of them were tried ?
* 5GHz-only (I have no 2.4GHz capable card)
* card is able to scan
* card is able to create an AP
* data can be transferred via AP and client (bidirectional connection)
* performance was more like 15 Mibit/s for 1x1 HT20 11n devices instead of something like 35-40 Mibit/s
I cannot give you any more detailed, current performance test results because they were done months ago and are most likely not relevant to describe the current state. Please ask Kalle if you want to know why the old tests were done many, many months ago.
Please ask Marek when you want to have tests done with the current mac8011+ath10k.
Kind regards,
Sven
Hi Sven,
Quoted 6 lines · Sven Eckelmann
On Tuesday 07 June 2016 20:20:02 Mohammed Shafi Shajakhan wrote:
[...]Quoted 3 lines
[shafi] it would be helpful if you can share your basic test results (if its possible to share). Have you tried to bring up the card in 5ghz (or) 2ghz. Or both of them were tried ?
Quoted 6 lines
* 5GHz-only (I have no 2.4GHz capable card)
* card is able to scan
* card is able to create an AP
* data can be transferred via AP and client (bidirectional connection)
* performance was more like 15 Mibit/s for 1x1 HT20 11n devices instead of something like 35-40 Mibit/s
[shafi] sure thanks a lot, this is a good start, i will keep you posted with my findings and results.
Quoted 5 lines
I cannot give you any more detailed, current performance test results because they were done months ago and are most likely not relevant to describe the current state. Please ask Kalle if you want to know why the old tests were done many, many months ago.
[shafi] sure, hopefully we can get this sorted out. Thank you for the patches and support.
Quoted 3 lines
Please ask Marek when you want to have tests done with the current mac8011+ath10k.
[shafi] thanks
Quoted 3 lines
Kind regards,
Sven
Quoted 16 lines · Mohammed Shafi Shajakhan
Hi Sven,
Quoted 6 lines · Sven Eckelmann
On Tuesday 07 June 2016 20:20:02 Mohammed Shafi Shajakhan wrote:
[...]Quoted 3 lines
[shafi] it would be helpful if you can share your basic test results (if its possible to share). Have you tried to bring up the card in 5ghz (or) 2ghz. Or both of them were tried ?
Quoted 6 lines
* 5GHz-only (I have no 2.4GHz capable card)
* card is able to scan
* card is able to create an AP
* data can be transferred via AP and client (bidirectional connection)
* performance was more like 15 Mibit/s for 1x1 HT20 11n devices instead of something like 35-40 Mibit/s
Quoted 2 lines
[shafi] sure thanks a lot, this is a good start, i will keep you posted with my findings and results.
[shafi] request if you can disable TX-STBC for both HT and VHT, it helped me though. Will keep you posted with more updates.
Quoted 25 lines
Quoted 6 lines
I cannot give you any more detailed, current performance test results because they were done months ago and are most likely not relevant to describe the current state. Please ask Kalle if you want to know why the old tests were done many, many months ago.
[shafi] sure, hopefully we can get this sorted out. Thank you for the patches and support.
Quoted 3 lines
Please ask Marek when you want to have tests done with the current mac8011+ath10k.
[shafi] thanks
Quoted 3 lines
Kind regards,
Sven--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Sven,
i have something like this as of now(generically disabling TX-STBC for streams <= 1 just like ath9k does
drivers/net/wireless/ath/ath10k/mac.c +4 -1
@@ -4194,6 +4194,9 @@ static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar) mcs_map |=IEEE80211_VHT_MCS_NOT_SUPPORTED << (i *2 ); } +if (ar->cfg_tx_chainmask <=1 ) + vht_cap.cap &= ~IEEE80211_VHT_CAP_TXSTBC ; + vht_cap.vht_mcs.rx_mcs_map =cpu_to_le16 (mcs_map); vht_cap.vht_mcs.tx_mcs_map =cpu_to_le16 (mcs_map);
@@ -4231,7 +4234,7 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar) ht_cap.cap |= smps; } -if (ar->ht_cap_info &WMI_HT_CAP_TX_STBC ) +if (ar->ht_cap_info &WMI_HT_CAP_TX_STBC && (ar->cfg_tx_chainmask >1 )) ht_cap.cap |=IEEE80211_HT_CAP_TX_STBC ;if (ar->ht_cap_info &WMI_HT_CAP_RX_STBC ) {
Signature · 2 lines
regards, shafi
Quoted 52 lines · Mohammed Shafi Shajakhan
Quoted 16 lines · Mohammed Shafi Shajakhan
Hi Sven,
Quoted 6 lines · Sven Eckelmann
On Tuesday 07 June 2016 20:20:02 Mohammed Shafi Shajakhan wrote:
[...]Quoted 3 lines
[shafi] it would be helpful if you can share your basic test results (if its possible to share). Have you tried to bring up the card in 5ghz (or) 2ghz. Or both of them were tried ?
Quoted 6 lines
* 5GHz-only (I have no 2.4GHz capable card)
* card is able to scan
* card is able to create an AP
* data can be transferred via AP and client (bidirectional connection)
* performance was more like 15 Mibit/s for 1x1 HT20 11n devices instead of something like 35-40 Mibit/sQuoted 2 lines
[shafi] sure thanks a lot, this is a good start, i will keep you posted with my findings and results.
[shafi] request if you can disable TX-STBC for both HT and VHT, it helped me though. Will keep you posted with more updates.
Quoted 17 lines
Quoted 6 lines
I cannot give you any more detailed, current performance test results because they were done months ago and are most likely not relevant to describe the current state. Please ask Kalle if you want to know why the old tests were done many, many months ago.
[shafi] sure, hopefully we can get this sorted out. Thank you for the patches and support.
Quoted 3 lines
Please ask Marek when you want to have tests done with the current mac8011+ath10k.
[shafi] thanks
Quoted 1 line
Quoted 8 lines
Quoted 2 lines
Kind regards,
Sven--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html