[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. Signed-off-by: Sven Eckelmann --- 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(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 49af624..0f4a4f6 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -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; diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index aedd898..9108831 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -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 0x0500 #define QCA6174_HW_1_1_VERSION 0x0501 @@ -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) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 8133d7b..b799f46 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -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: + ca
Re: [PATCH 1/2] ath10k: add QCA9887 chipset support
Hi Sven, On Fri, May 20, 2016 at 04:41:11PM +0200, Sven Eckelmann wrote: > 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. > > Signed-off-by: Sven Eckelmann > --- > 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(-) > > diff --git a/drivers/net/wireless/ath/ath10k/core.c > b/drivers/net/wireless/ath/ath10k/core.c > index 49af624..0f4a4f6 100644 > --- a/drivers/net/wireless/ath/ath10k/core.c > +++ b/drivers/net/wireless/ath/ath10k/core.c > @@ -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, [shafi] i think we can re-use QCA988X_CAL_DATA_LEN instead of a new h/w param > + .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; > diff --git a/drivers/net/wireless/ath/ath10k/hw.h > b/drivers/net/wireless/ath/ath10k/hw.h > index aedd898..9108831 100644 > --- a/drivers/net/wireless/ath/ath10k/hw.h > +++ b/drivers/net/wireless/ath/ath10k/hw.h > @@ -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_DIRATH10K_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 0x0500 > #define QCA6174_HW_1_1_VERSION 0x0501 > @@ -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) > diff --git a/drivers/net/wireless/ath/ath10k/pci.c > b/drivers/net/wireless/ath/ath10k/pci.c > index 8133d7b..b799f46 100644 > --- a/drivers/net/wireless/ath/ath10k/pci.c > +++ b/drivers/net/wireless/ath/ath10k/pci.c > @@ -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 }, > { Q
Re: [PATCH 1/2] ath10k: add QCA9887 chipset support
On Mon, May 23, 2016 at 11:52:11AM +0530, Mohammed Shafi Shajakhan wrote: > Hi Sven, > > On Fri, May 20, 2016 at 04:41:11PM +0200, Sven Eckelmann wrote: > > 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. > > > > Signed-off-by: Sven Eckelmann > > --- > > 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(-) > > > > diff --git a/drivers/net/wireless/ath/ath10k/core.c > > b/drivers/net/wireless/ath/ath10k/core.c > > index 49af624..0f4a4f6 100644 > > --- a/drivers/net/wireless/ath/ath10k/core.c > > +++ b/drivers/net/wireless/ath/ath10k/core.c > > @@ -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, > > [shafi] i think we can re-use QCA988X_CAL_DATA_LEN instead of a new h/w param sorry ignore this comment, i was looking into some old code, this change looks fine to me > > > + .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; > > diff --git a/drivers/net/wireless/ath/ath10k/hw.h > > b/drivers/net/wireless/ath/ath10k/hw.h > > index aedd898..9108831 100644 > > --- a/drivers/net/wireless/ath/ath10k/hw.h > > +++ b/drivers/net/wireless/ath/ath10k/hw.h > > @@ -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 0x0500 > > #define QCA6174_HW_1_1_VERSION 0x0501 > > @@ -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) > > diff --git a/drivers/net/wireless/ath/ath10k/pci.c > > b/drivers/net/wireless/ath/ath10k/pci.c > > index 8133d7b..b799f46 100644 > > --- a/drivers/net/wireless/ath/ath10k/pci.c > > +++ b/drivers/net/wireless/ath/ath10k/pci.c > > @@ -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_DEV
Re: [PATCH 1/2] ath10k: add QCA9887 chipset support
Sven Eckelmann writes: > 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. > > Signed-off-by: Sven Eckelmann I added the warning we talked about, diff below. Full patch in the pending branch: https://git.kernel.org/cgit/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=ed730faad11df99f2aba3b8d78ac5587c3403e69 diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index d34c32a075ac..3e8e7ed6faa1 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -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; -- Kalle Valo-- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html