Commit gráf

78 Commit-ok

Szerző SHA1 Üzenet Dátum
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
2aa767ca86 cnss2: Add support to download ini file to FW
Add new QMI message to download wlan-connection-roaming.ini
file to FW.

Change-Id: Icc7d63847560ae07f3d3cdebc158faf8e4cb5aec
2022-05-23 10:09:32 -07:00
Naman Padhiar
878c36c07a icnss2: Set WLAN_EN_DELAY based on temperature
Read temperature from the tsens given in DT. Based on that
temperature set WLAN_EN_DELAY value and send it to FW via
Host Capability QMI request.

Change-Id: I6a41dad58af28fa321932874c3974ca95beb59ac
2022-05-23 11:06:04 +05:30
Kai Liu
648ac5ccff cnss2: Add pcss recovery support
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
2022-05-19 14:36:33 -07:00
Mohammed Siddiq
c4f490a979 cnss2: Add code to parse wlan sw ctrl gpio in get_dev_cfg_node
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
2022-05-19 14:35:06 -07:00
CNSS_WLAN Service
3a77b6a963 Merge "cnss2: Add shadow register version 3 for kiwi" into wlan-platform.lnx.1.0 2022-05-18 07:44:47 -07:00
Mohammed Siddiq
334ef0ec36 cnss2: Add code to dump SRAM on MHI power on failure for QCA6490
Add code to dump SRAM on MHI power-on failure. To avoid CPU hog
relinquish CPU after dumping 256Kb chunks.

Change-Id: I2c9c64424c8ae4612e67b78fcabc1f872fefea81
2022-05-17 10:43:17 -07:00
Mohammed Siddiq
4ba2be4db0 cnss2: change log_level to avoid flooding of Dmesg
Due to SPF, multiple drivers are supported and are loaded
run time. It is expected for one driver to fail to load,
however the failing driver should not flood the dmesg.
So add code to change log level of debug message in
cnss_wlan_register_driver api to avoid flooding of
kernel logs when ipci driver is loaded.

Change-Id: I281ff2424daf2e8d85502cb9b11a392e049cd45d
2022-05-16 22:11:18 -07:00
Mohammed Siddiq
29e96e5173 cnss2: Add code to separate MSM PCIe APIs to pci_qcom.c file
Add code to move the platform related apis mainly defined under
CONFIG_ARCH_QCOM and CONFIG_PCI_MSM flags to separate file,
named pci_qcom.c. This change facilitates easy code upgrade for
customer.

Change-Id: Ic81e633829ccfdeb3fc3f123013708e6d712c5c2
2022-05-16 08:26:27 -07:00
CNSS_WLAN Service
037264e406 Merge "cnss2: Add code to address boot timer debug corner case" into wlan-platform.lnx.1.0 2022-05-16 08:13:28 -07:00
CNSS_WLAN Service
29d0bc3bc3 Merge "icnss2: Register for mpss subsys rather than modem subsys" into wlan-platform.lnx.1.0 2022-05-16 08:13:26 -07:00
Mohammed Siddiq
0db7057bb6 cnss2: Add shadow register version 3 for kiwi
Add shadow register version 3 structure for kiwi
CE7 support for wmi logging.

Change-Id: Ie37dcc47ff4b63726cee43a3d26cb0aad24d44ed
2022-05-15 18:52:52 +05:30
Manikandan Mohan
eadcd47888 cnss2: Feature update for OL CPR
Open Loop CPR feature is extended to support multiple VRegs. Add IDL
data structures, device tree setup for WLAN device PMU pin to platform
VReg mapping and handling for new OL CPR params from FW.

Change-Id: Ibdcc5b30521c01e12124b32bd6291def98bd9516
2022-05-13 10:50:35 -07:00
Mohammed Siddiq
04bdb792b7 cnss2: Add code to address boot timer debug corner case
To handle corner case where mhi power on success and the boot
debug timer handler execution(i.e dumping register) runs parellel.
Even-though the timer is deleted as soon as mhi is powered on,
as this handler is still running it is armed again. Use the
del_timer_sync api which makes sure the timer is not queued and
the handler is not running upon its exit.

Change-Id: Ie428f3e8af8870018dfed99a5472afca14116bb3
2022-05-12 14:19:00 +05:30
Sandeep Singh
4e020a4c9a icnss2: Register for mpss subsys rather than modem subsys
From 5.10 kernel onwards, remoteproc team has renamed
modem subsystem to mpss subsystem. So, icnss driver
should register for mpss subsystem rather than modem
subsystem.

Change-Id: I68276c7b03a4819ba0e219f1019a73eafa3ac456
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-05-10 13:38:36 +05:30
Mohammed Siddiq
8ebc3d7e4f cnss2: Log SW_CTRL GPIO value if PCIe link training fails
Add change to print SW_CTRL GPIO value when PCIe link training
fails during power on.

Change-Id: I77bd2db80dad4c56647f52d67acfab0fe7efb7a7
2022-05-09 20:27:55 -07:00
Mohammed Siddiq
83cc8e3076 cnss2: Add code to enable hang data for kiwi
Add code to enable hang data for kiwi.

Change-Id: Idef5d036c0add2f20bd452eb4f91be81dcc90e5e
2022-05-09 17:49:09 -07:00
Mohammed Siddiq
42f4e0431a cnss2: Get hang event params over target cap qmi response
Add change to get hang event params over target cap response.
With this change hard-coding of hang data address and offset
is removed if valid hang data params are received over QMI.

Change-Id: Ife163cf66d5880cd9a658a841e5d4a73816fd982
2022-05-09 17:47:54 -07:00
Kai Liu
af5e427b47 cnss2: Limit DRV suspend mode setting before FW ready
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
2022-05-05 18:35:01 -07:00
Mohammed Siddiq
be6ab7d269 wlan_platform: use cnss_utils to send device type across wlan & bt
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
2022-05-02 12:47:44 -07:00
Manikandan Mohan
5f2db0d3b8 cnss2: Update AOP Mbox interface for PDC config
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
2022-05-02 09:10:59 -07:00
CNSS_WLAN Service
1e3aa26d53 Merge "cnss2: Add code to support multiple device attaches via sub nodes" into wlan-platform.lnx.1.0 2022-05-02 06:31:01 -07:00
CNSS_WLAN Service
5ed26e24cb Merge "icnss2: Reject wlan host driver loading" into wlan-platform.lnx.1.0 2022-04-29 20:16:49 -07:00
CNSS_WLAN Service
ebc05d00ac Merge "cnss2: Add code to notify mhi about link down" into wlan-platform.lnx.1.0 2022-04-29 08:04:30 -07:00
Mohammed Siddiq
ab313f046c cnss2: Add code to support multiple device attaches via sub nodes
Add code to support multiple device attaches via sub nodes.

Change-Id: Ifa2bff0cacbb25bed2498c8804723deb64c583b0
2022-04-27 16:47:54 +05:30
Sandeep Singh
2bb5c9cb46 icnss2: Reject wlan host driver loading
Reject wlan host driver loading if wlan driver
dev_info is null. Wlan host driver needs to pass
correct dev_info to get driver loaded.

Change-Id: I6b4e94c42c6192a063d0e3ccf20deb73714fab8c
CRs-Fixed: 3178902
2022-04-27 15:31:01 +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
Manikandan Mohan
51894fbfb9 cnss2: Add code to notify mhi about link down
Add code to notify mhi about link down.In scenario of link down
recovery failure with SSR enabled, cnss-daemon posts a QMI req
during subsystem shutdown execution, the mhi layer tries to access
doorbell register to process the qmi msg but it leads to NOC error
as pci link is down. So added code to notify mhi about link down
to avoid NOC error.

Change-Id: I3ccc2cbda37e271f14f3821bb055db3107dac228
2022-04-21 13:19:12 -07:00
CNSS_WLAN Service
3d6bc31be2 Merge "icnss2: Add change to enable icnss2 driver unloading" into wlan-platform.lnx.1.0 2022-04-19 22:16:41 -07:00
CNSS_WLAN Service
6bf0b2b888 Merge "icnss2: create soc wake wq only for wcn6750 device" into wlan-platform.lnx.1.0 2022-04-19 22:16:40 -07:00
CNSS_WLAN Service
7f88b5b7d4 Merge "icnss2: Enable wpss ssr for adrastea target" into wlan-platform.lnx.1.0 2022-04-19 22:16:31 -07:00
CNSS_WLAN Service
9daa172011 Merge "icnss2: Enable dms get mac address for wpss supported target" into wlan-platform.lnx.1.0 2022-04-19 22:16:30 -07:00
CNSS_WLAN Service
0cba3b1723 Merge "icnss2: Enable wpss loading for adrastea targets using rproc" into wlan-platform.lnx.1.0 2022-04-19 22:16:29 -07:00
Manikandan Mohan
e8d76601a7 cnss2: Fix PBL / SBL logs collection for KIWI device
Fix PBL / SBL logs collection for KIWI device.

Change-Id: I271f1dc605f49db60339f1d7470bdd6c60770eb2
2022-04-18 11:32:29 -07:00
Sandeep Singh
c0e7f285a0 icnss2: Add change to enable icnss2 driver unloading
Rproc_put should gets called only after rproc
subsys shutdown as it decreases refcount. Rproc_put
should not be called from icnss_remove as refcount should
not be decreased without incrementing it using rproc
get_by_phandle api.

Change-Id: I26dc83d9750e45726e9e59d33a75d4ff402caa62
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-04-18 17:53:27 +05:30
Sandeep Singh
3f3761e143 icnss2: create soc wake wq only for wcn6750 device
Soc wake feature is only required for wcn6750 device.
So, this change moves soc wake wq creation only for
wcn6750 device.

Change-Id: Ib564d8bfd10c98aad3595bb10e5a2660f9049f85
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-04-18 17:43:05 +05:30
Sandeep Singh
2d00bd1bf8 icnss2: Enable wpss ssr for adrastea target
This change enables wpss ssr recovery handling
for adrastea targets.

Change-Id: I68a855db2b67d17dc4ba57337efb5ca406ba0873
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-04-18 17:18:43 +05:30
Sandeep Singh
e4e94ffa0d icnss2: Enable dms get mac address for wpss supported target
Enable dms get mac address for wpss supported target.
This change enables get dms mac address for adrastea
targets where rproc wpss loading is supported.

Change-Id: I76e4ae46833afb1d1150c3757cb2fc2f87ede2ec
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-04-18 16:53:08 +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
Wade Song
b12d988719 cnss2: Enable support for qca6390 on hana-au
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
2022-04-13 06:23:16 -07:00
Yue Ma
1f16ed3cb1 cnss2: Explicitly enable/disable dev SOL interrupt during power on/off
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
2022-04-11 14:19:57 -07:00
Manikandan Mohan
11e6daf9bf cnss2: Refactor calibration timeout handling
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
2022-04-04 13:51:28 -07:00
Manikandan Mohan
abe9d5bfb6 cnss2: Add sysfs entry for charger mode
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
2022-04-04 13:49:57 -07:00
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
Yue Ma
35d040ea76 cnss2: Add time sync support for kiwi device
Enable time sync feature for kiwi device which uses MHI registers
to get device time and uses shadow register #0 and #1 to get time
difference.

Change-Id: I72749c7b0328d278d9157adf254911280604ad60
2022-03-30 13:49:42 -07:00
Yue Ma
ce5d7eafbc cnss2: Add pinctrl support for SOL GPIOs
Add pinctrl support for SOL GPIOs so that default state of the
GPIOs can be set properly.

Change-Id: I2694d5d61074df04ab2e14251a743d387f814ae1
2022-03-29 14:58:40 -07:00
Yue Ma
c4cba5ad7b cnss2: Add support to handle SOL GPIOs
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
2022-03-29 14:57:36 -07:00
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
09128bd57d icnss2: Properly handle ramdump device creation failure
Check return value from function and handle it properly.

Change-Id: I8016f2a63d3d951e3ee0557397cbb80b9c51bebc
2022-03-17 09:15:48 +05:30