Efuse parameters are used to update qusb analog tuning values.
Change-Id: I4bc919ba7cf24d73cbc6cac392e00f81005bf64c
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Tune1 HSTX_TRIM parameter varies from part to part and needs to
be programmed using fused values. Update the code to read
the efuse register and update tune1 parameter. On previous
platforms this used to be tune2.
Change-Id: I7a2efa3c2409ba5dbb1ae9581738518b9457a971
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Update the sequence to include tune1 and tune2 parameters. While
at it update the comments to include register names.
Change-Id: Ib8ff42a6e05c0065b19e977eb56f6b96a78fcf39
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Update the tcsr_clamp_dig_n signal and phy init sequence
to reduce the random leakage from qusb2 phy. Random leakage
can result from turning on/off analog power rails
before/after digital power rails.
Change-Id: Id51a2d34f61c0a41891551d15b706872abf13809
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Analog and digital power rails connected to the phy can be turned
on/off in any order. This may result in random leakage in the phy
as it expects certain power rails to be on/off in certain order.
Avoid random leakage on qusb2 phy by
1. Disable pll when phy is suspended/disconnected.
2. Reset and assert clamp dig_n signal to put dp/dm lines in high
impedance state.
Change-Id: I1bafa7f824af8bbb3f67a71b81bf23b0a9c7164e
Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
Update dai driver and machine driver to enable multichannel
support for tunnel USB.
Change-Id: Ia43ea11719691a2869d6621d22c134f8a191ad35
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
xdci release function is called during xdci connect
failure cleanup. A bug passing the tethering protocol
to the function instead of the tethering type caused
it to fail and cease the cleanup operations.
Change-Id: I6337f93c13678c9256dfd46825f9a317cdaa0a1b
CRs-fixed: 1057013
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Currently the timeout period of IPA resource add dependency
is HZ jiffies (1 second). We have seen situations
where this timeout period is too small especially on heavy
loaded system with debug log enabled.
Enlarge the period to 5 HZ jiffies.
Change-Id: Ia678276ed1c3c223b1cedd1e6e8713ca06aefd14
CRs-fixed: 1057013
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
During SSR, we observe cases where card enter bad state
and does not responding to any I/O commands. Fix it by
powering off and on the card.
Change-Id: Ia3ab2781c93d1cfe7427e2b1c2644f6628f6465f
CRs-Fixed: 1058794
Signed-off-by: Komal Seelam <kseelam@codeaurora.org>
DMA coherent allocation was done with inappropriate
flags causing memory allocation to fail occasionally.
Use GFP_KERNEL flag as well as fix up some cleanup
actions.
CRs-Fixed: 1060305
Change-Id: I93c9340439dd65c50764dd078071bf66f65a9464
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
The DTEST1 rail selection value in the MODE_CTL register is not 0. Use
the proper offset value when calculating the value to write into the
MODE_CTL register.
Change-Id: Ia09aa072116d244abdd7ad0d92cc55e0aeba8efc
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Currently, the driver selects dtest rail specified in "qcom,dtest"
property as the output source in digital output mode. Add another
property "qcom,dtest-buffer" to specify which dtest rail to feed
when the pin is configured as a digital input.
Change-Id: I9e1ae5a64d633c7cdc6a1eb710932ca19ef5fe85
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Write drive-strength setting into SINK_CTL register to make sink
function work.
Change-Id: I0b6e273b846a8e07c5b36d03a20edddfd895e9c0
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
The drivers don't really need to know which PMIC they're for, so
make a generic binding for them. This alleviates us from updating
the drivers every time a new PMIC comes out. It's still
recommended that we update the binding with new PMIC models and
always specify the specific model for the MPPs and gpios before
the generic compatible string in devicetree, but this at least
cuts down on adding more and more compatible strings to the
drivers until we actually need them.
Change-Id: I4ea4c511108f37cbfae0a5ccaaaeadadcae37254
Cc: <devicetree@vger.kernel.org>
Acked-by: "Ivan T. Ivanov" <iivanov.xz@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 647dbd1e84871f6c0548f7fbb46eefc4da21f783
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
of_irq_count() is not an exported symbol (and it shouldn't be
used by platform drivers anyway) so use platform_irq_count()
instead. This allows us to make the qcom pinctrl drivers modular
again.
Change-Id: Ia2d8a0fc303af5ce6d34703f63bc61dfa0e5d148
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn@kryo.se>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: a5ea13f025e7bf3bb280a22f5fe63b7159358932
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
A recent patch added calls to of_irq_count() in the qcom pinctrl
drivers and that caused module build failures because
of_irq_count() is not an exported symbol. We shouldn't export
of_irq_count() to modules because it's an internal OF API that
shouldn't be used by drivers. Platform drivers should use
platform device APIs instead. Therefore, add a platform_irq_count()
API that mirrors the of_irq_count() API so that platform drivers
can stay DT agnostic.
Change-Id: I34cfc11feb2fbc2acc41e3697006d86a3cad3445
Cc: Andy Gross <andy.gross@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: 4b83555d5098e73cf2c5ca7f86c17ca0ba3b968e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
The number of interrupts is always equal to the number of pins
provided by the PMIC gpio and MPP hardware blocks. Count the
number of irqs to figure out the number of pins instead of adding
more compatible strings or doing math on the reg property. This
should make the code more generic and ease the number of changes
we have to make to the driver for each new pmic revision.
Change-Id: I52ce5ad8a5c4a79187dc94403dc0704d83f0549c
Cc: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Andy Gross <agross@codeaurora.org>
Reviewed-by: Björn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: ab4256cfeab91569e1d96e7f0014538fe0845259
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[fenglinw@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This algorithm allows for programmable charge current values
based on programmable thresholds on state-of-charge (SoC).
Adjusting battery charge current based on the battery SoC
may lead to extended battery capacity over number of charge
cycles.
Charging profile to be used relies on battery characterization
data from battery cell manufacurers.
CRs-Fixed: 1052854
Change-Id: I8844a3e8428b045514863d72c08f6c6b2b2ac2a4
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Change the ddr width from 8 to 4 for msmhamster, due to
ddr width being halved in hardware.
Change-Id: I40f5972be54393813ad04b07c032f494888ad5e8
Signed-off-by: David Dai <daidavid1@codeaurora.org>
There is delay seen in queueing notification when response is
available after performing function remote wakeup. This change
queues control notification from gsi_resume() for RMNET/MBIM and
ECM case when notify_count is 1 (i.e. remote wakeup is performed
but notify request is not queued.) to make sure that host is
notified before it timeouts for response and starts data transfer.
CRs-Fixed: 1033093
Change-Id: Ic55667df93c8bd51df06b48709bc420c082fbcf5
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
* fix skb->dev vs par->in/out
When there is some forwarding going on, it introduces extra state
around devs associated with xt_action_param->in/out and sk_buff->dev.
E.g.
par->in and par->out are both set, or
skb->dev and par->out are both set (and different)
This would lead qtaguid to make the wrong assumption about the
direction and update the wrong device stats.
Now we rely more on par->in/out.
* Fix handling when qtaguid is used as "owner"
When qtaguid is used as an owner module, and sk_socket->file is
not there (happens when tunnels are involved), it would
incorrectly do a tag stats update.
* Correct debug messages.
Bug: 11687690
Change-Id: I2b1ff8bd7131969ce9e25f8291d83a6280b3ba7f
CRs-Fixed: 747810
Signed-off-by: JP Abgrall <jpa@google.com>
Git-commit: 2b71479d6f5fe8f33b335f713380f72037244395
Git-repo: https://www.codeaurora.org/cgit/quic/la/kernel/mediatek
[imaund@codeaurora.org: Resolved trivial context conflicts.]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
[bflowers@codeaurora.org: Resolved merge conflicts]
Signed-off-by: Bryse Flowers <bflowers@codeaurora.org>
When playing secure content, framebuffer is setup as secure in the
rotator. But the sw timestamp is not going through the secure
route, and must clear out the secure setting, otherwise a smmu fault
will be issued. This fix make sure the secure buffer status is
cleared during the sw timestamp submission.
CRs-Fixed: 1059620
Change-Id: Ifb0f9928fa1d948351e6fc1ad925a070a7f50a96
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
msmcobalt requires MDP clks ON when configuring the retention bits of
MDSS_MDP_CBCR and MDSS_MDP_LUT_CBCR registers, so that the retention
signals can be propagated to memories. This change adds the code
to support the new requirement.
Change-Id: I75b83ce99f061104641188c0f0d3d6cd3e0cfb09
Signed-off-by: Ping Li <pingli@codeaurora.org>
Initialize some local variables before using them and safely return an
error code when encounter error cases in the SDE rotator driver.
CRs-Fixed: 1060558
Change-Id: I25406b13ac2007f1789d8d32e428c39dac4c29cf
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
Add support to enable WDI 2.0 interface on IPA version 2.6.1
which is used in falcon.
Change-Id: Id6460f21245808b739ad215fe8073ae7cae8422c
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
When WiFi is turned off from userspace, save power by toggling
WLAN_EN gpio and restore power when wifi is loaded again.
CRs-Fixed: 1058794
Change-Id: I0257698d9d168d7c889436a05693061cafe5ea7c
Signed-off-by: Komal Seelam <kseelam@codeaurora.org>
Implement new functionality for aborting an ongoing scan.
Add NL80211_CMD_ABORT_SCAN to the nl80211 interface. After
aborting the scan, driver shall provide the scan status by
calling cfg80211_scan_done().
Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>
Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com>
[change command to take wdev instead of netdev so that it
can be used on p2p-device scans]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 91d3ab46730379e89e1e908c6f62fbcadb3d8f08
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: I071841cfea5b0da72f70032d0d99b05678d3d747
CRs-fixed: 930859
Since cfg80211 maintains separate BSS table entries for APs if the same
BSSID, SSID pair is seen on multiple channels, it is possible that it
can map the current_bss to a BSS entry on the wrong channel. This
current_bss will not get flushed unless disconnected and cfg80211
reports a wrong channel as the associated channel.
Fix this by introducing a new cfg80211_connect_bss() function which is
similar to cfg80211_connect_result(), but it includes an additional
parameter: the bss the STA is connected to. This allows drivers to
provide the exact bss entry that matches the BSS to which the connection
was completed.
Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>
Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 81948527fce52c73c9a0742b8ec8d26b97f6c3c0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Change-Id: I5dc58b360b2bbce53493466a0bcd5363276c302a
CRs-fixed: 1008791
Signed-off-by: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
Define macro to indicate backport support for the new
cfg80211 connect api.
Change-Id: If77035ca928bf5bc5a27230d9b3f6d56ea6c8b99
CRs-Fixed: 1008791
Signed-off-by: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
This extends NL80211_CMD_CONNECT to allow the NL80211_ATTR_PREV_BSSID
attribute to be used similarly to way this was already allowed with
NL80211_CMD_ASSOCIATE. This allows user space to request reassociation
(instead of association) when already connected to an AP. This provides
an option to reassociate within an ESS without having to disconnect and
associate with the AP.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: ba6fbacf9c073effaedf0c52fe7e52e2baf67725
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Change-Id: Idfd211db838cdde40ecc02a1803eac5c1ebfbc77
CRs-fixed: 1004073
Signed-off-by: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
Define macro to indicate backport support for prev_bssid
parameter in connect request. This parameter allows the
driver to decide whether to do a new association or a
re-association on a cfg80211 connect request.
Change-Id: I760e2999ec56c9aa0c44ac7b062ee1755192299f
CRs-Fixed: 1004073
Signed-off-by: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
Define macro to indicate backport support for bssid parameter
in scan request.
Change-Id: I542b0de66948610135cf69a3d24c1561017fe7a8
CRs-Fixed: 996660
Signed-off-by: Vidyullatha Kanchanapally <vidyullatha@codeaurora.org>
fd(s) cannot uniquely identify buffers queued by cross-process
clients. Use ion handles to compare and match already-mapped-
buffers irrespective of data or extradata planes.
CRs-Fixed: 1060416
Change-Id: I591f18aa225cc6690bf423f2ae5bc7dafd4dad78
Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>