Commit graph

570358 commits

Author SHA1 Message Date
Adrian Salido-Moreno
4e78ce2470 msm: mdss: fix wb format enumeration
Enumeration for writeback is not properly done because not all
information from device tree has been retrieved before setting up
supported formats. Moved this call until all data has been retrieved
from device tree and hw pre initialization.

Change-Id: Id228bf7ec564669fa8e9e739e27052de0133cc4d
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-05-16 20:10:27 -07:00
Shashank Mittal
c82110ccb6 qcom: memory_dump: add support to dump DCC data.
Data Capture and Compare (DCC) is a DMA engine, to capture or to
perform CRC over configuration data or system memory.

Add ids for DCC registers and sram data.

Change-Id: If76ef1325b1be623626742b0f0172a1675f21d63
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2016-05-16 20:10:26 -07:00
Prasad Sodagudi
79333c3723 soc: qcom: common_log: Fix a memory leak in common_log driver
Fix the memory leak in common_log_register_log_buf() function
when registering log_first_idx with the memory with dump v2 driver.
Also use kmemleak_not_leak when msm_dump_data_register() calls
are successful to ensure that kmemleak doesn't report it as a memory
leak.

CRs-Fixed: 832905
Change-Id: I36eaeebf821f64dd7503ec823aca3c7aec846bd0
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2016-05-16 20:10:25 -07:00
Sarangdhar Joshi
6f938760b7 qcom: common_log: add support to dump rpm code ram
Allocate memory to dump RPM CODE RAM at the time of crash.

Change-Id: I5062d65a095538a508944315e6cc06f430382bf5
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2016-05-16 20:10:24 -07:00
Shashank Mittal
eb3bb2fc33 qcom: common_log: add support to dump VSENSE registers
Allocate memory to dump VSENSE registers at the time of crash.

Change-Id: Ibd896873bc40b723071c66ca7cf1a4bc9b38ad5e
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2016-05-16 20:10:24 -07:00
Neeti Desai
ef0aa942f0 qcom: common_log: add support to dump PMIC registers
Register for dumping 4KB of memory to dump PMIC
registers which can be parsed in case of device crash.

Change-Id: Idbf26d6241ab9a87e4dcea42723428289f2a869d
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
[spjoshi@codeaurora.org: fix merge conflict]
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
[mittals@codeaurora.org: fix merge conflict]
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2016-05-16 20:10:23 -07:00
Wu Jin
712d5c9bfc common_log: add common_log support snapshot
This snapshot is taken as of msm-3.10 commit:
 78c36fa0ef (Merge "msm: mdss: Prevent backlight update during
 continuous splash")

Common log registers the kernel log buffer address with the
memory dump driver so that the __log_buf can be collected from
ramdumps without the need of an external System.map file.

Change-Id: Ibeb74ca064e78fe7522e46b3c32bb362082d5d24
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
[spjoshi@codeaurora.org: fix merge conflict]
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
[mittals@codeaurora.org: fix merge conflict]
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2016-05-16 20:10:22 -07:00
Tony Truong
a195fd27a8 ARM: dts: msm: create PCIe devicetree node for msmcobalt
Create and add PCIe resources such as register bases, clocks,
regulators, GPIOs, etc. to msmcobalt devicetree and pinctrl
devicetree.

Change-Id: I7a41ed6dd0f78cba140a15661d44b2f6c2745e39
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-05-16 20:10:22 -07:00
Tony Truong
1e1de6b438 defconfig: msm: enable PCIe bus driver in msmcobalt defconfig
Enable MSM PCIe bus driver in defconfig for msmcobalt.

Change-Id: I44ece35ed1d8dda4d8139dfb54adc7a2e9c49383
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-05-16 20:10:21 -07:00
Tony Truong
a703839446 msm: pcie: update misc register offsets on msmcobalt
Some msmcobalt PCIe configuration registers have different
offsets than other chipsets. Update these offsets so
that PCIe can be correctly configured on msmcobalt.

Change-Id: I42c7f545a48e6a431ccdba062399776e8c1c64f2
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-05-16 20:10:20 -07:00
Tony Truong
f1660d2c22 msm: pcie: add device and vendor ID for PCIe on msmcobalt
Add device and vendor ID for PCIe on msmcobalt based on PCIe
core's configurations. This value is required to enable
PCIe low power management features.

Change-Id: I972c35c79327e3baa38573318ed0909d4daa9516
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-05-16 20:10:19 -07:00
Tony Truong
23e4107900 msm: pcie: retrieve PCIe SMMU SID base from DT
SMMU SIDs allocated for PCIe varies across chipsets.
Thus, add support to retrieve the base SID from
PCIe devicetree node so that PCIe bus driver can
use it to calculate and assign to each PCI device.

Change-Id: I7651f2cbc53587f5b48501855260c87af2a2db01
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-05-16 20:10:19 -07:00
Tony Truong
6689a31657 msm: pcie: update PCIe PHY registers and sequences for msmcobalt
PCIe PHY on msmcobalt has different register offsets and does not
support the same PHY sequences as other platforms. Thus, update
the PHY register offsets and sequences for msmcobalt.

Change-Id: If87bd507228476fee9713f88c06a1cf04b13f163
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-05-16 20:10:18 -07:00
David Keitel
5834faf085 trace: cpu_freq_switch: use tracefs instead of debugfs
Rather than using debugfs, switch to tracefs which trace
moved to in kernel 4.4.

Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Change-Id: I52ef7d45cabb20cc61fbd2fb3ef5016b041bc56c
2016-05-16 20:10:17 -07:00
Tony Truong
3993dd4312 msm: pcie: add support to get PCIe PHY init sequence from DT
PCIe PHY varies between each chipset. Thus, the PHY init sequence on
each of these chipsets are also different. Therefore, add the support
to read PCIe PHY init sequence from devicetree.

Change-Id: I21c2ce2b7d3bf1541a5d3580db4bc40497701095
Signed-off-by: Tony Truong <truong@codeaurora.org>
2016-05-16 20:10:17 -07:00
Alan Kwong
a5b1da948d msm: sde: Add error code for unsupported rotator version
Although rotator driver checks for hardware version, and rejects
unsupported version.  But it does not return error code to indicate
error condition, and causes driver crash.

This fix adds error code to unsupported version, so upper layer can
properly handling the condition.

CRs-Fixed: 1015335
Change-Id: If83199b5990a3623b1018058d2164862352902b7
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2016-05-16 20:10:16 -07:00
Osvaldo Banuelos
c017b2e51f ARM: dts: msm: Disable OSM vred FSM for msmcobalt
Disable the OSM vred FSM until core-count adjustments are enabled
for the CPRh VDD_APC0 and VDD_APC1 devices.

Change-Id: I467f49edbc65449f29f761c6b873ca702d24fa72
CRs-Fixed: 1014894
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-05-16 20:10:15 -07:00
Alan Kwong
ed3f816807 ARM: dts: msm: Add rotator clocks MNOC AHB/AXI for msmcobalt
Add additional required clocks to mdss device tree to enable
mmss smmu and ahb access for rotator.

CRs-Fixed: 1008505
Change-Id: I5bfc16e3d6ac3c6052b8dca55b42b57480ec650e
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
2016-05-16 20:10:14 -07:00
Lior David
83da6b7f65 AndroidKernel.mk: additional fixes for multi-kernel tree
Fixes 2 problems related to multi-kernel tree support:

1. Copying of modules to /system/lib/modules is broken when building
in a multi-kernel tree. This is because INSTALL_MOD_PATH is not
set correctly. When building a multi-kernel tree, the output
directory is one additional directory deep, so modules end up
under <out>/obj/system/lib/modules instead of
<out>/system/lib/modules. Fix this by using BUILD_ROOT_LOC
which is set appropriately for multi-kernel and standard trees.
2. When running "make kernelconfig" on a multi-kernel tree,
the generated defconfig is copied to the wrong location,
since it uses the old-style location under kernel, instead
of kernel/<kernel name>.

Change-Id: I90563104a5b6219472eaeae1964fc34b52586536
CRs-Fixed: 1014872
Signed-off-by: Lior David <liord@codeaurora.org>
2016-05-16 20:10:14 -07:00
David Collins
59d0cad166 ARM: dts: msm: restrict VDD_GFX voltage to Nom for CPR Rev 0 on msmcobalt
Some MSMCOBALT parts with CPR revision 0 are unable to operate at
low voltage.  Therefore, raise the CPR floor voltage to be equal
to the Nominal ceiling voltage for all corners.  Also increase
the ceiling voltages for corners accordingly to ensure that the
ceiling >= floor voltage requirement is met.

Change-Id: I346a909984519c2522503f842d449c6f3217b746
CRs-Fixed: 1014407
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-05-16 20:10:13 -07:00
Hemant Kumar
7db8d8be40 ARM: dts: msm: Enable super speed mode support on msmcobalt
Enable ssphy and update the qmp phy initialization sequence
to enumerate in super speed mode. By default Lane A is
selected for super speed mode.

Change-Id: Ibd5fdd0a1f48ecd8a828d187ac86513e3f48ae6f
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-05-16 20:10:12 -07:00
Abhijit Kulkarni
64c2a7fced ARM: dts: msm: Add mnoc_ahb clock for msmcobalt
Add mmss_mnoc_ahb clock to mdss device tree as this clock needs to be
turned on before turning on ahb_clk.

CRs-Fixed: 1008505
Change-Id: I43ccff9774d098d551c4ba25ad5678fee13aca1f
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2016-05-16 16:55:56 -07:00
Kuirong Wang
395fde109b ASoC: msm: Add USB audio via ADSP support
Add new USB rx and tx afe ports and routing to different
fe dais to enable USB audio via ADSP.

Change-Id: I4f82ba27becee1f3b62c410be0d00876961f9b18
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-05-15 22:42:12 -07:00
Steve Muckle
2e96ff27f3 arm64: enable HAVE_IRQ_TIME_ACCOUNTING for arm64
The only dependency for irq time accounting is a sufficiently high
resolution timer. Plenty of arm64 platforms will have this, so enable
this feature.

CRs-Fixed: 1013947
Change-Id: Id675a541a6813a14ae0b7e1bb66670bf7467a97f
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
[satyap@codeaurora.org: trivial merge conflict resolution.]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-05-15 22:42:01 -07:00
Runmin Wang
2d470fdbe8 defconfig: Enable CPUSS dump driver
Enable CPUSS dump driver to dump cpu subsystem during crash.

CRs-Fixed: 1011333
Change-Id: Id4a8bca3eb77db4f998c790f1927fe373684048a
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-05-15 22:41:51 -07:00
Runmin Wang
9669bbda4d soc: qcom: Add snapshot of the cpuss driver
This snapshot is taken as of msm-3.18 commit dacccc6.

CRs-Fixed: 1011333
Change-Id: I4ed06b5602220ed4e30bd37a0633ccb3454f7d43
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-05-15 22:41:41 -07:00
Sreelakshmi Gownipalli
a0c23c20d1 diag: Use correct index while accessing DCI channel
Use correct index value while accessing DCI channel status.

Change-Id: I97456326a40c6d24c208307a9e8e6a55fc5b9d59
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2016-05-15 22:41:32 -07:00
Deepak Katragadda
8cc9b35f9a clk: msm: clock-gcc-cobalt: Add reset capability to PCIE pipe clock
Instead of having a separate reset clock for PCIE 0 reset, tag the
BCR register with the gcc_pcie_0_pipe_clk directly.

CRs-Fixed: 1014989
Change-Id: Icbc3a4a237bd0ac75fbef0857238e18cfb0ca533
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-05-15 22:41:21 -07:00
Deepak Katragadda
4622a2f426 clk: msm: clock-gcc-cobalt: Update the pcie_aux_clk_src frequency
The pcie_aux_clk_src needs to run at XO frequency instead
of at 1MHz. Update the clock driver to support that.

CRs-Fixed: 1013278
Change-Id: Id8a92b0f36f71ed50726504d1e5b3feab4cfa512
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-05-15 22:41:11 -07:00
Runmin Wang
dc2b0c10a1 pinctrl: qcom: Fix the base address of various GPIOs
Update the base address of GPIOs to the correct value.

CRs-Fixed: 1014950
Change-Id: Id232492bd458dac04e89a94ed5a85092223ebff6
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-05-15 22:40:59 -07:00
Jeykumar Sankaran
b4b947c1f3 ARM: dts: msm: separate control and config offsets for PPB
This change separates the control and config register offset nodes
for ping pong blocks. Its not necessary every ping pong
blocks to have both control and config registers.

Change-Id: Ide998ad71abccb35d899f9e1f6093949acb95b09
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2016-05-12 15:07:10 -07:00
Ram Chandrasekar
595ef42db8 msm: thermal: Update the min frequency update logic
With LMH DCVSh hardware, the current check will use cpufreq to
limit both scaling min and max frequency. But cpufreq should be
used only for scaling min frequency.

Update the check to use cpufreq only to limit scaling min frequency.

Change-Id: I38de1699a7cdd5bc3fecef80dd34c4d22d2fd200
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-05-12 15:06:59 -07:00
Ram Chandrasekar
c8a89f3b19 msm: thermal: Avoid updating the scaling max frequency to cpufreq
With LMH DCVSh hardware, thermal driver can directly vote in the
hardware to limit the scaling max frequency. Voting to the cpufreq
driver along side the hardware, will introduce software delay when
removing the mitigation.

So avoid voting the scaling max frequency to the cpufreq when LMH DCVSh
is available.

Change-Id: I8a5f913ae41263b06af99b0ee802b4fa68312f33
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-05-12 15:06:47 -07:00
Ram Chandrasekar
0f2154f71d defconfig: msmcortex: Enable bcl driver
Enable bcl peripheral driver. The driver will interact
with the bcl peripheral to get the battery current, battery
voltage and set and receive thresholds for the same.

CRs-Fixed: 1010115
Change-Id: I7168c754e939ef9da001bcac52a5b802dea40b41
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-05-12 15:06:37 -07:00
Kuirong Wang
273e71d9d4 ARM: dts: msm: Add slimbus_6_rx back-end dai-link for msmcobalt
Add slimbus_6_rx back-end dai-link for msmcobalt to enable
independent backend for different devices during audio playback.

Change-Id: If22cadbcfac92f8243a3b6d3201935a839cd701a
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-05-12 15:06:25 -07:00
Kuirong Wang
bc5a96807d ARM: dts: msm: Add USB audio via ADSP support for msmcobalt
Add device tree entries for USB audio rx and tx to
support USB audio via ADSP on msmcobalt platform.

Change-Id: I345aa2369d18e2137ce79676049bb59d715d1ee0
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-05-12 15:06:14 -07:00
Sridhar Ancha
aea451330a msm: ipa: Add NETIF_F_SG to RMNET_IPA's hw features
GSO segmented packets are getting linearized
before being sent to rmnet_ipa interface since SG
feature is not enabled.

Add NETIF_F_SG to IPA's HW features so that
ethtool can be used to enable it.

Change-Id: I7b321c796935febb3fa3e9ae520fd65e00da507c
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
2016-05-12 15:06:04 -07:00
Viswanadha Raju Thotakura
948ea35fca msm: camera: Increase wait timeout time for kernel probe
Camera sensor probe happens in camera daemon, because
of delayed start of camera daemon, timeout happens and
camera server is notified with 0 cameras, this is
temporary solution.

CRs-Fixed: 1014373
Change-Id: I957b9744f6f627a74f805933012429c41b910e92
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
2016-05-12 15:05:54 -07:00
Aravind Venkateswaran
947dec941e ARM: dts: msm: fix panel mode selection GPIO specification
Commit a240321fd6 ("ARM: dts: msm: define
primary display interface for msmcobalt CDP") used an incorrect binding
to specify the panel mode selection gpio state for the nt35597 WQXGA
dual dsi panel. Fix this to ensure that the panel mode gpio state is set
correctly.

Change-Id: I895642c231d980633801d094c8f329d209370c88
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-05-12 15:05:44 -07:00
Ram Chandrasekar
d151671bb9 ARM: dts: msm: Add default configs for bcl in msmcobalt
Add default battery mitigation configurations for msmcobalt

CRs-Fixed: 1010115
Change-Id: I13f1825f2eb04d606464d1092c222c8269084107
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-05-12 15:05:34 -07:00
Ram Chandrasekar
57d83c5c18 ARM: dts: msm: Configure bcl peripheral driver for PMIcobalt
Configure the bcl peripheral driver with the details about the
register address, interrupt and interrupt clear polling delay for
PMIcobalt.

CRs-Fixed: 1010115
Change-Id: I521ee6c715525bd401630ec7948e5746682de6da
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-05-12 15:05:23 -07:00
Viswanadha Raju Thotakura
6254bc51f9 ARM: dts: msm: Correct camera nodes for msmcobalt
Correct the pinctrl nodes for actuator, change the CCI
source for auxiliary camera node, add eeprom1 node for
auxiliary sensor.

CRs-Fixed: 1014373
Change-Id: Icd9f1478c797fbdbd76d96c3069e5baa2c30ff61
Signed-off-by: Viswanadha Raju Thotakura <viswanad@codeaurora.org>
2016-05-12 15:05:12 -07:00
Ram Chandrasekar
92ad7a30f3 power: bcl_peripheral: Support new bcl peripheral
Add support for the new version of bcl peripheral introduced
in PMIcobalt.

The new support includes,
1. support the new address space
2. set the new Ibat too high threshold
3. set the new vbat low comparator threshold
4. set the new vbat too low comparator threshold
5. enable the LMH DCVSh monitor algorithm, when the
   thresholds are configured.

CRs-Fixed: 1010115
Change-Id: I6dad908bbc673ff1b7f7d3d05fecdfc8f48b5815
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-05-12 15:05:01 -07:00
Ram Chandrasekar
9383bcf86a power: bcl: snapshot of battery_current_limit driver
This snapshot is taken as of msm-3.18 commit
978d23c.

Accommodate the changes in the input arguments for
power_supply_register() API and use
power_supply_get_property() API to get the SoC information
from BMS.

CRs-Fixed: 1010115
Change-Id: I1af565ffd3b61e424aca1cbd5ec6cbef8d89f1fa
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-05-12 15:04:48 -07:00
David Dai
60e4a3d3a7 ARM: dts: msm: Add mnoc ahb bus fab for msmcobalt
Add mnoc ahb fab used by clients to request for different
speeds on configuration paths.

CRs-Fixed: 1013346
Change-Id: Ic5f3598644a6d93796b8613117e42ff692168c3c
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2016-05-12 15:04:35 -07:00
David Dai
99e2cfeec5 ARM: dts: msm: use msmbus_bimc node for bimc_fab for msm_cobalt
To prevent a 0 vote on to bimc_clk from late clock init,
there must be a non zero vote on bimc_clk's child as opposed
to itself, vote on the child clock node as opposed to the parent.

CRs-Fixed: 1013348
Change-Id: Id3a9fa3238ce0f04737a7b98aa897ec83ecdc8e2
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2016-05-12 15:04:22 -07:00
Runmin Wang
ee494e024b defconfig: enable CONFIG_DEVMEM and CONFIG_DEVKMEM
Add support to access system's memory.

CRs-Fixed: 1013668
Change-Id: I7cafb74373efbc611bc894bdf3b351aae7e03da5
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-05-12 15:04:09 -07:00
Banajit Goswami
4e85059f81 ASoC: soc-core: change debug level for debugfs fail message
Debugfs directory creation failure are not critical error.
However, the failure messages might be misleading and might
be interpreted as geniune failure in ASoC functionality.
Mark the failure messages as debug level.

Change-Id: Id61c81753d493b6508cbe87c59077adda4675ada
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-05-12 15:03:55 -07:00
Osvaldo Banuelos
290a76165b clk: msm: osm: initialize PLL test control register
Program the PLL test control register for the power
cluster clock in agreement with hardware guidelines.

Change-Id: I102fd544ea0571d31d2ef9232195d4adbddda6d7
CRs-Fixed: 1009203
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-05-12 15:03:44 -07:00
Aravind Venkateswaran
79101aca9c msm: mdss: dsi: fix configuration for mode selection GPIO
Configure the mode selection GPIO as direction output in order to
correctly configure the panel operating mode.

Change-Id: Ic79850674c42f3c59512467dbb608942b98cf74a
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-05-12 15:03:31 -07:00