In case dsi2hdmi chip is used as external display, then framework
reboot and connect disconnect events need to be handled separately.
So, when framework indicates reboot event by writing into sysfs node,
then power down the chip and send disconnect event to all registered
clients.
Change-Id: I4bfb43f60aad1a7f364af3b77a61fc24ba213e9f
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
With the keymaster 1.0 support appsbl is loading the keymaster
during boot-up, because of this app_arch flag is not propagated
which results in send modified command failures. This patch adds
support to get the app_arch for keymaster app if KM is loaded by
appsbl.
Change-Id: Iff997db8c96591c9f5e3d6609cfcb424b922f34a
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
Change the TZ apps region as per the new memory map, which
update the base address and size in dt.
Change-Id: I472ceab4e2fe06a51938a0d7e82d37d1e7f4bd0d
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
In dual dsi case, if we do DSI PHY sw reset for one DSI controller
then it will reset the DSI PHY regulator also. Since DSI PHY
regulator is shared among both the DSI controllers, it might cause
side effects on the other DSI controller if that is active. So only
reset DSI PHY lane and PHY HW as when one of the DSI controller is
still in active state. Also avoid reconfiguring DSI PHY regulator in
dual dsi case if the other DSI controller is active.
Change-Id: I5ad1251c89e8ad3f521c4e5c11607494e14143cf
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Voltage sensor regulators need to be notified when the corner of apc
rail changes. Voltage Sensor regulator needs to be disabled prior
to changing the apc corner and needs to be notified of the ceiling
and floor voltage before enabling it again.
Change-Id: I0156480f6bfaf10397578caded2c15a298f20f95
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
The voltage sensor driver monitors the droops on the
APC rails. Enable it on 8976.
Change-Id: I58ff7f1cb5d6389e42e6a150d584180a6e14bd3c
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Voltage Sensors are h/w blocks that monitor the voltage at particular
sites within the MSM.
They consist of a voltage controlled oscillator and use phase quantization
(frequency to digital) converter to report voltage. They need a known
frequency input to generate a code for the voltage observed.
The primary usecase is to set a bit in the status register when the
voltage crosses programmed minimum or maximum thresholds. This bit is
read by crash dump tool for debugging and analysis.
Change-Id: Ibe6e07776e9694422e64859c24951b91ddcdee46
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Currently PHY is put into SIDDQ during host bus suspend. But
recommendation is not to put PHY in SIDDQ during host bus suspend and
allow SIDDQ during cable disconnect. Hence fix this issue by setting
ALLOW_BUS_SUSPEND_WITH_REWORK flag.
Change-Id: Ifc17d425f1a20df627d310780bbf46c9a26db15c
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: ChandanaKishori Chiluveru <cchilu@codeaurora.org>
Currently, MAH_TO_SOC_CONV_REG is read and the data is converted
to half float before dividing it by the learned capacity.
However, it should not be converted like that and should be used
as an unsigned integer instead. Also, before dividing it by the
learned capacity, convert it to MICRO_UNIT so that the floating
point encoding of cc_to_soc coefficient will be proper. Fix it.
CRs-Fixed: 887349
Change-Id: Ibbeca6f2aff24fc68bc8bf931fa03850ca22c3a9
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently the smb1351-charger driver checks for the presence of the
smb1351 chip in the smb1351_parallel_set_chg_present function regardless
of whether or not the primary charger is calling it to notify of
presence or removal. This is incorrect, as the check will always fail
upon removal if the VDDCAP pin on the primary charger falls fast enough
and puts the smb1351 parallel charger in suspend. This causes subsequent
parallel charging enablements to fail to run the setup routines, and
thus fail enabling parallel charger altogether.
Fix this by only checking for smb1351 chip presence upon the primary
charger notifying the driver of presence, and not upon removal.
CRs-Fixed: 877809
Change-Id: Iac226309286f9169963f5bea07648074415cb4d3
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
MSM CCI monitors are added in MSM8976 to monitor CCI traffic.
Add CCI monitor devices for MSM8976.
Change-Id: I6a8a7ac45f79bd68290af982cb55ee52b1fe8314
Signed-off-by: Arun KS <arunks@codeaurora.org>
Signed-off-by: Hanumath Prasad <hpprasad@codeaurora.org>
Currently, the smb1351 driver does not set the same USB100/USB500 mode
polarity when ran in parallel mode. This can cause current limits of
500/900mA to be switched with 100/150mA.
Fix this by setting the same bits the smb1351 does in its normal hw_init
routine.
CRs-Fixed: 877809
Change-Id: I44ae3086fd86e46b15a2c16368fcd5aade771319
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Some targets have a single irq line which is shared among all
the cci hwmon counters. Enhance the driver to support shared interrupt
handling.
Change-Id: I5fdaecfaa14fa47e8f393fe51c538e5000e6ad5b
Signed-off-by: Arun KS <arunks@codeaurora.org>
Signed-off-by: Hanumath Prasad <hpprasad@codeaurora.org>
Add the DT configuration for SMB1315 parallel charger. Set the
enable-pin polarity to active high.
Change-Id: I5a87f2eeaec7d2b6623a4abc2bfc6434fc5fd3d4
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
The remote debugger driver allows a debugger running on a host
PC to communicate with a remote stub running on peripheral
subsystems. Add device tree entry for this driver.
Change-Id: Ib59e57aa00b4c3042b3429860a4379019fee502b
Acked-by: Vivek Iyer <viyer@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
The remote debugger driver allows a debugger running on a host
PC to communicate with a remote stub running on peripheral
subsystems. Add device tree entry for this driver.
Change-Id: Ic7d0c50880f5e0f27d3e34bfcf5c07467193995a
Acked-by: Vivek Iyer <viyer@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
The counter needs to be cleared and acknowledged before clearing the IRQ
bits. Otherwise, the HW could set the IRQ bit again if the old counter
value was higher than the threshold. So, add a memory barrier after
clearing the counter.
Change-Id: I35f9f7905b05b8a185eb94d04d9c0a8ccfc2db51
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
add tasha_vifeedback dai definition.
fixup msm_vi_feed_tx_ch config for tasha.
add dynamic configuration by codec name check.
Change-Id: Iffdbb35bbe7f6df3e4550792a9f84c9c5073479a
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Type-C defines new USB cables, connectors and plugs to allow
connecting USB cables without worrying about orientation. This
also allows detecting type-c enabled host/chargers enabling phone
to draw up to 3A current for charging.
Change-Id: Icdf913dcfdbd5c3d74c8bb3c7584be61e01d0056
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
msm_jtag_save_state() and msm_jtag_restore_state() are called
directly from msm-pm driver. However msm-pm driver is going to be
deprecated when we move to PSCI framework. Add support in jtagv8
driver to rely on hotplug and cpu_pm callbacks for save and
restore functionality of Debug and ETM registers.
This commit also modifies the hotcpu callback in ETM driver to
avoid any race condition with hotcpu callback from Jtagv8 driver
that has been introduced in this commit.
Change-Id: I1261fdcb548b7a21b37090426efdbd77ea038333
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
Mute observed when playback and SSR done continuously.
Found registers that are non-cacheable are not listed
in volatile API. This is resulting in mute in RX path
sometimes after SSR usecases. Update non cacheable registers
table and volatile API accordingly.
Change-Id: Id8afb37656b39214525bedb1c14b453231aaf742
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
When Soundwire master device down callback is called, rather
than calling device suspend, call device down and turn off
clock.
Change-Id: I0c9b2b5cd3b816a6bb840309c588e02cf5ebb7c8
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
When ADSP Sub-system Restart (SSR) is triggered, it
is necessary to send corresponding device down
notification to Soundwire master driver. Without this,
once device comes back from SSR, audio playback on
speaker will not work. This change sends device down
notification from wcd9335 codec to soundwire master
during SSR.
Change-Id: Iae4776bb397303b736f0d35d5ab3aef4dd25178f
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Some interrupts can be bypassed during xo shutdown as they are not
responsible for wakeup. Update MPM mappings with such interrupts
for MSM8956 and MSM8976.
Change-Id: Ia62d235571f02ee24bc7bfa69267c7c1a00329a3
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
Signed-off-by: Achyuth Sai Vadrav <avadra@codeaurora.org>
There is a window where dumping the bypass list is not
printing actual snapshot of enabled interrupts. Hence
dump the interrupts in mpm_enter_sleep which gives the
interrupt snapshot just before going to rpm assisted pc.
Change-Id: I46f075f5c3a8650944e45bfbf302c00f9fbb52d6
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Signed-off-by: Achyuth Sai Vadrav <avadra@codeaurora.org>
Change the sequence of registering and freeing the interrupt
handler in suspend/resume. Freeirq needs a guarantee that the
IRQ can't come anymore before we call it. So, we disable the IRQ
before calling freeirq.And register the handler before enabling
the irq to avoid the interrupt getting unhandled.
Change-Id: I3945202d049e16f64a16e456f914f7602b763c89
Signed-off-by: Hanumath Prasad <hpprasad@codeaurora.org>
msm-pm driver calls msm_jtag_save_state() and msm_jtag_restore_state().
However msm-pm driver is going to be deprecated when we move to PSCI
framework. So remove msm_jtag_save_state and msm_jtag_restore_state
from msm-pm, so that jtag driver handles this in common for both PSCI
and non-PSCi targets.
Change-Id: Ie9060b50aa1118b23e71dbc00ba9ca5bd363f48c
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
MSM8976 target with WCD9335 codec supports ADSP sub-system restart.
Add necessary support for ADSP SSR on to MSM8976 target.
Change-Id: I2837c677b7e23044ebe461d96d55a0bd609d7b99
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
It is possible that some physical CPUs may not be brought online and
it can be decided at runtime. This behavior changes the physical CPU
to logical CPU numbering dynamic. Only two performance cores will be
enabled for MSM8956. Adding all perf core phandles for BCL mitigation
will ensure that the mitigation is applied on the two enabled
perf cores.
Change-Id: Ie8b1f739548fd55561cd9850501a01c148d5f1b8
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Currently, LAB_PRECHARGE_CTL register is programmed if LAB is not
ready to be enabled by IBB. LAB_PRECHARGE_CTL needs to be configured
by the LAB/IBB driver irrespective of its previous setting.
CRs-Fixed: 877370
Change-Id: Idb473ba0b063f010e89b669b79f79349ebfd0d59
Signed-off-by: Ravindranath Thiyagarajan <rthiyaga@codeaurora.org>
Specify the following configurations, IBB discharge resistance
needed for LCD mode, LAB max precharge time and IBB power-up/power-down
delay on all MSM8976 targets.
CRs-Fixed: 877370
Change-Id: I1092a47e92bbc7f3a70212b93b1d0d22dbd34664
Signed-off-by: Ravindranath Thiyagarajan <rthiyaga@codeaurora.org>
Currently, power up delay for IBB is programmed in the incorrect
register locations [4:3] of IBB_PWRUP_PWRDN_CTL_1. Fix this by
changing it to the correct register locations [5:4] of
IBB_PWRUP_PWRDN_CTL_1.
CRs-Fixed: 880446
Change-Id: I3beaf8cef749f3f1b0c77834b93f871de982e219
Signed-off-by: Ravindranath Thiyagarajan <rthiyaga@codeaurora.org>
Add mi2s dai entry for senary port in 8976 dtsi.
Also add required VI sense pinctrl changes to support
VI sense via senary port on 8976.
Change-Id: I89a052306545acb4539e2e7ebfb34fbb0b1e99dc
Signed-off-by: Meng Wang <mwang@codeaurora.org>