Ghost image is displayed on R69006 panel after certain
operations in some extreme cases. Fix this issue by
optimizing its flicker value.
Change-Id: Id36dcc67a419123c2ef45cbecf4c592222d95a2b
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflicts]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
commit 269a1b78 "usb: gadget: Add support for DMA mapping
optimization of request buffers" added checks to
usb_gadget_{map,unmap}_request() to support the pre-mapped
DMA buffers that a function can map ahead of time before
enqueing the request. However, these routines check the
req->dma for a sentinel value, DMA_ERROR_CODE, in order to
determine whether or not to proceed with dma_map/unmap().
This means that UDC drivers should initialize to this value
when allocating each new request. Do this in the dwc3
gadget driver in order to properly support this. This fixes
an issue in which usb_gadget_unmap_request() was incorrectly
being called on an uninitialized (as 0) req->dma address,
and proceeds to call dma_unmap() which interprets it as
physical address 0x0.
Change-Id: I514d2b824e272c6c42c483febaa1c4084b0d09ee
Signed-off-by: Jack Pham <jackp@codeaurora.org>
In order to improve performance, this patch enabled mapping of USB request
buffers in advance, before queueing them to the HW. This can be used when
there is a pool or pre-mapped request buffers so we don't need to map it
again every time the request gets queued.
Change-Id: Ic3a6db749343ef1345e0816210517755aee055b3
Signed-off-by: Danny Segal <dsegal@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
NULL pointer crash is seen when starting USB QDSS data transfer
from usb_qdss_connect_work() as cdev was not updated. Issue can
be fixed by updating cdev from qdss_bind(). It seems that cdev
has been used couple of places to provide gadget related information.
Hence removing usage of cdev from qdss data structure and use gadget
directly.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change enables USB BAM driver (CONFIG_USB_BAM) and USB QDSS
driver (CONFIG_USB_CONFIGFS_F_QDSS) for BAM2BAM communication
between USB and QDSS peripherals.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
USB BAM driver is accessing some of APIs which are specific to
CI controller. Hence add definitions of those APIs as No-ops
when CI is not enable to compile USB BAM driver.
Change-Id: Id121f042023f4a176936c8b575613244ec46de7f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
- This change adds configfs usage with USB QDSS driver.
- It removes all different supported control and data transports
and assume BAM2BAM as default mode.
- It also removes supported DPL functionality from this driver.
Change-Id: I9678c9e9a397445f36272616e517bbb83a59e88a
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This change adds USB QDSS function driver which is used for
USB QDSS functionality. This snapshot is taken as of msm-3.18
kernel commit d5809484bb1b.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Add USB BAM driver used which allows USB BAM to communicate with other
other peripherals (e.g QDSS or IPA) BAM.
This snapshot is taken as of msm-3.18 commit d5809484bb1b.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
HW MAD bypass feature is to facilitate input to CPE by avoiding
MAD in codec. This is done by routing DEC1 data to CPE. Add the
required changes to support this feature.
CRs-fixed: 938514
Change-Id: I7788b1475cd22bdea291bcae47f048131b220ce3
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
When vdd micbias is connected to regulator, need enable
regulator when micbias is needed.
To detect special headset, micbias need to be set to 2.7v.
Regulator need get enabled before special headset detection.
Change-Id: Iae361cabf7b5194e12f5ddc8e32d60cf94bf28c3
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Add new channel to be able to communicate with SLPI processor
and do remote procedure calls from Apps subsystem. The Apps
and SLPI subsystems would use the memory from ADSP ION heap
for sharing the input and output buffers.
Change-Id: I186ec8e7769011d7aeeba149017f1555f2d84ed7
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Remove IOMMU domain adsp_shared_domain as domain is created
at runtime.
Change-Id: Ic5e4aa9f05167be7c721b3c1fd71ab889c1fcd1d
Acked-by: Himateja Reddy <hmreddy@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Calling find_vma() with out holding the mmap_sem semaphore is
not safe especially when an another thread could be removing
vmas from the list. Remove find_vma in places where it is
being used just for debugging purposes.
Change-Id: I1ac12410a0880d92c7301065aa656b5ad8d521cf
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Update the compatible string and clock name to upstream.
Change-Id: I693dd6df9e272a09748d74d7ed9d76fe294ec7ee
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
The rest of the driver started using CONFIG_QCOM_KGSL_IOMMU. The
replayed MMU changes didn't get the memo.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Enable compilation of the CPRh KBSS regulator driver to manage
power requirements of the KBSS subsystem in the msmcobalt chip.
CRs-Fixed: 967275
Change-Id: I8d0195bfe70148937f5f375e2caf2431e4fcde54
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Auto update for the mismatch seen with following defconfigs.
- msm_defconfig
- msm-perf_defconfig
- msm_cortex_defconfig
- msm_cortex-perf_defconfig
Change-Id: Ic702802d48465011b5c15a862c0d12e8536c5139
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
qpnp-power-on driver have been moved to drivers/input and no
longer present under drivers/platform/msm. Move the DT binding
documentation as well there.
While at it, fix the indentation so that it pass checkpatch.
Change-Id: I32f416d32a57d7c447563d26e4dad24605cdce50
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Device tree bindings documentation for qpnp-revid/coincell are
missing. Add them. These files are taken as a snapshot from
msm-3.18 commit d5809484bb1b (Merge "msm: ipa: fix race condition
when teardown pipe").
Change-Id: I79eeff64e655808414dd23882939bd952e4e279a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Mutual exclusion between APM switching and LMH register accesses
is only required for HMSS version 1.2 and below on MSM8996. It
is not required for HMSS version 1.2 on MSM8996-Pro. Add support
for MSM8996-Pro so that the LMH mutex is not locked during APM
switching on MSM8996-Pro parts.
Change-Id: If09454827ed12c4d436c2fc792f5adcd45ef4312
Signed-off-by: David Collins <collinsd@codeaurora.org>
Adjust the floor, ceiling, and open-loop voltages for each corner
of each CPR3 regulator based upon aging measurements. This
allows the fixed open-loop voltage adjustment to be reduced since
it no longer has to account for the maximum possible aging
adjustment. This in turn leads to more situations where LDO mode
may be used for the HMSS CPR3 regulators since the LDO must
always operate at the open-loop voltage.
Change-Id: Iaca0ed4b51f258656b5c44dc58f7361814ca3af7
CRs-Fixed: 949622
Signed-off-by: David Collins <collinsd@codeaurora.org>
Change 64fec1f302ee21759bb4c6d7178a5d8a0aefe779 ("regulator:
cpr3-regulator: add support for CPRh-compliant controllers")
refactored cpr3_parse_common_ctrl_data() and introduced a bug
returning the error code after a VDD regulator get failure.
Fix this.
Change-Id: I486151ce61dab3c3f5a05daa2325386aacdd9960
CRs-Fixed: 984037
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
MSM8996-Pro chips with HMSS CPR revision 1 will also utilize CBF
voltage offset fuses. Update the fuse presence check to include
this revision.
Change-Id: I8a9cd45a961948b39d3ed4cadf1a91706041c9c3
CRs-Fixed: 980901
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add support for the CBF open-loop/closed-loop voltage offset
fuses found on MSM8996-Pro chips. These fuses define independent
open-loop voltages and closed-loop target quotients for the power
cluster and CBF clock which share CPR hardware thread 0. This
independent fusing ensures optimal VDD supply voltage for all
power cluster, performance cluster, CBF corner combinations.
Change-Id: I2e309d683f853f8bd9fd4eb6d12b05c32c7aaf26
CRs-Fixed: 980901
Signed-off-by: David Collins <collinsd@codeaurora.org>
Augment the cpr3-regulator driver to support controllers with full
hardware CPR operation also known as CPR hardening. Also, introduce
the cprh-kbss-regulator driver to handle CPU subsystem specific power
requirements of the msmcobalt chip.
Change-Id: Icac84f9533fa1895ca2466a3793ddaa8b7a4c89c
CRs-Fixed: 967275
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Voltage boost is a CPR4 hardware feature which raises the VDD supply
voltage when the number of active cores reaches a certain threshold.
It then reduces the voltage back down when the active core count
condition is no longer met. Add support to enable and configure this
feature.
Change-Id: Iccfc2ddddb6621a150235cb2c46adfd1b884dbc2
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Add support for hardware managed per-online-core and per-temperature
voltage adjustment. These adjustment methods may be used together or
independently. The configuration data for these adjustments including
the amount of adjustment for a given corner should be parsed from device
tree. Update the cpr3-regulator driver so that it writes the adjustment
values when enabled into the SDELTA hardware registers.
Change-Id: Idae9018f6a185202d38d210834ca337991fe83d9
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
MSM8996-Pro chips contain a fuse which defines the GPU speed bin.
Each speed bin supports a different GPU maximum frequency. Add
support to read this speed bin fuse and use it to parse device
tree properties appropriately.
Change-Id: Ib9b0ba170287ae30802bdb0c64faead8c9bdee8c
Signed-off-by: David Collins <collinsd@codeaurora.org>
The lower Turbo fuse corner reference voltage for speed bin 1
with CPR revision >= 5 only applies to MSM8996v3 chips. It
should not be used on MSM8996-Pro chips. Therefore, add support
to distinguish MSM8996v3 from MSM8996-Pro and add a V3 check
to the reference voltage selection logic.
Change-Id: Iae7d49fe1b2539727160649cbf60ce57b73d639e
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add TTW configuration for PMI8950. Also, add a DT property
(qcom,labibb-ttw-force-lab-on) to keep LAB always-on in TTW mode.
Presently, this property is only required for PMI8950.
CRs-Fixed: 958285 962662
Change-Id: Iec79a6f752067d96fc62a8e9d629c39f4db5ab9f
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, fan53555 regulator driver always registers for
set_suspend_voltage. This force configures the regulator to
set suspend voltage switching to a different voltage selector.
However, this might not be preferred for certain applications.
Add a device tree parameter "fcs,disable-suspend" for the
regulator which when specified will disable suspend voltage
configuration.
CRs-Fixed: 968575
Change-Id: Ib9f450126482e606f3e057857b7a58800583519a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Halo HL7509 is a digitally programmable buck converter that
outputs a voltage from 600 to 1230 mV from an input voltage of
2.5 to 5.5 V. Since the register mappings are compatible with
FAN53555, add a new vendor ID to support it.
CRs-Fixed: 968575
Change-Id: I0083a7ada311d624731e43755cfd371b2364fb39
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, fan53555_parse_dt() does a platform data allocation in
addition to reading device tree parameters. Move the memory
allocation out of fan53555_parse_dt() and change it only to parse
device tree parameters to match its name. This helps to expand
the function to read other device tree parameters.
CRs-Fixed: 968575
Change-Id: Id876d54bede15c73a298a6bfa68af7097115e36b
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, rslow compensation active settings are applied and
cleared based on certain conditions. However, if the device goes
for a reset, the flag used by FG driver to save the setting done
will vanish. For e.g. if an active setting is applied and the
device goes for a reset, even if there is a condition present to
clear the active setting, it will not be applied. This is due to
the fact that the flag (rslow_comp.active) is not set in first
place even though FG HW has that setting applied. Fix this by
reading rslow configuration during hw_init and set the flag.
CRs-Fixed: 977626
Change-Id: Ib6d9f7d79335b027f7ed7ee24dfd5c9bb303228d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Update the fast-charge configuration for SMB1358 used to
index into the battery charge-current.
CRs-Fixed: 978046
Change-Id: I31ffc03d083c955ac1fdcf79ba5287a0107d3524
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Add ability to configure the polarity of enable-pin in
parallel-charger configuration.
CRs-Fixed: 978046
Change-Id: Ied82dff7afeaa58ea0815f555791c9a0d15e926a
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
If insert HVDCP charger when device in sleep, kernel wakes up by the
interrupt and after DCP being detected, there is a chance that kernel
going to sleep again and hvdcp_det_work won't be run. This causes the
HVDCP detection failure and stay at 5V to be acting as normal DCP.
Hold a wake lock before schedule the hvdcp_det_work, and release the
wakelock after it being detected.
CRs-Fixed: 966430
Change-Id: I7ca503a5656ab9031d409079421a24710f2996e6
Signed-off-by: Chunmei Cai <ccai@codeaurora.org>
Currently, ESR is being under-estimated when the battery state of
charge (SOC) is less than 2%. Add a change which can do tuning to
use default ESR values when SOC is less than 2% and switch back
to ESR extraction when SOC goes above 2%. When the SOC is greater
than 2% and less than 5%, apply slow settings for ESR pulse. When
the SOC crosses 5%, apply the default settings.
This will allow the SOC to increase more accurately when the FG
starts with a better ESR value. This feature is supported via
device tree property "qcom,esr-pulse-tuning-en".
CRs-Fixed: 953448
Change-Id: I37da8d2a9d795dc3d4daffeaf80a72d188243bfd
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, a battery profile is loaded when the profile integrity
bit is not present, a new battery is inserted, or battery voltage
is not in range across reboot. When the battery profile loading
happens after the device has booted up, the charger driver is
notified to disable battery charging.
However, in cases like offline mode charging, the device can boot
up again with charging enabled causing battery parameters to be
modified even before the charger driver can probe. This causes
a jump in state of charge (SOC) across reboot and causes the FG
to restart. To help with this scenario, make sure the charger
driver is ready, and charging is kept disabled before the battery
profile loading process start. Enable charging back when there is
no need to reload the battery profile, or the FG has restarted
and the first SOC estimate is done.
CRs-Fixed: 953448
Change-Id: I90b1c81ce502c0f6e96feab3b23cff61054422cb
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
When the charger driver haven't been probed yet and batt_psy is
unavailable, batt_profile_init is rescheduled as it depends on
the charger to disable charging while loading profile. However,
this adds a constraint that SRAM parameters needs to be updated
every time just before batt_profile_init is called again. Else,
stale SRAM parameters will be used to decide whether the battery
profile can be loaded or not.
Hence, cancel and schedule the update_sram_data work whenever
battery profile loading is rescheduled again.
CRs-Fixed: 953448
Change-Id: I6e1108601baf744014227155b7b09e0ec4a0a9bb
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
The battery missing detection (BMD) is incorrectly
being enabled. Fix it.
CRs-Fixed: 943881
Change-Id: I58407f0b6ca376bc4809073144429cd4cc3483c9
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
This devicetree documentation snapshot is taken as of msm-3.18
commit 96a424f00642 (regulator: cpr4: Fix highest voltage corner
open-loop voltage calculation).
Change-Id: I7d65e33e9e501a9175730df676490189effbfd44
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This devicetree bindings documentation snapshot is taken as of
msm-3.18 commit 96a424f00642 (regulator: cpr4: Fix highest
voltage corner open-loop voltage calculation).
Change-Id: I9b62013a8049c3a22a62b34cd06b87245bcdc5de
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This devicetree documentation snapshot is taken as of msm-3.18
commit 85b7eb8ac225 ( Merge "ASoC: soc-core: Fix integer
overflow").
Change-Id: I06a15d2668de59db8fca3cae0b69f5d0d3351e05
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>