提交線圖

73 次程式碼提交

作者 SHA1 備註 日期
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
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
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
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
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
Sandeep Singh
328d2fa04f icnss2: use firmware_request_nowarn api to load qdsss/bdf file
Use firmware_request_nowarn api to load qdsss/bdf file instead
of request_firmware api. Firmware_request_nowarn doesn't produce
warning messages.

Change-Id: Ia8a2881cdd6eca43396cda0e05b0c75dc3d21610
CRs-Fixed: 3616145
2023-09-15 10:53:09 -07:00
Sandeep Singh
111da9be47 icnss2: enable icnss2 compilation for pineapple
Enable icnss2 compilation for pineapple and remove
unused configs for icnss2.

Change-Id: I500cd3dc2ea9f846f80bf1e57427106df4ae2bbc
CRs-Fixed: 3600796
2023-09-09 09:43:00 -07:00
Balaji Pothunoori
2f4117dcd2 icnss2: send ICNSS_UEVENT_FW_DOWN uevent instead ICNSS_UEVENT_FW_CRASH
PD restart triggered as part of host based SSR triggered,
this will call PLD shutdown and HDD shutdown.
While processing HDD shutdown host driver check CDS recovering state
and then ASSERT if it is not set.
To Avoid this ASSERT, fix introduced to set CDS recovering by
sending ICNSS_UEVENT_FW_DOWN uevent to Host driver during firmware
crash.

Change-Id: I4f06404b02bb7ce0018b3f8e1e5253e0ba155095
CRs-Fixed: 3595285
2023-08-31 21:46:40 -07:00
Balaji Pothunoori
89f8f5e0b2 icnss2: support to add new flag rproc fw download
Currently wpss_supported variable which helps to download
wlan FW binary using rproc channel and also includes SMP2P
communication between platform and FW.
Currently SMP2P is not required for QCS405 target, Hence
introduced rproc_fw_download to download only wlan FW via rproc.

Change-Id: If230e05fc6098d4ea017d8af74b2b1c7a7afce25
CRs-Fixed: 3596283
2023-08-31 21:46:39 -07:00
Prateek Patil
e44a22665b icnss2: include qcom_aoss.h file at correct place
For bengal target, getting compilation error due to
Change-Id: Ifc5ff95208e79280543471d56fdb0a87ca973cf5, resulting in
multiple time inclusion of inline definition of the APIs defined in
the header file qcom_aoss.h. This is resulting in linking error.
Move the header file to the correct place in power.c.

Change-Id: I5a0f83fa954feb4656af09527c090f8e7d96bab8
CRs-Fixed: 3595936
2023-08-28 21:12:28 -07:00
Sandeep Singh
87ee900083 icnss2: add blair config files to enable bazel compilation
Add blair config files to enable bazel compilation.

Change-Id: If22e082f51a53f359d760f70bde6d89189e12271
CRs-Fixed: 3578579
2023-08-03 16:28:08 -07:00
Prateek Patil
882ac969c2 icnss2: Add support for direct QMP to communicate with AOP
Add support for direct QMP to communicate with AOP. There
are two ways to communicate with AOP: mailbox, and direct
QMP, Based on property set in the device tree use either
direct QMP or mailbox to send messages to AOP.

Change-Id: Iae8302fd2e40181a192a2c9afaebdb807b7cf1c3
CRs-Fixed: 3571108
2023-07-31 15:17:01 +05:30
Naman Padhiar
1eb85173ef cnss2: Enable debug config only for debug build
Remove CONFIG_CNSS2_DEBUG from GKI config so that debug
config get enabled only for debug builds.

Change-Id: Iebe86b3b3969d7de5d5f65c372f7e6d6aa7aa126
CRs-Fixed: 3565145
2023-07-19 23:14:24 +05:30
Naman Padhiar
3e85d50d6d cnss2: Correctly check for WCNSS_MEM_PRE_ALLOC macro
After CNSS2 switched to Bazel based compilation, conditional
compilation macros became same as configs and are enabled
directly from defconfig. Fix macro check in the code for
both 'y' or 'm' to enable code based on the that.

Change-Id: I12ca87c851a7b47af0255716ce1b9f59ad2eb70a
CRs-Fixed: 3553530
2023-07-12 15:39:07 -07:00
Sandeep Singh
495980e3ab icnss2: use platform_get_irq api to get irq for wcn6750/wcn6450 target
Use platform_get_irq api to get irq for wcn6750/wcn6450 target
instead of platform_get_resource as in 6.1 kernel implemetation
of platform_get_resource has changed.

Change-Id: Iaef73896dd0db08df3d29f4377c60b57394f3517
CRs-Fixed: 3536604
2023-07-07 11:25:15 -07:00
Alan Chen
2ec2768bfc cnss2: Make changes to support WLAN DDK for all modules
To be in line with upstream changes on bazel, create separate defconfig
files for each module instead.

Change-Id: Ic2c24f8d8c207b51a0a5b4b9d1088601bc91765c
CRs-Fixed: 3539620
2023-06-30 15:26:33 -07:00
Sandeep Singh
c07270aa95 icnss2: use platform_get_irq api to get irq for adrastea target
Use platform_get_irq api to get irq for adrastea target instead
of platform_get_resource as in 6.1 kernel implemetation of
platform_get_resource has changed.

Change-Id: Ia4fae607bd98b68554588cfb318e074d516bb1ff
CRs-Fixed: 3533543
2023-06-17 23:31:14 -07:00
Sandeep Singh
c5b4320df3 icnss2: pass fw capability to wlan host driver
Pass he_channel_width_cap, phy_qam_cap and rd_card_chain_cap
to wlan host driver as part of soc info.

Change-Id: I471de0df5452c960662955aad20cf1b1f6c8845e
CRs-Fixed: 3533554
2023-06-16 21:29:31 -07:00
Dundi Raviteja
0168d637ed icnss2: Ignore FW ready timeout if AON is not up
Ignore FW ready timeout if AON is not up.

Change-Id: I77ae832e8d5c2fceb5228ff5554375fa3e6ecb08
CRs-Fixed: 3519857
2023-06-15 16:31:35 -07:00
Dundi Raviteja
2f882a1189 icnss2: complete AON completion event gracefully
In some error cases AON completion event can be in wait
state, so complete it gracefully.

Change-Id: I98df398a74e00b9adc3c8d0cf7abcd48b66def1c
CRs-Fixed: 3527640
2023-06-14 22:02:18 -07:00
Sandeep Singh
8ddac0b648 icnss2: return ENOSYS from smmu fault handler callback
Return -ENOSYS from smmu fault handler callback as iommu
driver requires -ENOSYS return value to print debug info.

Change-Id: Id395269542d40137323d413f20da67dc715efa2d
CRs-Fixed: 3513019
2023-06-14 21:47:36 -07:00
Dundi Raviteja
0fcf684c10 icnss2: Unregister AON event notifier
Unregister AON event notifier.

Change-Id: Ic247f7dc1a2672ccca54dac0dbef1d8dbec22fb1
CRs-Fixed: 3522232
2023-06-11 02:53:45 -07:00
Dundi Raviteja
de80f12c97 icnss2: Handle AON ready event
During cold boot AON sends multiple DOWN and UP notifications
as part of its FW update. ICNSS driver should not initiate
any QMI handshakes and should wait till correct FW is flashed.

After successfully flashing correct FW, AON will send ready event.
Once AON ready event receives ICNSS driver sets AON ready bit and
proceeds with QMI handshakes.

Similarly in AON SSR, this change handles UP notification only if
AON ready bit is set.

Change-Id: I326d731cd3f619cef9fa8c072a1e898f4b21a6ce
CRs-Fixed: 3491699
2023-05-31 20:52:34 +05:30
Dundi Raviteja
401152234c icnss2: Move AON code under a macro
Move AON related code under a macro to make it as config.

Change-Id: I52b35aa8eb06556934250e7347d8d851d29964a6
CRs-Fixed: 3512075
2023-05-31 20:24:14 +05:30
Jeff Johnson
6b432e8d56 cnss_prealloc: Update DDK for cnss_prealloc dependencies
Commit 97303bf330 ("cnss_prealloc: update prealloc mem pool based on
device type") introduced several new dependencies:
- cnss_prealloc has a dependency upon a new header file
  cnss_utils/cnss_common.h
- cnss2 has a dependency upon cnss_prealloc
- icnss2 has a dependency upon cnss_prealloc
- icnss2 has dependency upon cnss_utils and wlan_firmware_service

Add those dependencies to the DDK build rules.
Also add CNSS_OUT_OF_TREE config in icnss2/Kconfig file.

Change-Id: If00eb7623cffb82e02ed0f8001254082f2a19b93
CRs-Fixed: 3495407
2023-05-20 22:20:39 -07:00
Sandeep Singh
ff9d11362f cnss_prealloc: add wrapper APIs if MEM_PRE_ALLOC flag not enabled
Add wrapper api to avoid compilaton failure if
CONFIG_WCNSS_MEM_PRE_ALLOC flag is not enabled.

Change-Id: Ic0625d68f587c79f38f33495b53645f1d7582144
CRs-Fixed: 3492092
2023-05-11 15:36:42 -07:00
Sandeep Singh
97303bf330 cnss_prealloc: update prealloc mem pool based on device type
Update prealloc mem pool based on device type.

Change-Id: Ic7fc2145a0039aa55643672b8e125857c096a3ee
CRs-Fixed: 3459351
2023-04-25 23:46:44 -07:00
Naman Padhiar
643d19ee98 icnss2: Check for SSR before SOC Wake request
There are scenarios when WLAN Host request for
SOC Wake during SSR. If WLAN FW receives the request
before FW_READY it ASSERT.
Avoid sending SOC Wake request to FW during SSR.

Change-Id: Ia42cc17149de7a33da0161a280c79d5dfce0f4c8
CRs-Fixed: 3435111
2023-03-16 22:37:14 -07:00
Sandeep Singh
f6f7707351 icnss2: Add change to download qdss file for WCN6450
Add change to download qdss file after bdf download
for WCN6450 device.

Change-Id: I3b46c3411d8af7835af3907f472e82906f924d08
CRs-Fixed: 3413562
2023-03-02 10:48:37 -08:00
Sandeep Singh
b9deac9d5c icnss2: Disable APPS proxy votes before WLAN_EN
WCN6450 has strict power on sequence where WLAN_EN needs
to be enable first followed by regulators. To achieve
this remove Host Proxy votes before sending TARGET_CAP
and MODE_ON QMI request in which FW is suppose to do
WLAN_EN high.

Change-Id: I315269048c6499153d4d2daf6ee6a829f6fd2ccc
CRs-Fixed: 3413588
2023-02-28 23:33:52 -08:00
Sandeep Singh
aec346c6bc icnss2: Add support for WLAN WCN6450 device
Add corresponding driver support for WCN6450 device.
This change adds compatible dtsi entry, msi config,
v3 shadow register config and vreg regulator details
along with enabling bootup sequence for WCN6450 device.

Change-Id: I406c92cdc2815ffd1108331d382c4972befad998
CRs-Fixed: 3404702
2023-02-28 23:33:51 -08:00
Sandeep Singh
ecd2be21ed icnss2: Add null check for priv variable
Add null check for priv variable to avoid null
pointer dereference.

Change-Id: Ib1746d564f27f8096f66761946d37a2a3faf2e57
CRs-Fixed: 3378034
2023-02-28 18:35:39 -08:00
Naman Padhiar
01cb81be76 icnss2: Use event_data before posting event
In icnss_pdr_notifier_cb() API, event_data gets free while
processing PD_SERVICE_DOWN event. In the same function
event_data->crashed is checking after posting PD_SERVICE_DOWN
event which may cause using event_data even after free.

This commit updates checking for event_data->crashed before
posting PD_SERVICE_DOWN event.

Change-Id: Ie82a0b7b4ceb40063318ab2d926b9c14412fb2c9
CRs-Fixed: 3415299
2023-02-28 14:47:48 -08:00
Ajit Vaishya
8e0ff47179 icnss2: Don't clear LP on subsystem AFTER SHUTDOWN Event
As per Hibernate Entry (i.e. SUBSYS_BEFORE_SHUTDOWN with flag
crashed is not set) and based on low power supports it set the
state to ICNSS_LOW_POWER.
While processing the SUBSYS_AFTER_SHUTDOWN, its reset the
ICNSS_LOW_POWER state based on previous state already set
state and low power supported.
But before system freeze callback triggered,
SUBSYS_AFTER_SHUTDOWN event received to wlan and due to
which ICNSS_LOW_POWER state is clear and freeze callback failed,
thus its leads to prevent Hibernate freeze on WLAN.
This fix is to provides WLAN entered into Hibernate freeze state
by not clearing ICNSS_LOW_POWER state in SUBSYS_AFTER_SHUTDOWN.

Change-Id: I7b34d54c7ce5314e5092dbe2c0bc65ffe13d014d
CRs-Fixed: 3394501
2023-02-03 21:18:20 -08:00
Surabhi Vishnoi
26e2742f2f icnss2: Add support for Hibernate low power mode
Hibernate is a system wide power mode during which Modem
would be brought down along with DDR and the RAM contents
would be saved on the disk (suspend-to-Disk).

Modem would be do graceful shutdown in Hibernate mode,
so BEFORE_SUBSYS_DOWN notification will be received.
Based on dtsi node "is_low_power", if BEFORE_SUBSYS_DOWN
with notif->crashed bit not set is received, platform
driver will trigger an idle shutdown and set low power mode.

On AFTER_SUBSYS_DOWN notification, low power mode will be
cleared if it was set and ramdump collection will happen
only in case of crash.

Change-Id: I7b618e7c23950e4055079cde237ed75d6861620f
CRs-Fixed: 3394501
2023-02-03 21:17:25 -08:00
Surabhi Vishnoi
6c9f906a94 icnss2: Add Low power mode to icnss driver state
Deep Sleep is a system wide low power mode during which
Modem would be brought down and DDR would be in self
refresh mode (suspend-to-RAM) thus platform driver on
receiving deep sleep indication goes to a state similar
to SSR apart from the fact that FW is not crashed but
deliberately brought down.

In msm-5.15, there are no seperate notifications used
for deep sleep, notifications used for hibernate like
BEFORE_SHUTDOWN, AFTER_SHUTDOWN, BEFORE_POWERUP and
AFTER_POWERUP are used for deep sleep also.

In this commit add only low power mode state to
icnss driver state.

Change-Id: I4b12c5a8841e3cfc3e5e44ab6d9dff141e472876
CRs-Fixed: 3394501
2023-02-03 21:16:40 -08:00
Sandeep Singh
172b8aee52 icnss2: trigger wpss self recovery
Icnss driver receives early crash indication when
fatal error happens in wpss. In few cases rproc
framework didn't receive any notification regarding
wpss fatal crash due to which icnss driver wpss
notfier is not getting called. This prevents wpss ssr
recovery. To recover wpss from this scenerio icnss
driver tries to do self recovery of wpss subystem.

Change-Id: Ie22dfb6a6218aafd1fec84fb14f3efb16c60bf5e
CRs-Fixed: 3265930
2023-02-02 18:05:22 -08:00
Sandeep Singh
54df2d964c icnss2: Add ASSERT if fw ready got timed out
Recovery timer is used to detect FW_READY timeout(60 Sec)
during SSR/PDR recovery and assert. Same timer starts
before cold boot calibration also and expires in 40 sec
if FW_READY is not received.

Change-Id: Ie4e2a327aa4f4df49b8684f9c178b9b5f4d4fb15
CRs-Fixed: 3221566
2023-02-02 18:05:21 -08:00
Sandeep Singh
3a589a650e icnss2: Remove wlan driver on device shutdown
This change shutdown wpss on device shutdown for
adrastea targets. With this change icnss driver unloads
wlan host driver in wpss shutdown callback.

Change-Id: I6d7d2563e694786b8d74725d77dc8c25943198e9
CRs-Fixed: 3392307
2023-02-01 15:26:29 +05:30
Dundi Raviteja
1d66a24813 icnss2: Update slatecom_interface.h file path
slatecom_interface.h file is moved to include/ in kernel,
update the same in icnss2 also.

Change-Id: Ibd07235636066b48221de9928283bfdf24b90221
CRs-Fixed: 3390989
2023-01-30 12:04:07 +05:30
Dundi Raviteja
6d4715f78c icnss2: Send wlan boot init and complete commands
When server arrive event is received send wlan boot init command
and when firmware ready indication is received send
wlan boot complete to co-processor subsystem.

Change-Id: I1c75ca772b7b96757f1b060b6c1d5700245b17aa
2023-01-17 23:00:22 -08:00
Dundi Raviteja
e5906b5e52 icnss2: Handle co-processor subsys down notification
WLAN RFA is present on another co-processor subsystem.
Any error fatal in co-processor subsystem will result in
WLAN reset.

In order to make sure that rf clock/rails are up
before accessing WLAN hardware, ICNSS platform driver
needs to register with co-processor SSR notification and trigger
PDR once co-processor is down.

Change-Id: I28cdc997646cc15ef0de23c28dfada87972eb465
2023-01-17 23:00:22 -08:00
Dundi Raviteja
951c866f53 icnss2: Synchronize qmi server arrive with co-processor up
WLAN RFA is present in another co-processor subsystem.
In order to prevent unclocked access, Wait for SLATE_POWER_UP
event before starting wlan cold boot qmi handshakes.

Change-Id: If24816c270c32c5f0191227ef66bc4a31549c54d
2023-01-17 23:00:21 -08:00
Dundi Raviteja
d2bd912107 icnss2: Register for co-processor subsystem notifier
WLAN RFA is present on another co-processor subsystem.
Any error fatal in co-processor subsystem will result in
WLAN reset.

In order to make sure that rf clock/rails are up before
accessing WLAN hardware, ICNSS platform driver needs to
register with co-processor SSR notification and wait for
POWER_UP event before starting QMI handshake.

Change-Id: Idf65e508a09d93e481349afc73de4804c7841111
2023-01-17 23:00:20 -08:00
Naman Padhiar
b0d6e583c7 icnss2: Send ICNSS_SMMU_FAULT uevent to host driver
On detection of SMMU fault, platform driver send
SMMU_FAULT and FW_DOWN event to Host driver.

Change-Id: I623522231b5ee7ab0b03b8c1b25993395b7f3a2d
2023-01-12 07:35:10 -08:00
Surabhi Vishnoi
075cc964ce icnss2: Send rf_subtype to firmware via QMI command
Send rf_subtype based on dt node "qcom, rf_subtype" to
firmware using QMI_WLFW_WLAN_HW_INIT_CFG message after
qmi server arrive. Firmware will initialize different
halphy code based on rf_subtype sent by host.
Currently, this change will be applicable only for
adreastea targets which can have either slate RF or Apache
RF attached.

Change-Id: Iba327d0c221104a4ebb55a72d42e1a4b8dcb66c3
2023-01-05 10:28:42 +05:30
Alan Chen
ef9321c23d icnss2: Add data length validation in cnss_wlfw_qdss_data_send_sync()
Add a data length validation check in fw response message in
qdss_data_send_sync().

Change-Id: I750f46549bc914698baaf4e24f1710536ca8e356
CRs-Fixed: 3366343
2022-12-29 16:41:24 -08:00
Sandeep Singh
219c37b87e platform: Add sanity change for fw memory size
Icnss and cnss2 driver receives and sends memory size
over qmi to and from wlan fw. This change add maximum
memory size check before sending or receiving fw mem size
over qmi. Also, use QMI_WLFW_MAX_NUM_MEM_SEG_V01 enum as
maximum size limit.

Change-Id: I392bfbbf0359e60bce9e93d909a119e8c72f07d5
CRs-Fixed: 3367408
2022-12-23 14:11:24 -08:00
Rajesh Chauhan
ecb024f0d1 icnss2: Fix build issue when strict-prototypes is enabled
When strict-prototypes and format-insufficient-args are
enabled then icnss2 fails to build. Change prototype of
icnss_get_plat_priv() and remove extra arg from error log
in icnss_wlfw_wlan_mac_req_send_sync().

Change-Id: I81c7d90fa24b05d573a9ce47c0301d2798118182
CRs-Fixed: 3359853
2022-12-13 19:36:36 -08:00