提交線圖

68 次程式碼提交

作者 SHA1 備註 日期
Yu Wang
6368e826b3 icnss2: enlarge maximum length for filtering rproc name
The remote proc name for wpss on volcano is
'9bb00000.remoteproc-wpss', the restart level changing
on which will be ignored by icnss platform driver
unexpectedly due to the maximum length for filtering the
name is too short.

To fix it, enlarge this maximum length to 100 bytes
according to implementation of remote proc.

Change-Id: I42148cb2f8d0821521acf06e5f54d4ebaf439985
CRs-Fixed: 3794773
2024-04-25 03:10:07 -07:00
Dundi Raviteja
5ca3f8b383 icnss2: Add new API to validate smp2p state
Checking smp2p_state using IS_ERR_OR_NULL returns true every time
for Adrastea based targets.

So add a new API to validate smp2p state which returns true only
if the device id is WCN6750_DEVICE_ID or WCN6450_DEVICE_ID or
wpss_supported is enabled.

Change-Id: I01237d9e7b47dd666a4987920ca73a3f8f584c87
CRs-Fixed: 3758894
2024-04-03 14:52:39 -07:00
Prateek Patil
08ec0c895d icnss2: Collect msa0 ramdump only at the time of crash
This change will collect msa0 ramdump only at the time of crash.

Change-Id: I5dd9b039ea7696a0dcccb56a4a3133fb77a16d63
CRs-Fixed: 3767055
2024-04-03 05:22:41 -07:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Sandeep Singh
414f0dcf64 icnss2: pass fw build id in soc info to wlan host driver
Pass fw build id as part of  soc info to wlan host driver.

Change-Id: I6a8bced678ada0f88e744b5fd3f2ed58fa4173ef
CRs-Fixed: 3324963
2022-11-10 12:56:04 -08:00
Naman Padhiar
60f897b63a icnss2: Send WLAN_EN delay during Mode request
Send WLAN_EN delay during Mode On QMI request if temperature is
below threshold at that time.

Change-Id: I910168dafa09c25cc4a263a7756379eb8be46824
2022-10-02 01:17:36 -07:00