Commit Graph

25 Commits

Author SHA1 Message Date
Prateek Patil
dc9f45faee cnss2: Send QMI message to download TME binaries
Send QMI message with SEC, RPR and DPR file information to WLAN FW, to
download TME binaries (sec, rpr, dpr files)

Change-Id: I0a4ab7ab127d493ef62d14658be2aa08b7d41606
CRs-Fixed: 3684131
2023-12-20 05:31:07 -08:00
Naman Padhiar
b791c15d0c cnss2: Optimize link down recovery sequence
Remove unwanted delay from PCIe link down recovery sequence
1. Wait for wake event from PCIe driver instead of hardcoded wait.
2. After link recovers, wait for device to move to RDDM mode
   instead of starting rddm timer.
3. If device fails to move to RDDM, assert HOST SOL and initiate
   side band recovery.

Change-Id: I5a4096ac781dd8f5011b07b0ffb669815a968570
CRs-Fixed: 3590419
2023-09-24 19:07:57 -07:00
Mohammed Ahmed
e1dd6c2585 cnss2: cnss changes for sun compilation
Current code has compilation errors
when compiling for sun. sched_clock()
was moved to clock.h, and iommu_map API
was changed with new sun kernel. Fix
this by updating code for new kernel
apis.

Change-Id: I77029fcc74142f3f650dc289c8d19c121eba6445
CRs-Fixed: 3603129
2023-09-14 15:14:49 -07:00
Naman Padhiar
bdd3c6bf67 cnss2: Send QMI message to download TME-L patch
Send QMI message with TME-L patch information to WLAN FW, to
download TME-L patch.

Change-Id: Ieae07c0f761ada45ffcb990b1412654b9c6862b1
CRs-Fixed: 3521187
2023-07-03 09:34:38 -07:00
Alan Chen
f4e0145655 cnss2: Add AUX UC download functionality
Add support for AUX UC download functionality if aux support is
indicated by both host and fw.

Change-Id: I3bfbebbb5cdfbbaa350a34378ab2f0809f27affb
CRs-Fixed: 3402104
2023-05-25 19:54:56 -07:00
Naman Padhiar
693e91a938 cnss2: Add support for MSIX interrupts
Read MSI-X address from device tree file and initialize
MSI-X address and data to support MSI-X interrupts.

Change-Id: I7cc43ca4d3e4c937f09facf12dd02437ddc2e039
CRs-Fixed: 3488821
2023-05-11 13:09:23 -07:00
Sandeep Singh
2dee0837c9 cnss2: record timestamps in smmu fault cb handler
Record timestamps in smmu fault cb handler.

Change-Id: I96042ffdc81fcca8069d16bf74899412cf04183c
CRs-Fixed: 3487738
2023-05-08 20:37:48 -07:00
Sandeep Singh
18a4f28a8d cnss2: notify wlan fw to stop trace collection
Cnss2 driver receives cnss_pci_smmu_fault_handler cb from smmu
driver whenever wlan fw access illegal IOVA address. In
cnss smmmu fault cb handler, cnss2 driver rings trace stop
door bell register to stop tracing in wlan fw. This will
help to get proper traces to debug where illegal access
is happening in wlan fw.

Change-Id: I953ced55d4d847ccaabad15f5f70150aec8aabd6
CRs-Fixed: 3459443
2023-04-18 18:26:59 -07:00
Naman Padhiar
190e1efaa9 cnss2: Avoid PBL/SBL region dump in Mission mode
Access to PBL and SBL log region in SRAM is restricted in
Mission mode. Avoid PBL/SBL log region dump in Mission mode.

Change-Id: Ia8813ccd9e2c0339c280e6cb6d6f0bab0bee206e
CRs-Fixed: 3432159
2023-04-07 17:02:05 -07:00
Gangadhar Kavalastramath
4f03c58310 cnss2: Add support for QCN7605
Add support for QCN7605 in cnss2 driver

Change-Id: I529d76f8f6fa6eeea2117630b2a1e9d05ce5f5b4
CRs-Fixed: 3359985
2023-03-07 18:28:55 -08:00
Gangadhar Kavalastramath
6c09e62157 cnss2: Add code changes to support thermal mitigation
Add cnss2 code changes to register with thermal framework to support
thermal mitigation.

Change-Id: I9d427603bfc7e6bb5d732fa3e29ff66c965e153b
CRs-Fixed: 3386762
2023-02-06 00:02:18 -08:00
Chaoli Zhou
f2346285bc cnss2: Support dual wlan cards managed by cnss2 platform driver
Currently, the cnss2 platform driver just can support
one wlan device attached, so do the following changes
to cover dual wlan card attach case. Firstly, delay
the second device go to pcie link suspend and power
off state to make sure it really finished the pcie
enumeration. Then pcie enumeration succeeds with
multi-devices. Secondly, supporting to write the qrtr
node instance id to PCIE register for wlan fw reading,
which can fix qmi message exchange failure if active
two Hastings devices. Thirdly, change the usage of
plat_env to support dual Hastings.

Change-Id: Ica41a23d4e983b91c0ff1b4e76b380803fb877ab
2023-01-31 16:53:31 +08:00
Alan Chen
edab97e465 cnss2: Add support for WLAN PEACH PCI device
Add PCI device ID config and code updates to handle PEACH WLAN device.

Change-Id: Ib4f30a1dd5c3307c59694e94871617e766488677
CRs-Fixed: 3347738
2023-01-28 01:06:38 -08:00
Alan Chen
ae2498e987 cnss2: Collect and load elfdump data
Call collect_driver_dump() driver ops to add the data from the buffer
for the four log types.

Change-Id: Ic06d4520de6f87202d1c3ce24362d61002b85f61
CRs-Fixed: 3352310
2023-01-19 18:40:35 -08:00
chunquan
a7f6cb0389 cnss2: Free m3 blob memory once driver probed
Free m3 blob memory after driver probed.

Change-Id: I10803eae60f2308b3a024877cdb7c446f3d33802
CRs-Fixed: 3321438
2022-12-01 14:07:57 +08:00
Lin Bai
39a9deb49b cnss2: Only send host IOVA range to firmware when SMMU enabled
Only when SMMU S1 enabled, CNSS driver will send IOVA range in
HOST_CAP message, and let firmware to configure ATU.

Change-Id: Idd19063da975c0105d91e0e31575d0b0d1edd8e2
CRs-Fixed: 2896035
2022-11-08 22:04:29 -08:00
Sandeep Singh
eeed8341c6 cnss2: move pci/mhi register dump after rddm mode trigger
Move pci/mhi register dump after rddm mode trigger
in case of smmu fault.

Change-Id: I3e2c4c5725f614b7b12e95d3a13ec0250a631608
CRs-Fixed: 3291781
2022-09-15 18:26:56 +05:30
Alan Chen
787df21a61 cnss2: Disable MHI satellite if DRV is disabled
When DRV is disabled during use, MHI satellite is still enabled and
is causing timeout when suspend occurs again. Hence, set base to 0
for MHI satellite when DRV is disabled in order to disable it.

Change-Id: I68315cc102884a33b2ba92753f21af2e59b6b466
CRs-Fixed: 3256095
2022-08-03 11:19:05 -07:00
Nirav Shah
20cf29c42e cnss2: Add sysfs support for configuring timer sync interval
It can be used to tune the host and fw time synchronization interval
for better accuracy.

Change-Id: I0a3d8895520cec526341f278c91f153dd0bd1966
CRs-Fixed: 3257702
2022-07-29 10:44:44 +05:30
Sandeep Singh
6b4390361d cnss2: Add code to optimize prints
Add code to optimize prints.

Change-Id: I21c070b4c136eeb5ef3ea2cc18e0fc415fd2297b
CRs-Fixed: 3161488
2022-07-06 12:29:56 +05:30
Alan Chen
79dd3075ca cnss2: Add support for WLAN MANGO PCI device
Add PCI device ID config and code updates to handle MANGO WLAN device.

CRs-fixed: 3210010
Change-Id: I48fffdb8c7ecf5343908d823facf7a2fad2f2dea
2022-06-30 17:51:42 -07:00
Mohammed Siddiq
29e96e5173 cnss2: Add code to separate MSM PCIe APIs to pci_qcom.c file
Add code to move the platform related apis mainly defined under
CONFIG_ARCH_QCOM and CONFIG_PCI_MSM flags to separate file,
named pci_qcom.c. This change facilitates easy code upgrade for
customer.

Change-Id: Ic81e633829ccfdeb3fc3f123013708e6d712c5c2
2022-05-16 08:26:27 -07:00
Yue Ma
c4cba5ad7b cnss2: Add support to handle SOL GPIOs
The side-band SOL (Sign-Of-Life) GPIOs are introduced to help make
RDDM more reliable so that device dump can be copied correctly. When
device SOL GPIO is triggered from device, it means there is watchdog
reset happened in device and driver should expect RDDM to happen.
When host SOL GPIO is triggered from host, it will result watchdog
reset as well as PCIe controller reset in device which should try to
enter RDDM always. This commit also adds debug hooks for the GPIOs.

Change-Id: I61a0f252d04ab0a62c5bf838850fe9a1bec2273b
2022-03-29 14:57:36 -07:00
Yue Ma
be03060a66 cnss2: Use correct device code name
Correct code name for kiwi device.

Change-Id: Ic52ba0abfc7049fd353eb1416a5c77c5bfec4bb5
2021-11-15 13:16:26 -08:00
Yue Ma
5b29459b17 wlan_platform: Bring initial files for CNSS family drivers
Bring CNSS family drivers from msm-5.10 kernel as of commit
cc3bc4b888af (cnss2: Fix a few switch statement fallthrough
issues) to WLAN platform project. Fix SPDX-License format for
a few files as well.

drivers/net/wireless/cnss* -> .
include/net/cnss* -> inc/

Above shows how directories and header files are relocated.

Change-Id: If8fd40a35c9fdbeb1aa76a8aac5fdb1fc1c7e786
2021-10-08 15:28:40 -07:00