ASoC: msm8974: Update PCM MUX for 8974Pro variant

MSM8974Pro aa/ab/ac have different addresses for MUX register
which selects the same set of GPIO lines between PCM and MI2S
devices. Update PCM/MI2S MUX register addresses for MSM8974Pro

CRs-fixed: 563134
Change-Id: Icec7bcd77fe59f6f10474fd99aa2f37955d9afc1
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
msm: mdss: Increase max BW cap for low kbps to 2.75G

Increase the bandwidth cap for low kpbs to 2.75G to support. This allows
the following use case to go through MDP:
* 2xRGBX_8888 full screen layer WQXGA resolution
* 1xRGB_888 full screen layer WQXGA resolution

But still fail other use cases that could lead to underrun.

Change-Id: I826b014d663ff69c1611e9463088ba712f40efc8
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
arm: dts: msm: update SPM sequences for krait v2.x

KPSS v2 implemented HW Sequencer to switch Krait power gate
modes. SPM toggle one power control signal to switch to RET/PC sleep.
If the SPM power control for the h/w sequencer is asserted for only
3 AHB clocks, a single cycle pulse is generated which latches the
newMode. The newMode is latched even though the h/w sequencer is
not idle. This causes the state machine to get stuck in LDO_PD state.

Update the retention SPM sequence as recommended by cpu design team
to avoid the issue. Power collapse sequences are already up to date.

CRs-fixed: 566952
Change-Id: I8fe74acf06d67b490f927b504e3aba266667cf9f
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
avtimer: Update avtimer driver to parse driver tree data

LPASS exposes registers from which timestamp can be
read by clients for audio & video synchronization.
Change adds to retrieve the register address of AV
timer in LPASS passing from driver tree data.

Change-Id: Id7cf3455e22ddc27f5350a7a37c3b40d44eb0873
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>

avtimer: Update avtimer driver to support Qdsp6v2

AVtimer in Qdsp6 provides the timer ticks for synchronization
of audio and video streams for capture and playback use cases.
Qdsp6 AVtimer interface has been updated for v2 version.
Update avtimer driver to support Qdsp6v2.

Change-Id: Ia68b04421edf13a96685654761bb71b866a5327b
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>

defconfig: 8974: Enable AV timer

Change enables AV timer driver which provides audio
and video synchronization clock support

Change-Id: I318de660e6f52d0c62bafc5cb2c9907fe007c997
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>

ARM: dt: msm8974: Add AV timer specific data

LPASS exposes registers from which timestamp can be
read by clients for audio & video synchronization.
Change adds the register address of AV timer in LPASS.

Change-Id: Idee2aeb3cb73fcbca37976629c798abeae544774
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>

avtimer: fix uninitialized variable compilation warning

Fix the following compilation warning in the avtimer driver:

kernel/drivers/platform/msm/avtimer.c:
	In function 'dev_avtimer_probe':
kernel/drivers/platform/msm/avtimer.c:316:
	warning: 'result' may be used uninitialized in this function
error, forbidden warning: avtimer.c:316
make[5]: *** [drivers/platform/msm/avtimer.o] Error 1

Change-Id: Ia760ba174e36bbcd63ed1c18cfcdce4308c825e1
Signed-off-by: David Collins <collinsd@codeaurora.org>
msm: krait-regulator: handle efuse differences

Scaling factor version is valid for
- 8974 based devices when the version bits read 1
- 8974pro based devices when the version bits read 1 or 2
- 8084 based devices when the version bits read 0
- 8092 based devices when the version bits read 0

Moreover the three bit scaling factor data for
- 8974 based devices starts at bit 16
- 8974pro based devices starts at bit 16
- 8084 based devices starts at bit 14
- 8092 based devices starts at bit 14

Update the code to handle these differences.

CRs-Fixed: 614657
Change-Id: I30c65026341ece9a03f88514127b563417df46ee
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
ARM: dts: msm: Add new property to specify OCMEM size

OCMEM is required by video hardware to deliver optimal
performance mostly at higher resolutions/fps. For targets
which have low specifications, OCMEM is not needed or not
needed as much as for higher targets. This change adds the
property to dtsi file to specify the size of OCMEM.

Change-Id: I65ae271bc73d302975957727a95461c7388727f6
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
ARM: dts: msm: Move audio heaps over to use reserved CMA regions

Carveout regions are being deprecated. Convert the audio heaps over
to use a reserved CMA region instead of a carveout. At a later time,
the audio regions may be converted over to a fully functional CMA region.

Change-Id: I70d9c671ff118400ee60e669062a7b2092931536
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ARM: dts: msm: Update size of modem pil heap

The modem pil heap size was incorrect. Updating the
size to reflect the correct size.

Change-Id: I1ec2a907ec1e1b74e31cbe1c23817b25057237bb
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
ARM: dts: msm8974pro: Make 307MHz the BIMC vote floor

Needed to enhance modem stability.

Change-Id: I09b3ccf9a0f36a2b791c3d3030de0f59cd31eb8c
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
ARM: dts: msm8974pro: Add AB value for the lowest BIMC vote

Bus usage needs to be taken into account on the lowest BIMC vote
to prevent underrun for other bus users. Add default vote to be
taken into account in the BIMC AB calculation.

Change-Id: I73a92116f3e0665495bb085008a8bc34128b1941
Signed-off-by: Patrick Cain <pcain@codeaurora.org>
ARM: dts: msm8974pro: Update max-hw-load of venus

Update the max h/w load supported by venus firmware.

Change-Id: Ie3e6fe98fb3925a4fd7b287bee6853c3ba1b5458
CRs-Fixed: 640961
Signed-off-by: huiy <huiyQuic@codeaurora.org>
ARM: dts: msm8974pro: Make 307MHz the BIMC vote floor (fix)

Needed to enhance modem stability.  Lowers the occurence
of modem read/write latency spikes.

Change-Id: I09b3ccf9a0f36a2b791c3d3030de0f59cd31eb8c
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
ARM: dts: msm: Remove VADC and BTM thermistor channels for PM8941

MSM8974 PRO AC device uses PMA8084 and PM8941. On
PM8941 thermistors are not connected to any channels.
Removing these channels will avoid reading incorrect
values.

Change-Id: I5e939da91bf0f39f2a61b9cccfef9c737c621b7e
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
ARM: dts: msm: BIMC for 8974 class devices

Map memory for tools to access BIMC facilities.

Change-Id: I4f3286f4aae47e181d7cde3f303a4ca995b5da52
Acked-by: rahul ramasubramanian <rahulr@qti.qualcomm.com>
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
ARM/dts: Set ref clock to 24MHz for msm8974

Set ref clock rate to 24MHz for 8974 platform for ref clock
based SOF/ITP generation. Otherwise enumeration of peripherals
will fail.

Change-Id: I8425e82f5ceaf3a8bcb4a5d1a3ccc7954e44d752
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
ARM: dts: mdss: Add boolean property for LUT readability

LUT read is not supported by hardware in the case of msm8226.
Adding property to dtsi file to denote the absense of support
for read in hardware.

Change-Id: I29cf869af4135e1199bc0feb4369700b994520ec
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
msm: mdss: Configure minimum voltage for CX power rail

For smart panels, we observe abnormal waveforms and
unexpected voltage spikes on DSI data lanes when the cx
power rail goes to minimum voltage. Vote for the cx
regulator in mdp3 driver and control the voltage to
avoid frame shifting.

Change-Id: I8ce8d7621f903966f519da563a9c57701146be24
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
ARM: dts: msm: Update MDP writeback QoS configuration

Right now, writeback QoS registers are being programmed dynamically
when respective paths are being exercised. Starting 8916, wb QoS
is starting to differ from other chip-sets and since these are
chip-set specific settings, hence configure them using device-tree.

Change-Id: I7eb3717e3756f1eb09c0f1e972fc326854b8ee37
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
ARM: dts: msm: Add support for second qcrypto device for 8974

Add entry for a second qcrypto instance that uses a different
pipe pair for data transfer to/from CE hardware. This will allow
clients to use different PIPE key register set intended for a
different use case.

Change-Id: Ibdf5ae10de63f1a26ce37ab9b74e4a60346cc105
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
ARM: dts: msm8974pro: Update BW votes to reflect clock plan

Either 931MHz or 800MHz is the turbo BIMC frequency, but both
do not exist in the same build.  Just request 931MHz.

Change-Id: I4b587e08689f9baa6e1088388d2748a298e7c916
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>