Sometimes dumping IRIS register along with PRONTO register
results in crash.
To mitigate issue get MUX control before dumping IRIS register.
Change-Id: Ie1e19a254ec1ae43c2713c86c4d35a2d9968bcd6
CRs-Fixed: 777663
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
This reverts commit 7db9a1a9f7.
Above commit depends on firmware code changes, As new code
changes that would be introduced removes this dependency,
hence reverting this commit.
Change-Id: I86479d05f98e48949a140e30efae4e311e1cbf00
CRs-Fixed: 744296
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
Add support to check for pronto ver3 hardware is present
by reading a device tree entry
Change-Id: I01cd71ac6c00b6c1e4c5ea46b3f3c0b57a0dbd95
CRs-Fixed: 737209
Signed-off-by: Siddharth Bhal <sbhal@codeaurora.org>
Add case to handle cold boot calibration complete
event from firmware.
Change-Id: I3d3dce178fadd7f993ee31667c89bcebb02c388b
CRs-Fixed: 734932
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
Add WCNSS platform driver API to expose monotonic boot time so that
WLAN host driver can get the timestamp.
Change-Id: Id1db5bc7efac036cf76d2090ab5c07d2aece5e1a
CRs-Fixed: 706813
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
-Add support to dump PMU register after enabling measure
and debug clk.
-Add support to read IRIS registers on failure of enabling
measure clk.
Change-Id: I77abd6ea6d97a890643c0bc1eab46188c6e42b67
CRs-Fixed: 652321
Signed-off-by: Pradeep Kumar Goudagunta <gpradeep@codeaurora.org>
Wlan driver should not read registers from wcnss or
try to communicate with the chip when it is undergoing
a subsystem-restart. Added an API with the wcnss platform
driver to check if ssr is in progress, this API will be
used by the wlan driver to protect register access and
other prohibited operations.
Change-Id: Ia0d93e774af126d84dbaabf5c36a2c90fdbd58be
CRs-Fixed: 621974
Signed-off-by: Mihir Shete <smihir@codeaurora.org>
Set Pronto and IRIS voltage regulator according to 8x16
power grid requirment.
Change-Id: I0b3b2dcb3cf82bc23e5d047809fa31a5e6b9b337
CRs-fixed: 567674
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
Store avoid channel list into recoverable location.
If Softap mode detects current channel is not safe to use,
WLAN kernel module will be restarted.
Then WLAN kernel module internal storage will lost
unsafe channel information.
To avoid start softap with unsafe channel, channel information
should be stored in static location.
Change-Id: I5a6d7ab7314936d7bbaaf7a005e58179a4dc0613
CRs-fixed: 576020
Signed-off-by: Leo Chang <leochang@codeaurora.org>
This change introduces a sysfs entry to allow userspace to
configure the wlan MAC addr and exports an API which allows
WLAN and other wireless technologies to query the wlan MAC
addr
Change-Id: If723ceed9e6cf68533eaa42cef6fab59bb3ae9da
CRs-Fixed: 583465
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
When Apps recieves a WDOG bite from WCNSS, collecting a register
dump of WCNSS is helpful to root cause the failure. WCNSS may not
be properly clocked in some WCNSS bite cases, and that may
cause unclocked register access failures. So add a feature flag
so that customers can disable this register dump on production
builds.
Change-Id: Ifc9c577ac3a342634e01b3da9c12973c5c1a7713
CRs-Fixed: 556962
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
The voting for clocks and regulators during WCNSS boot up/restart
was split across the WCNSS platform driver and the PIL ops. Move
all the proxy voting to PIL ops to consolidate the code and remove
unnecessary code. This also allows for future clean up patches that
consolidate the start/powerup and stop/shutdown subsystem ops.
Change-Id: I9808185b6b941228cdc4bb0f5293bedd04aed84d
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
IRIS XO mode can be configured thru module parameter; and it can also
be auto detected. Add an API to expose the IRIS XO mode set. WLAN driver
can use this API for it's XO specific operation.
Change-Id: If40ae715f5e400e13a6fc9588d2bd144958ee8c2
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
WLAN driver's RX buffer count is a configurable value; WCNSS platform
driver will expose an API to read this configurable value from device
tree. Using a smaller coount of this buffer will reduce the memory
usage of WLAN driver.
Change-Id: Ida3da258ec1efdc16d37e50f69de8248fd6a26f9
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
WCNSS platform driver can detect the Iris card attached to it. And if
dynamic XO detection is enabled, then WCNSS driver can configure the
48MHZ/19.2MHZ Iris XO configuration based on the Iris card attached to
it. The Iris register for this configuration can be read, once the 5wire
GPIO settings are applied. (Even before applying the Iris XO)
The dynamic XO will only be performed on 8x26 variants. If the dynamic
detection is not enabled, then platform driver will choose the settings
based on the has_48mhz_xo module parameter or qcom,has_48mhz_xo device
tree entry.
Change-Id: I8990468492efa1d3d3a606d01904a77eeaa6a980
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Dump PMIC registers which are related to WCNSS(RIVA)during the
WCNSS SSR or WDI timeout. This information helps to check PMIC
status during the SSR. This allows to debug multiple crash issues,
where WCNSS SSR dumps are insufficient to conclude why FIQ is not
reaching the WCNSS from HOST and why SPM is stuck.
CRs-fixed: 487483
Change-Id: I14bae1d0e99d5345b298c97917b23d246f0fef25
Signed-off-by: Naresh Jayaram <njayar@codeaurora.org>
WCNSS Firmware needs raw NV data (settings & some register values),
to do the power-on calibration. Once firmware does the power-on
calibration; it can then re-use the calibrated data. And it need not
do the calibration again when the next time it boots. WCNSS sends this
calibrated data to Apps; and Apps saves this into a persistent area.
And in the subsequent bootup, Apps sends the calibrated data to WCNSS.
Add interfaces to read calibrated data; and also add inteface to write
calibrated data to platform driver.
Change-Id: Ic18d40150093024b10a53e28f8a423dd9d3846eb
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
NV download is not done by WCNSS platform driver during SSR. After
SSR WCNSS depends on WLAN driver to load NV image.
Change-Id: I2c3f64aa94634b89b1f191d56748e8cf7b71cdc5
CRs-fixed: 457015
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Reset interrupt is sent to WCNSS when host drivers fail to
communicate with WCNSS over SMD. So log certain Pronto registers to
know the failure reason at Pronto. Similar debug mechanism is already
added for Riva. The same WCNSS registers are also logged in watchdog
bite handler.
Change-Id: I0ef4256b9702a61785e9ca2f0ccbf9f947d6dfa7
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Notify WCNSS when the Kernel is suspended and also when it resumes.
Certain notifications from WCNSS are not required when Apps is
suspended.
Change-Id: I4e237d4793803798c599d4659bb2d7c0e496a393
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Add wcnss reset interface, this interface generates an FIQ to Riva.
Upon receiving this interrupt, Riva will execute the ERR_FATAL
routine and invoke SSR.
Change-Id: I74c293121cb69b312ed980902a12019adb700792
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
WLAN driver will use this pre-allocated memory (when available) for
large memory allocations; this will prevent WLAN driver load
failures because of the un-availability of the large size slabs
during module load.
Change-Id: I8a8139bdf343ddc871036f6d5c6ab90993816de0
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
wcnss related host drivers can use these APIs to prevent Apps suspend.
WLAN driver uses this API to prevent suspend, when it's module
initialization routines are being executed.
Change-Id: Id072804e6ccc953c78caf6cf11c73e0ea1d71d18
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
APPS vote from coldboot may be still pending when SSR is invoked;
so make sure that the APPS votes from coldboot are cancelled before
SSR votes for these Riva regulators.
Change-Id: I975be7470ce08e941c5846642a9379f23574915b
CRs-fixed: 380434
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
This is the initial version of the Wireless ConNectivity SubSystem (WCNSS)
WLAN driver. The WCNSS is a new Hardware integrating WLAN, BT and FM
technologies that is built into new MSM chip. This version of the driver
does basic WLAN device detection, WLAN SMD channel allocation probing and
trigger the PIL to download the WCNSS SW image.
Change-Id: I054566453152e8d8d02f79693e6a51f26d047835
Acked-by: Jeff Johnson <jjohnson@qualcomm.com>
Signed-off-by: Yunsen Wang <yunsenw@codeaurora.org>