Commit Graph

2865 Commits

Author SHA1 Message Date
David Yu
7354304367 regulator: max77851: fix LDO3 range
LDO3 voltage range was limited so that 3.3V couldn't be set.

Bug 3668223
Bug 3534753

Change-Id: I0e29effd9cbf81db41241312800971435f71e101
Signed-off-by: David Yu <davyu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2731026
(cherry picked from commit e320ac551bf5f713674ed40ff9f63edd2985b09c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2767188
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2947781
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:25:27 -07:00
Shubhi Garg
0acac0ee77 regulator: max77851: add max77851 regulator driver
Bug 200749982

Change-Id: I8bbc914b7aa93058e4ec116fb3eb5b6d3eb74606
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2595372
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2946283
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:25:22 -07:00
Akhil R
3006e5b42f mfd: max77851: Enter SLEEP on suspend based on DT
Add option to disable entry to SLEEP when system is suspended.
There are systems where SW_SLP is not necessary on system suspend
as it could be managed differently. Provide an option not to enter
SLEEP state during suspend for such systems.

Bug 3643699

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I1600d0d053a15e18c7419a377962b76845bb92b5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2712396
(cherry picked from commit a83d4b50fdef4af7a9360224cad0357672bbd380)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2717492
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938654
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:25:17 -07:00
Shubhi Garg
1ab8a495fc mfd: add max77851 pmic MFD driver
Adding MAX77851 MFD driver provided by Maxim.
 - fix android warning/error for uninitialized variable return

Bug 200749982

Change-Id: I6ef82a6c06fe7bbd4df2c71991ec6c5c15e28474
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2591158
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938653
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-14 13:25:12 -07:00
Jon Hunter
cdc64f43fa drivers: Drop version check for DMA BUF namespace
The MODULE_IMPORT_NS macro adds a namespace tag to the module
information. The DMA_BUF namespace is required for Linux v5.16+ kernels
for drivers that use DMA BUF, there is no reason not to populate this
for earlier kernels. Furthermore, some 3rd party kernels prior to v5.16
may require this too and so drop the version check around the DMA BUF
namespace.

Bug 4119327

Change-Id: If8a5e90340f7a0582247cb91611d275ec1f4990e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2979260
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-13 22:21:25 -07:00
Ankur Pawar
f4b8e44a5e media: i2c: camera cert-c and coverity fixes
Cert-C fixes in camera ar1335, imx219 and imx477 driver.

Cert-C
CID:566165
CID:566166
CID:566168
CID:566169
CID:566170
CID:566171
CID:683423
CID:566021

Coverity
CID:10179834

Bug 3959323

Change-Id: Id68deab8051206b6eae3da917d83c32365186fc5
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2939548
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-13 22:21:06 -07:00
Jon Hunter
1212fd6023 scripts: Add copyright/license for conftest
The conftest script and Makefile are distributed as part of the
'open-gpu-kernel-modules' project [0]. These files don't have a explicit
copyright and license appended to the file, but per the COPYING file for
the files are licensed as MIT. Add the copyright and MIT license header
to the conftest files.

[0] https://github.com/NVIDIA/open-gpu-kernel-modules

Bug 4119327

Change-Id: I3f5dd44a4a8475a943660589432ebdf67ac3b255
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2978871
Reviewed-by: svc-sw-mobile-l4t <svc-sw-mobile-l4t@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-12 22:14:21 -07:00
Anubhav Rai
ed8e05adbf vi5: capture descritor seq in gang mode
capture descriptor sequence in gang mode
should be followed for each vi channel
individually.

bug 4266018

Change-Id: Ic438cc5a46c501b3c7e97bd6f62f8552350f6527
Signed-off-by: Anubhav Rai <arai@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2972827
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-12 22:12:09 -07:00
Jon Hunter
214beca091 drivers: Add compilation flag for iosys-map.h
Determining whether the header file iosys-map.h is present in the kernel
is currently determine by kernel version. However, for Linux v5.15,
iosys-map.h has been backported in order to support simple-framebuffer
for early display. Therefore, we cannot rely on the kernel version to
indicate whether iosys-map is present. This is also true for 3rd party
Linux kernels that backport changes as well. Fix this by adding a
compile time flag, that will be set accordingly by the conftest script
if this header is present.

Bug 4119327
Bug 4228080

Change-Id: Ibd814285b2a07932ede2fbe9e6dc8fd03039d0c3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971954
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-12 22:12:04 -07:00
Jon Hunter
b3b4cf6f51 debug: display-dts: Remove driver
The driver added to display the DT node name during boot is not being
used and so let's remove this driver. This is needed in the future for
debug it should be added under the test kernel modules.

Bug 3860578

Change-Id: Ief34ff4e33ab3094629c61e7051da6c1cb960fbe
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2913270
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-12 22:11:54 -07:00
Timo Alho
320dee5c7d clk: tegra: fix error return case for recalc_rate
tegra-bpmp clocks driver makes implicit conversion of signed error
code to unsigned value in recalc_rate operation. The behavior for
recalc_rate, according to it's specification, should be that "If the
driver cannot figure out a rate for this clock, it must return 0."

Bug 3640397
Bug 4090576

Signed-off-by: Timo Alho <talho@nvidia.com>
Change-Id: I96cfbe466351fde035e0de6aeae1b9e6d929cec4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-stable/+/2975580
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2977080
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-11 14:07:05 -07:00
Chris Dragan
97835cded8 misc: mods: update copyright header
Bug 4165184

Change-Id: Id5d570cc4e5c3364d696271b1333e47e02e17b9e
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2976924
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-11 14:06:17 -07:00
Shardar Mohammed
4be2dd36bb nvidia-oot: remove module * from class_create()
Remove the module pointer from the class_create() based
on following change in core kernel

======
driver core: class: remove module * from class_create()

The module pointer in class_create() never actually did anything, and it
shouldn't have been requred to be set as a parameter even if it did
something.  So just remove it and fix up all callers of the function in
the kernel tree at the same time.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
=====

Bug 4276500

Change-Id: Ifa0a92a282151ce12dc4a48f4f4b5b9499d3fbd8
Signed-off-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2976600
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-08 18:09:50 -07:00
Chris Dragan
a7810cdbac misc: mods: update from Perforce to 4.21
Bug 4165184

Change-Id: I6b548008b21024d8e322c5a1ca1f98fbc5b389a2
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2975467
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-07 18:56:15 -07:00
Mahesh Kumar
4ded4286d6 platform: dce: prevent dce driver unloading
DCE-KMD driver does not support reloading of the driver today.
Support will be added in the future.

As a WAR this patch prevents unloading of the driver.

Bug 4239420

Change-Id: I29f60fbaaf99f5f4e22f75b6674bd1a543b83c1a
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2968906
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Vinod Atyam <vatyam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Vinod Atyam <vatyam@nvidia.com>
2023-09-06 17:05:13 -07:00
Johnny Liu
837b275df5 drm/tegra: Resume device frequency with Fmax
Avoid using suspend_freq to set the Fmax for the device, since it will
re-enable the actmon watermark interrupts again if the suspend_freq is
not zero in the devfreq_suspend_device call.

Since we want to make sure device is running at Fmax but avoid using
suspend_freq, we can forcelly override the resume_freq with the
scaling_max_freq to reach the same effect.

Bug 4271562

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ia19a7ef9de14643abf1b174b6180e40a847de132
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2974074
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-06 12:05:33 -07:00
Ketan Patil
ebf51c43ae video: tegra: nvmap: Add more checks to avoid races
Add more checks in nvmap code so as to avoid any possible races.
- Update is_nvmap_id_ro and is_nvmap_dmabuf_fd_ro functions so that they
return error value during error conditions and also update their callers
to handle those error values.
- Move all trace statements from end of the function to before handle
refcount or dup count is decremented, this make sure we are not
dereferencing any freed handle/reference/dambuf.
- Increment ref's dup count wherever we feel data race is possible, and
decrement it accordingly towards end of function.

Bug 4253911

Change-Id: I50fc7cc98ebbf3c50025bc2f9ca32882138fb272
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2972602
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-06 11:58:16 -07:00
Revanth Kumar Uppala
7a01b01e88 nvethernet: Resolve "Wframe-larger-than" warning
-Use dynamic structure pointer to eliminate
"Wframe-larger-than" warning.

-Modify "-Wframe-larger-than" flag from 4096 bytes to 2048 bytes

Bug 4213870

Change-Id: I9dc3df951290415ce587b1fe2440ee52dd985b62
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2954775
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-06 05:20:02 -07:00
Jon Hunter
2360391866 scripts: Add conftest.sh support
The script conftest.sh can be used at build time to determine which
kernel headers or versions of kernel functions/macros are present in the
kernel that drivers are being compiled against. This is useful for cases
where changes are backported from upstream Linux kernels that may change
kernel functions and so we can no longer rely on the kernel version to
indicate which version of the kernel function to use.

The conftest.h header file is a top-level header file that includes all
the header files that are generated by the conftest.sh script. This
header file can be included by drivers so that they can use the various
definitions that are generated by conftest.sh. This file is located
along with the conftest.sh script because this is copied to the output
directory where all the generated header files are placed.

Bug 4119327
Bug 4228080

Change-Id: I781884e359e9688640661548620e01a178debac9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2974065
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-09-05 23:08:03 -07:00
Sheetal Tigadoli
514af0686d drivers:nvpps: skip PTP_TSC sync config if disable in DT
skip PTP_TSC sync config if disable in DT.

Bug 4044583
Bug 3896607

Change-Id: I5eccb2d2cf14aefbca792c935aeec407716db5ba
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2877072
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-05 10:43:37 -07:00
Sheetal Tigadoli
0f58bdf322 Documentation: bindings: define DT prop to disable PTP TSC sync logic
define DT prop to disable PTP TSC sync logic

Bug 4044583
Bug 3896607

Change-Id: I51778db4bd4203589c48bf5b3bdb0d49547fec55
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2877071
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-05 10:43:31 -07:00
Sheetal Tigadoli
182768fd7b drivers:nvpps: Add nvpps k5.10 updates to k5.15
Add nvpps k5.10 updates to k5.15

Bug 3896607

Change-Id: Id9614ca9329804ae81d3d60e2f8647191208d2b6
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2877070
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-05 10:43:26 -07:00
Sheetal Tigadoli
61586ca1df Documentation:binding:nvpps: Add nvpps documentation
Add nvpps documentation for dt binding

Bug 3896607

Change-Id: I238424db9152539f24f0544de8be320701215bfd
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2877069
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-05 10:43:20 -07:00
Johnny Liu
8b99f1f5b8 drm/tegra: Set static Fmax for suspend frequency
The suspend_freq is a fixed value for devfreq core, while the
resume_freq will be changed dynamically based on the last previous
updated frequency value of the device.

When device is put into suspend mode, devfreq core will update the
resume frequency with the suspend frequency. Therefore, when the device
is resumed back again, it will run at suspend_freq.

Forcelly set the suspend_freq as Fmax so that device will run at Fmax
when it is resumed back.

Bug 4269900

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ic6511613ae5d02831a66dd1c2a93f21c142bf3a7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2973229
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-05 03:46:11 -07:00
Mallikarjun Kasoju
c9dae14cce scsi: ufs: Fix CBB errors for K6.1
Made below changes to hba structure to make it
symmetric as core hba structure for K6.1.

1. Remove unused members in hbs structure.
2. Added write booster mutex.

Bug 4161857

Change-Id: I1fdb5e7da11e51edb9f072f8fde25795b38bdc30
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2973021
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-04 08:25:48 -07:00
Thierry Reding
fe4df61d9f drm/tegra: Remove existing framebuffer only if we support display
Tegra DRM doesn't support display on Tegra234 and later, so make sure
not to remove any existing framebuffers in that case.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Change-Id: I410c6dc73b3b00caf9bef4b3a047c741223e75f0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2968311
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Tested-by: Santosh Galma <galmar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-04 08:18:39 -07:00
Ankur Pawar
8c434bce54 media: i2c: fix imx185 sensor driver
Don't set the err value when setting parent clock.
Only print the error.

Bug 4191790

Change-Id: Ibab5c8bac08ea1451474ebd43cf9ff0f8200d8f1
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2965648
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-04 08:13:04 -07:00
Hanna Mofid
e5159320a9 drivers: Add bmi088 driver
Add bmi088 driver code which implements accelerometer
and gyroscope part of the IMU.

Bug 4190630

Change-Id: I653e928e594b67df61e3de35359b87436a80b60d
Signed-off-by: Hanna Mofid <hmofid@nvidia.com>
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931645
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-02 16:30:29 -07:00
Ketan Patil
ee71e72f4e video: tegra: nvmap: Do not decrement handle's refcount
Do not decrement handle's refcount until allocation function is
completed. If there is a data race between nvmap_ioctl_alloc and
nvmap_ioctl_free, the dma-buf/handle can get freed before last access
to dmabuf in nvmap_ioctl_alloc.

Bug 4253472

Change-Id: Idbcee278df645389f85ad03d48fa7baa76a7213d
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2969182
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971778
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-01 19:51:11 -07:00
Mallikarjun Kasoju
7939750e65 scsi: ufs: Fix CBB errors
UFS virtualization registers are accessed
without taking controller out of reset.

Bug 4161857

Change-Id: I6860eb2011fc6be5ffe9dba91ed94a8a749a4add
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2970936
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-01 13:08:08 -07:00
Praveen AC
f62619388d t23x:Add virtual i2c mux support & enable IMU.
This change consists of following changes:
1> Add Virtual i2c-mux driver support for P3762.
2> Ser/Dser reg programming to map 1st Hawk's respective MFP's.
   Accel (MFP0) Ser --> Deser (MFP5)
   Gyro (MFP3) Ser --> Deser (MFP7)
3> Disable IMU's for 2nd,3rd & 4th Hawk.
4> Code cleanup.

Bug 4146784

Change-Id: I3f69bd57b1368451d8e2db06366a57b06b5ff0f4
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971156
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-01 12:52:13 -07:00
Praveen AC
8ad7be0833 nv_hawk_owl:Enable external/internal Fsync.
Following support is added:
1.Add external Fsync support for HAWK & OWL.
2.Made Internal Fsync as default mode.
3.External Fsync is set only when TSC driver is called.
4.Swap i2c address translation for Hawks.
5.Add sync mechanism to protect i2c read/write.
6.Move sensor mode table during probe.
7.Code cleanup.

Bug 4125757
Bug 4143918
Bug 4151001
Bug 4161719

Change-Id: I15f1a41a838c883b11c14ed689adeb6d11aa2630
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971153
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-01 12:52:07 -07:00
Praveen AC
39aff5ff53 driver:cam_cdi_tsc: Add IOCTL call support for start & stop.
Made clone of cdi_tsc driver for camera use case to
add ioctl call to start & stop of external Fsync pulse
from TSC.

Bug 4091221

Change-Id: I1d0039a84137fd857b7ec5a5933918a50d7d80e3
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971147
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-01 12:52:02 -07:00
Praveen AC
35335a44b6 nv_hakw_owl: Add 4xHawk and 4xOwl support.
Following changes are made to add support 4xHawk & 4xOwl
on P3762 / P3783 GMSL board.
1) Driver changes to add i2c address translation.
2) Fix simultaneous streaming of Owl & Hawk.
3) Update ar0234 EEPROM Calibration.
4) Add support for 4xHawks.
5) Add internal Fsync support.
6) Add multiple link combinations for Hawk & Owl.
7) Enable EEPROM support for 4xHawk.

Bug 3620984
Bug 3562348
Bug 3866131
Bug 3817827
Bug 3932004
Bug 4071347
Bug 4095571
Bug 4096788

Change-Id: Ic6289f60258d446f259277fdd1d6d52e687dc74e
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971143
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-01 12:51:51 -07:00
Ian Kaszubski
6e4e41ce95 media: tegra: cdi-mgr: Fix deser power down IOCTL
Add missing power down implementation for the
CDI_MGR_IOCTL_DISABLE_DES_POWER ioctl.

Bug 4148683

Change-Id: I3c25ac9cdde8c7799cd60a3a78590f24637d4c7e
Signed-off-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2962131
(cherry picked from commit befa29f775ca44a058a2c460f02ac0f77807c78d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2943106
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-09-01 12:50:28 -07:00
Anubhav Rai
b2b703f13d camera: fix rgba format for lt6911uxc
Fix RGB format streamed by the Lontium HDMI
CSI chip.
Fix Lontium HDMI driver for print. Probe is
info and not error flagged in kwarn scripts

bug 4168439

Change-Id: I7323fa5d6fd0b2c0cdefd9ea7248335b76726b94
Signed-off-by: Anubhav Rai <arai@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2927531
(cherry picked from commit d12b72d44508ff8c36d26dcbb50aa6a05e6a7bdf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2966743
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-31 05:40:20 -07:00
vinodg
d49cb5b97d drivers: dce: Increase the HSP max count
Increase the hsp index max count to 3

Jira TDS-13541

Change-Id: Ic74eae415a14f5ccb34fc079062e00bc83a3e03a
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2948232
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-31 05:34:45 -07:00
Nitin Kumbhar
0f04078fb6 drivers: nv-virtio-poc: fix coverity issues
Fix issues about unused value of err and overwriting write_size
value.

write_size:
assigned_value: Assigning value from err to write_size here, but that
stored value is overwritten before it can be used.
...
value_overwrite: Overwriting previous write to write_size with value
from copied.

err:
returned_value: Assigning value from nvvc_process_rxdataavaiable()
to err here, but that stored value is overwritten before
it can be used.

CID 10174057
CID 10174058

Bug 3952896

Change-Id: I21ef42b7c1c3fec83e558f80d954b65dbb14a5b8
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2969244
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-30 20:33:26 -07:00
Aniket Bahadarpurkar
fa20ae0dd6 soc: tegra: Reduce number of mem areas
Reduce number of memory areas for camrtc dbg tests
for DRAM optimization

Bug 3995285

Change-Id: Icc2250915ada202aee962c691d97f14ca861f31d
Signed-off-by: Aniket Bahadarpurkar <aniketb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2902767
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-08-28 15:12:02 -07:00
pshaw
01ecacf7b4 fsicom: add fsicom multi core support
- smmu and hsp support added for fsicom multi core
  feature in fsicom kernel driver
- probe, suspend and resume will be called for smmu_inst
  0 only as it will have single dev node for comm.
- mailbox 2,5 and 1,4 is used for TX and RX comm. respectively
  with FSI

Jira SS-5744

Change-Id: I859d5945853195ba76996a8c36ca19efd9c4409f
Signed-off-by: pshaw <pshaw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2952268
Reviewed-by: Praveen James <pjames@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-27 21:50:21 -07:00
Jian-Min Liu
dc318641f5 nvsciipc: Fix issue associated with no permission to set db
CONFIG_ANDROID kconfig option has been removed from ack-6.1 version,
hence we add ACK_BUILD config to identify android build.

Bug 4223187

Change-Id: I77e6a40fc57a54d2115938e1906faf15ee879d60
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2953312
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 23:32:11 -07:00
Jian-Min Liu
719d3fa024 nvidia-oot: use TEGRA_SYSTEM_TYPE_ACK as ack macro
Use config TEGRA_SYSTEM_TYPE_ACK to control kernel builds only
base on the system type which also aliged to Makefile use.

Bug 4223187

Change-Id: I276208d180d1b3459eccb80d8fdb818f4507d3df
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2966713
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 23:32:04 -07:00
Vamsee Vardhan Thummala
46f980b806 drm/tegra: firewall: Check for is_addr_reg existence in IMM check
In the IMM opcode check, don't call is_addr_reg if it's not set.

Fixes: 8cc95f3fd35e ("drm/tegra: Add job firewall")
Change-Id: I2b7b35afeed774a571fd147aa922718f644c5c88
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2966639
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 23:21:30 -07:00
Johnny Liu
a588ad882d drm/tegra: Derive count weight from max freq
The original resume_freq will be overridden when the device is put
into suspend mode. Therefore, the resume cycle won't always use the
max frequency of the device to set the actmon count weight.

Change the implementation to use scaling_max_freq to always use the
max frequency of the device to set the actmon count weight.

Bug 4252125

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iaaae8ada989cd1ed7dd728fb526ad4391a2f192c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2967098
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 09:24:42 -07:00
Mark Mendez
1435b03c66 BPMP: reduce HV timeout to 30 sec
The current timeout of 10 minutes for the BPMP-HV IVC
is too long.  Reducing it to 30 sec

Bug 4180228

Change-Id: Ibfa86bee39c970d0bb3dbdf2b2b446fdb6ad9ef4
Signed-off-by: Mark Mendez <mmendez@nvidia.com>
(cherry picked from commit a775d866e9127b95b7adee8d3b4961bb6ee6ae89)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2962685
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2023-08-24 09:11:47 -07:00
Chris Dragan
1a3e4521c8 misc: mods: update from Perforce to 4.20
Change-Id: I7ea45fb5aa393372299648e326e81ecf62913b40
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2955034
Reviewed-by: Lael Jones <lajones@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-24 09:03:53 -07:00
Jian-Min Liu
6f90c6d858 Fix unused function errors for ack user build
In Android's user-build, debugfs is not configured. This has led to
multiple warning errors related to Debugfs usage in the nvidia-oot
build. Add CONFIG_DEBUG_FS conditional compilation around the
functions that use it.

drivers/scsi/ufs/ufs-tegra-common.c:39:13: error: unused function
'ufs_tegra_init_debugfs' [-Werror,-Wunused-function]
static void ufs_tegra_init_debugfs(struct ufs_hba *hba)
            ^
 1 error generated.

drivers/platform/tegra/aon/tegra-aon-debug.c:732:13:
error: unused function 'tegra_aondbg_recv_msg'
[-Werror,-Wunused-function]
static void tegra_aondbg_recv_msg(struct mbox_client *cl, void *rx_msg)
            ^

drivers/platform/tegra/aon/tegra-aon-debug.c:749:12:
error: unused function 'aon_dbg_init' [-Werror,-Wunused-function]
static int aon_dbg_init(struct tegra_aondbg *aon)
           ^
 2 errors generated.

Bug 4230728

Change-Id: I4210c3574b4d76205fdca45990e9ccc02c18620a
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2964635
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2023-08-23 11:19:18 -07:00
Revanth Kumar Uppala
37b53e8d72 r8168: update driver to 8.051.02.10m_pll
- Update realtek r8168 driver version to 8.051.02.10m_pll
- This update disables 10M EEE

Bug 4205197

Change-Id: I0d20a2d6061e108192a3066965aff94e8a463ca5
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2962412
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-23 11:17:30 -07:00
Johnny Liu
1dcfd26f70 drm/tegra: Set nvjpg actmon count weight once
Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to align the implementation as
nvdec for kernel upstream.

Bug 4251915

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I6df0f13d1c58402cb78e4e05ff6cd6cd21ef2c4b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2965505
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-23 02:34:10 -07:00
Johnny Liu
d6a45460a5 drm/tegra: Set nvenc actmon count weight once
Change the implementation to set count weight values for both actmon and
the engine once in runtime resume cycle to align the implementation as
nvdec for kernel upstream.

Bug 4251915

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ie2df685e990a4ebcd5a83db23db3c3bc8ab2af37
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2965502
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-23 02:34:04 -07:00