Call collect_driver_dump() driver ops to add the data from the buffer
for the four log types.
Change-Id: Ic06d4520de6f87202d1c3ce24362d61002b85f61
CRs-Fixed: 3352310
Keep PCSS recovery config as persistent during the whole
lifetime of cnss driver, and send it to WLAN firmware
service upon receiving firmware ready event.
Change-Id: Iec6c35c82750df3f8fd43723d102bcabfb539874
CRs-Fixed: 3378798
WLAN IOMMU mappings have cached attribute set whereas
ADSP IOMMU mappings do not have cached attribute set.
This is resulting in an inconsistent memory view between
ADSP SS and WLAN SS. ADSP writes to a DDR location and
WLAN HW reads from the same location but since access is
cached from WLAN side, there is a possibility of reading
incorrect values.
Fix is to use IOMMU_CACHE flag for audio smmu mappings.
Change-Id: Ife97bee34bc8224fd2d0d2bb45b606efeea5aa53
CRs-Fixed: 3375521
If device tree doesn't configure any regulators for
device, means this device doesn't need extra regulator.
This case shall not be treated as an error.
Return a positive value for this case to allow caller to
make proper choice.
Change-Id: I7ead81b3915d16f966f94c9d916e0d67bc04fda0
CRs-Fixed: 3355141
Some auto HW can't guarantee wlan_en low state when powerup.
Add a macro to enable initializing wlan_en state.
Change-Id: I6755bcd49c78f7bb9931f80cb385e62177ebe603
CRs-Fixed: 3355148
Added below mentioned changes to support qca6174 in cnss2 driver.
1. While resuming pci link, restore the pci config space before
enabling pci device.
2. Add 10ms delay between wlan_en become active and pcie reset
de-assert.
3. For wlan chipsets which don't support cold boot calibration,
schedule Wlan driver load in cnss_cold_boot_cal_start_hdlr.
Change-Id: I28435896314783353db5dd830051df9467be6585
CRs-Fixed: 3359223
Add NULL check for 'dev' pointer before passing to
cnss_bus_dev_to_plat_priv function.
Change-Id: I8ab93a71219638e4b66d3b9fdcb164e052385129
CRs-Fixed: 3364740
Add NULL check for 'dev' pointer before passing to
cnss_bus_dev_to_plat_priv function.
Change-Id: I319a9859c41d7e8096b3a4457f4a831e0e93f7ab
CRs-Fixed: 3360223
Add support for IOMMU map and unmap of WLAN memory
regions into Audio SMMU for direct link usecases.
Change-Id: Ic136b1e5ac22641b6612ab5285452273233fcaea
Add and export API to check whether FW capabilities like
DIRECT_LINK, etc are supported by FW or not.
Update WLAN Firmware Service QMI file as per latest IDL file.
Change-Id: Ic33104ec55e18845b8c33ff611d1ecc15ec5cd77
CRs-Fixed: 3335259
Add RC_EP_ULTRASHORT_CHANNEL in cnss feature if it
is enabled in dtsi and indicate it to wlan fw.
Change-Id: Ic70c4b1b2dd637f11c2e2b281521f2094a9a2fe9
CRs-Fixed: 3323608
To protect firmware download not be processed when system goes into
suspend, before we add semaphore cnss_pm_sem in cnss driver.
Function cnss_pm_notify, PM_POST_SUSPEND may be got before
PM_SUSPEND_PREPARE. Once it happens, the count of cnss_pm_sem will
be abnormal.
And, ROME firmware download is in qcacld driver. Not in cnss driver.
So, remove function cnss_pm_notify, and the export symbol cnss_lock_pm_sem
and cnss_release_pm_sem. Move the protection to qcacld driver. In qcacld
driver, use wakeup source to protect ROME firmware download.
Change-Id: I7768fdbeb1fa8cd6ef3b260eb0aafb231aeed324
CRs-Fixed: 3294347
Ensure the completion of pci probe before checking
whether the calibration is supported for the device id or not.
Change-Id: Ifb6b6b15c434c16822bb8a4291403e4a635f985f
CRs-Fixed: 3303831
Converge dt nodes for wlan chips that share the same PCI slot
into one node.
The items in this node are split into 2 parts: common and chip
specific.
The common part will be parsed during cnss probe, such as basic
power related configuration and bus type, to power on the device
and trigger pci probe;
Chip specific part will be parsed during bus specific probe, this
part includes chip specific power and feature related
configurations.
With this change, cnss2 can support different chips on one pci
slot with the same image.
Change-Id: I08c64b6dc3cc27a479ee6fd07e3c8705cc3ac43d
CRs-Fixed: 2384088
TZ APIs, to check the secure peripheral state, can return error code
which says feature is not supported. Set a flag if feature not
supported and avoid calling TZ APIs again till next device boot.
Change-Id: I8f83c206b7a876cbaa304b442a9cfe9f6372a04d
CRs-Fixed: 3290183
Some compilers such as clang requires the attribute instead
of just a fallthrough comment when -Wimplicit-fallthrough
is enabled. So replace fallthrough comment with attribute.
Change-Id: I1935bfb325b550fbc6539c58a99b3696fb6cc753
CRs-Fixed: 3295197
In some scenario like ssgtzd get killed, CNE and TZ go out of sync.
Consider a case where TZ notified CNE to enable WLAN HW. Now CNE
will request to CNSS to Enable WLAN HW. At the same time again TZ
notified CNE to Disable WLAN HW but due ssgtzd killed, CNE did not
wait for previous request(sent to CNSS to enable WLAN HW) and immediately
return to TZ. TZ assumes everything is done and change state to secure
mode. Now CNSS act on previous request of enabling WLAN HW but when
when checks the state it get secure mode and fails to enable WLAN
and asserts. Avoid assert in such scenarios.
Change-Id: I85f63258ff55a44cfcc5ebeaa9da9ba19db67780
CRs-Fixed: 3288122
DMS server runs in Modem. When Modem SSR happens dms_del_server
gets called. Even after DMS service disconnected, qmi_txn_wait is
still waiting. Release DMS QMI handle in dms_del_server to cancel
pending transaction.
Change-Id: I06ccfba34269dc51288300aa5fa0326842a09e32
CRs-Fixed: 3288808
Sram dumps are getting dumped only for qca6490 debug build, so
allocate sram dump memory for qca6490 debug build only.
Change-Id: If714b49720c1445ebfc0d4645dde592145b734a8
CRs-Fixed: 3256709
PCIe gen switch via debugfs is allowed only for QCA6490. Remove check
on QCA6490 and instead allow PCIe gen switch based on firmware
capability exchange.
Change-Id: Ib17c54a6c17a2b87d01a877b057495debec704f6
CRs-Fixed: 3260767
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
If Device boots up in secure mode, CNSS defers PCI enumeration,
calibration and host driver registration. When secure mode exits
host driver gets notified from CTRL_PARAM and calls PLD API to
perform previously deferred operations and enable WLAN HW. This
can take some seconds and by the time again Secure mode can enter,
disable WLAN and access controlled by TZ.
Now Calibration completes and CNSS receives CAL_DONE indication.
As part of CAL_DONE when CNSS try to power off WLAN access WLAN_EN
it results in NOC error.
One more scenario, where CNSS can access WLAN_EN when WLAN HW
is disabled by TZ, could be when QMI message times out. Consider
secure mode is entering as part of CNSS will to IDLE shutdown.
During IDLE shutdown while sending MODE_OFF QMI message to FW
it might wait for 10 seconds if FW does not respond. But TZ has
timeout of 5 sec if framework does not respond in 5 Sec TZ will
disable WLAN_EN and access control it. Now when after QMI timedout
when try to access WLAN_EN it results in NOC error.
Check secure peripheral state before updating WLAN_EN and maintain
correct driver state in such scenario.
Change-Id: I4a0892f02edb42496b9633d2d33ded26cbc08707
CRs-Fixed: 3247847
It can be used to tune the host and fw time synchronization interval
for better accuracy.
Change-Id: I0a3d8895520cec526341f278c91f153dd0bd1966
CRs-Fixed: 3257702
On device probe, cnss2 should not power off the device in api
cnss_wlan_device_init() because the device either:
1) has already been powered down after it is enumerated by
the pcie probe callback and its related code; or
2) doesn't have to be powered off.
To fix this issue, add code to return directly from
cnss_wlan_device_init() without powering down the device once
cnss_bus_init() returns 0.
Change-Id: I1dd57952368471e522757cdda47bf2ac27eab112
CRs-Fixed: 3244133
There are scenarios where APIs to get HW secure mode fails
due to feature not supported. Handle the error gracefully
for such cases.
Change-Id: Iace96f21dbbcd87ddb94bf4546a0fca3b3868995
CRs-fixed: 3241447
Peripheral control service can send notification to enable WLAN HW
even if HW is already enabled at boot. Thus skip wlan device pci
re-enumeration if PCI probe is already complete.
Change-Id: I5687b9ee74afe9331e11ec1fc5f1cf20f94117c8
CRs-fixed: 3224613
WLAN HW can be securely disabled. Add support in platform driver to
handle WLAN cold boot initialization sequence changes if HW is disabled
at boot and WLAN resume sequence after WLAN HW is enabled.
Change-Id: If5036560820c54653801298ceebe4f50b7532f3f
CRs-fixed: 3211229
Kiwi-v2 supports separates image for MM and FTM mode,
platform driver will load difffernt binary according to the mode
indicated by wlan driver.
If seprate binary is not there, fall back to default binary.
Change-Id: I848309440fdffd6517463e18190c03c1b7ed9269
This change allows wlan host driver loading only if cnss2
node is present in dtsi. On spf, qca6490 wlan driver loading
is getting retried 100 times even if cnss2 node is not present
which is causing andoid bootup delay. This change will return
ENODEV error on wlan driver loading if cnss2 node is not present
instead of EAGAIN which was getting returned earlier.
Change-Id: Ic8568147257642a84983a0d6e738e4bf0ee917b5
CRs-Fixed: 3201930
Extend current recovery sysfs interface, add pcss recovery support.
Change previous sysfs recovery from bool to bitamp. Bit 0 is used
for original wlan recovery, bit 1 is newly added for pcss recovery.
Once fw is downloaded, host driver can use QMI message to notify
fw enable or disable this feature.
Change-Id: Ifdf49cecc70ab2d554bd267d18ff78d92049f5b8
Add code to parse wlan sw ctrl gpio in cnss_get_dev_cfg_node so
that entire handling of subnodes is restricted to one function.
Change-Id: I13ccb0b3de082e396939c8b37e738b149ccd3095
Add code to dump SRAM on MHI power-on failure. To avoid CPU hog
relinquish CPU after dumping 256Kb chunks.
Change-Id: I2c9c64424c8ae4612e67b78fcabc1f872fefea81
Debugfs item control_params can be used to disable|enable
drv suspend, since FW can configure suspend mode only before FW ready,
so host needs make sure this flag is set at proper phase.
Change-Id: I632e3802aa1ab152fe153530a49a7405599cf96d
Add code to use cnss_utils to send device type across wlan & bt.
cnss platform driver reads the wlan sw control gpio and updates
the cnss_utils with the device type, when Bt comes up it get the
device type from cnss_utils.
Change-Id: I5b6f3e7d3dc44e4c5a4a341b3e286f87b5c24bbb
AOP Mbox interface message is updated to include the PDC name as WLAN
devices like KIWI needs 2 PDCs.
Also following updates are done:
1. Always open Mbox channel for OL CPR update.
2. Add device tree config for PDC - VReg mapping and
WLAN device PDC Init table.
3. Reconfig PDC based on WLAN device connected to the platform.
4. Add debug interface for PDC update.
Change-Id: Ia3150166a0ef5d44cb74a8c7e3b78870284cd18f
To enable support for qca6390 on hana-au:
1) Return 0, instead of an error code, when 'qcom,icc-path-count'
isn't present in the device tree, given some chipsets like
qca6390 don't need this parameter to get probed successfully;
2) Add one more vreg config, 'vdd-wlan-rfa3', into the vreg list
as it's required for qca6390 to get probed;
3) Add one more dts parameter, 'qcom,multi-wlan-exchg' into the
wlan device tree node on auto platforms, to reflect the fact
that multiple wlan chipsets can be plugged, while only one of
them exists at a time.
Also, reorder the parameters passed for debug printing in function
cnss_plat_ipc_init_fn(), given the original ordering is not
matching with the debug message literally.
Change-Id: I94d33fcfa2343646c55d8021894f35bc3cf8a56b
Dev SOL GPIO will be pulled down (interrupt will be triggered then) by
design when WLAN_EN GPIO is pulled down. Hence enable/disable dev SOL
interrupt during power on/off to avoid handling such case.
Change-Id: Ia0ddcbd438d533832c944632443000e2a087a300
WLAN driver register requires calibration to complete if enabled.
Calibration timeout can happen due to FW or file system mount delay.
Update driver to assert only for calibration timeout due to FW.
In some cases file system mount may take longer if file system repair
is attempted. Thus update cnss platform driver to wait for this
operation to complete and only log the time elapsed.
Change-Id: Iacd4d4565fb05ae1557c94c574c0153b5995b226
WLAN is not needed in charger mode. Thus add a sysfs entry to notify
charger mode to cnss platform driver to ignore wlan initialization
request.
Change-Id: I4719b16e7fa6914c253018284b5a5d80acf14bbb
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
Support dev coredump feature if QC ramdump related features are
not present so that WLAN dump can be saved to file system using
userspace binary. Most of the logic here is referred from QC
ramdump driver.
Change-Id: I9a0966f66f3d7999948216a7b83f57beff1ef519