Commit Graph

27 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
Naman Padhiar
4d21b48025 icnss2: Add support to configure WLAN_EN_DELAY
Add support to configure WLAN_EN_DELAY using sysfs.
When temperature detected is less than threshold
configure WLAN_EN_DELAY value from sysfs if it is
greater than default WLAN_EN_DELAY value.

Change-Id: I94ac0c6bb3bd2bc2da122d3cf1215b8fe964159f
CRs-Fixed: 3230892
2022-06-28 14:36:37 +05:30
Sandeep Singh
9be6cc9072 icnss2: Enable power supply framework for 5.15 kernel
Icnss driver indicates vbatt voltage level to wlan fw
based on battery percentage. This change adds power
supply framework code to enable icnss2 driver to measure
battery percentage and update vbatt volatge level to
wlan fw.

Change-Id: I376805da38222a5e7a20ae4a1737bc978ee6a9ae
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-05-25 14:28:40 +05:30
Naman Padhiar
23e8cd3328 wlan_platform: Add CONFIG_CNSS_OUT_OF_TREE flag
Use CONFIG_CNSS_OUT_OF_TREE to control if ICNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.
Resolve ICNSS compilation issue with msm-5.15 kernel.

Change-Id: I0a94f70c1be659a00f9401e57ee1dd31b6aa82ae
2022-04-25 19:29:59 +05:30
Sandeep Singh
a3d650f48a icnss2: Enable wpss loading for adrastea targets using rproc
This change enables wpss loading for adrastea targets using
rproc framework.

Change-Id: Ib9293a407c54da050d94b013ba6b6db58ab46893
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-04-18 12:41:53 +05:30
Naman Padhiar
04d2478bcc Icnss2: Remove deprecated ICNSS_BDF_DUMMY type
ICNSS_BDF_DUMMY type board data file is no longer used. Hence remove
it. A BDF file with regular name and dummy content should be sent as
dummy BDF instead of just sending a dummy string.

Change-Id: I9bbdf8a59bb178afe8c27e709b3a360c5de4fa68
2022-04-01 11:29:22 +05:30
Sandeep Singh
9c8339eabe icnss2: Add code to pass device configs to wlan host driver
Add code to pass device configs to wlan host driver.

Change-Id: I977fc564914f9fbdabc0004eff4c5c2f14a1fc7c
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-03-22 22:35:22 -07:00
Sandeep Singh
3974704e22 icnss2: Remove vbatt feature code from icnss2
This change removes vbatt feature code as adc tm
api's functionalities has been changed and no
longer supports vbatt feature.

Change-Id: I431c1dfe1a5529809fd7d68d1cb15632de3b801b
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-03-22 18:47:20 -07:00
Naman Padhiar
8b84662a7d icnss2: Register early SSR notification for WPSS
Consider a scenario where WPSS watchdog happens RPROC driver
gets interrupt and notified to GLINK layer(underlying layer
within QMI) now if ICNSS driver tries to send any QMI message
it will fail and ASSERTS. If ICNSS would have received legacy
SSR notifier it could have ignore ASSERT. But there is a race
where ICNSS sends QMI message between GLINK layer received
WPSS down and ICNSS receives WPSS down and ASSERT of QMI
failure cannot be avoided. To resolve this register early
SSR notifier from ICNSS which notifies about WPSS down to
ICNSS before GLINK. Based on that ICNSS can either avoid
sending QMI message or can ignore ASSERT.

Change-Id: Iada85a1bfff6ae420123afc5f86a738b662171fc
2022-03-12 08:43:47 +05:30
Sandeep Singh
48c98ff79f icnss2: Add prefix in file path for adrastea targets
This change will add adrastea prefix in fw file path
of adreatea targets. This changes enables fw files
to be picked from /vendor/firmware_mnt/image/adrastea
path.

Change-Id: Ic0ce57b7a8db08e4bf55c8a493a1f1500d93c427
CRs-Fixed: 3140070
2022-03-10 10:55:49 +05:30
Naman Padhiar
3983bc4503 wlan_platform: Bring initial files for ICNSS family drivers
Bring ICNSS family drivers from msm-5.10 kernel as of commit
'cb298739ee51 ("icnss2: Download bdf file for helium targets")'
to WLAN platform project.

Updated wlan_firmware_service files and makefiles to support
ICNSS2 compilation.

Change-Id: I02cf792b61772f07ac0607be7bb6b3bfda7815e4
2022-03-02 09:04:18 +05:30