xhci: tegra: Fix bias pad power control

Per UTMIP software guideline document, if xusb own OTG port0,
use xusb padctl register space to power on/off bias pad.

Bug 1334491
Bug 1242148

Change-Id: I28c7b9346b8332352fa53996769d6a76221b5ac4
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Signed-off-by: joyw <joyw@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
(cherry picked from commit abb84051c9cf6e0709a752081ae2102e349e0955)
Reviewed-on: http://git-master/r/358100
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
ARM: tegra: tegratab: avdd_hdmi_pll selection

For P1988, discharge unit for avdd_hdmi_pll
regulator is prepared and that is handled by
GPIO_PO6 pin. For other platforms like E1569,
P1640 do not have this unit.
This change selects proper avdd_hdmi_pll
regulator platform data according to board
selection.

Bug 1439626

Change-Id: I7515e8a4e4d57a491720fc0adbf7790c7c73a39c
Signed-off-by: Min-wuk Lee <mlee@nvidia.com>
Reviewed-on: http://git-master/r/358158
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harry Hong <hhong@nvidia.com>
USB: ehci: tegra: destroy mutex when driver remove

mutex_destroy to be called when the driver is removed.

BUG 1401358

Change-Id: Idb6703c01c41d241d8bdb67ca19c80a78c52b513
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/328852
(cherry picked from commit 739f06547bff816641eb998e6f109e64b614ebfe)
Reviewed-on: http://git-master/r/358170
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
input: touch: maxim: revert device splitting

Set number of input devices back to 1 and disable
the mutual exclusion of finger and stylus.

Bug 1439868

Change-Id: I104cd8f4fa71c542399e61ae0015465638f27d3c
Signed-off-by: Youngjin Kim <nkim@nvidia.com>
Reviewed-on: http://git-master/r/356008
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
ARM: dts: update dts based on board config.

Bug 1439626

Change-Id: I621af6dfcc2977f2f30ce3bd7242d016f3eb89f1
Signed-off-by: Harry Hong <hhong@nvidia.com>
Reviewed-on: http://git-master/r/358474
arm: tegra: tegratab: ULPI_DATA5 pin selection

ULPI_DATA5 pin is not used in ERS and P1640,
but used to avoid avdd_hdmi_pll regulator leakage.
This pin needs to be selected according to
board selection.

Bug 1439626

Change-Id: I11f9305e718af28f221efae5cfcdd722e0098a29
Signed-off-by: Min-wuk Lee <mlee@nvidia.com>
Reviewed-on: http://git-master/r/358528
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
usb: ehci: Tegra: change to noirq suspend/resume

Chnage ehci suspend/resume to noirq suspend/resume
to enable it get more chances to handle the remote
wake-up which may come after normal suspend/resume

bug 1430974

Change-Id: I0e27435c729b515c968990507a1d6ab53c4ce37a
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/359052
usb: ehci: Tegra: add echi wake lock

For now, only apply it in tegra_ehci_irq when it's
triggered by remote wake-up irq, since, without
wake lock hold here, device may continue the
suspend if remote wake-up comes in suspending.

bug 1431546

Change-Id: I44ea268ca168a1a3a9098ad9f5f6f7b1270a0fa5
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/359090
ARM: tegra: usb: disable WAKE_ON_CNNT_EN for HSIC

Disable USB_WAKE_ON_CNNT_EN_DEV bit during phy_power_off for HSIC

Bug 1430974

Change-Id: I545c7cc0f1b87f4540554b3d7e5e9cca89ea2411
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/359109
Tested-by: Martin Chi <mchi@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Martin Chi <mchi@nvidia.com>
arm:tegra: Correct sample rate for voice call

Because the channel1 of DAM is used for DL, there is no SRC in DL.
the  codec need to be set the same rate with baseband.
Otherwise the I2S Timing REG cannot get the suited value and
left channel may be swapped with right channel.

Bug 1441449

Change-Id: Ib71bb41a7e03d2a85d718be0c94a5a5f525c0ce3
Signed-off-by: Lei Fan <leif@nvidia.com>
Reviewed-on: http://git-master/r/358078
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijay Mali <vmali@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Martin Chi <mchi@nvidia.com>
misc: tegra-baseband: Don't abort suspend notify

Bug 1445863

Change-Id: I6d58eed1ffbfc4012f2e4543a87d5f06e59542a7
Signed-off-by: David Yu <davyu@nvidia.com>
Reviewed-on: http://git-master/r/359590
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
mmc: sdhci: tegra: fix shutdown order

Fix mmc command error caused by early regulator shutdown.

Bug 1445876

Change-Id: I446dba2b216ca6fdebf38aa7d1afaf88370b5bee
Signed-off-by: David Yu <davyu@nvidia.com>
Reviewed-on: http://git-master/r/359698
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
mmc: core: Handle card shutdown from mmc_bus

Considering shutdown of the card, the responsibility to initate this
sequence shall be driven from the mmc_bus.

This patch enables the mmc_bus to handle this sequence properly. A new
.shutdown callback is added in the mmc_driver struct which is used to
shutdown the blk device.

Bug 1445876

Change-Id: I947315a7102606a1873eeebf136d741c98b46c76
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: David Yu <davyu@nvidia.com>
Reviewed-on: http://git-master/r/359692
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
ARM:Tegra:Add sleep GPIO function

Some GPIO pins need re-configure while system enters LP0.

Bug 1439735

Change-Id: I2d21e4119c7a9d762db17b0b753ba12781547a27
Signed-off-by: ximingc <ximingc@nvidia.com>
Reviewed-on: http://git-master/r/359078
Reviewed-by: Martin Chi <mchi@nvidia.com>
gpio:tegra:Add sleep gpio function

Some GPIO pins need re-configure when system enters LP0

Bug 1439735

Change-Id: I3d9c864b5c099ab834543e2f3c905cab8a957372
Signed-off-by: ximingc <ximingc@nvidia.com>
ARM:tegra:tn7c:Configure GPIO_PQ1 as sleep gpio

GPIO_PQ1(KB_COL1) needs to re-configure in LP0 state.

Bug 1439735

Change-Id: I5a18136c537e7a6938e19f4e834bde61846c1161
Signed-off-by: ximingc <ximingc@nvidia.com>
ARM:tegra:tn7c: Export GPIO122 (GPIO_PP2)

User space can control the output value.
Output 0 to cut power of modem buck-boost circuit.
echo 0 > /sys/class/gpio/gpio122/value

Bug 1443384

Change-Id: I673a1e86099774ecf3ce1c235333abc91217eb6f
Signed-off-by: ximingc <ximingc@nvidia.com>
Reviewed-on: http://git-master/r/359212
Reviewed-by: Martin Chi <mchi@nvidia.com>
Tested-by: Martin Chi <mchi@nvidia.com>
ARM:tegra:tn7c:Cut modem power if not attached

Cut modem buck-boost circuit power if modem part is not inserted.
 MDM_APACK2 (gpio input) 0 : modem inserted
                         1 : not inserted
 MODEM_EN (gpio output)  0 : power off
                         1 : power on

Bug 1443384

Change-Id: Ib79d7c673d98d75dd8294f1568537080b1a65a83
Signed-off-by: ximingc <ximingc@nvidia.com>
Reviewed-on: http://git-master/r/359626
Reviewed-by: Martin Chi <mchi@nvidia.com>
Tested-by: Martin Chi <mchi@nvidia.com>
usb: acm: No hangup for Bruce during reset resume.

Set NO_HANGUP_IN_RESET_RESUME flag to Bruce model to
prevent tty hangup during reset resume procedure.

Bug 1446181

Change-Id: I3866e49e8c36ec8627791cd63a237b3bca63e0b9
Signed-off-by: glei <glei@nvidia.com>
Reviewed-on: http://git-master/r/359777
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Martin Chi <mchi@nvidia.com>
Revert "ARM:tegra:tn7c:switch to LP cluster before LP1"

This reverts commit d9b262e497e4d760f6c2eea595da6845f8fc4b23.

Change-Id: Iaba5e51ce2b340891c2f4746ae401ecb8dbbcc16
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/359766
GVS: Gerrit_Virtual_Submit