提交图

358 次代码提交

作者 SHA1 备注 提交日期
Sandeep Singh
f6e67cd993 icnss2: Add cmem support for wcn7750
Add cmem support for wcn7750 and pass the mem info
as part of soc info to wlan host driver.

Change-Id: Icb40d8cfe50cdd160471b8210a67ce9dc8dd3ad0
CRs-Fixed: 3750961
2024-03-29 19:07:07 -07:00
Yu Wang
b6c97a4162 cnss2: refine the code for AOP configuration
The Mbox interface requires structure 'qmp_pkt' which is defined
only when kernel config CONFIG_MSM_QMP is enabled, so add
conditional compilation for these interfaces (controlled by
config CONFIG_MSM_QMP).
While at the same time, qmp_get/qmp_put/qmp_send are controlled
by kernel config CONFIG_QCOM_AOSS_QMP, but they are defined
even when CONFIG_QCOM_AOSS_QMP is disabled, so conditional
compilation is not needed.

Change-Id: I0f793ae3661fb901edc857af0b1d4191d7c113f8
CRs-Fixed: 3712102
2024-03-27 03:10:20 -07:00
Yu Wang
6d219d7a90 cnss2: modify the checking for Secure HW feature disabled case
qcom_smem_get() returns 'ERR_PTR(ENODEV)' when Secure HW feature
is not enabled (related kernel config: CONFIG_QCOM_SMEM), add
the checking for this case.

Change-Id: Id3c6f8407a4eb4bc2124014503cc50bb99e90235
CRs-Fixed: 3769852
2024-03-27 03:10:17 -07:00
Yu Wang
f554c1a9b4 cnss2: Add wrapper to get SoC info before registering MHI controller
Add wrapper __cnss_get_mhi_soc_info() to get SoC info
before registering MHI controller.
It calls mhi_get_soc_info() if downstream MHI bus driver
is enabled(CONFIG_MHI_BUS_MISC is enabled), while reads
register for SoC hardware version directly if not.

Change-Id: I97e53bf0a7e28b2b1027d8de5eaf9fc82bcd5cee
CRs-Fixed: 3712133
2024-03-27 03:10:14 -07:00
Yu Ouyang
05dba07d27 Revert "cnss2: restore to gen2 speed for qca6490"
This reverts commit I55d554c4dc7d01ed82fffe79f666b340b1004765.
Default RC speed should be restored, shouldn't be restored to Gen2.

Change-Id: I23369aea1391c9e20c7aabe10506a7c9c37a4ba7
CRs-Fixed: 3702776
2024-03-26 08:57:24 -07:00
Lin Bai
7b9d7b465a cnss2: Add chip serial id in wlfw cap resp
Add support to handle chip serial number in wlfw cap
respone message.

Change-Id: Icf6a310a127264c09db8567f53372590cae0e81f
CRs-Fixed: 3754364
2024-03-26 08:57:22 -07:00
Lin Bai
7e31c686ad cnss2: Add memory type for seg CALDB DDR
When FW supports segment CALDB memory in memory request,
it will request memory with new type
QMI_WLFW_MEM_CALDB_SEG_V01.

Change-Id: I84b62436ea2616cb2d663c604ac4af8a8d9966b8
CRs-Fixed: 3763980
2024-03-22 04:17:04 -07:00
Prateek Patil
d346d95866 cnss2: Add usage for debug interfaces
The below debug interface usages are added:
1. assert_host_sol
2. deassert_host_sol
3. dev_check
4. dev_enable

Change-Id: I42aaca7f90239d67bb0c9317b5651751cec5f236
CRs-Fixed: 3758776
2024-03-20 08:31:46 -07:00
Prateek Patil
e409b8c5d2 icnss2: Remove __GFP_DIRECT_RECLAIM flag to claim memory faster
To avoid watchdog bark in 10s timeout due to compaction latency in very
bad fragmentation situation, Remove __GFP_DIRECT_RECLAIM flag to kzalloc
to avoid delay, which will help to claim memory faster.

Change-Id: I9d57e28c6e94dbd5cf02aaa9c6f84fe4b60fe36d
CRs-Fixed: 3746405
2024-03-08 05:57:00 -08:00
Dundi Raviteja
47ca780fca icnss2: Enable slate config for monaco
Enable SLATE_MODULE_ENABLED config for monaco.

Change-Id: Icb0b3f14d84a143bafe85fb5413a7406a087dfc5
CRs-Fixed: 3743739
2024-03-03 17:22:16 -08:00
Yeshwanth Sriram Guntuka
e488d6bdfb cnss2: Add support to determine Audio shared IOMMU group
Add support to determine if CNSS and Audio share
IOMMU group and do iommu_map/unmap only in the
case of distinct iommu groups for direct link
datapath.

CRs-Fixed: 3714345
Change-Id: I6134e9d732052fd492e0f20d538e86ba96c14c4d
2024-02-26 04:21:10 -08:00
Naman Padhiar
a7e715c312 cnss_utils: Add QMI message Soft SKU information
Add QMI request containing Soft SKU license address
and size. WLAN FW gets this request and downloads
license from host memory to FW memory.

Change-Id: Ice3fcf99806232669f89c44603caa2fa4c89e076
CRs-Fixed: 3735666
2024-02-19 12:46:45 -08:00
Jia Ding
fbe33f423c cnss2: Fix potential TME NULL pointer dereference
Fix potential NULL pointer dereference for tme_lite_mem
and tme_opt_file_mem, which are captured by static
analysis tool.

Change-Id: Ib2540669c55e771598dd21d8c2ae3eb297ffa67f
CRs-Fixed: 3716873
2024-02-18 03:25:47 -08:00
Sandeep Singh
33c6ef08af icnss2: add null check in icnss driver code
Add null check in icnss driver code.

Change-Id: Ic15e76f9c8dc09d76f2786aaa374698228cb6134
CRs-Fixed: 3718108
2024-02-12 18:56:49 -08:00
Naman Padhiar
36aaccd887 cnss2: Clear DRV last connected flag at right place
DRV last connected flag is cleared based on return from
host driver runtime_resume callback. In host triggered
SSR case runtime_resume callback return success without
actually resuming the bus and clearing DRV last connected
flag. When CNSS driver actually tries to resume the bus,
based on DRV last connected flag it calls MHI resume instead
of MHI DRV resume and fail to resume the bus. Bus resume
failure results in MHI driver go to bad state and fail to
trigger RDDM in device using SYS_ERR.
Fix this issue by clearing DRV last connected flag only after
bus resume is success.

Change-Id: Ia904f6965c2a2cbe0a483cf02ced91a09775ca62
CRs-Fixed: 3720847
2024-02-12 15:09:19 -08:00
Mohammed Ahmed
b02f8575e8 cnss_utils: add smem-mailbox APIs
Add smem_mailbox start, stop, and write API usage.

Change-Id: Ie284b0df439bb3181168b3bdb2e532daf593a951
CRs-Fixed: 3723643
2024-02-11 09:43:56 -08:00
Sandeep Singh
26a92221c3 icnss2: enable rproc_recovery_set vendor hook compilation
Enable rproc_recovery_set vendor hook compilation for
icnss2 platform driver with 6.5 kernel.

Change-Id: Iaf1cb736af410ef61fc83d1c9da5fe7ab419b9f1
CRs-Fixed: 3718268
2024-02-11 09:43:55 -08:00
Naman Padhiar
8f70367411 cnss2: Start Device RDDM timer after Host REQ
For the cases where SOL is not enabled, Host REQ
reset will be used for second RDDM entry. If Host
REQ reset is success, start RDDM timer to wait for
RDDM status callback from MHI. If RDDM timer get
timedout read EE register to check for RDDM state
and schedule recovery.

Change-Id: I34253526ff4b20aedf8ab8f1f49831f68a3e0a35
CRs-Fixed: 3727389
2024-02-10 11:46:14 -08:00
Naman Padhiar
e38803e8a0 Revert "cnss2: loads different fw binary per running mode"
This reverts Change-Id I848309440fdffd6517463e18190c03c1b7ed9269.

Reason for revert: Separate FW Binary not required

Change-Id: Ib694d38922f81895ce6bc01f4e38f95813625730
CRs-Fixed: 3726340
2024-02-10 11:46:13 -08:00
Sandeep Singh
d63fcc180d icnss2: refractor chain1 regulator voting
Refractor chain1 regulator voting.

Change-Id: I151de783bdc8518290b7069432f5b71d626d5e3e
CRs-Fixed: 3715778
2024-02-01 13:11:25 -08:00
Karthik Kantamneni
0df07c1ee9 cnss2: Add API to get Audio dev direct link cap
Currently cnss_get_fw_cap is checking both FW and Audio cap
to enable direct link, add new API to check audio node available
for direct link. So that this API can be queried when direct link
is being used.

Change-Id: Ic2032b338da74021f2b6c483c9480f185554f2d5
CRs-Fixed: 3711887
2024-01-31 11:57:58 -08:00
Naman Padhiar
87ab436e3d icnss2: Enable Support for WFC call TWT config
Update icnss2 driver to support WFC call TWT config
params exchange between IMS and WLAN firmware.

Change-Id: Ib565019c0b51db3cc3def8a994094eeeed7a701a
CRs-Fixed: 3710947
2024-01-26 02:07:37 -08:00
Huashan Qu
b718fd7127 cnss2: Print address range for minidump region
Print address range for minidump region when
CONFIG_QCOM_MINIDUMP is not enabled.

Change-Id: I7d162bf4b7a057d806df07eda47740bf2471ba1b
CRs-Fixed: 3704383
2024-01-19 03:25:01 -08:00
Naman Padhiar
f140232c39 cnss2: Fix DEV SOL interrupt issue
Fix misfiring of DEV SOL interrupt during enable_irq().
Ignore DEV SOL interrupt in case of device power off
as it is expected as part of off sequence.
In case of HOST triggered recovery, CNSS driver
tries to put device to RDDM first using MHI_SYS_ERR
and HOST_RESET_REQUEST if MHI_SYS_ERR fails. With
SOL enable, replace HOST_RESET_REQUEST with HOST_SOL.

Change-Id: I90c1a2dbd68c4c9c2e56d87dd1304a6ab0db53eb
CRs-Fixed: 3590408
2024-01-12 16:31:27 -08:00
Sandeep Singh
02e22639bc icnss2: enable icnss2 compilation for volcano
Enable icnss2 compilation and bazel related configs
for volcano.

Change-Id: Iff95b1983f323c76651564a94a35618781966ec6
CRs-Fixed: 3684107
2023-12-26 10:35:07 -08:00
Alan Z. Chen
c532da94b6 cnss2: Remove DIAG related MHI channel configuration for Peach
As DIAG is now deprecated on Peach chipset onwards, create a new
MHI config struct that removes DIAG related channel configuration.
Then, register this new struct for peach chipset onwards.

Change-Id: I1ba1cadaa0d1a022d6c9af6d8ff14942d4f219cf
CRs-Fixed: 3684700
2023-12-22 13:14:05 -08:00
Lin Bai
5a888e90a2 cnss2: Add segment CALDB support flag in FW Cap
When FW supports segment CALDB memory in memory request,
it sets CALDB_SEG_DDR in its capability which is sent to
host by Target Cap QMI message.

Change-Id: I84b62336ea2616cb2d663c604ac4af8a8d9966b8
CRs-Fixed: 3681105
2023-12-21 00:01:02 -08:00
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
Prateek Patil
6d5176c254 cnss2: Update TME-L patch name
Update TME-L patch name as per the target version 1.0 and change the
patch file location.

Change-Id: I1e5e8e6ac330a093f61e34029f8aec35fd3f26aa
CRs-Fixed: 3687807
2023-12-17 15:45:14 -08:00
Prateek Patil
36a061b235 cnss2: Add dump collection for CAL memory
Add CNSS_FW_CAL dump segement for dump collection of CAL memory

Change-Id: Ie3d339f3db8898e087d8460d1efb7b9a8f75a13d
CRs-Fixed: 3684125
2023-12-15 09:26:28 -08:00
Sandeep Singh
b33774b0e9 icnss2: add bazel config files for pitti
Add bazel config files for pitti.

Change-Id: I53571d0408aa53b9ac9ed7c55297a52c214d3c8d
CRs-Fixed: 3681289
2023-12-14 01:36:50 -08:00
Prateek Patil
2dec17eda3 icnss2: Add PDC init table support for WLAN device
Send PDC init table as configured in DT for WLAN device.

Change-Id: I75ce3182e844787bb78646df4a6dad023520a94d
CRs-Fixed: 3672179
2023-12-05 19:51:29 -08:00
Yeshwanth Sriram Guntuka
42fc0fe2e5 cnss2: Add support to get LPASS-FW shared memory info
Add support for host driver to get LPASS-FW shared
memory information in the context of direct link
use case.

CRs-Fixed: 3667595
Change-Id: I8254919814d578c9f28084db52a22f8cb9779112
2023-11-27 04:41:54 -08:00
Yeshwanth Sriram Guntuka
3d8ea8bbb7 cnss_utils: Add LPASS SSR reason code and new memory type
Add LPASS SSR reason code that would be used to indicate
the reason for LPASS crash and also add memory type for
FW to request shared memory with LPASS for direct link
use case.

CRs-Fixed: 3653551
Change-Id: I4d6ed721857289f43c01c8522d844656ef15c1b1
2023-11-22 17:51:34 -08:00
Naman Padhiar
2f61e5043c cnss2: Set FUNC_SEL for SW_CTRL and SW_CTRL_WLAN GPIO
From Sun onwards FUNC_SEL for SW_CTRL and SW_CTRL_WLAN
GPIO needs to be set by client. Add support to set
funtion to "wcn_sw_ctrl" and "wcn_sw" for SW_CTRL and
SW_CTRL_WLAN GPIO so that, when these GPIOs goes high,
PDC get interrupted and TCS sequence(which enables RF_CLK)
can be started.

Change-Id: Ia2ba7d8a89fe6bb54b6563f5319d50c90df2210d
CRs-Fixed: 3668322
2023-11-22 10:04:35 -08:00
Prateek Patil
21931a8db7 cnss2: Add PBL error logging on host console
Add PBL error logging on host console and dump SOC reset cause
register and PCIE_PCIE_BHIE_DEBUG_n register

Change-Id: I80ae44354b1efc05ed72f69a7e3ee8d358d840d7
CRs-Fixed: 3661767
2023-11-17 22:27:21 -08:00
Dundi Raviteja
920df40d31 icnss2: Add bazel configs for monaco
Add bazel config files for monaco compilation.

Change-Id: Ib16ae673065849b941c52ec1cb26114fa71edfe5
CRs-Fixed: 3650989
2023-11-13 15:45:54 -08:00
Dundi Raviteja
94cdab90a2 icnss2: Update hardcoded path for BOARD_COMMON_DIR
Some targets use a different location for the build scripts and
set the BOARD_COMMON_DIR build variable accordingly. If this variable
is set, pick up the Build_external_kernelmodule.mk makefile
from this location.

Change-Id: I983849f8f250ea9e9cbf5ee09c71687893abb605
CRs-Fixed: 3636186
2023-11-13 06:52:38 -08:00
Sandeep Singh
b0a979e08c icnss2: enable wpss supported for wcn6450 device
Enable wpss supported for wcn6450 device.

Change-Id: Ida818999538e7366ac1a2326b3563accc7cb5da7
CRs-Fixed: 3661363
2023-11-12 15:22:29 -08:00
Naman Padhiar
0e4171f329 cnss2: Initialize completion event at right place
CNSS2 registers PCI event callback for wake irq from
PCI driver. When callback is called CNSS2 completes
wake_event to notify the waiting threads. Currently,
initialization of wake_event completion is done after
PCI event callback registration causing issue when
PCI even callback for wake irq is called before wake_event
completion could initialize.

Initialize wake_event completion before PCIe event callback
registration.

Change-Id: If8c6ca5a5d5de5fc903b479d6d32ac0e5349f069
CRs-Fixed: 3648865
2023-11-12 15:22:29 -08:00
Prateek Patil
027c253616 icnss2: Fix compilation error when CONFIG_MSM_QMP is not enabled
'qmp' is not defined in 'struct icnss_priv' when CONFIG_MSM_QMP
is not set, use 'use_direct_qmp' to check if 'qmp' is configured
or not.

Change-Id: I3095f7173c4368d04bfab0c1cefc901ea58fccd4
CRs-Fixed: 3661758
2023-11-12 15:22:28 -08:00
Yu Ouyang
34e74266d2 cnss2: Genoa window enable bit set wrong
Genoa window enable bit should be set before function writel_relaxed.

Change-Id: I7592e3975fad76c5232377cc51a9c4906a90aab6
CRs-Fixed: 3646876
2023-11-07 05:06:10 -08:00
Meng Yuan
6bb3f633f3 cnss2: Add PCIe's link resume failed event
Add BUS_EVENT_PCIE_LINK_RESUME_FAIL type to bus event type.

Change-Id: If13f53ed9f2c6968eed5e11343cc493e740d82bd
CRs-Fixed: 3646812
2023-11-04 04:41:19 -07:00
Xiaoning Ma
cd3b976590 cnss2: Fix compilation error when CONFIG_MSM_QMP is not enabled
'qmp' is not defined in 'struct cnss_plat_data' when CONFIG_MSM_QMP
is not set, use 'use_direct_qmp' to check if 'qmp' is configured
or not.

Change-Id: If8f822a3bb1acfe10ecf175f742f3f5abd5f7df7
CRs-Fixed: 3647012
2023-10-26 19:21:41 -07:00
Chaoli Zhou
3350d6f679 cnss2: Add logic to support hang data for GNO
Support hang data enabled for genoa.

Change-Id: I93ac07159cddf067aa5f74bd26c9420f48d31710
CRs-Fixed: 3646227
2023-10-26 19:21:40 -07:00
Naman Padhiar
d897e63881 cnss2: Remove wlan-connection-roaming INI download
Remove QMI message to download wlan-connection-roaming.ini
file to FW. This way, for all the OEMs, we would not download
any of this file. Separate change will be raised to download this
files with invalid character check in CNSS2 platform driver and
maintained as hot fix.

Change-Id: Id9f990751d30f28d2d1aac180c24cb6d673e1205
CRs-Fixed: 3640676
2023-10-20 03:45:02 -07:00
Yu Wang
da6fe13a18 cnss2: free host ramdump device properly
As per description of device_add(), never directly free
a device after calling device_add(), should always
use put_device() to give up the reference and free it
in callback function 'release' if it's required.

Change-Id: I5b07b49bcf2e2af6994c05ef038deebc92a825b7
CRs-Fixed: 3637349
2023-10-17 21:38:54 -07:00
Prateek Patil
20021f2826 cnss2: Print sw_ctrl_gpio value setting pci_link up fails
This change will print sw_ctrl_gpio value during pci_link up fails.

Change-Id: Ifc92f52911e64b69ba80787763de0b5d1e15c217
CRs-Fixed: 3641068
2023-10-17 21:38:53 -07:00
Mohammed Ahmed
0a9f61aed2 icnss2: Additional platform changes for sun
Current code has compilation errors for sun kernel.
Fix this by resolving the errors.

Change-Id: I903f4c4ca0301626062c3b5d11069feaba48850a
CRs-Fixed: 3632179
2023-10-17 21:38:53 -07:00
Sandeep Singh
41022800bc icnss2: Add two vectors for DP in wcn6450 msi config
Add two vectors for DP in wcn6450 msi config which will
be used in monitor mode and increase number of ce interrupts
to 12 for wcn6450.

Change-Id: I386c98310441fd7c4f9dc8b4cfc7f2da727fe35e
CRs-Fixed: 3629007
2023-10-04 16:14:52 -07:00