Add support to read cti data from OF nodes.
Devices can use this data to configure CTIs as part of their
configurations.
Change-Id: I55b0534ab4d81b9ce02378b513e6ae9bc3b6cd1e
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
During board initialization read the shared memory item
SMEM_POWER_ON_STATUS_INFO and place it in the procfs at
/proc/sys/kernel/boot_reason
The data item is an integer with a bit being set to identify the reason
the device was powered on. The values of this data item is defined in
the document Document/arm/msm/boot.txt, the following is the data in the
documentation file.
power_on_status values set by the PMIC for power on event:
----------------------------------------------------------
0x01 -- keyboard power on
0x02 -- RTC alarm
0x04 -- cable power on
0x08 -- SMPL
0x10 -- Watch Dog timeout
0x20 -- USB charger
0x40 -- Wall charger
0xFF -- error reading power_on_status value
This is cherrypicked from commit <372d39f87b0da75>
("put reason for boot in procfs") of 3.18 tree.
Change-Id: I59e665f92e6e29f7dfef4380314f676a2d92c94b
Signed-off-by: Rick Adams <rgadams@codeaurora.org>
[abhimany: fix up minor merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
add 64bit dma mask support on ipa3 to resolve
the dma pool exhausted issue.
Change-Id: I629e2ae15574ab779c43dd40d40cf169fe19bb8e
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Starting with DSI PHY hardware revisions 3.0 and above, data lane swap
configurations need to be programmed via the DSI PHY interface. In other
cases, a new register interface has been introduced to program the lane
swap configuration for DSI controller revision 2.0 and above. Refactor
the existing implementation to account for these hardware changes.
Change-Id: I3772c614bfee0ed13f30a38535bb814158d23226
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
The IBB pulse-skip and NLIMIT DAC configuration should be disabled
before applying the 2nd SWIRE command skip logic, to guarantee
that the IBB voltage changes immediately in the subsequent
SWIRE command. After the WA is completed, the pulse-skip can
be re-enabled after a programmable delay. Add this logic and
a DT property 'qcom,swire-ibb-ps-enable-delay' to configure
this delay. If this delay is not specified in the DT it defaults
to 200ms.
CRs-Fixed: 1010085
Change-Id: Ifec458a0028c16440ffd6ac1f6fa58eebc815c5a
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
The ACC and GCC regions present in KPSSv1 contain registers to
control clocks and power to each Krait CPU and L2. For CPUfreq
purposes probe these devices and expose a mux clock that chooses
between PXO and PLL8.
Change-Id: Icaa1b68652eb4c836e8aacad80ff6cebe34cad4f
Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
On some devices (MSM8974 for example), the HFPLLs are
instantiated within the Krait processor subsystem as separate
register regions. Add a driver for these PLLs so that we can
provide HFPLL clocks for use by the system.
Change-Id: If8a3e492e1c227cbf42f4f9907cdcb0dcb3ccc11
Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
We can't control eSE power through driver as of now
so adding gpio pin support for eSE in NQxxx driver.
Multiline comments are updated.
Change-Id: I60651052d7bf97a8a0505e76904cebe2b7c69ce2
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
This driver supports the SMB138X charger device.
This charger peripheral is common among other chips, therefore the
driver uses the smb library to support all common functionality.
Register access is provided by the parent device via regmap. Interrupts
are controlled by the parent device, and handlers are registered by the
SMB138X charger driver.
The power supply framework is used to communicate battery and usb
properties to userspace and other driver consumers such as fuel gauge
and USB.
VBUS and VCONN regulators are registered for supporting OTG, and powered
Type-C cables respectively.
CRs-Fixed: 1023141
Change-Id: I119d33cdfdfc874b5d7f6137618ee3e590c72064
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Add a driver for the multimedia clock controller found on MSM8996
based devices. This should allow most multimedia device drivers
to probe and control their clocks.
Change-Id: I0b69b1e78a8b0faeaff3e5c87c73e24b1c19ba55
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
Without 'coresight-name' a CoreSight device gets registered with its
dev_name.
This can be a problem in case where we have CoreSight properties defined
within some other platform device.
Make 'coresight-name' a required property for a CoreSight device to
avoid this problem.
Change-Id: I5e192c4d850bb040983024cfe163714fbebbb199
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Add the device tree files necessary to support the APQCOBALT.
CRs-Fixed: 1026738
Change-Id: If440e1ef4bdbcc73ac7a0569a6bbf093db8aefef
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Add device tree file necessary to support msmcobalt qrd platform.
CRs-Fixed: 1026732
Change-Id: Ic234c29b9c86e7095ab39f633eda57560b271c1f
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
The I2C PMIC Controller is used by multi-function PMIC devices which
communicate over the I2C bus. The controller enumerates all child nodes
as platform devices, and instantiates a regmap interface for them to
communicate over the I2C bus.
The controller also controls interrupts for all of the children platform
devices. The controller handles the summary interrupt by deciphering which
peripheral triggered the interrupt, and which of the peripheral interrupts
were triggered. Finally, it calls the interrupt handlers for each of the
virtual interrupts that were registered.
CRs-Fixed: 975120
Change-Id: I5ebe6d0bcb7c097124ba9b35c56579815dda234f
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Qnovo hardware module controls battery charging pulses. Pulse
characteristics are programmed via sysfs files, this driver
translates those values to register values and writes to appropriate
registers.
CRs-Fixed: 1018090
Change-Id: I2573f719f4b2c2fa9a169659a65433fb834ea74e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Switch to swap ground and mic headset poles is controlled by a
GPIO on the Apps processor instead of the PMIC, and therefore
software logic must change to use pinctrl APIs
CRs-fixed: 1019254
Change-Id: Ibccddc82b18614ddbe6ef9c9720b3de1ce00163e
Signed-off-by: Stephen Oglesby <soglesby@codeaurora.org>
Add napi framework to use napi API's to poll
embedded data from IPA HW.
Change-Id: Icb6ec9d060ca4fb02e95c1e98bded89422bb1fff
CRs-Fixed: 1002026
Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
Add PLL and PHY programming for HDMI. Dynamically calculate
the register values to be programmed for a given pixel clock.
CRs-Fixed: 1022772
Change-Id: Ibf7877eb6edd29baefee57bc12188989d897d47e
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Add the device tree files necessary to support the MSMFALCON
SoC and the MSMFALCON Simulator platform.
Change-Id: Iabdb1c21757ad6dead50fdc4aa3b12077f8f840f
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Support new format of rpm messaging to reduce response time of rpm
acking and increasing the number of messages that the rpm fifo can
process.
RPM message
====================
Old format:
uint32_t service_type;
uint32_t request_len;
uint32_t msg_id;
enum msm_rpm_set set;
uint32_t resource_type;
uint32_t resource_id;
uint32_t data_len;
New format:
unsigned request_hdr;
unsigned msg_id;
unsigned resource_type;
unsigned request_details;
RPM ACK message
====================
Old format:
uint32_t req;
uint32_t req_len;
uint32_t rsc_id;
uint32_t msg_len;
uint32_t id_ack;
New format:
unsigned request_hdr;
uint32_t id_ack;
CRs-fixed: 993338
Change-Id: I85cb0223ce45de2712c20a3a0edffe2a84b80f01
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Increase the size of snapshot static region to 1MB in the
device tree file for a5x targets which have preemption enabled.
This increase is needed to accommodate preemption records and
preemption history records. This overrides the snapshot size
specified in the driver code.
CRs-Fixed: 999360
Change-Id: I2cd27481cc0fb189e35ea44709fe27ad0884fcfd
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Currently the charger driver sets the charge current based on device tree
property. Allow setting fast charge current (fcc) via power supply (psy)
property. Moreover the current voter for fcc is a min voter, change
that to max voter so that values above what device tree has set can
be used.
Similarly, introduce a max voter for battery float voltage (vfloat) and
set it to defaults via device tree.
CRs-Fixed: 1018090
Change-Id: I691984543f8beb3c52d3d578c7cc311c285a1fcc
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
LMH DCVSh hardware can send interrupts whenever the hardware mitigation
blocks make a new frequency mitigation vote. scheduler is not aware of
any of the hardware mitigation.
Add support to listen for this interrupt, read the aggregated mitigation
frequency from all LMH DCVSh block and notify scheduler. After receiving
interrupt, poll the hardware periodically for the mitigation frequency
till the mitigation is cleared by hardware. Once the mitigation is
cleared, interrupt is re-enabled.
Change-Id: I38bc0c80710038f135289420d6b20c1ff0ab06eb
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
RPM stats and RPM master stats provide the similar information via
different interfaces. Combine them into a single driver to provide a
unified information.
Change-Id: If5a5ef6e080ab6d75139472c5204eb6d5e9c6614
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
This reverts commit 8f90803a45 ("sched: warn/panic upon excessive
scheduling latency") as this feature is no longer used.
Change-Id: I200d0e9e8dad5047522cd02a68de25d4a70a91a4
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This reverts commit b40bf941f6 ("sched: add scheduling latency
tracking procfs node") as this feature is no longer used.
Change-Id: I5de789b6349e6ea78ae3725af2a3ffa72b7b7f11
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This has always been unused feature given its limitation of adding
phantom load to the system. Since there are no immediate plans of
using this and the fact that it adds unnecessary complications to
the new load fixup mechanism, remove this feature for now. It can
be revisited later in light of the new mechanism.
Change-Id: Ie9501a898d0f423338293a8dde6bc56f493f1e75
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Kill unused scheduler knob sched_migration_fixup. With this change
scheduler always adjusts CPU's busy time during migration.
Change-Id: I5d59e89d5cc0f2c705c40036cd7b47f5d3f89e58
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This merge brings MMC/SD card changes from 'dev/msm-4.4-mmc_port' to
msm-4.4.
* origin/dev/msm-4.4-mmc_port: (472 commits)
mmc: sdhci-msm: fix few compilation issues
mmc: cmdq_hci: fix compilation issue
mmc: host: fix compilation issue when clk_gating config is disabled
mmc: sdhci: clean up legacy adma related variables
mmc: sdhci: enable 64-bit DMA support only if chipset supports 64-bit
mmc: sdhci: Replace SDHCI_USE_ADMA_64BIT flag
mmc: auto bkops fixes
mmc: card: fix quirk bit map
Revert "mmc: core: get drive types supported by eMMC cards"
mmc: host: sdhci: don't queue zero length descriptor
mmc: core: fix deadlock between runtime-suspend and devfreq
mmc: block: Add quirk and increase read data timeout for hynix emmc
mmc: card: Fix broken clock gating
mmc: core: postpone runtime suspend in case BKOPS is required
mmc: core: update AUTO_EN in BKOPS_EN field on runtime resume
mmc: revert runtime idle state
mmc: host: Set max frequency when disabling clock scaling
mmc: queue: Fix queue_lock spinlock bug from CMDQ shutdown path
mmc: core: fix issue with devfreq clock scaling
mmc: core: set REL_WR_SEC_C register to 0x1 per eMMC5.0 spec
...
Change-Id: I702a72fbbecba520f429bf1149106e684335e2a5
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
The graphics clock frequencies need to be updated for
msm8996 Pro. Add support for doing the same using the
bin fuse values.
CRs-Fixed: 1022663
Change-Id: I60185482ae9b5364e297370593d95cce056b314e
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
While the transport always supports scatter-gather, the
capability advertised through this IOCTL is configured
from the device tree. Add support on ipav3.
Change-Id: Idf626cb5a22d2ed5152ab76dcc5fe56696a631a6
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Use DTS configuration file to initialize IPA memory partitions
in order to allow per target configuration decoupled from code.
Change-Id: If770b9315807e51e46cd94dec6234ef186cf4fcb
CRs-Fixed: 1022125
Signed-off-by: Gilad Landau <glandau@codeaurora.org>
Add support for controlling the graphics clocks on
MSMCOBALT v2.
CRs-Fixed: 1015446
Change-Id: Ia94606113b112a5e363e342a0ad1d977a48b3d72
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Add support for controlling the multimedia clocks on
MSMCOBALT v2.
CRs-Fixed: 1015446
Change-Id: I636001ea91e7be1e2adec2ea7cd3d9aadfcc39a2
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Add support for the global clock controller found on MSM8996
based devices. This should allow most non-multimedia device
drivers to probe and control their clocks.
Change-Id: I559f5976b56bf8933df2c68fc4e29b2bd0ce1160
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Kill unused scheduler knob and parameter sched_enable_power_aware. HMP
scheduler always take into account power cost for placing task.
Change-Id: Ib26a21df9b903baac26c026862b0a41b4a8834f3
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Kill unused scheduler knob sched_account_wait_time. With this change
scheduler always accounts task's wait time into demand.
Change-Id: Ifa4bcb5685798f48fd020f3d0c9853220b3f5fdc
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
The lower bus speed mode to be used during clock scaling may
vary based on the target. Hence, add a new dtsi property to
define this bus speed mode.
Change-Id: If8e2d125b8246ca479f816a475940bb357138297
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Some host controllers may need additional TLMM registers to be
configured to enable the IO lines connected to it.
Change-Id: Ic334ce653bf13fef5969f08e19f6202377b8fd2e
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
As SDIO spec doesn't allow advertisement of 1.8v support, some SDIO
devices advertise support of only 3.0v even though they support 1.8v
as well.
sdhc3 host controller only supports 1.8v and rejects the initialization
of SDIO devices that advertise 3.0v support.
This change adds fake support for 3.0v to sdhc host controller.
This will allow initialization of SDIO devices that supports 1.8v but
advertise 3.0v support.
Change-Id: I5a98c54ad4998e6439f83081628c9c083e95bbf0
Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
Add the necessary device tree properties and parsing in the driver
to support PM QoS voting for IRQ and CPU groups for CMDQ / legacy modes.
Change-Id: I1a94978ca66823d2ce78ee230cf36b4ebb72e6d8
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
pm_qos is causing race conditions in CQ mode with
power management. Removing the feature in order to
allow power management.
Change-Id: I340cd784829f389f18df6bff664337aca0f3c867
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Add ICE support to low-level driver sdhci-msm.c. This code is
primarily responsible for enabling ICE (if present),
managing ICE clocks, managing ICE suspend/resume and also provides
a few host->ops for sdhci driver to use ICE functionality.
Change-Id: I3ec62146982c9db0263d5e19f60274163f514859
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This change adds the use of devfreq to MMC.
Both eMMC and SD card will use it.
For some workloads, such as video playback, it isn't
necessary for these cards to run at high speed.
Running at lower frequency, for example 52MHz, in such
cases can still meet the deadlines for data transfers.
Scaling down the clock frequency dynamically has power
savings not only because the bus is running at lower frequency
but also has an advantage of scaling down the system core
voltage, if supported.
Provide an ondemand clock scaling support similar to the
cpufreq ondemand governor having two thresholds,
up_threshold and down_threshold to decide whether to
increase the frequency or scale it down respectively.
The sampling interval is in the order of milliseconds.
If sampling interval is too low, frequent switching of
frequencies can lead to high power consumption and if
sampling interval is too high, the clock scaling logic
would take long time to realize that the underlying
hardware (controller and card) is busy and scale up
the clocks.
Change-Id: I58ddbd93648ded82b304411956e035fb353cd97e
Signed-off-by: Talel Shenhar <tatias@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts & compilation
errors]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
In order to boost mmc performance on various platforms,
add support for configuring whether set_wake_up_idle()
should be called on the mmc queue thread (mmcqd).
The decision will be set in each individual platform's
dts file.
CRs-Fixed: 787554
Change-Id: I3989d3f5b8228785e6d3bc49c7eb01ebf2fa2f38
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>