ARM: Config: Tegra2: Disabled CONFIG_INPUT_MOUSEDEV

Disabled CONFIG_INPUT_MOUSEDEV to avoid kernel registering PS/2 mouse
devices, which are mostly not in use now.

Bug 1162832

Change-Id: If47e654063934d3b60d033a0d2523b8caf97825b
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/187808
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
ARM: Config: Tegra3:Disabled CONFIG_INPUT_MOUSEDEV

Disabled CONFIG_INPUT_MOUSEDEV to avoid kernel registering PS/2 mouse
devices, which are mostly not in use now.

Bug 1162832

Change-Id: I0b44af668fa94ffc589e646a842259afa837731e
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/187807
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
arm: tegra: cardhu: additions to cardhu board file

This change is intended to add modifications to
cardhu board file (which is also used for beaver)
to get rid of NACK errors occuring due to the absence
of certain hardware components on beaver

Bug 1217572

Change-Id: I36dfcda1b133c983ce25d56729505bce8b99fdf1
Signed-off-by: Darbha Sriharsha <dsriharsha@nvidia.com>
Reviewed-on: http://git-master/r/193667
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
arch: tegra: Ventana: vdd_ldo4 regulator handling

Cleaning up of the vdd_ldo4 regulator handling and also control
the multiple calls for regulator_get call for vdd_ldo4

Bug 1241274

Change-Id: I0f62d5059212302956bfe7e48d24eb7f45ff2dda
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: http://git-master/r/207516
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
arm: tegra: cardhu: modify cardhu board files

This change is intended to add a few modifications to
cardhu board file (which is also used for beaver)
to get rid of NACK errors occuring due to the absence
of certain hardware components on beaver

Bug 1217572

Change-Id: I1df7b7f777014610e4d64695d89324808ea4f266
Signed-off-by: Darbha Sriharsha <dsriharsha@nvidia.com>
Reviewed-on: http://git-master/r/215983
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Make firmware loading of R8169 optional

According to Realtek, the firmware provides
power optimizations. The driver works without
the firmware. Plus, there are scenarios where
the firmware is not available, which makes the
driver wait at request_firmware call (i.e.,
60 sec wait).

Bug 1236060
Bug 991551

Change-Id: Ifcaa4b2dd48c4111ded33cf2bade7dc1f6422821
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/258353
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
config: tegra3: Turn off R8169 firmware loading

The firmware is not being in use currently.
So, turn the loading code off.

Bug 1236060
Bug 991551

Change-Id: Id41cf762b59502d0ece470e315ac75d93e3b6b39
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/218613
(cherry picked from commit f15976bdfb32d6c5e20057f6d4d57646c15a5591)
Reviewed-on: http://git-master/r/258354
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
media: video: tegra: sh532u: fix out-of-bounds read

fix Coverity issue
Coverity id : 13692

Bug 1046331
Bug 1049868

Change-Id: Iefa6d076d4622368534710630b89b9a15d166378
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/165864
(cherry picked from commit db33c3f3f2447a52a40f4fd001fec9a2932ee4c8)
Reviewed-on: http://git-master/r/244637
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
ARM: tegra: beaver: updated DVFS table

DVFS entry is fixed for Hynix_2GB_H5TC4G83MFR-PBA
to support all emc frequencies.

Bug 1218885

Change-Id: Id9d578499e495f43db1a072cbcee25a353fa78f5
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/210653
(cherry picked from commit 688bf04ff67e2c1ff22762f4f578b925ff3b9f3c)
Reviewed-on: http://git-master/r/273530
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
ARM: tegra3: initialize pll_a during boot

Configure pll_a during boot so that
locking to pll_a does not fail

Bug 1330751

Change-Id: I188f0be211379f43770b24c5b382dec2788aefda
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/269469
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jong Kim <jongk@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
media: OV5650: tweak registers and add test mode

 - tweak offset registers
 - add test mode to output color bars
 - use BGGR RAW format

Bug 1369083

Change-Id: I61352c018f8ca099ff3d39158a67052a1e185eec
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/279983
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Allen Martin <amartin@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
media: videobuf2: fix buffer management issues

Use right buffer flag NVMAP_HANDLE_WRITE_COMBINE to allocate buffer,
which can be shared by VI/CSI and CPU. Don't use NVMAP_HEAP_SYSMEM.
It is validated to old T20 silicon and can't support big buffers. By
default, our nvmap_alloc() will use IOVMM to allocate buffers.

nvmap_pin() gives us IOVA for hardware engines like VI/CSI module
with IOMMU enabled in kernel. nvmap_mmap() gives us VA for CPU
read/write operations. So we need to convert VA address to physical
address of the buffer and map that buffer to user space processor's
memory space "page by page".

Bug 1369083

Change-Id: I4629eebe206c7640adf63551968fd89260dd0082
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/279984
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Allen Martin <amartin@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
media: tegra: use BGGR raw ouput format

Bug 1369083

Change-Id: I43acb0d1dd6ca182291895d294a8458bfc99da05
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/279985
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Allen Martin <amartin@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
media: tegra_v4l2: pass platform_data via soc_camera_link

soc_camera_link supports passing power on/off control callback to
soc_camera stack. So the power control can be handled by soc_camera
stack instead of our Tegra V4L2 host driver.

Also pass other platform_data fields via soc_camera_link instead of
a hacking nvhost_device_data struct.

Bug 1240806
Bug 1369083

Change-Id: I443a7d28196cc8292805da70d2d5ff1c3cd50a5d
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/246267
(cherry picked from commit 9083d270bf93b583cd5bf5151a52ea250f8541a3)
Reviewed-on: http://git-master/r/279986
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
media: tegra_v4l2: add dual camera support

Add support for dual cameras from both CSI-A and CSI-B:
 - move all the CSI settings into video buffer struct
 - queue the video buffer struct to a dedicated queue
 - process one video buffer struct from the queue at one time

Bug 1369083

Change-Id: Ie64d69282ab991b66e97327e288a2bacde088bd6
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/246269
(cherry picked from commit 228b0c2d9ae3fa1121f88836626d654ae0fc4ff0)
Reviewed-on: http://git-master/r/279987
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
ARM: tegra: cardhu: enable OV5650/OV5640 sensor

Enable OV5650 and OV5640 sensor in Cardhu board file with the help of
Tegra V4L2 SoC camera interface.

To use V4L2 driver, we need to disable old camera HAL driver.

Bug 1240806
Bug 1369083

Change-Id: I0dc529d44fba4d80b45690e384e8bf81b29f69e5
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/246266
(cherry picked from commit 6b2f7cc4117208dc992478f27d5873ea38071fdc)
Reviewed-on: http://git-master/r/279988
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
media: ov5640: update OV5640 sensor driver

Bug 1369083

Change-Id: I1522b688e0681e52592c0f26a8e335937372836a
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/279989
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
media: camera config changes

- Disables TEGRA_CAMERA
- Enables SOC_CAMERA and OV5640 sensor support

Bug 1369083

Change-Id: I073c226e9f04a6f4f4699051f624a755dceb36cb
Signed-off-by: Vikram Fugro <vfugro@nvidia.com>
Reviewed-on: http://git-master/r/309491
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Revert "media: camera config changes"

This reverts commit dd9a841da571a41d43f1eeaac1785b2adb1d80f3.
The config changes (for V4L2) can be done manually as per need
basis for V4L2, followed by compiling the kernel.

Change-Id: I9174bce0f3da2974ab703b238dfb8fb3bbf607c5
Signed-off-by: Vikram Fugro <vfugro@nvidia.com>
Reviewed-on: http://git-master/r/327607
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kaustubh Purandare <kpurandare@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
media: nvmap: Few tweaks in nvmap

The tweaks are only specific to r16-r2 branch
and will not go into mainline.
 - Pass nvmap memory handle to the user through
   the mmap'd buffer allocated by videobuf2 client.
 - Allow the "user" nvmap client to access the
   nvmap memory handle of "videobuf2-dma-nvmap" client.

Re-arranging the copyright message in nvmap_dev.c
for Automatic validation to pass.

Bug 1369083

Change-Id: Ia27d172253860e79557911c2e848bc9084d662d4
Signed-off-by: Vikram Fugro <vfugro@nvidia.com>
Reviewed-on: http://git-master/r/309494
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Kaustubh Purandare <kpurandare@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>