Added device tree binding documentation for CS40L25, CS40L25A and
CS40L25B devices.
Change-Id: I4b809d34aad193915f25044ade404db83d6aa3ad
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Removed extraneous variable initialization from cs40l20_init and moved
linked list initialization to cs40l20_i2c_probe so that cs40l20_init is
limited to device configuration only.
* Limited REFCLK configuration to revisions A0 and B0 of silicon because
revision B1 ROM handles it automatically.
Change-Id: I5e626f5476cad4d1b1f5bc359714cf04c0425f1f
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Separated DSP initialization into its own function and qualified the
silicon revision to determine the appropriate firmware file and boot
sequence.
Change-Id: Ic2d50e8604d390877cf431811963d95be72d1ba6
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Changed regmap cache type to REGCACHE_NONE to disable caching of
chip-level registers outside the DSP.
* Removed cs40l2x_reg array and cs40l2x_volatile_reg callback.
* Added macros for register addresses introduced with B0 silicon.
* Removed unused register mask/shift macros.
Change-Id: I3e47e265d413a7c22b59abb761ef066074f928d2
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Updated the qualification of the device ID to include part numbers
programmed by the OTP controller (e.g. revisions B0 and B1).
* Conditionalized OTP memory unpack and application of errata based
on silicon revision.
Change-Id: I7c8c6f194c6f300e632b3382dca5f54eed6f6603
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Renamed all files and namespaces from cs40l20 to cs40l2x.
* Added platform driver entries for CS40L25, CS40L25A and CS40L25B.
* Updated copyright year to 2018.
Change-Id: I2b2266a9870e713d454bee3cfc3e01e5e53bc191
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Added a check for the expected revision of silicon.
* Added support for revision A0 errata.
Change-Id: Id647367a23d1856ee3c61c0b2e83d4ed71584f09
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Exposed the firmware's click compensation enable control as a sysfs
control.
Change-Id: I9cbc4454c52277eee486dff80c19de481d3668a0
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Corrected the calculation of algorithm revision
* Limited the comparison of algorithm revisions to the MAJOR field
Change-Id: I903802f98c472109aa5d62915ab611b1ff869c80
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Replaced printing of wavetable entry count with the num_waves sysfs
control.
* Removed printing of custom/default wavetable notification as existing
request_firmware_nowait already prints in the case of failure.
Change-Id: Id86ad20d12bb23b029338c0b847ecdeb80248cfa
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Exposed the firmware's heartbeat register as a read-only sysfs control
and printed the firmware revision number at startup.
Change-Id: Iaf844e72b2f2618a7c67156432c63e2375c388ab
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Added a means to reject user-provided wavetables that do not match the
algorithm ID and revision advertised by the firmware.
* Added a means to calculate the maximum allowable wavetable size for a
given revision of firmware, and then reject user-provided wavetables
that exceed the calculated limit.
Change-Id: Ib1d04bdc5f8d6c2150cd1d313a3f61178adeffe6
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Added the redc_stored sysfs control to expose access to the firmware's
stored ReDC input parameter.
Change-Id: Ifb6ca330f9b1a546c024d9e066dbb4da5fafe4c6
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Corrected various register default values, updated the list of registers
marked as volatile and removed some inapplicable register macros.
Change-Id: I51ca890aaa98001e85728a113670a391911b00a1
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Exposed a means to apply attenuation to the device's digital signal
path with the dig_scale control.
Change-Id: I66cd3bc425e770faf8b2ee0fd89ffbb20a394d5c
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Added precious_reg regmap callback to prevent the device's OTP memory
from being read outside of the driver's control.
Change-Id: I1dbd76a1d918187d8e2d9757b26785aad5484dba
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Updated the initialization sequence to apply trim data stored in
OTP memory.
Change-Id: I4854fe8ee394d04522c7db540b68b270a674901b
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Added a timeout loop to allow the firmware sufficient time to load
after the DSP is enabled.
* Increased the minimum supported firmware revision to 0x000205.
Change-Id: I7403060a7ea11a19efb9debdd4c3aac694662b6e
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Preserved device state correctly if new work is scheduled before
diagnostics is cancelled.
* Removed hard coding of diagnostics trigger index.
* Updated minimum supported firmware revision to 0x000202.
Change-Id: I5b667cf32a588e329eb03face69ad8e7e0a13e71
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Rearranged entry into and exit from closed-loop mode
* Checked for mutex lock in f0/ReDC capture function
* Moved mutex init and destroy to probe and remove, respectively
Change-Id: I38d83e9eb3881f833bf000ce760f4a8fda7fa17f
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Added support for diagnostics stimulus generation as well as f0
and ReDC reporting.
Change-Id: I0a496501cc229026897865cca2333ba0a70f8bf0
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Added support for large wavetables that straddle both X memory (XM) and
Y memory (YM).
Change-Id: If946713744228a1010ff12715548c74a76fa3a85
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Allowed for the MSB of the cp_trigger_index sysfs control to indicate
that playback should be rendered until forcibly stopped.
Change-Id: Ic9c0111a7b4110d482174bfd475697bb2ac2c17a
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
* Added missing mutex lock/unlock around regmap access.
* Changed waveform index store functions to use an unsigned int.
* Added measured-f0 show function and stored-f0 show/store functions.
Change-Id: I00eb137ee65bb863d3208b0a1ab3b5e3f7464fbe
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Converted loop counters used in for statements from unsigned int to
int as per style guidelines.
Change-Id: I102f9bfc955c8b00adae381854104c04fc7484fa
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Replaced references to algorithm control register addresses (which vary
with each firmware build) with their corresponding human-readable
control names (which are fixed).
Change-Id: If373845874353d121470c9071342bb03fa9667ec
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
It's a workaround solution, these removed codes cause
spi communition error and need to be reviewed by cirrus..
Change-Id: I6632023de8c874bfabecf81ffef27c368e4a18f9
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1182137
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
For river, only 1 FB notification got when boot up.
Set this counter to 1 to enable auto FW update.
Change-Id: I87cc21d481f8790e6b273741cf3236ad5f2c25d9
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1181635
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This Patch should be revert.
Add this init Fw only for Factory SW.
Change-Id: Ied7ee9b5e7d716e48a768bfcff743d7dc7c0f690
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1181634
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
In situations were multiple devices are using ADSP cores in
the system it is not safe to modify the global list of controls
in the case of custom firmwares. Fix this by creating local
copies of the firmware enumeration and control data structures.
Change-Id: I9acc29397e49ea902819e19ad7e238ffa984136d
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1177442
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
If the control contains any large regions and memory is
heavily fragmented the allocation of a single buffer for
the region data can fail. Avoid this by splitting the
data into page-sized chunks.
Change-Id: I10cc9312a80bf863e00b6ba63dc737212d756339
Signed-off-by: vkarp <Vlad.Karpovich@cirrus.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1177441
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
If the binfile contains any large regions and memory is
heavily fragmented the allocation of a single buffer for
the region data can fail. Avoid this by splitting the
data into page-sized chunks.
Change-Id: I45c62ae04409bbcfbc5280f89ef0da5e68dc1bf4
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1177440
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
Move the loop which buffers and writes wmfw data out
into a separate function so that it can be re-used for
other purposes.
SQA-952
Change-Id: I19b5666d974bd5db5b08b2081a61d39da0af0e83
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1177439
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Rav(CR) Vembu <raviv@motorola.com>
Submit-Approved: Jira Key
Port watchdog_cpu_ctx functions to SDM845 and also
make it a loadable module.
Change-Id: I35f53a75b4e58ae0a59fe14491e9c70bc69a19a0
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1144236
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
This patch port synaptics_tcm_v1.0 origin code.
First line of release_notes.txt is:
v1.0 Mar 09, 2018 scott.lin@tw.synaptics.com
Change-Id: I0f83d23bce4375c609d09ef1f413627fce5f60b7
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1171049
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key