arm/dt: msm8974: spi_qsd: Config GPIOs by name instead of index

Currently GPIOs are identified (MISO/MOSI/CLK or CS0..3)
by their index in the device-tree entry's array.
Further, chipselect GPIOs must be declared in order.
This allows to set a value for GPIO number three only
if the values for GPIOs one and two are also set.
This patch identifies GPIOs by a unique name, thus
allows to specify any arbitrary chipselect GPIO and
reduces chances of simple user configuration error.

Change-Id: Idd06607df2992d17a0ab9ad1e77b2db35ccd1d29
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
msm_serial_hs: Configure UART RX gpio line as wakeup irq line

UART wakeup can be triggered by RX activity using a wakeup GPIO on the
UART RX pin. This change adds support for configuring the UART RX gpio
line as wakeup irq line.

CRs-Fixed: 482104
Change-Id: I775c17d4d36b08225b32063131473567c2d16f9c
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
Signed-off-by: Ram Mohan Korukonda <rkorukon@codeaurora.org>
ARM: dts: msm: Move USB3 interrupt overrides back to top-level msm8974

Several of the msm8974 v2-based board DTS files contain the exact
same definition of the override for &usb3 whose sole purpose is to
add an additional interrupt to support the PM8941 MISC peripheral
interrupt for ID pin detection.

Since commit ad4a0282 (usb: dwc3-msm: only request PMIC USB ID
interrupt if available), there is now runtime support to detect
if this interrupt is available or not, so we no longer need this
override littering a bunch of board DTS files. Let's move the
pmic_id_irq to the top-level msm8974.dtsi SoC file.

Change-Id: If857950fbb26447f21a795e54e7adbc77ada0e56
Signed-off-by: Jack Pham <jackp@codeaurora.org>
arm/dt: msm8974: Enable support for configuring MPM interrupt

On 8974, DP and DM lines are routed to MPM for detecting data lines
transition during VDD minimization. Hence enable support for allowing
VDD minimization during host bus suspend and depend on MPM for usb
remote wakeup.

Change-Id: I18c8cd9cbeb7bd1767a54ef3c70b6392255e56c9
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
ARM: dts: msm: Add pipe-ownership and product-code for slimbus in 8974

To setup data channels from application processor with at least one
endpoint in memory, slimbus driver requires information about pipes
owned by the apps processor, and the product-code of the controller.
Add this information to Device-Tree for MSM slimbus controller on
8974.

Change-Id: Ice45907c784f532b727868ce0f14a94e08313eeb
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
ARM: dts: msm: Add phandle for ADC devices in PMIC pm8941

Add phandle to VADC, IADC and ADC_TM device nodes.

Change-Id: Ib8ee6ada7c1e1cc6985169b2677396f0305ef86d
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
ARM: dts: msm: Use PMA8084 resources for msm8974pro-ac

MSM8974Pro-AC uses PMA8084 as a primary PMIC instead of PM8941.
Remap all consumer usage of PM8941 resources (regulators, GPIOs,
MPPs, IRQs) to the corresponding PMA8084 resources.

Change-Id: Ib4177df95e8bd6f285663fce36bf70d4915795be
Signed-off-by: David Collins <collinsd@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8974.dtsi
ARM: dts: msm: Update regulator supply name for msm8974

There should not be underscore in the property name.
Remove the underdcore in the regulator supply name defined
in msm-thermal device tree.

Change-Id: Id4949d8ca9d9d14ad2a8862d94571d070326d45e
Signed-off-by: Jennifer Liu <chihning@codeaurora.org>
ARM: dts: msm: Update TSENS efuse address

Use the shadow address while reading the TSENS
efuse region. Currently TSENS reads the raw address region
but it is recommended to read the shadow region instead
which is designated as a read only region.

Change-Id: If04159dfb35d5c225c4d2720b5fbc9c1f2998cba
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/apq8084.dtsi
ARM: dts: msm: Define UART aliases for 8974

Create an explicit alias for the console UART device used
on 8974 targets to make UART uevents more informative.

Change-Id: I1d705981eb623c8ac7d35cbd8b76b022386f9109
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
ARM: dts: Enable additional GDSC collapse modes based on HW version

8974v2.2 supports additional collapse modes for Oxili, Venus,
and MDSS. Move the device-tree parameters that disable the modes
to version-specific files. Some MDSS collapse modes should still
remain disabled, even on v2.2.  All collapse modes are supported
on 8974Pro.

Change-Id: Ic9f1c057d16042d9a9c339dc5786cf35301169f0
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8974-v2.0-1.dtsi
ARM: dts: msm: Update SPI entries
SPI driver has new device tree bindings for GPIOS and
for clock-path voting. Here, SPI entries are updated
to reflect these changes.

CRs-Fixed: 514669
Change-Id: I06f84f09569d5768f762f59b2811508a89cf927a
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
msm: smd_tty: add device tree support to smd_tty drivers

SMD TTY is configured using local tables that do not
allow customization on a per-target basis.

Add device tree support to configure SMD TTY devices.

Change-Id: Ie02dd63a0bec8edff77c8cbeeb72ae7331a0c67a
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/smd_tty.c
ARM: dts: msm: Add entry for relocatable pil heaps for 8974

Add device tree entry for relocatable pil heaps to be used
using the ion framework.

Change-Id: I813f154d45363706f78b5b23353e80f082aec56c
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
arm/dt: msm8974: Add GDSC regulator controlling Venus core

GDSC control is now moved out of PIL to enable power collapse
of Venus core through video driver.

Change-Id: Id8cf5547871434dede63c5a304311c53a9bc78dc
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
USB: bam: Enable RAM12, RAM13 only for QDSS data & descriptor fifo

Currently for QDSS<->USB usecase, DWC3 core internal memory
(RAM11, RAM12, RAM13) is used for data & descriptor fifos. A data
fifo of 8KB size is enough for achieving maximum QDSS performance
instead of 16KB size. Hence enable only RAM12, RAM13 for QDSS<->USB
usecase so that remaining RAM10, RAM11 can be used for TX endpoint's
fifo allocation. This enables more fifo allocation for TX endpoints,
which will allow double buffering and results in better throughput
improvement.

CRs-Fixed: 532070
Change-Id: I7637bda9520b92537b9297f30d6003d2b6ceccf7
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
ARM: dts: msm: Update device tree with memory map information for 8974

Update the device tree in order to be aligned with the latest memory
map. As the venus and adsp images are relocatable, reclaim the memory
that was previously occupied by non relocatable images of these
subsystems.

Change-Id: I4c4ff452f01877378247d275a9a86ee88a1948cb
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
ARM: dts: msm: remove ebi cache dump reservation for 8974

The cache dump driver no longer uses the deprecated ebi memory
reservation api to reserve memory. As such, remove the
reservation from the device tree.

Change-Id: Ib016094da95c0dbc4520b9e3ed657487b180c853
Signed-off-by: Pushkar Joshi <pushkarj@codeaurora.org>
ARM: dts: msm: Support touch with 1080p display on 8974

Enable Synaptics S3408 touchscreen on 8974 1080p display panel.

Change-Id: I9e953370edc0c3aef7d7493fa75b23715609f894
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8974pro-ac-mtp.dtsi
ARM: dts: msm: Remove bus active-only property from TSPP

TSPP HW blocks would use the PNOC bus independent
of the power collapse state of the CPU. Making bus vote
with active-only will cause the vote to be removed by
RPM when CPU gets into power collapse state.

CRs-Fixed: 546090
Change-Id: Ia3963f84f96eb96747867d28a8b09889de8ca22f
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>