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>
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>
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
arm:tegra:TN7C: set VDDIO_DDR to 1.38 per ram-code

RAM_CODE[1:0]=0x00, Micron DDR3L, requires 1.38V
RAM_CODE[1:0]=0x01, Hynix DDR3L, requires 1.35V

bug 1438727

Change-Id: I8cfe9e7220f197bcf6e00b91c5d354c3eda8b3f0
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/360198
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
ARM: dts: tn7c: includes Hynix DVFS table

http://nvbugs/1438727/10

bug 1438727

Change-Id: I8280c79ec88c62a329de7f3d4b46f2623f57887e
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/360203
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Pu <dpu@nvidia.com>
Reviewed-by: Danny Song <dsong@nvidia.com>
GVS: Gerrit_Virtual_Submit
ARM: tegra: clock: Use ram code for TegraNote7C

TegraNote7C supports two different DDRs:

RAM_CODE[1:0] = 0x00 -> Micron DDR3L 1GB
RAM_CODE[1:0] = 0x01 -> Hynix DDR3L 1GB

Bug 1438727

Change-Id: Ib4b6f2d38b2667dea1167417ba84388f9739414e
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/360204
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Danny Song <dsong@nvidia.com>
GVS: Gerrit_Virtual_Submit
Revert "Revert "mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used""

This reverts commit 866353859bcd3328dd0be84e0f0ed6d1ba834772. Moving back
suspend and resume to dev_pm_ops to ensure that bus suspend is done before
device suspend and bus resume is done after device resume. Without bus
suspend and resume, there is a chance of some requests being scheduled
after device suspend or before device resume is done.

Bug 1381236
Bug 1446176

Reviewed-on: http://git-master/r/309656
(cherry picked from commit de13dd1f8b0d802914ec4143c42730d4f90f880b)
Change-Id: I842b1e042982f8ac0547936800bbc996643c7d34
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>

Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Change-Id: I7b72b956a617762741854d49b4560d3848cf2b12
Reviewed-on: http://git-master/r/326379
Reviewed-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

Change-Id: I0cc4d85c879dcedf671f14a83978524cd0c7f287
Signed-off-by: Ximing Chen <ximingc@nvidia.com>
Reviewed-on: http://git-master/r/360331
GVS: Gerrit_Virtual_Submit
Reviewed-by: Martin Chi <mchi@nvidia.com>
Tested-by: Martin Chi <mchi@nvidia.com>
mmc: sdhci: tegra: fix power rail policy

Keep power rail on unless otherwise specified on shutdown.

Bug 1445876

Change-Id: I5a0309226177c10ab52f25703c7133be63faa6b4
Signed-off-by: David Yu <davyu@nvidia.com>
Reviewed-on: http://git-master/r/360385
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>