1
0

0019-wifi-ath11k-update-hw-params-for-IPQ5018.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. From 8dfe875aa24aec68baf6702018633c84c2c1feca Mon Sep 17 00:00:00 2001
  2. From: Sriram R <quic_srirrama@quicinc.com>
  3. Date: Fri, 2 Dec 2022 23:37:13 +0200
  4. Subject: [PATCH] wifi: ath11k: update hw params for IPQ5018
  5. Add new compatible string for IPQ5018 and add
  6. required hw params for IPQ5018. The hw descriptors size and
  7. datapath ops are similar to QCN9074, hence reuse the same.
  8. Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
  9. Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
  10. Co-developed-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
  11. Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
  12. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  13. Link: https://lore.kernel.org/r/20221122132152.17771-3-quic_kathirve@quicinc.com
  14. ---
  15. drivers/net/wireless/ath/ath11k/core.c | 71 ++++++++++++++++++++++++++
  16. drivers/net/wireless/ath/ath11k/core.h | 8 +++
  17. 2 files changed, 79 insertions(+)
  18. --- a/drivers/net/wireless/ath/ath11k/core.c
  19. +++ b/drivers/net/wireless/ath/ath11k/core.c
  20. @@ -604,6 +604,77 @@ static const struct ath11k_hw_params ath
  21. .smp2p_wow_exit = true,
  22. .support_fw_mac_sequence = true,
  23. },
  24. + {
  25. + .hw_rev = ATH11K_HW_IPQ5018_HW10,
  26. + .name = "ipq5018 hw1.0",
  27. + .fw = {
  28. + .dir = "IPQ5018/hw1.0",
  29. + .board_size = 256 * 1024,
  30. + .cal_offset = 128 * 1024,
  31. + },
  32. + .max_radios = MAX_RADIOS_5018,
  33. + .bdf_addr = 0x4BA00000,
  34. + /* hal_desc_sz and hw ops are similar to qcn9074 */
  35. + .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074),
  36. + .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074,
  37. + .ring_mask = &ath11k_hw_ring_mask_ipq8074,
  38. + .credit_flow = false,
  39. + .max_tx_ring = 1,
  40. + .spectral = {
  41. + .fft_sz = 2,
  42. + .fft_pad_sz = 0,
  43. + .summary_pad_sz = 16,
  44. + .fft_hdr_len = 24,
  45. + .max_fft_bins = 1024,
  46. + },
  47. + .internal_sleep_clock = false,
  48. + .host_ce_config = ath11k_host_ce_config_qcn9074,
  49. + .ce_count = CE_CNT_5018,
  50. + .rxdma1_enable = true,
  51. + .num_rxmda_per_pdev = RXDMA_PER_PDEV_5018,
  52. + .rx_mac_buf_ring = false,
  53. + .vdev_start_delay = false,
  54. + .htt_peer_map_v2 = true,
  55. + .interface_modes = BIT(NL80211_IFTYPE_STATION) |
  56. + BIT(NL80211_IFTYPE_AP) |
  57. + BIT(NL80211_IFTYPE_MESH_POINT),
  58. + .supports_monitor = false,
  59. + .supports_sta_ps = false,
  60. + .supports_shadow_regs = false,
  61. + .fw_mem_mode = 0,
  62. + .num_vdevs = 16 + 1,
  63. + .num_peers = 512,
  64. + .supports_regdb = false,
  65. + .idle_ps = false,
  66. + .supports_suspend = false,
  67. + .hal_params = &ath11k_hw_hal_params_ipq8074,
  68. + .single_pdev_only = false,
  69. + .cold_boot_calib = true,
  70. + .fix_l1ss = true,
  71. + .supports_dynamic_smps_6ghz = false,
  72. + .alloc_cacheable_memory = true,
  73. + .supports_rssi_stats = false,
  74. + .fw_wmi_diag_event = false,
  75. + .current_cc_support = false,
  76. + .dbr_debug_support = true,
  77. + .global_reset = false,
  78. + .bios_sar_capa = NULL,
  79. + .m3_fw_support = false,
  80. + .fixed_bdf_addr = true,
  81. + .fixed_mem_region = true,
  82. + .static_window_map = false,
  83. + .hybrid_bus_type = false,
  84. + .fixed_fw_mem = false,
  85. + .support_off_channel_tx = false,
  86. + .supports_multi_bssid = false,
  87. +
  88. + .sram_dump = {},
  89. +
  90. + .tcl_ring_retry = true,
  91. + .tx_ring_size = DP_TCL_DATA_RING_SIZE,
  92. + .smp2p_wow_exit = false,
  93. + .support_fw_mac_sequence = false,
  94. + },
  95. };
  96. static inline struct ath11k_pdev *ath11k_core_get_single_pdev(struct ath11k_base *ab)
  97. --- a/drivers/net/wireless/ath/ath11k/core.h
  98. +++ b/drivers/net/wireless/ath/ath11k/core.h
  99. @@ -142,6 +142,7 @@ enum ath11k_hw_rev {
  100. ATH11K_HW_WCN6855_HW20,
  101. ATH11K_HW_WCN6855_HW21,
  102. ATH11K_HW_WCN6750_HW10,
  103. + ATH11K_HW_IPQ5018_HW10,
  104. };
  105. enum ath11k_firmware_mode {
  106. @@ -230,6 +231,13 @@ struct ath11k_he {
  107. #define MAX_RADIOS 3
  108. +/* ipq5018 hw param macros */
  109. +#define MAX_RADIOS_5018 1
  110. +#define CE_CNT_5018 6
  111. +#define TARGET_CE_CNT_5018 9
  112. +#define SVC_CE_MAP_LEN_5018 17
  113. +#define RXDMA_PER_PDEV_5018 1
  114. +
  115. enum {
  116. WMI_HOST_TP_SCALE_MAX = 0,
  117. WMI_HOST_TP_SCALE_50 = 1,