Compare commits

..

1534 Commits

Author SHA1 Message Date
Revanth Kumar Uppala
de95a4c5bb r8126: Fix PCIe completion timeouts
During PTP operation, abnormal interrupt handling could stall internal
transactions, leading to delayed BAR register reads and PCIe completion
timeout errors.

This patch adjusts the PTP interrupt mechanism to
eliminate the stall and reduce latency.

Bug 4755448

Change-Id: Id7fa3fbcac33ba89b3635d86a15932ac95f7e4bd
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3446115
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-09-05 08:26:18 -07:00
nanwa
11f63191e9 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit b284345610ceb ("pva: fix static defects...")

No changes since last deployment.

Change-Id: I56211cf375961730f67e246f4103217b33893286
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3428161
Reviewed-by: Rohit Goel <rogoel@nvidia.com>
Tested-by: Rohit Goel <rogoel@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3433644
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
2025-08-15 17:25:39 -07:00
Shobek Attupurath
5447cfe01c rtl8852ce: Add Nvidia changes to driver v261-10
- Reduce log level
- Remove unwanted prints
- Add Nvidia sourcetree path

Bug 5440351
Bug 5442104

Change-Id: Ie6655f1570731b1c51ef1aede2973ff4a2604d2b
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3426790
(cherry picked from commit 8657f0db30)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3428767
Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
2025-08-12 14:06:00 -07:00
Shobek Attupurath
cd7b169ce8 rtl8852ce: Add v126-10 to fix disconnect with new channel
Issue - When WiFi operating channel is switched, at times the wifi
role index and role bitmap show that there is already a role
assigned for the channel context and this causes a failure in association. Kernel warning is shown when this occurs.

Fix - Update driver to v126-10 that fixes this issue.

[   57.590860] Call trace:
[   57.590861]  rtw_phl_chanctx_add+0x528/0x8f4 [rtl8852ce]
[   57.590947]  rtw_clear_is_accepted_status+0x4a4/0xbb8 [rtl8852ce]
[   57.591033]  cur_req_hdl+0x3c/0x4c [rtl8852ce]
[   57.591118]  msg_dispatch+0x2dc/0x3f8 [rtl8852ce]
[   57.591204]  dispr_thread_loop_hdl+0x270/0x2dc [rtl8852ce]
[   57.591289]  dispr_share_thread_loop_hdl+0x10/0x1c [rtl8852ce]
[   57.591374]  share_thread_hdl+0xb8/0x1a0 [rtl8852ce]
[   57.591459]  kthread+0x110/0x124
[   57.591466]  ret_from_fork+0x10/0x20

Bug 5440351
Bug 5442104

Change-Id: Ie78c70c1ea7a789351a2ba4ad445c4d0062281da
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3426784
(cherry picked from commit c9aa3b2f1b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3428714
Tested-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
2025-08-12 14:05:25 -07:00
Ketan Patil
55bd49a633 video: tegra: nvmap: Reduce log level to avoid spews
OpenRM maps the buffer with remap_pfn_range and then it's user VA is
passed to libnvrm_mem to create a handle out of it. NvMap uses
get_user_pages to get user pages from the VA. It fails for the buffer
mapped with remap_pfn_range. Then it fallbacks to follow_pfn or
follow_pfnmap_start functions to obtain pfn from the VA and then obtain
page pointer from it. But as get_user_pages fails, the corresponding
error prints are getting generated even when not required. Hence reduce
the log level to debug to avoid these unnecessary spews.

Bug 5383624

Change-Id: Idbd3cfe93ce3fac6e27efc5c3bb7a200fc183d26
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3425552
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-08-07 03:57:08 -07:00
nanwa
d756afd6a7 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit b0d3faac3c446 ("Fix syncpt mapping crash in Li...")

Changes since last deployment:

- Fix syncpt mapping crash in Linux KMD

Change-Id: I75429bd652f31ac50b9ddd2deb53c7b455658320
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3423360
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-05 10:44:59 -07:00
Revanth Kumar Uppala
2c3145ecbe r8126: Modify configs similar to earlier r8126 version
Modified below configs of r8126
CONFIG_SOC_LAN
ENABLE_MULTIPLE_TX_QUEUE
ENABLE_PTP_SUPPORT
ENABLE_RSS_SUPPORT

Bug 5312842

Change-Id: Ief05d33514aed51522488c6c7a801f078c943e30
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3417996
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-08-04 09:57:27 -07:00
Revanth Kumar Uppala
009a4a8f5d ethernet: Add dummy driver for r8126
Add dummy driver when real driver is not available to make
packaging success.

Bug 5312842

Change-Id: I9f0e531f0b9d3353c6f98a3872a4c0dd5cb27934
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3415213
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-04 09:57:23 -07:00
Revanth Kumar Uppala
914b98c3ac r8126: Add r8126 driver version 10.016.00
Add support for r8126 ethernet driverversion 10.016.00
which adds support till K6.15

Bug 5312842

Change-Id: I5987fd9a885fef7be6e1448674fc2e5c61820d1a
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3415199
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-08-04 09:57:18 -07:00
spatki
4a68689610 tsec: add support for s2idle state
TSEC from t26x onwards is booted by PSC. Since s2idle PSC
never resets tsec, there is no need to handle streamid programming
form KMD side.

Moreover this change also fixes a bug wherein tsec KMD would
poweroff the clocks of TSEC in suspend case.

Bug 5407465

Change-Id: Idb648e2f0e7226bb779bd1a801796fa28c415419
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420250
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-04 04:27:14 -07:00
Revanth Kumar Uppala
97c57036d7 r8126: Disable LTR_EN in PCIe DevCtl2 register during probe
Problem:
- When a Downstream Port Containment (DPC) software trigger is issued, the LTR_EN bit in the Root Port (RP) is cleared as per PCIe spec.
- However, LTR_EN bit of RTL8126 endpoint (EP) which is being expected to reset is still active and sends Latency Tolerance Reports (LTR) to RP.
- This behavior violates the PCIe spec, as LTR_EN is a non-sticky bit and should be cleared automatically on reset.
- As the RP has LTR disabled but the EP still sends LTR messages, it results in Unsupported Request (UR) errors on the RP.
- These UR errors trigger AER (Advanced Error Reporting) recovery, which includes a Secondary Bus Reset (SBR).
- The SBR causes the PCIe link to go down and come back up, but the EP again starts sending LTRs, leading to a infinite error-recovery loop.

Workaround:
- As a temporary fix, disable the LTR_EN bit in the RTL8126 EP during its probe.
- This prevents the EP from sending LTR messages, thereby avoiding UR errors and breaking the loop of AER recovery.

Impact:
- Disabling LTR prevents the EP from entering the L1.2 low power state.
- However, ASPM is currently not enabled in the system, so this workaround has no impact.

Bug 4869463

Change-Id: Ibf7effaeb0f22e952645ef7bf6a18287264e1463
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420019
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-08-01 09:57:47 -07:00
Brad Griffis
991868b8d7 build: print configs being used
Print critical variables kernel_name and system_type.

Print any config files being included in the build.

Bug 5413835

Change-Id: Ie2b59d333f1625ba63dd5f86044534bcba45dd69
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420648
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-31 07:43:31 -07:00
Brad Griffis
2d06e05d6e configs: add Makefile.config.l4t
Utilize the ability to have a second config file "system_config" that
is specific to the system_type, in this case l4t.

Bug 5413835

Change-Id: I883e5d03b19307f702f2db5774ee22e8d2061def
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3420523
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-31 07:43:27 -07:00
Brad Griffis
f50f1ec51b hvc_sysfs: introduce NV_OOT_HVC_SYSFS_SKIP_BUILD
Add infrastructure to make it possible to have configs that
skip the building of hvc_sysfs.o.

Bug 5413835

Change-Id: I8fa1fd6bbdcc1cc1d4d64c27fb6b913661be38e7
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419689
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-31 07:43:22 -07:00
Rakibul Hassan
66235b7274 coe: disable allocation power of 2 check
In fringe unexpected cases, HSB (Holoscan sensor bringe) sends image
byte offset larger then allocated image size (e.g. if HSB just sends
incorrect packet, or is configured incorrectly for a different image
size. or just packet corruption).

In such cases, we run into SMMU faults.

To mitigate this, a buffer size of two check was introduced so even
were this to happen, it would not cause SMMU errors.

However, the support for this in UMD is not complete.
Therefore, disable this check until UMD is able to comply with this
buffer constraint.

Jira L4T-7463

Change-Id: I2de31740284627ca117f1fa0a28bde2ef9a82785
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419644
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-30 07:15:45 -07:00
Igor Mitsyanko
bbcbfbb49e coe: remove scratch buffer
Scratch buffer is no longer used by RCE as it now requires four image
buffers to be provided by user before streaming starts.

Jira CT26X-1892

Change-Id: Ib69a58db95b074d5b908d7fd9b1c3ccfb361b72b
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419643
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
2025-07-30 07:15:40 -07:00
Igor Mitsyanko
5dbcf5524b coe: keep track of registered buffers
Modify logic of CoE IOCTLs REGISTER_BUFFER and CAPTURE_REQUEST to use
pre-registered buffers identified with an index. Instead of userspace
specifying a DMA_BUF ID for each capture request it will now specify a
simple index 0-3 of a pre-registered DMA_BUF.

Jira CT26X-1892

Change-Id: Icc3e0f3f8f572d4590f8d64badc8eea89f52c663
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419642
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raki Hassan <rakibulh@nvidia.com>
2025-07-30 07:15:35 -07:00
Igor Mitsyanko
2909c904dc coe: move Rx descriptor mem from uncached region
RCE no longer manipulates Rx descriptor ring with CPU accesses, but uses
a DMA engine instead. Rx descriptor mem can be moved out of uncached
RCE region.
As RCE uncached region is now empty - remove it.

Jira CT26X-1892

Change-Id: I3651468680349041ae77d39eefc6fd1ccfba7eb2
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419641
Tested-by: Raki Hassan <rakibulh@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Reviewed-by: Raki Hassan <rakibulh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-30 07:15:30 -07:00
Igor Mitsyanko
913e46c90d coe: move PKTINFO from uncached RCE region
RCE firmware no longer writes anything to PKTINFO buffers and just reads
them. PKTINFO can be moved out of uncached RCE memory region and treated
like a normal allocation.

Jira CT26X-1892

Change-Id: I918d7d5c7e7cbe07255e9d89459932148dd7418f
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419640
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2025-07-30 07:15:25 -07:00
Igor Mitsyanko
45423af499 coe: fix driver reinsert
Fix CoE driver rmmod/insmode cleanup logic to avoid resource leacking.

Jira CT26X-1892

Change-Id: I8539fd32965adf0fb302d7177a22fa1dd94c75d6
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419639
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
2025-07-30 07:15:20 -07:00
Igor Mitsyanko
344aa664d2 coe: make CoE capture more robust
Modify CoE capture logic a bit to make it more robust and error-proof:
- RCE Rx queue limit size is 16, no point to have 32 elements long queue
  in kernel.
- Pass kernel's queue length to RCE when opening a channel so it can be
  validated (to not exceed RCE max depth)
- validate image buffers IOVA addresses and buffer length before queuing
  to RCE

Jira CT26X-1892

Change-Id: I199143fe726ebab05a1236d4b14b59f0528d65a8
Signed-off-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419638
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Raki Hassan <rakibulh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
2025-07-30 07:15:15 -07:00
Rakibul Hassan
f374450381 coe: Add Camera Over Ethernet cababilities
The following change is a squash change that aims to reintroduce
Camera Over Ethernet (CoE) functionality to kernel.

Bug 5401884
Bug 5419655

Change-Id: Id2fc0263c43ed8566241dbf712aa603a3b3a76f4
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3419627
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-30 07:15:10 -07:00
Shobek Attupurath
a7fae6153a rtl8852ce: Add Nvidia changes to driver version 261-1
- Reduce log level
- Remove unwanted prints
- Add Nvidia sourcetree path

Bug 5207091

Change-Id: I1fa512ea04ef703d2f17608658abf2e258c38db3
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3415008
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-29 17:42:23 -07:00
Shobek Attupurath
9146af2407 rtl8852ce: Add driver v126-1 to fix kernel panic
Fix kernel panic observed in rtl8852ce driver

[  179.040508] Call trace:
[  179.040512]  rtw_fsm_stop+0x138/0x174 [rtl8852ce]
[  179.040592]  rtw_fsm_notify_disconnect+0x50/0x60 [rtl8852ce][  179.040672]  rtw_free_assoc_resources+0x128/0x330 [rtl8852ce]
[  179.040751]  rtw_indicate_disconnect+0x4cc/0x984 [rtl8852ce]
[  179.040831]  rtw_indicate_disconnect+0x978/0x984 [rtl8852ce]
[  179.040910]  cur_req_hdl+0x3c/0x4c [rtl8852ce]
[  179.040988]  msg_dispatch+0x2dc/0x3f8 [rtl8852ce][  179.041067]  dispr_thread_loop_hdl+0x270/0x2dc [rtl8852ce]
[  179.041146]  dispr_share_thread_loop_hdl+0x10/0x1c [rtl8852ce]
[  179.041225]  share_thread_hdl+0xb8/0x1a0 [rtl8852ce]
[  179.041305]  kthread+0x110/0x124
[  179.041325]  ret_from_fork+0x10/0x20[  179.041348] Code: f9400273 eb16027f 540000c0 b4ffff15 (f9402e60)
[  179.041353] ---[ end trace 0000000000000000 ]---

Bug 5207091

Change-Id: I22d153c0ef970efad888fcce668d0d19e95f4e17
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3415007
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-29 17:42:18 -07:00
Chenjian
7434e9a293 mfd: clear interrupt status in probe
VRS RTC may assert interrupt if battery mounted. Clear the status
registers before interrupt enabled to prevent bad logic.

Bug 3910065
Bug 3742306

Change-Id: I02dc6ce9352b1f1932cc539e6988375da4098014
Signed-off-by: Chenjian <jackchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2833620
(cherry picked from commit a50dd0a752641a30d84a5edfed426a12f2641acc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2839704
(cherry picked from commit 1b7ac9b9dce9e87b6eab9f0116414fa636b00f87)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3414735
Reviewed-by: Shubhi Garg <shgarg@nvidia.com>
Tested-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:36 +00:00
Jon Hunter
4e64a23624 cpuidle: Remove cpuidle-cg-disable-t264 from BUILD.bazel
The cpuidle-cg-disable-t264 driver has been removed and so also remove
from the BUILD.bazel file.

Bug 4697511
Bug 5401876
Bug 5401884

Change-Id: I56e090f388c71e83615fdec91f378ec095af1b93
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3414860
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:20:36 +00:00
Jon Hunter
93e7024e0a usb: typec: Disable async suspend for fusb301
Upstream commit aa7a9275ab81 ("PM: sleep: Suspend async parents after
suspending children") triggers a suspend issue on Tegra234 Jetson
Orin Nano boards because it had reordered the suspend of devices with
async suspend enabled with respect to some other devices. This commit
is present in Linux v6.16 kernels.

The same issue was observed with the cypd4226 Type-C controller used on
other Jetson platforms and due to its dependencies on other devices it
is necessary to disable async suspend to fix the issue [0]. Fix suspend
for Tegra234 Jetson Nano platforms by disabling 'async' suspend for the
fusb301 device. Note that it is safe to disable this for all kernel
versions.

[0] https://lore.kernel.org/lkml/6180608.lOV4Wx5bFT@rjwysocki.net/

JIRA LINQPJ14-73

Change-Id: If08932406c43bca2736164a2fdd96a5a4b9fa81c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3404885
(cherry picked from commit 21686177a6d395701cc8f19088090142657899a0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3411825
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:20:36 +00:00
Jon Hunter
57b5bd5c1e cpuidle: Remove cpuidle-cg-disable-t264
Bug 4697511
Bug 5401876
Bug 5401884

Change-Id: I4bbdffb3565d191289148f0689f82e2aa0b74d2d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3411919
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Ishan Shah <ishah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:36 +00:00
Johnny Liu
408c3a8bb3 devfreq: track governor usage count
Prevent governor from unexpectedly getting unloaded when it is in used.

Bug 5394611

Change-Id: I84b2ee3ce7666d4107096d958971d28700e744b4
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3408797
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:20:36 +00:00
Aniruddha Rao
49ebbfc3ed ufs: tegra: Set MPHY EQ timeout
Set MPHY EQ timeout as per the HW recommendations

Bug 5136701

Change-Id: Icf8012044f13006b76921e8f783c246d2953b858
Signed-off-by: Aniruddha Rao <anrao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3373643
(cherry picked from commit b918e90ad2c7dfb649fd98a9c65d35ff70a47d0f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3407950
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:20:36 +00:00
charliej
31cf676050 DCE KMD: Add timeout into synchronous IPC calls
This is for avoiding kernel hang when DCE FW fails to respond.
Failures of IPC call will return -ERESTARTSYS or -ETIMEOUT, which
will be handled by caller functions:
1. tegra_dce_client_ipc_send_recv (EXPORT_SYMBOL)
   This is module export symbol and caller have the responsibility
   of checking return value.
2. DCE FSM event handler
   Error return will change back to previous state.

DCE_IPC_TIMEOUT_MS_MAX is set to 10000[ms]
SHA computation time on SC7 entry request can go up 2sec.
Host tolerance time must be larger than this.

Jira TDS-16567
https://nvbugspro.nvidia.com/bug/5335034

Change-Id: I5d77a9497f14f305d07b98e39a58fbcecafedf92
Signed-off-by: charliej <charliej@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3358620
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
(cherry picked from commit 6c2ab3c78ce7cba0e88455b263d51d1a88c03927)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3402917
2025-07-24 10:20:36 +00:00
spatki
9a57665a0f tsec: Add support for t264 fw init
This change adds the support for programming streamids to
allow tsec fw on t264 to access PA at a low privilege level.
It also includes the synchronization logic to communicate
with the fw regarding completion of stream id programming
so that the fw can go ahead and initialize itself.

In addition to this, the mailbox used for communicating init done
from tsec fw to ccplex is changed from NV_PTSEC_FALCON_MAILBOX0 to
NV_PTSEC_MAILBOX1 since CCPLEX does not have access to the former from
t26x onwards. Hence falcon based mailboxes are used for tsec-psc comms
and non-falcon ones for tsec-ccplex comms (stream id comms and init done).

Jira TSEC-14

Change-Id: I2871a52222cd69786a8cc3f53162a80486611bb5
Signed-off-by: Sahil Patki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3366343
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
(cherry picked from commit db54fde9c4d786b22b7f8694753de3ec80649b17)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3400219
2025-07-24 10:20:36 +00:00
Igor Mitsyanko
27970204aa disable MACSEC interrupts
Change-Id: I4c76c6807717527582c96cec51617aa73a4c211a
2025-07-24 10:20:36 +00:00
Sheetal
a4125dd460 ASoC: tegra: Fix 24bit usecase
The tegra_dai_fixup function was incorrectly updating the format mask
when S24_LE format was requested and DAI has 32-bit sample width incase
the stream on that DAI is already running.

S24_LE format uses 32-bit physical width on the DAI interface, but
the format mask should remain as S24_LE to maintain proper format
negotiation. The fix adds a check to skip format mask updates when
S24_LE is requested and DAI sample_bits is 32.

This resolves issues with RT5640 and other codecs that support
24-bit audio formats on Tegra platforms.

Bug 5350165

Change-Id: Ie297a4176866c9bb3dbc9f40ac7b6d9051a879f6
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3396978
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2025-07-24 10:20:36 +00:00
Shubham Chandra
5500a4aee6 media: camera: modify error log to info log
v4l2-compliance has a negative test for image size,
resulting in an error log. Modify this error log to
info to avoid reporting kernel error/warning failure.

Bug 5143480

Change-Id: I5ec459f97c5b09e130293b59c19c1eb3ea9a53ee
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3396425
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nithin Varghese <nvarghese@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:36 +00:00
Johnny Liu
2a5341be49 devfreq: nvhost_podgov: Fix NULL dereference issue
When switching the governor to nvhost_pogdov or switching back to other
governors, we will need to lock the devfreq lock to prevent triggering
DVFS cycle from other paths.

The nvhost_pod_target_freq callback will be called when triggering the
DVFS cycle. However, the callback expects governor data is already
allocated and initialized. We need to synchronize the operations when we
switch the governor so that DVFS cycle can only be triggered when
governor data is ready.

Bug 5354161
Bug 5351714

Change-Id: Iaf8af8291ea09a7c2bfbdc5e1453bb976ee0987b
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3392341
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
2025-07-24 10:20:36 +00:00
Revanth Kumar Uppala
15c7804551 nvethernet: Add support for RX EQ SW ovrd flag
Add flag to protect RQ EQ SW override logic in OSI from executing for
other platforms except jedha

Bug 5277708
Bug 5017313

Change-Id: I826523cfbae67017a48576b4f802b7a3eeebfaf9
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
(cherry picked from commit b2df171faa368e93b1331e58d3b31cee753c0607)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3383665
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2025-07-24 10:20:35 +00:00
Jon Hunter
4f229ab150 tty: tegra_hv_comm: Fix build for Linux v6.15
In Linux v6.15, the functions del_timer()/del_timer_sync() were renamed
to timer_delete()/timer_delete_sync(). Use conftest to detect these
changes and update the drivers as necessary.

Bug 5268017
JIRA LINQPJ14-47

Change-Id: Ia3e331b942a610a8e6926f5241b49e049e493730
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3374462
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shanker Donthineni <sdonthineni@nvidia.com>
2025-07-24 10:20:35 +00:00
Ashish Mhetre
5608649145 memory: tegra: Use of_match_ptr() for mc-hwpm device id
- Use of_match_ptr() for mc-hwpm device id
- Add module_exit function
- Add error print if mc-hwpm driver fails to register

Bug 5313972

Change-Id: I695cede736949d828fee2db09617b68515cf40fd
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3374385
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:20:35 +00:00
Ketan Patil
93fde3b573 video: tegra: nvmap: Add numa checks
Android builds don't have CONFIG_NUMA enabled hence
/sys/devices/system/node/node0/meminfo is not present on android.
While nvscibuf calls the QueryHeapParams to check presence of the
hugetlbfs based carveout, the error prints will be seen due to absence
of the above sysfs file. Hence first check whethere there are multiple
numa nodes are not. If not, then use /proc/meminfo file to retrieve the
hugetlbfs size otherwise use the meminfo sysfs node from the
corresponding numa node.

Bug 5200644

Change-Id: I5495de91726d323210807e86f22757b798226fca
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338255
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Jian-Min Liu <jianminl@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Surajit Karmakar
a7b08a9c27 Add support for passing keyslot usage to SE-Server
This patch adds support for passing keyslot usage to SE-Server

Bug 5236776

Change-Id: Iafa6ec15daff6f2acefad207e8b1939f656d7d3f
Signed-off-by: Surajit Karmakar <skarmakar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348146
(cherry picked from commit f438b482a173bc745af46fe5b08f10a806b43a2f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361963
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Sriharsha Allenki <sallenki@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Khushi . <khushi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:20:35 +00:00
Mohit Ingale
2085a29b32 rtcpu: Fix licensing of camera diag header files
Change licensing of include/soc/tegra/camrtc-diag-messages.h and
include/soc/tegra/camrtc-diag.h from NVIDIA Proprietary to GPL-2.0-only,
as these files are used by GPL code. The license incompatibility is
resolved by ensuring all files maintain consistent licensing terms.

Bug 5278776

Change-Id: Ia42d64339458eb6f3320aea142f0360350614b8b
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365826
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
9bf9c3e826 drivers:nvpps:remove unused soc id enum
remove unused soc id enum. This is not needed
anymore as we use different compatible str
and associated static initialized data struct

bug 5175333

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: Ia6cd5cb8ab22f3c06373ea686e7a4f962e3b366e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337822
Reviewed-by: Vijay Mishra <vijaym@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
c543d5bfa4 drivers:nvpps:isolate platform specific of_match table
isolate platform specific of_match table into separate
file so that n1auto platform support can be added
without modifying any of the nvpps driver files

bug 5175333

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I020e9156bbd538e568d3b2ae11165834466a3f2f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337808
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
e2af8ee563 drivers:nvpps:deprecate older kernel support
deprecate older kernel support as current kernel
version used is > K5.15

bug 5175333

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I97a5ec274ec28c457e0ffbd2729376f65f5bbd7b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337807
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
73cba718fb drivers:nvpps:remove no dt support in nvpps
remove no dt support in nvpps as unused feature

bug 5175333

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: Ic5d92b74b53a0d162117260dc179eea79f1c8c26
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337806
Reviewed-by: Vijay Mishra <vijaym@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
262f358456 drivers:nvpps:cleanup & modularize driver code structure
cleanup & modularize driver code structure to separate
out HW dependent & independent parts to facilitate adding
support for new SoCs

This patch
 - restructure SoC specific code into separate files
 - Add function pointers to call HW specific sequences
 - adds a common header which is needed by all platforms
 - cleans up obsolete code such as memmap of phc regs,
   xavier support, etc
 - Removes default value assumption for lock_threshold,
   pps_freq, sync_trig_interval

Bug 5175333

Change-Id: I106e130fdaa1a166a4a2c9bbaeb3b924af90ab66
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321185
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
b656843df9 bindings:nvpps:update nvpps binding doc
update nvpps binding doc :
 * remove references to xavier platforms
 * remove memmap_phc_regs property
 * correction - primary-emac property is mandatory
 * update other property description and cleanup examples

bug 5175333

Change-Id: I2555011b83f1f969059c2a728f30feeeee2653af
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321943
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Khushi
9c0c7558d3 vse: Address comments from code inspection
Addressed the comments from the code inspection for D7.0
https://git-master.nvidia.com/r/c/linux-nv-oot/+/3367095

JIRA ESSS-1919

Change-Id: Id986308352dcb44e3684a50dec45bf9c167d5f92
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369197
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:20:35 +00:00
jaiyasha
c89da8defd DCE-KMD: Add support for logging infra
- Allocate DMA mapped buffer from DCE-KMD and pass it to DCE FW through
  admin-cmd calls.
- Add debugfs node to retrieve buffer data and print through seq file.
- Add support to clear log buffer

JIRA TDS-15963

Change-Id: Ied4ffe1df14c8db61cfe15e6442f55e8306530b8
Signed-off-by: jaiyasha <jaiyasha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3117241
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Tested-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
2025-07-24 10:20:35 +00:00
Jian-Min Liu
d9679931aa nvethernet: use -mno-outline-atomics for android kernel
Previously, this option was disabled because the clang version
used was too old (clang-r370808, clang 10). This option has been
supported since clang-r416183b, clang 12. In order to avoid potential
build errors, this option is re-enabled.

Bug 5289423

Change-Id: I1d0fd5a3dfdff06e95eeca13f85a263922c6ecaf
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3371014
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Ivan Raul Guadarrama
fab00a954b drm/tegra: vic: Update FW code section size
Increase the size of the code section by 256 bytes.

Jira EGFX-16888

Change-Id: I86d8d32ebd7ffd25270bf3f4ab25f08244fe940d
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3370316
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:20:35 +00:00
Ashish Mhetre
b79129381b platform: tegra: Check if MC channel is enabled
In MC-HWPM driver, check if MC channel is enabled before accessing its
registers.

Bug 5279654

Change-Id: I41e3d277a75d0a1045e47f148e2b9eb63f29b279
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369527
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
(cherry picked from commit e2b9c86688)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3370768
2025-07-24 10:20:35 +00:00
Armandeep Singh
cb108984e1 Merge remote-tracking branch 'origin/dev-t256' into HEAD
Change-Id: I171cfd58fdb25c5ec158a0db11d97ada5603c578
Signed-off-by: Armandeep Singh <armandeeps@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365262
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Sanjith T D
a5b3a14cc8 vmtd: Enable timeout for requests
Enabled timeout of 30 seconds for each
MTD request.

Jira SSV-13035

Change-Id: I7629223cef58abff6003601e78fbe6a71a065bd1
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3357961
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:20:35 +00:00
Nathan Hartman
31594cb465 nvidia-oot: cpuidle: Support changes to residency
Add debugfs files for configuring a states residency. Assumes
all cores share the same cpuidle driver.

Change-Id: If23eeaa631c266646962648eba7851f1e5471ba0
Signed-off-by: Nathan Hartman <nhartman@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3331646
Reviewed-by: Ishan Shah <ishah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:20:35 +00:00
Mainak Sen
3137fbd9b4 gpu: host1x: Fix race in syncpt alloc/free
Fix riace condition between host1x_syncpt_alloc()
and host1x_syncpt_put() by using kref_put_mutex()
instead of kref_put() + manual mutex locking.

This ensures no thread can acquire the
syncpt_mutex after the refcount drops to zero
but before syncpt_release acquires it.
This prevents races where syncpoints could
be allocated while still being cleaned up
from a previous release.

Remove explicit mutex locking in syncpt_release
as kref_put_mutex() handles this atomically.

Bug 5170956

Change-Id: I9e2348482d5c9646556576772f6b90fa7df3acd2
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369121
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Johnny Liu
fd42ccc45d conftest: add devfreq_has_suspend_freq test
Bug 5297893

Change-Id: I74388d308fdeb6673ecd7b6354971285ba6e3aa0
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369019
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Robert Huang
38578736f2 tegra-cec: Fix cec_irq flooding issue
The RX_REGISTER_FULL interrupt is not cleared when rx_fifo_data is 0.
Add readw for RX_REGISTER when rx_fifo_data is 0 so that the interrupt
can be cleared.

Bug 5266075

Change-Id: I10ab107efadc22a6ec79255e22bf080384b4ff5c
Signed-off-by: Robert Huang <robhuang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3367190
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:20:35 +00:00
Mainak Sen
cfb3723972 gpu: host1x: Add dma_fence_chain support
Enhance IOCTL handler to identify and
handle dma_fence_chain objects that might contain
host1x dma fences. This fixes issues
when userspace passes a dma_fence_chain
(created by DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT
operations) to HOST1X_IOCTL_FENCE_EXTRACT.

The updated code iteratively unwraps fence
chains until it finds a host1x_syncpt_fence or
reaches a fence it can't process. This ensures
proper operation with DRM-based applications
that use timeline syncobj features which internally
use dma_fence_chain.

Bug 4983872

Change-Id: I3eef9d54e2c42180cb5c74236cd64f42a863b7ea
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3364940
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Tested-by: Arunmozhikannan Soundarapandian <asoundarapan@nvidia.com>
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
2025-07-24 10:20:35 +00:00
Mallikarjun Kasoju
56756a4ee7 ufs: Auto-hibernate in cold boot
Enabled auto-hibernate in cold boot.

Bug 5247388

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: Ia000697ba0fce514a392f42236ad5c5342f1ff6c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363799
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:20:35 +00:00
Mayuresh Kulkarni
2aa72a2701 tsec: Return SoC specific offsets
Since the offsets for the tsec engine registers have changed with t264,
this change adds the support to use SoC specific register offsets.

Jira TSEC-14

Change-Id: I37afc076809008b0948239f5e9555dfa5c763ba8
Signed-off-by: spatki <spatki@nvidia.com>
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3360321
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:20:35 +00:00
Dara Ramesh
97f7875469 adsp: cleanup legacy code
The legacy ADSP applications, such as file access and lpthread,
as well as the actmon driver, are no longer supported on T26x/T23x.

Bug 5174542

Change-Id: I3e70f11e0c09a7178f069c2423ad068dc765eea8
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3359415
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Manish Bhardwaj
bc0fa73ed6 nvidia-oot: expose tegra_hv_ivc_tx_empty API for hv comm driver
Jira HYP-20929

Change-Id: I4ba92c8c7e76cc391d1c4a8a2e8d22f312cde7fa
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369454
Tested-by: Daniel Kudrow <dkudrow@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Daniel Kudrow <dkudrow@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
2025-07-24 10:20:35 +00:00
Daniel Kudrow
79cf6380ea nvidia-oot: resurrect tegra_hv_comm TTY driver
Port the tegra_hv_comm driver to the OOT kernel. This driver allows an
IVC channel to be used as an emulated serial device.

Make the following changes to simplify maintaining compatibility with
different kernel versions:
- Use a generic port type instead of defining a custom one.
- Use existing conftest to determine whether platform_device.remove
  returns void.
- Add a conftest to determine whether uart_state.xmit exists.
- Use tty_port.xmit_fifo in kernels where uart_state.xmit has been
  removed.

Jira HYP-20929

Change-Id: I1bc218f591d6d741fc39ae5392a9ea95bdc3f117
Signed-off-by: Daniel Kudrow <dkudrow@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340420
(cherry picked from commit a67e7fd330be5d6c55e35c0ce810ff5124378ae7 in embedded/7.0.3.0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301386
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Joshua Cha
a81de1a2c6 nvsciipc: remove redundant sysfs node creation
nvsciipc_uid_groups are redundant since it's already
created by sysfs_create_group.

Bug 5214323

Change-Id: I70f514ff47f30ac1c70b85dec5c0354ef8d85997
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348582
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:20:35 +00:00
yizhou
737925e58e kmd: re-enable the panic_callback
- introduced a panic_flag in the tegra_rtcpu_trace.
- set panic_flag to 1 when kmd receives panic hsp
  message from RCE.
- the trace buffer readout thread calls rtcpu_trace_snapshot
  to dump out the snapshot section when panic_flag is set to 1.

Bug 5293085

Change-Id: Ief5d9431bfc944fc588f38a69f7758f829cf2e6e
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3368252
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Kalle Jokiniemi <kjokiniemi@nvidia.com>
2025-07-24 10:20:35 +00:00
Joshua Cha
b42f5d8ada nvsciipc: add put_cred()
Added missing put_cred() after using get_current_cred()

JIRA NVIPC-3520
Bug 5300203

Change-Id: Iddfb1ae78bb265109709360746b315bd1e62561b
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369157
Reviewed-by: Jungho Kim <junghok@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:20:35 +00:00
Narayan Reddy
38227b2177 nvethernet: add SIOCGHWTSTAMP support
issue: facing an unsupported ioctl error while
launching the ptp4l, since get timestamp configuration
support is not there.

fix: add get timestamp configuration ioctl support

Bug 5274698
Bug 5287071

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I9254b041d4d3b9dc2cddebc14dc6100ed1b76807
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3366858
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Srishti Goel
25d24fca15 pci: tegra264: Do not toggle PRSNT# in tegra264_pcie_ep_rst_assert
When EP boot up first and RP in power OFF state, default PERST# input is
high due to onboard pull up. When RP is powered ON, it causes a glitch
from high to low due to default pinctl settings, it is perceived as
PERST# assert by Endpoint. In tegra264_pcie_ep_rst_assert() PRNST#
signal is released (set high), this will cause PCIe link up failure.
This WAR is initially added for RP reboot case, to handle a scenario
where EP function driver still executing core_deinit as part of PERST#
assert and mean while RP boot up and ready for link up again. However
on Thor it is measured that core_deinit is taking only ~1.4 msec which
completes before RP boots. So, it is safe to remove PRNST# release WAR
in tegra264_pcie_ep_rst_assert(), this fixes link up failure when RP
boot after EP.

Bug 4981895

Change-Id: Ie24652a267bf3e3bc740d9c40e5b6d6671429b00
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345684
(cherry picked from commit 8944b4a4d767a144b7204865d26b4e989ee003b6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338072
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Mark Mendez
0138f99d46 PCD: Fix license to GPL2
This fixes the mistake of adding the Nvidia proprietary
license for upstream documents

Bug 5068365
Bug 5278766

Change-Id: If346041568bbf7b94c68b787dd22783840fa1de8
Signed-off-by: Mark Mendez <mmendez@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321819
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
yizhou
b1789adbac kmd: disable the panic_callback
Disable the panic_callback function as a workaround
for bug 5293085.

when panic_callback() is called from an atomic context,
it tries to do something that could sleep (e.g. calling
mutex_lock when the mutex is contended).

Bug 5293085

Change-Id: I822bd72fdbedcaa9201086dae991da36f34df8fa
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3368091
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Tested-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:20:35 +00:00
Narayan Reddy
29ee31019b nvethernet: remove ETHER_PRV_TS_IOCTL support
remove ETHER_PRV_TS_IOCTL since it is not longer used.

Bug 5265084

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: If3fd6d82b67812e25c9146569d2ff2f0e8dab5f4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3367197
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Praveen AC
459e781d79 virtual i2c mux support for other Hawks
* Add virtual i2c bus support for 2nd, 3rd
& 4th Hawks to read/write EEPROM data
while streaming
* Move MAX96712 function declarations to
a proper header file instead of using extern
declarations in .c files. This fixes checkpatch
warnings about externs in .c files and improves
code organization

Bug 4807682

Change-Id: Ie4e7f7b9adc6fe6255a517cd5f076afdc754384a
Signed-off-by: Praveen AC <pac@nvidia.com>
(cherry picked from commit 57dc20f5a8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365540
Reviewed-by: Narendra Kondapalli <nkondapalli@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
5de17f758a drivers:nvpps: Add support for configurable inital operating mode
Add support to select initial operating mode (GPIO or TIMER)
through DT property "nvpps-event-mode-init".

This allows users to specify which mode the driver should
start in rather than always defaulting to GPIO mode if gpios
property is specified in DT.

Key changes:
- Add DT property parsing for initial event mode
- Add validation to ensure selected mode is supported
- If this property is not specified, default mode selection
  happens based on if nvpps-gpios property is defined or not
- Add informative debug messages about selected mode
- Add error handling for invalid configurations(eg: init
  mode is GPIO but gpios property is not defined). If
  validation fails, probe returns error instead of
  defaulting to TIMER mode.

bug 5253938

Change-Id: I64c2a6565eeb46d6b07cf266cd4189fba9f0fba3
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352704
(cherry picked from commit 091bb3ff50972e8dc3d7b941d850b4c1457b2a9e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361726
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
148c895a23 dt-bindings:nvpps:Document property to set initial operating mode
Add documentation for the new 'nvpps-event-mode-init'
property in the NVIDIA nvpps driver devicetree bindings.
This optional property allows users to specify whether the
driver should start in GPIO mode (1) or TIMER mode (2).
If not specified then default mode is chosen based on
if the nvpps-gpios property is defined or not.

bug 5253938

Change-Id: I624e50458383a5a61efdb4d5dd790b4a1dc7bb7e
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352703
(cherry picked from commit 3e3c946b6b0122b5cb9afe4f3150301c7f64b3a0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361725
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Khushi
ff1bc4d840 vse: remove dynamic allocate memory during runtime
Bug 5225204

JIRA ESSS-1833

Change-Id: I1cb869cf11a51cb0d910989bbbe4793d3439b6cf
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3326503
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:20:35 +00:00
Khushi
ae4f81c13d vse: Static violation fix driver
Bug 5225204

JIRA ESSS-1846

Change-Id: I25268475765572b0cce18b78b7eda436e1c55d56
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3339815
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:20:35 +00:00
Joshua Cha
bb2c8b1fc4 nvsciipc: increase inter-process channel count
default DriveOS inter-process endpoint count is about 1300 for now.
DriveAV requirement needs 8192 inter-process channels
(=16384 endpoints) except for DriveOS system usage.
Hence increased the number of inter-process endpoints by 2048
more in considering margin.

Bug 5224327

Change-Id: I47f5a67f9ece917ed5fe873be2e188f128d63961
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361956
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:20:35 +00:00
Mark Stephen Krueger
872a72234a kmd: trigger RCE snapshot on timeout
Jira CAMERASW-32243

Change-Id: I529a0d39990f6a20ff9780089383deebe22e2741
Signed-off-by: Mark Krueger <mkrueger@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3355776
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ying Zhou <yizhou@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
2025-07-24 10:20:35 +00:00
Prakhar Srivastava
e6a11f7e4c PCI: tegra264: Disable RST# IRQ when EP not ready
Enabled RST# IRQ during EP_START after tegra264_pcie_ep_rst_deassert is
invoked for EP and disable RST# IRQ during EP_STOP after
tegra264_pcie_ep_rst_assert is executed for EP and EP is not available
anymore. This prevents unwanted EP accesses during RP reset sequence
causing PERST# to toggle, while EP is not ready or available.

Bug 5281037

Change-Id: I43e1fd6c6ccfaae64a6bb2375a3685f186766d78
Signed-off-by: Prakhar Srivastava <prasrivastav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363313
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:20:35 +00:00
Manish Bhardwaj
9c6469ff98 tegra_hv: stop compiling unused APIs for prod kernel
- stop compiling unused APIs for prod kernel
- remove APIs having just function declaration

Jira ESLC-8593

Change-Id: I8acd01a88e0ea4c3792d7080f685bcac9c9cf559
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363569
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:20:35 +00:00
Sanjith T D
d6ef2a4201 vmtd: Establish IVC channel on LCPU-2
- The IVC channel establishment has to be done
   on LCPU-2 to avoid timeouts during boot.
 - Updated the vblk driver to register the IRQ handler
   before performing the IVC reset.

Jira SSV-13035

Change-Id: Id337db4ce394bc89fd052f94463ed3fc3a49f9ba
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3355578
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:20:35 +00:00
std
3ea97358bb virt oops: Establish IVC channel on LCPU-2
The IVC channel establishment has to be done
on LCPU-2 to avoid timeouts during boot.

Jira SSV-13035

Signed-off-by: Sanjith T D <std@nvidia.com>
Change-Id: Ib647c318621a1b4435909d8a76f25f341bdb2c95
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3366612
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:20:35 +00:00
Sanjith T D
89e5c02ff7 vblk:vmtd:oops: doxygen comments for external API
Jira SSV-12897

Change-Id: Ie4b8d54a601a3a904e02f9f93e4ae52ae0447b3c
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336860
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
59e320fc90 drivers: nvpps: Add configurable TS capture interval
Add support for configurable timestamp capture interval
through device tree property 'ts-capture-interval'.
This allows users to tune how frequently timestamps are
to be captured in TIMER mode.

- Add support for device tree property 'ts-capture-interval' (in ms)
- Defaults to 1000ms if property not specified
- Validate interval is within allowed range (100ms - 1000ms)
- Update timer configuration to use configurable capture interval

Bug 5242056

Change-Id: I4a327558576a86650890be4ae7e1ccfa5abe3c1d
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348872
(cherry picked from commit 1317865f5dc042348e1e39b2aa54a7bb6aa1ffdb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361722
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:20:35 +00:00
Sheetal Tigadoli
e9783303bc dt-bindings:nvpps:Add ts-capture-interval property
Add documentation for 'ts-capture-interval' property.
This property allows configuring the interval between timestamp
captures in milliseconds (valid range: 100ms-1000ms), determining how
frequently the driver collects timestamp data.
If unspecified, timestamps are collected every 1000ms (1s) by default.

Bug 5242056

Change-Id: I12412d67d6eb3885d15a73ed1d40210fcc33d64e
Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348871
(cherry picked from commit 742ac3220d0af4cc5bbac873bc4743a3b437efc0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361721
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Frank Chen
48f3711947 nvidia-oot: cdi: Update cdi package buf size check
The original checking for cdi_dev_package buffer size is wrong,
it should not check the max size against max I2C payload size.

If the cdi_dev_package buffer size is too big for i2c transfer,
it will be breaking down to smaller sizes and transferred using
multiple I2C messages.

Define a new MAX_CDI_DEV_PACKAGE_BUFFER_SIZE for checking the
cdi_dev_package buffer size.

Bug 5107765
Jira CAMERASW-333779

Change-Id: Ieec049d51af4911dfd31410f43aa4733b75d265d
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3365281
Reviewed-by: Kevin Xie (SW-TEGRA) <kevixie@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
Reviewed-by: Samuel Hung <samuelh@nvidia.com>
2025-07-24 10:20:35 +00:00
zyi
c71ca8521c kernel: nvidia-oot: fix TAINTED_SCALAR
Fix TAINTED_SCALAR static analysis:
- camera/fusa-capture/capture-isp-channel.c

New violations are in
fusa_kmd: delta per rule
=======================================================
New :
=======================================================
Total new violations : 0
=======================================================
Fixed:
 -       TAINTED_SCALAR:  -3 defects
 - MISRA C-2012 Directive 4.14:  -3 defects
=======================================================
Total fixed violations : -6
=======================================================

Jira CAMERASW-33480

Change-Id: I428982ba33a26dcd5bb66e7b9a13ea689d7a8d1f
Signed-off-by: Yi Zhang <zyi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3363100
Tested-by: Mike Jia <mijia@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Yang Xu <yangxu@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Divyash Kumar <divyashk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mike Jia <mijia@nvidia.com>
2025-07-24 10:20:35 +00:00
Hitesh Khode
cb4010130d SerDes: BHSI-16, BHSI-10: Add Read after write opcode
Bug 5218749

Change-Id: Iaca83d0c201b746d5e70a4e3717781d0273c55ab
Signed-off-by: Hitesh Khode <hkhode@nvidia.com>
(cherry picked from commit 6ac5c42e80f80f1defb9e8d3f2803f143da4f506)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341500
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Zhongjie Wang
1d5c9f1143 nvethernet: Add capability checks for ioctls
Issue description:
- Some privileged ioctl commands lack capability checks,
  so a malicious user can configure ethernet HW with those
  ioctl commands.

Fix description:
- Revisited all ioctl commands in nvethernet and added
  missing capability checks for privileged ioctl commands.

Jira NET-2865

Signed-off-by: Zhongjie Wang <zhowang@nvidia.com>
Change-Id: Idae1d72f205ca24a02693274668cdff58f4d12e9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337486
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
55e777b5cd nvdla: kmd: enable current voltage, power knobs
The following knobs are enabled with this commit.
- power_mW
- voltage_mV
- vftable_mV_kHz (Supported in command list v1.3 and above)

Additionally, the implementation for setting MCU and core frequencies
are accidentally swapped. This commit fixes the issue.

Bug 5185298
Jira DLA-7905

Change-Id: I0e7ec2a7d1d07e7da103f6fe70ee09247f532cfa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337804
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 4804a2da70eee29ade79153fac15998d287a5ab1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340409
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3850099bf5 nvdla: kmd: support autosuspend, lpwr telemetries
[1] BUG_ON -> WARN_ON as per the recommendation from svcacv.
[2] Updated the power management interface
    - Setting delay for rail, power and clock gating is easier to
        manage with separate API.
    - delay_us has been removed from the gating.
    - New stat interface has been exposed for any stats related
        to the power management operations.
[3] Supports autosuspend feature.
[4] Supports lpwr telemetries for the rail, power, and clock.
    - idle time in us
    - active time in us
    - idle count
    - active count
    - entry and exit latencies in us (max, min and total)

Bug 5185298
Jira DLA-7905

Change-Id: I81267d7c3e9c35c81d29a19efe9192d436322ee9
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318099
(cherry picked from commit c7cf5bb3b24dd9ed58e55a3fec56c8b1503c7e01)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338010
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3f7a9abe07 nvdla: kmd: support power management with HFRP
Jira DLA-7800

Change-Id: If02567cb5a30a6fbeae7d5256ba612317605fb48
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3303252
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
Signed-off-by: Arvind M <am@nvidia.com>
(cherry picked from commit c71198a1ef7cc7715401da08c24ef2bbc4b44de0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337347
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
3ed7b12ef5 nvdla: kmd: update riscv offsets with firewall
With the registers remapped to the DLA KMD accessible area, the riscv
register offsets are updated to point to the remapped offsets.

Bug 5080056
Jira DLA-7802

Change-Id: Id7558bb032e1702eb17d55e1fc87a2d8dcd3ba30
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300041
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit cccd927a215c370c7297a256901dd93ffdf3d4fa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337346
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:35 +00:00
Vishal Thoke
e0a8ac6edf nvdla: kmd: implement dvfs_statdump & set_mcu_freq
[1] connected dvfs_statdump and clk_mcu_freq
    from debugfs to FW interface end to end.

Jira DLA-7799

Change-Id: Ic4871b3acafcd9acf1901a72f5ba3465fb7c252b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306119
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 8417d0c3c1f68760f4c6427863aba75b9586d86c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337345
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
c27930b9db nvmap: kmd: Add support for ACPI
Bug 5011465

Change-Id: I77ba3d5dcbee602859766db079d2b9a579730bce
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3277542
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit 905368c55e4ae51c01b5d7d4ed8caa022ec73261)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3277546
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:20:35 +00:00
Arvind M
4bf26c4247 host1x-emu: kmd: Add support for ACPI
This change enable device probing for ACPI device.

Bug 5011544

Change-Id: Ibfc85be18b0d73e813f68c699e4baa3de9682b5d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276952
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit bbfa4c3afd2dd3856b01be1b15c3023549dd079b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3272347
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:20:18 +00:00
Arvind M
7f006193a3 nvdla: kmd: add support for ACPI
Bug 4988970
Jira DLA-7673

Change-Id: I8d611932cf7b7af107f135e9ae44caad9032a6c0
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3272418
Signed-off-by: Amit Sharma <amisharma@nvidia.com>
(cherry picked from commit e01c86ebdf123d6e9a40986c16f7f3ccbb989cc1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270720
Reviewed-by: Ayush Kumar <ayushk@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
Mainak Sen
f0404e50f6 drm: tegra: Disable TEGRA_SYNCPT_INCR IOCTL for T264 platform
Conditionally disabled the legacy TEGRA_SYNCPT_INCR IOCTL for T264
platforms since it's no longer needed. This IOCTL is superseded by the
newer TEGRA_SYNCPOINT_INCREMENT IOCTL which provides better functionality
and follows the modern API design.

The conditional compilation helps reduce the attack surface on T264
platforms by removing legacy code paths that aren't needed.

Use CONFIG_ARCH_TEGRA_264_SOC as the proper platform-specific flag
to identify T264 platforms, as this is the standard architecture flag
used throughout the codebase.

This change affects:
1. The IOCTL definition in the tegra_drm_ioctls table
2. The IOCTL handler function implementation

This improves code cleanliness by removing unnecessary legacy code
on newer platforms while maintaining backward compatibility for
older platforms that might depend on this IOCTL.

Bug 5060574

Change-Id: Idd21d69ebd992f976770016b5805f7d6af89c88d
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3342657
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
yizhou
4736728ec1 camera: dump out RCE snapshot on CAMRTC_HSP_PANIC
- implemented a panic callback function which dumps out
  the snapshot section of the RCE trace buffer.
- registered the panic callback function with hsp handle
  during handle init time.
- when receiving the CAMRTC_HSP_PANIC from RCE, trigger
  the panic callback function to dump out the RCE snapshot.

Jira CAMERASW-32243

Change-Id: I523a0b51637a6cf1091d578195c75090b52ffcd7
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341536
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
yizhou
d68f89d225 camera: Add snapshot section & HSP PANIC cmd
- Add the snapshot section into the trace buffer header struct
- Introduce a new HSP command which will be used to signal
  KMD about RCE halt.

Jira CAMERASW-32243

Change-Id: I3890b30200b3a0a386939d432842269f4c1e1225
Signed-off-by: yizhou <yizhou@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314382
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2025-07-24 10:19:19 +00:00
Nagaraj P N
7e77b140e3 nvtzvault: take lock before close session
- need to take lock to avoid race conditions when accessing
  mailbox.
- don't use spinlock in irq context as irq is not shared
  and only one request is processed at a time.
- remove debug print.

Bug 5225204
Bug 5275408

Change-Id: I2de5a07d06568012d6557d3a32126478b6ddaf15
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3356286
(cherry picked from commit 521e75b7c3cbc5f4724a8a0f3c11c3a2940383b2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3364010
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
ef0bf7c94c mc-utils: Remove get_dram_num_channels_t26X
The function get_dram_num_channels_t26X() is identical to the function
get_dram_num_channels_t23x() and so get rid of the
get_dram_num_channels_t26X() function and just use
get_dram_num_channels_t23x().

Bug 5054840

Change-Id: I5647bf9a946dc06e692b1a2fc44f750bc68ec65d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3362555
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
cdef2b63f6 drivers: Remove 'private' directories
Drivers in the NVIDIA OOT repository are public and so remove the
directories named 'private' to avoid any confusion once these sources
are released.

Bug 5054840

Change-Id: I9156e3b08df9ce3d90dc0a2b5e72416f28fac5f5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3351272
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:19 +00:00
Joshua Cha
fe810a887f nvsciipc: fix endpoint access error
Fix authentication in mutex handling (Linux).
Fix endpoint access error return value and
add endpoint name debug info.

Bug 5237628

Change-Id: Id54b182c41c0d8e637dbe212ceea3d914b56edac
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345811
(cherry picked from commit 3115465d891b10bc389b813a2fb279d0b0bce9b0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345807
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Khushi
8e4bf79db8 Bug Fix: Fix AESRNG performance on Thor
Bug 5095525

Change-Id: I4de355ea6a53b4dcc5654cb67d50c128efd8e06b
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348752
(cherry picked from commit 28f1ad0ad6ec3fe69a7f551a24accb526c23e410)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361960
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
00c660901e rtcpu: camera-diagnostics: fix dependency module
tegra-isp5 module is identified by name nvhost_isp5, it should always be
loaded first to ensure all initializion is done for isp device.

Bug 5225858

Change-Id: I35c7715034ac1301c7592a59827d9fd1e1fbdcdd
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3358137
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2025-07-24 10:19:19 +00:00
Khushi
fba609e17f bug fix: negative test cases
Bug 5225204

Change-Id: I0b6bb5f347e037d79466abf0f88b2ff21ee22b9f
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349831
(cherry picked from commit 3229106e7d7fb08ce58e1732e2a7ad4efabff906)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313802
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
Nagaraj P N
60a05995c2 vse: copy error code from SE Server
error code from SE Server is not being copied
for Keyslot Allocate/Release case, which results
in success being returned even when keyslot operation
has failed.

Bug 5225204

Change-Id: Ib2ef5c64c2e84c70c01dc6922ef636b87cd081d9
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3357970
(cherry picked from commit 82d81ec68217c516636f9b072373b924bfae376e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3361711
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:19 +00:00
Nagaraj P N
2f4f0d54a1 vse: address CERT-C EXP39-C violations
avoid typecasting different pointer types
to address EXP39-C violations.

Bug 5225204

Change-Id: I1650c690074ca8275f76868751d82d2d137d83a4
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3353505
(cherry picked from commit b879bcc3eb2524c7080981b52913df55d4883c47)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3358594
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:19 +00:00
Manish Bhardwaj
edd7b240b0 nvidia-oot: clear out the memory before freeing
Jira ESLC-8592

Change-Id: I0532bab29d4267477770f317576610514c25d4ea
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3356255
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Suneel Kumar Pemmineti
2483ab734d nvsciipc KMD: Fix incorrect PID
The code was using task_pid_nr(current) to get the process ID, which
returns the Thread ID (TID) instead of the actual Process ID (PID) for
multi-threaded applications. This caused problems with endpoint
reservation tracking since different threads of the same process would
appear as different owners.

current->tgid (Thread Group ID) represents the actual Process ID in
Linux. task_pid_nr(current) returns the Thread ID which is unique for each
thread within a process. Using TGID ensures all threads from the same
process are properly identified as belonging to the same process.

This fix ensures proper endpoint reservation tracking across all threads
of a multi-threaded application.

Bug 5260259

Change-Id: If2f864dc4456de71b1df49e64320463a24203c68
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3360307
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jungho Kim <junghok@nvidia.com>
2025-07-24 10:19:19 +00:00
Xiaoming Xiang
f717989baf fuzz: syzkaller semi automation script
Jira CAMERASW-30740

Change-Id: I429c9465b1fa1873d3a5e9ef3d9a182e22e486c9
Signed-off-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314647
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
2025-07-24 10:19:19 +00:00
zyi
9192e31e0a fuzz: nvidia-oot: syzkaller fuzz test description
Involving the following modules: cam_fsync cdi fusa_kmd

Jira CAMERASW-30645

Change-Id: Iebba84a0df43f0acc8b8d3906be5e0d1f85505fe
Signed-off-by: zyi <zyi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3307513
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Tested-by: Xiaoming Xiang <xxiang@nvidia.com>
2025-07-24 10:19:19 +00:00
Xiaoming Xiang
b081602754 fuzz: nvidia-oot: fix syzkaller fuzz test crash
fix cdi and fusa kmd module crash

Jira CAMERASW-30661

Change-Id: I78b49a5f0d65f7c69ff1f1a8b746c4091d4adeb7
Signed-off-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337853
Reviewed-by: Ming Chang (SW-TEGRA) <mingchang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:19 +00:00
nanwa
2314d54174 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit 689815042dacd ("Fix syncpt related crash durin...")

Changes since last deployment:

- Fix syncpt related crash during SC7 resume
- Add SC7 simulation and test
- tests: docs: fix mat_add test specs
- compat: bugfix: prevent fence override
- Add AI code reviewer to CI

Change-Id: I781ac9379787adb9dbdde55cd3fdec5729b08a95
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3358344
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
2025-07-24 10:19:19 +00:00
Naseer Ahmed
feca511d6b conftest: Add drm_connector_has_override_edid
Needed to compile tegradisp-drm in Kernel 6.6.
Kernel 6.6 removes override_edid. Instead it
defines edid_override.

Jira TDS-17170

Change-Id: I0136f4c6ed2aed45b1618afa38503880e6f6af23
Signed-off-by: Naseer Ahmed <naahmed@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313704
Tested-by: Cather Zhang <catherz@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
5a615789cd platform: tegra: rtcpu: Rename camera diag control sysfs node
Renamed the "control" sysfs node to "diag_control" in the camera-diagnostics
driver to avoid naming conflicts with other control nodes in the system.

This renames the associated show/store functions and updates all references
to maintain the same functionality through the new more specific node name.
The camera diagnostic control interface is now accessible through
/sys/devices/platform/.../camera-diag/diag_control instead of .../control.

Bug 5225858


Change-Id: I5ce96d6d981354f7af9edc7495cf9eef6ba1fdb6
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345338
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2025-07-24 10:19:19 +00:00
Janardhan Reddy
d4def4008d nvscic2c-pcie: Fix Top25 CWE CERT-C violations
Fix total 8 Top-25 CWE violations of below CERT-C rules:

1) CERT STR07-C - 4
cert_str07_c_violation: Using unsafe interface strcpy instead of
strcpy_s for string manipulation.

2) CERT EXP34-C, FORWARD_NULL - 2
var_compare_op: Comparing drv_ctx to null implies that drv_ctx might be
null. cert_exp34_c_violation: Dereferencing null pointer drv_ctx.

3) CERT INT30-C, CERT INT08-C - 2
cert_int30_c_violation: Unsigned integer operation (*msg).data - 7U may
wrap.

Bug 5238880

Change-Id: I481f61f5c96407f90da51f9878ff55cbb61b1699
Signed-off-by: Janardhan Reddy <jreddya@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340682
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Deepak Kumar Badgaiyan <dbadgaiyan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:19 +00:00
Narayan Reddy
ebfb82a4c1 nvethernet: correct return val check of get_avb_perf
issue: return value of get_avb_perf of avb_perf command
is checked against non zero value which is incorrect

fix: get_avb_perf always return non zero value based on
avarage bits per second, so modified the check accordingly

Bug 4778785

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I142445491cc617773d5659067690426a98843a33
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3350515
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:19 +00:00
Chris Dragan
6db615e47a misc: mods: update mods driver to 4.31
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Change-Id: I41439d9268c2307bddf6f396db299ab937084d69
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3351803
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:19 +00:00
Johnny Liu
5fc58123c7 hwmon: ina232: introduce ina232 oot driver
Example of information reading from hwmon sysfs interface:

generic_atv_int:/sys/class/hwmon/hwmon0 # grep "" *_input
in0_input:1345
in1_input:24092
curr1_input:268
power1_input:6437376

generic_atv_int:/sys/class/hwmon/hwmon0 # grep "" shunt_resistor
5000

The unit of each node follows the ina2xx ABI specification:
https://elixir.bootlin.com/linux/v6.1/source/Documentation/hwmon/ina2xx.rst

Bug 5060737

Change-Id: I6b9066206c95fc32fd90506b1233d1d5feb6c854
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348715
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
2025-07-24 10:19:19 +00:00
Sanjith T D
930192b47f vblk:mtd: Update the memory allocation
- The Linux BSP secutiry requirement "LINUXBSP70-REQ-223"
   mandates the memory to be initialized before use. So, updated
   the driver to use zero initialized memory allocation API's.
 - Removed the IVC reset done during resume.

Jira SSV-12846

Change-Id: Iac9bd11edb520584206797446b8f3a59d20b2453
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354502
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:19 +00:00
Bhadram Varka
90d4d4e1c4 nvethernet: Fix IRQ type mismatch warning for common IRQ
Issue:
Kernel logs reported an IRQ type mismatch warning for
the Common IRQ, as it was assigned to the Ethernet server.

Fix:
Skip reading and requesting the Common IRQ when virtualization
is enabled.

Bug 5248491
Bug 5091879

Change-Id: I54d145b2f1c1dfbc42a0e0d2f686f1bb085119c4
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341674
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
2025-07-24 10:19:19 +00:00
nanwa
1e36fa1086 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit 52e76e5680447 ("Map only PVA's syncpoints as R...")

Changes since last deployment:

- Map only PVA's syncpoints as RW
- fw: treat unregister resource ID 0 as noop
- Fix tegrastats issue that mixes two reads together
- Delpoy VPU ELF files to tegra tree
- kmd: bugfix: check if ctx inited before async ops

Change-Id: Ife641b1a27580e6f74f2b6e806eebc6750f3f846
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354736
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Ketan Patil
c85efbe2a7 video: tegra: nvmap: Change data type of addr to u64
In android ATV build, userspace is 32 bit while kernel is 64 bit. Hence
value of NVMAP_IOC_CACHE differs on userspace and kernel space side,
as we are using unsigned long data type for addr field. The unsigned
long resolves to 32 bit in userspace while 64 bit in kernel space. Use
u64 data type which will always resolves to 64 bit.

Bug 5111364

Change-Id: I392146e71f7d65ba047ee2dda0d69dd202370968
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348602
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
a8bff2c6e5 camera:kmd replace WARN/WARN_ON usage
Replace use of WARN or WARN_ON kernel with dev_warn to improve logging
behavior. This change ensures that error conditions are reported with
clear informative messages rather than kernel stack traces that can
flood logs.

Additional information:
- The files `drivers/platform/tegra/rtcpu/debug.c` and
  `drivers/platform/tegra/rtcpu/hsp-combo.c` present in the original
  codebase were deleted as part of unrelated refactoring in the
  target repository; hence, changes related to these files in the
  patch were not applied.
- Additional changes are done to replace WARN_ON at other places.

Bug 4719119

Change-Id: Id12f1b4de77f8b007b557de140257a3bd7478b52
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/3308911
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3352892
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
15b054f417 rtcpu: Add power management support to camera-diagnostics driver
Added suspend and resume functionality to the camera-diagnostics driver
to properly handle ISP SDL diagnostics during system power transitions.
This ensures that diagnostics are stopped before system suspend and
restarted after resume if they were running before.

Jira CAMERASW-33531

Change-Id: Ic52fe91e0cfcc2a3138cacd8433e3b5a644378e4
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344684
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Robert Kelly <rkelly@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
04b1b44e81 media: camera: Use conftest for CSI2 config
In Linux v5.18, commit 20c238dfb26c ("media: v4l2-mediabus: Drop legacy
V4L2_MBUS_CSI2_*_LANE flags"), commit 5a6ac3f4b46f ("media:
v4l2-mediabus: Drop legacy V4L2_MBUS_CSI2_CHANNEL_* flags") and
commit b9f7caa7753a ("media: v4l2-mediabus: Drop
V4L2_MBUS_CSI2_CONTINUOUS_CLOCK flag") removed various CSI2 flags.
Out of these flags we only need to set the number of lanes. The other
flags are redundant. The configuration was moved by
commit 94d964e58ad6 ("media: v4l2-fwnode: Move bus config structure
to v4l2_mediabus.h") to the structure v4l2_mbus_config_mipi_csi2
which itself is under the structure v4l2_fwnode_endpoint. Use conftest
to detect if the structure v4l2_mbus_config_mipi_csi2 is present and
avoid using kernel version checks.

Bug 4425688

Change-Id: Icd597492e48831326c203a6556176ac3767472a3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354475
(cherry picked from commit 2f83033498)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354638
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:19 +00:00
spatki
3b9dbf3106 tsec: Changes to the tsec kmd wrt t264
This change makes the following changes to the tsec kmd to get it
working on t264.

- Add compatible property for t264
- Update dma mask bits for t26x

Jira TSEC-14

Change-Id: If9fe7498f38018a2fed461281aa02865e6db5e7d
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341847
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Byungkuk Seo <bseo@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2025-07-24 10:19:19 +00:00
Junghyun Kim
7b863e3e09 kernel: cdi: Update fsync logic
CIM version 3 for Ferrix is added in DT which can be used to select
GPIO port number of IO expander to control the multiplexer for
each deserializer

Bug 5163582

Change-Id: I3ce608be9f5c18af005e1bc6fea9c73daeef7995
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3342728
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:19 +00:00
Sanath Kumar Gampa
efd43d9c76 nvethernet:split macsec_sa_state_lut 2 sysfs nodes
Issue: Observed KSAN bug when using both Tx and Rx sa_state luts in a
single sysfs Entry as the data is not within the PAGE_SIZE

Fix: Split the sa_state_lut to 2 entries different for Tx and Rx

Bug 5178711

Change-Id: Id6929abae263622b02c00cef459e974661b5f1bc
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3334987
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Nan Zhang <nazhang@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
2025-07-24 10:19:19 +00:00
Mohit Ingale
41bf84e591 tegra: fsync: Fix tick calculation for freq generation
Use DIV_ROUND_DOWN_ULL consistently for frequency calculations to match
QNX implementation. For 30Hz signals, reference ticks were calculated
as 1041667 for a value of 1041666.67, while QNX correctly uses 1041666.

When generating precise frequencies, this rounding difference affects
how extra ticks distribute across periods (covering the 0.67 gap over
3 periods). The QNX implementation works correctly because it rounds down,
while the Linux implementation was rounding up.

This change ensures proper fractional tick distribution and prevents
signal drift over time for frequencies that aren't exact multiples of
the TSC clock unit.

Bug 5223558

Change-Id: I5fbeafd1e37c92fe95f2f3605d1ae225eacb88c8
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348278
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
c9abbd16c0 ufs: tegra: Simplify headers
Depending on kernel version the Tegra UFS driver includes different
headers to build the driver. Now that Linux v5.x kernels are no longer
supported, we can simplify this. Simplify the headers for the Tegra UFS
driver as follows ...

1. For Linux v6.x kernels only the ufshcd-priv.h and ufshcd-pltfrm.h
   headers are required. These headers are copied from the Linux kernel.
   However, only the prototypes for the functions 'ufshcd_query_attr',
   'ufshcd_query_descriptor_retry' and 'ufshcd_pltfrm_init' are needed.
   The functions 'ufshcd_query_attr' and 'ufshcd_query_descriptor_retry'
   have not been change since they were introduced in Linux v4.17 and
   the function 'ufshcd_pltfrm_init' was last updated in Linux v6.1
   (making the ufs_hba_variant_ops argument const). Although redefining
   the prototypes outside the kernel is fragile and does not protect the
   Tegra UFS driver from updates to these functions, this problem
   already exists.
2. Move the files ufshcd-pltfrm.h and ufshcd-priv.h into the Tegra UFS
   driver directory because these are not needed outside of the driver.

JIRA LINQPJ14-47

Change-Id: I3891bf756723f730f036637891c55090b5d2a384
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349825
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
b8e8f99bbd ufs: tegra: Remove legacy headers
Linux v5.x kernels are no longer supported and so remove all the legacy
UFS related headers for these kernels.

Bug 3978622
JIRA LINQPJ14-47

Change-Id: I6e514305d30f93d74bd75fc335db69ced79b3866
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349975
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
b3c970d8f9 drivers: Remove unused headers
Remove all the unused headers.

Bug 5054840

Change-Id: I4b441c6cb39025aa0c9d35c6f0f597ada5b1882b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349974
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Khushi
3e98bab231 vse: Add keyslot management related changes
JIRA ESSS-1834

Signed-off-by: Khushi <khushi@nvidia.com>
Change-Id: I5276228f9e1f42c945336e641f5180777ccf9006
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318026
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:18 +00:00
Manish Bhardwaj
025c3b6b37 nvidia-oot: set the nvlog mode with read only permission
Bug 4997347

Change-Id: I7823b318a932877647243852af36649fb563090e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3351170
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Manish Bhardwaj
381d88e597 nvidia-oot: don't set nvlog & mempool buffers as executable
Bug 5248920

Change-Id: I89ac129953aa312f30d11f721c0ab8255e515af2
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3350549
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:18 +00:00
Saravanan Ponnuswamy
45b9d2ed87 nvdisp_serdes: Fix CERT ARR30-C
- This patch fixes the following CERT violation
   CERT ARR30-C - 3
     (CID - 6388489)

   - Passed the priv->client directly

 - JIRA TDS-15862

   CERT ARR30-C:
     __mptr - 32UL evaluates to an address that
     is at byte offset -32 of an array of 848
     bytes

Change-Id: If513c6d718019d50d9a19bdd864650be9ed45bfd
Signed-off-by: Saravanan Ponnuswamy <saravananp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344668
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:18 +00:00
Sanath Kumar Gampa
7fec719a7c nvethernet:Move blocking MACSec in PHY to server
Removed the below functionality from Linux OSD as we moved
the same to ethernet server to avoid implementation in QNX OSD

- Restrict enabling MACSec in PHY

Bug 5221921

Change-Id: I0cbdeccfe91a67060a4609b9b8bc2bf842547b99
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341020
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Mainak Sen
d3e0d8bb36 nvdla: Replace deprecated syncpt API in EMU driver
This commit replaces the deprecated nvhost_syncpt_unit_interface_init()
and other related deprecated nvhost syncpoint functions
in nvdla_sync_syncpt_emu.c with direct implementations
using the host1x API

Key changes include:
- Added a local nvhost_syncpt_interface structure definition
- Replaced nvhost_syncpt_unit_interface_init()
   with direct initialization code
- Added nvdla_syncpt_address() function to replace nvhost_syncpt_address()
- Updated nvhost_syncpt_put_ref_ext() -> host1x_syncpt_put()
- Updated nvhost_get_syncpt_host_managed() ->
   host1x_syncpt_alloc() + host1x_syncpt_id()
- Updated nvhost_syncpt_incr_max_ext() -> host1x_syncpt_incr_max()
- Updated nvhost_syncpt_read_maxval() -> host1x_syncpt_read_max()
- Updated nvhost_syncpt_is_expired_ext() -> host1x_syncpt_wait()
- Updated nvhost_syncpt_set_min_update() ->
   host1x_syncpt_read() + host1x_syncpt_incr()

Bug 4921461

Jira HOSTX-5971

Change-Id: Ief353770bfcf87ef48abcc598f5ca84bcf72bd22
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330688
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:18 +00:00
Ankur Pawar
9597e077cd media: camera: remove t194 from nvcsi driver files
Refactor nvcsi driver files to replace t194, with
more general name. Modify the makefile as well
As t194 on dev-main is deprecated as a platform.

Compatible string "nvidia,tegra194-nvcsi" remains
to maintain backward compatibility and avoid any
device tree changes.

Bug 3790154

Change-Id: Iad742dfc75430a9b74bf9d03bf5e89c0912eeab1
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313179
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:18 +00:00
Nagaraj P N
c01b5d0614 vse: add error prints for nvlog
Add error prints to adhere to nvlog guidelines.
Also, expose ivc config params via new dev node.

Jira ESSS-1835
Bug 5225204

Change-Id: I39da948ad3debdac84aa4065979dda598985deef
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344527
(cherry picked from commit a14445ab406720469551eecb713d1f19dca845c7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336143
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:18 +00:00
Nagaraj P N
91a5f43355 nvtzvault: clear out done register in irq handler
if register is not cleared then, due to spurious interrupts
RCU related threads can't execute which leads to error
spews and stalls.

Bug 5241951

Change-Id: Ifb43c02741162618c360e055cc74a35f7d49c39f
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348632
(cherry picked from commit df2d584c50c93bf9b27e295220762ef6317e7dcf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3350537
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:19:18 +00:00
Nagaraj P N
24ee9c4a6a nvtzvaut: fix CWE25/CERTC violations
Jira ESSS-1713
Jira ESSS-1830
Bug 5225204

Change-Id: I10c4115f7a8d4c3a3c65d27e56551d2ba0569cdd
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344526
(cherry picked from commit 0d5d086803c897be88fcf0d0e740cc755b42f18f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3350536
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:19:18 +00:00
Nagaraj P N
a952ece7d2 nvtzvault: support up to 72 sessions
Also
- add suspend/resume callbacks
- close sessions in case of app crash
- perform dynamic memory allocation

Jira ESSS-1713
Jira ESSS-1830
Bug 5225204

Change-Id: Ic3bd6d74a530bd10e2e5758b9c59b4a552c7d4b1
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344180
(cherry picked from commit 69d8511e80e2e45e9f8aea4b2b736c632d7894a3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324497
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Ketan Patil
816ad75551 video: tegra: nvmap: Enable VPR feature
VPR feature is needed for N1-auto on embedded, while this feature is not
required on 7.0. Hence enable this feature to unblock the VPR testing.
Later on in 7.0.4.0 branch create a patch to disable this feature. Once
we have a uniform solution for handling this from program team, we will
switch to that approach.

Bug 5240456

Change-Id: Ib3773bff8b44525f4a1c3b68cc134d96f5c45ee3
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348574
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:18 +00:00
Akhil R
8f0fcc68f0 crypto: tegra: Do not use IV for AES ECB
It may happen that the variable req->iv may have stale values or
zero sized buffer by default and may end up getting used during
encryption/decryption. This in turn may corrupt the results or break
the operation. Ensure not use IV for algorithms like AES ECB where IV
is not expected.

Bug 4883011

Change-Id: I309ad26f99fe54005ff71b270b3b115dc62ac168
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330469
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Akhil R
fc72250a45 crypto: tegra: Reserve keyslots to allocate dynamically
The HW supports only storing 15 keys at a time. This limits the number
of tfms that can work without failutes. Reserve keyslots to solve this
and use the reserved ones during the encryption/decryption operation.
This allow users to have the capability of hardware protected keys
and faster operations if there are limited number of tfms while not
halting the operation if there are more tfms.

Bug 4883011

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I7de17eb1acf3b5a9f55a42e9df2aa8b64e20cb6d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3347661
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:18 +00:00
Akhil R
e09a390449 crypto: tegra: Fix HASH intermediate result handling
The intermediate hash values generated during an update task were
handled incorrectly in the driver. The values have a defined format for
each algorithm. Copying and pasting from the HASH_RESULT register
balantly would not work for all the supported algorithms. This incorrect
handling causes failures when there is a context switch between multiple
operations.

To handle the expected format correctly, add a separate buffer for
storing the intermediate results for each request. Remove the previous
copy/paste functions which read/wrote to the registers directly. Instead
configure the hardware to get the intermediate result copied to the
buffer and use host1x path to restore the intermediate hash results.

Bug 4883011

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I54952620906ccfd57d560c4619d17211f67b9ac3
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328440
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:18 +00:00
Akhil R
be083d7bc7 crypto: tegra: Transfer HASH init function to crypto engine
Ahash init() function was called asynchronous to the crypto engine queue.
This could corrupt the request context if there is any ongoing operation
for the same request. Queue the init function as well to the crypto
engine queue so that this scenario can be avoided.

Bug 4883011

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I7d5e4629fbd47215c7d7748b675030c1cb63e5ea
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328439
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Akhil R
77c91508d5 crypto: tegra: finalize crypto req on error
Call the crypto finalize function before exiting *do_one_req() functions.
This allows the driver to take up further requests even if the previous
one fails.

Bug 4883011

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I36ee3548159e96432e7d15b93f7ef688022dbc87
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328438
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Akhil R
f725f36d1e crypto: tegra: Use separate buffer for setkey
The buffer which sends the commands to host1x was shared for all tasks
in the engine. This causes a problem with the setkey() function as it
gets called asynchronous to the crypto engine queue. Modifying the same
cmdbuf in setkey() will corrupt the ongoing host1x task and in turn
break the encryption/decryption operation. Hence use a separate cmdbuf
for setkey().

Bug 4883011

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: Ia6a5376e2c8dfc98e11414666ebf9ade41f10fee
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328437
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:18 +00:00
Akhil R
a628affd69 Revert "crypto: tegra: Use separate buffer for each host1x command"
This reverts commit f75887b0c0e9340c3dd92b19dab99ed92f36bcb0.

Reason: To align with the upstream changes pushed as part of
https://lore.kernel.org/lkml/20250224091610.49683-1-akhilrajeev@nvidia.com/

Bug 4883011

Change-Id: If79728d00d3e8e3c8ad3e26a8170a7c1fa95414c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3347660
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Akhil R <akhilrajeev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Nagarjuna Kristam
0f2a737b8a linux: pcie-dma: Update calibration info for DMA init API
Add calibration details of register used by DMA driver.

Bug 4635515

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I4621184cbff919b73b990cd62543404367d8df8d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341775
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:18 +00:00
Sanjith T D
45a0155889 vblk: Pass correct direction for DMA map/unmap
The tegra_hv_vblk driver use DMA_BIDIRECTIONAL in
dma_map/dma_unmap for both read and write.
It could add unnecessary CMO for cpu/for device (depends on R/W).
Fixed this by passing the correct direction for
DMA map/unmap based on read/write operation.

Bug 5221800

Change-Id: Ieee50fa66c18a8e1bf23db749eba0c5f2d3745b2
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340025
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
22336de810 drm/tegra: Update to Linux v6.15-rc3
Update the Tegra DRM to align with Linux v6.15-rc3. In Linux v6.15-rc3,
the arguments of the 'mode_valid' function pointer of the
drm_connector_helper_funcs structure and the 'atomic_async_check'
function pointer of the drm_plane_helper_funcs structure were updated.
Add conftest tests to detect these updates and make the necessary
changes to the Tegra DRM driver.

JIRA LINQPJ14-47

Change-Id: Id1c8db95390f02258952da78af3dd6ff5acfa631
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333838
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
abhinayaa
63f6f2f159 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit a307885246be7 ("umd: port intf tests to umd - ...")

Changes since last deployment:

- umd: port intf tests to umd - add NegativeTest_MaxContextCreate_Single...
- Remove VPU auth default macro
- kmd: Add a null check to fix static defect
- tests: Fix sync unregistration test
- fw: Handle DMA error when fetching chunk
- umd_tests: add requirements tests
- Fix error path of Linux KMD memory API
- Add kernel code style check script
- address review comments for access flag feat
- fix memory leak in access buffer tests
- kmd: use correct formatting
- fw: update license and use macro
- tests: add tests for buffer access type
- feat: respect buffer access flags
- Update deployment document
- Add a default fence wait timeout
- Fix error path of KMD sync ops submit
- Move recovery state check to pva_kmd_device_busy
- Fix error path of profiling level update
- Increase max CCQ FIFO depth to 14
- kmd: zero initialize all commands
- Make KMD robust against firmware abort
- Add multi user stress tests
- Conditional VMEM Clear Check
- Conditional VMEM Clear Check
- Fix static defects in KMD
- Reading auth for all the PVA devices
- Add support for VPU Device Tree authentication
- UMD: Add Null and range checks
- Remove assert and propogate error
- Add error injection tests
- Bug fix - 5207608
- Update CUPVA tests in CI to 2.7.0 rc3
- tests: add register_exec_noop_with_bit_flip
- fw: Fix static defects
- kmd: freeze PVA before freeing code/data memory
- Add missing test_mode parameter for run_test_plan
- deploy: allow deploying to different branches
- pva kmd: linux: handle test mode dt entry
- fw: baremetal: bound breaklink params
- coverity: Set expiry for code quality report
- kmd: Remove PVA_IS_DEBUG from native timeout calc
- Reduce iterations of long duration UMD tests
- Fix IOVA leak in Linux KMD
- fw:common: fix order of enable/disable virt
- umd_test: add missing requirement test specs
- umd_test: add test for perf spikes
- Fix nsight fence logging
- deploy: fix GVS build failure
- Add FSP Abort Hook
- Execution timeout
- Trace fences for NSIGHT
- Fix shared buffer handling during suspend/resume
- tests: add more tests for resource unregistration
- Add MODS test support
- KMD:Fix static defect
- umd: fix double free in cuextend
- umd: Free pva_memory object on free()
- Unify VPU and PPE syscall ID
- Clean up public API
- cuextend: Cleanup implementation
- cuextend: Add API to get stream payload
- compat: Fix missing flushes of event fences
- cuExtend: Unified code path for stream submit
- cuExtend: Implementation of cuExtend Stream Submit
- cuExtend: Stream submit API definitions
- cuExtend: Sync to new cuExtend header
- Set test mode default through macro
- fw: Add PPE error codes
- Use zalloc when allocating resource record
- Allocate Temporary Buffers for DMA Config Loading
- Fix fast reset failure test
- Add DMA config allocator
- kmd: Add unsafe API for block allocator
- Add missing warning for Linux kernel build
- Set err cmd idx to zero if there's no error
- ci: Run tests for MODS test mode
- Use 1K command buffer chunk size in MODS test mode
- Allow developer to provide its own target lease
- tests: add nvsci prefence_postfence_test
- kmd: Sha calculation static defects fix
- kmd: fix INT30-c static defect
- Fix command index logging for PVA_FW_EVENT_RUN_VPU
- Enable vpucfg_destroy_after_submit
- tests: add tests spec for deterministic test
- test: add cpu_signaller_pva_waiter_deterministic
- tests: add cpu_waiter_pva_signaller_deterministic
- Disable verbosity control of FW log
- Ops free API should accept NULL ptr
- Report TCM usage for t26x as well
- Support non-contiguous syncpoints
- umd: fix new top 25 CWE
- License header update
- L2SRAM flush command changes
- debugfs: disable tests for broken nodes
- debugfs: handle 0 input size for allowlist path
- Move pva_kmd_device_idle to context destroy
- Refactor interrupt handler binding in PVA KMD
- Fix DMA registration error path
- debugfs: Add read support for fw log level
- Add stress test suites to CI
- Fix error path for context init
- Add stress test suites
- umd: add NULL checks
- ci: Perf Test Updates
- ci: perf test updates
- Enable boot from GSC in L4T GVS
- Updating comment

Change-Id: I98be7ec270ba5f6fd5bc0978d084d731a88e70b6
Signed-off-by: abhinayaa <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3348508
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
2025-07-24 10:19:18 +00:00
Sakar Arora
0ac4068c89 t26x: update phys address size in vs_config_info
Bug 5083802

Change-Id: I33eb20e45292f0b71ba5df70ae2f1fc5471c5b17
Signed-off-by: Sakar Arora <sakara@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341746
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Sanjith T D <std@nvidia.com>
2025-07-24 10:19:18 +00:00
Surbhi Singh
9bf1a3723f drivers: video: tegra: Add inline macro for FP
Adding a inline annotation macro to suppress the false positive defect.

Bug 4479044
JIRA TMM-6053

Change-Id: I898f3b2f69b010e73766a82dd5e0c33e2c748437
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338901
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
b578f490b6 conftest: Fix return types for timer functions
The function hrtimer_setup() returns void and the function
timer_delete() returns int, and so correct the return types
for the respective conftest functions.

JIRA LINQPJ14-47

Change-Id: I569f4fae0bf01f894583570116125a44a1757ff3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3342808
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
af058279c6 drivers: Flag mixed declarations and code
Adding the build flag '-Werror=declaration-after-statement' to prevent
mixing variable definitions within the body of code. Ideally, we would
enable this for all kernels, but in the latest upstream Linux kernels
this flag has been removed from the kernel build to allow for scope
based declarations in some contexts. However, even in the upstream
kernel declaring variables at the start of the scope is recommended. Add
this flag for noble kernels to ensure that this recommendation is
followed for OOT drivers.

Link: https://lore.kernel.org/lkml/20230612093537.693926033@infradead.org/
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I29648ec41d5a5afb06a41b209c025c7b3fa77e85
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338231
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
53584a0920 platform: tegra: rtcpu: Fix mixed declarations and code
The RTCPU driver fails to build with the compiler option
'-Werror=declaration-after-statement' and the following errors are
observed ...

 drivers/platform/tegra/rtcpu/camera-diagnostics.c:900:17: error: ISO
  C90 forbids mixed declarations and code
  [-Werror=declaration-after-statement]
  900 |                 unsigned long end_time = 0U;
      |                 ^~~~~~~~

 drivers/platform/tegra/rtcpu/camera-diagnostics.c:904:17: error: ISO
  C90 forbids mixed declarations and code
  [-Werror=declaration-after-statement]
  904 |  bool all_tests_pass = (status.executed > 0 &&
                                status.passed == status.executed);
      |  ^~~~

Fix this by declaring the necssary variables at the beginning of the
functions.

Jira CAMERASW-32042
Jira CAMERASW-32960

Change-Id: I6bc652b19f77f0a9bbbe3263cdff371acbc957d7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3334920
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Mahesh Patil
659e731f28 r8125: Enabling realtek ethernet driver support
Bug 5091558

Change-Id: Idb013a451e81ad1e7a664d85f024eebb17f92b77
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316987
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Mahesh Patil
b9b6d2df39 r8125: Realtek ethernet driver version 9.014.01
Adding Realtek ethernet driver version 9.014.01 drop

Bug 5091558

Change-Id: I678c9a6da836945f356479f20deca0d4467362e3
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316982
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
vinothkumarr
5248eb940d spi: tegra-quad: Bug fix in the qspi io clk
Instead of choosing the qspi io clk(qsp_pm), the functional
clk has been used(qspi_2x_pm).

Bug 4623718

Change-Id: Ib4044bfa4c001aab24dec908d2b869e9b7aacdbe
Signed-off-by: vinothkumarr <vinothkumarr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304007
(cherry picked from commit 2834f6fce74ffbc21168e79c022683aab7790718)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344831
Tested-by: Vishwaroop A <va@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Vishwaroop A <va@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Mainak Sen
31b5b5d17a gpu: nvhost-host1x: Move nvhost_get_* APIs to header file
deprecate definition of below APIs from host1x-nvhost.ko -

nvhost_get_default_device
nvhost_get_host1x_device
nvhost_get_host1x

Bug 5176225

Change-Id: I72c3aae62fbc8c297a3871a9337562fe3998621b
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3342019
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Vishwaroop A
faaed878ff drivers: spi: remove debug #defines.
Remove # define which will enable sysfs node
entries and also the code which is under it.

Bug 5210086

JIRA ID LINNMCRV-114

Change-Id: I3055861cff3492418780c9fa0bad4fc7d2daa919
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336074
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:18 +00:00
Jaiyash Agrawal
3223288ee0 DCE-KMD: Add T256 support for KMD driver
This patch Adds support to build DCE-KMD for T256 chip.
Since T264 and T256 use same HSP IP and offsets are same
reuse the T264 HAL functions with T256.

JIRA TDS-16705
Bug 5214628

Change-Id: I07deec4a70bc4edbe5d8dfe24b92c68e3c85e5ce
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3319943
Tested-by: Jaiyash Agrawal <jaiyasha@nvidia.com>
Reviewed-by: Jaiyash Agrawal <jaiyasha@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Nagaraj P N
61ec572ed1 vse: remove deprecated chip struct fields
remove support for old chip

Bug 5091879

Change-Id: I911d81268b3485f2691548a116510d82e946e305
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338859
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Vamsee Vardhan Thummala
6b5d0b8383 gpu: host1x: Remove PM ops from DLA host1x bus-side driver
Remove power management ops from the host1x bus-side DLA driver. The host1x
bus-side driver is a virtual device and should not directly access hardware.
PM ops should only be used in the platform device driver.

This fixes suspend/resume test failure when tegra-drm is loaded without any
enabled engines under host1x node.

Bug 5055946

Change-Id: I2e07f759e1d92b4c5a92739e1b5439d39800773f
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3337661
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Mainak Sen <msen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Vamsee Vardhan Thummala
05fdb35d8e gpu: host1x: Allow loading tegra-drm without enabled engines
Add support to load tegra-drm without any engine
enabled under host1x node.

Add support to register host1x devices without
requiring subdevices. This ensures syncpoint
functionality remains available even when engine
subdevices are not present.

Bug 5055946

Change-Id: I18076391e37e01926b621bb8f3e19f72f62d2533
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306748
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:18 +00:00
Nagaraj P N
5e58030479 vse: increase max support dev count to 70
Bug 5091879

Change-Id: Ib5134b5fb3e41a369afcecad5dffe073bbb90363
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324338
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:18 +00:00
Bhadram Varka
2abe7d65dd nvethernet: Document mdc-cr DT property
This patch adds Device Tree binding documentation for the mdc-cr
property used in the nvethernet driver.

This property configures the MDC clock rate for the MDIO interface.

Bug 5147775

Change-Id: Iad49e9e41741f975a6dc329cce1308dc4af87ba5
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3339678
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Bhadram Varka
ebee392608 nvethernet: pass MDC CR from DT
o Add nvidia,mdc-cr property reading
o Set the default values if property is not present
   EQOS = 6
   MGBE = 5
o Remove CMD MDC CONFIG which is not required.

Bug 5147775

Change-Id: I84c382745b862f73ffecb3a4ea15fe56b79d63e4
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336145
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Mohit Ingale
63597e114a rtcpu: camera-diagnostics: Use device_iommu_mapped() to check IOMMU status
Replace the explicit IOMMU domain check using iommu_get_domain_for_dev()
with the more direct device_iommu_mapped() function. This ensures, iommu
domain is mapped and ready.

Bug 5225858

Change-Id: If54b77ed2468b2967a28abf98c5ff3e8517a7405
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3343722
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2025-07-24 10:19:18 +00:00
Joshua Cha
2cdcd7f6a2 nvsciipc: update kernel message level
update kernel message level from error to info for
nvsciipc_ioctl_reserve_ep.

Bug 5228447
Bug 5119903
JIRA NVIPC-3423
JIRA NVIPC-3427

Change-Id: I75bf39f4bf0b04f8d1e3d527293c1f796fad60dc
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3343579
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:18 +00:00
Manish Bhardwaj
897e587b25 virt: add sanity checks for ivc info's metadata
Jira ESLC-8494
Bug 5226392

Change-Id: Ie401827cab2a326ee449ba4c9e0e294ace2c48bd
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3340893
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Sanath Kumar Gampa
5a5cf6254f nvethernet: handling new CERT errors
CERT INT08-C
CERT STR07-C

Jira NET-2907

Change-Id: If331caf9838840073792de5ac722f268920c4a87
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328902
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Narayan Reddy
d3cdce84ec nvethernet: IOCTL handling of HSIs
1) Add IOCTL support for below HSIs
 T264-EQOS_HSIv2-30
 T264-EQOS_HSIv2-9
 T264-MGBE_HSIv2-8
 T264-MGBE_HSIv2-7
 T264-MGBE_HSIv2-6
2) Add support for T26x Err Injection

JIRA NET-1946
JIRA NET-1948
Bug 4778785

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: Idd479983c39a7f15c875dac93c86d5bf4fd5e04c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258754
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
Joshua Widen
7ae5bc1873 host: isp: Correct log level of debug print
A debug print was left at an incorrect level. Spamming the kernel
log and causing high CPU utilization.

Bug 4921461
Jira CAMERASW-32858

Change-Id: I0037d5bc96f3ec3925eee3b565637b2d2a2fa91d
Signed-off-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3335947
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
2025-07-24 10:19:18 +00:00
Srishti Goel
825083f3d6 pci: xdma: Polling on XDMA debug reg to restart if DMA hung
Polling on XDMA_CHANNEL_DEBUG_REGISTER_4 for atmost 10msecs in the IRQ handler and restart the channel if the XDMA_CHANNEL_DEBUG_REGISTER_4_INTR_ENGINE_MSI_CHAN_MSI_DISP_FSM is non-zero at the end of this.

Bug 4787071

Change-Id: I215065a1bf7ae35c89c4b3c4df9a21f7bea5ebe9
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330655
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
kevixie
04fdeac230 nvidia-oot: CameraSW: KMD SWUD update
+ Use CameraDoxygenWorkflowV1_02182025 to generate
  SWUD doxygen headers for functions in FusaCap KMD
  and RTCPU
+ Use Cursor Agent to generate SWUD doxygen headers
  for FusaCap capture-vi.c

Jira CAMERASW-32271

Change-Id: Ida6b94d6ffea3df593fa793cc4b9a150c87187ba
Signed-off-by: kevixie <kevixie@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313956
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:18 +00:00
Narayan Reddy
abd6b1a506 nvethernet: update dereferring of ioctl_data
structure variables inside ioctl_data structure has been
grouped to union, so updated the dereferring of ioctl_data

Bug 5129765

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I8732a1e86985643bb88f58de2b0b11a0d02ffe2b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323781
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
dd5c4b741f host: nvcsi: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The NVCSI driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I22a75c9f58ec0980aa97997b674c26a9bb62d47b
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321086
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c2dd36f33c host: capture-support: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The capture-support driver does not register prepare_poweroff,
poweron_reset, finalize_poweron callbacks nor set the clock gating
regs with nvhost, so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I438621258378bb6e81fc7a82e3334dcbfa180dc9
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321085
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c555e49cf1 host: isp: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The ISP driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: Iadf7b4104f622507e8b2e82fe054151e6318d747
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321084
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:18 +00:00
Akihiro Mizusawa
c84bc1ebe7 host: vi: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider
nvhost API deprecation while maintaining equivalent functionality.

The VI driver does not register prepare_poweroff, poweron_reset,
finalize_poweron callbacks nor set the clock gating regs with nvhost,
so the runtime operations will only call clk APIs.

Bug 4921620

Change-Id: I639d428f5ea1ed1071d4502a877841b7049b9cd2
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320983
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: FNU Raunak <fraunak@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:18 +00:00
Ketan Patil
6e5aec9ce4 video: tegra: nvmap: Add new heap for VI mempool
- The VI is allowed to access the whole of the Guest VM currently as it
is a stage-2 SMMU device. Hence it can read and write to any memory.
This may lead to breach of confidentiality and integrity. In order to
restrict the VI from accessing the whole VM, a mempool is being created
by HV that would restrict access to VI to just the mempool memory.
- In nvmap, we have some special rules for IVM carveout like if user
specify IVM carveout to allocate from, then if first IVM carveout does
not have sufficient memory then nvmap tries to allocate from next IVM
carveout. We don't want these rules applicable for VI mempool heap,
hence only carveout initialization part would remain similar to IVM
carveouts but rest of the operations would be performed normally like
any other carveout.
- Add DT binding doc for VI-carveout.

Bug 4648721

Change-Id: Ib40415a4c80da908654c86162c1cd4b50b33ef31
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196238
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
2025-07-24 10:19:18 +00:00
Jon Hunter
a59a10dfeb drivers: Update timer APIs for Linux v6.15
In Linux v6.15, the timer APIs hrtimer_init() and del_timer() have been
removed. The hrtimer_setup() was added in Linux v6.13 to replace
hrtimer_init() and hrtimer_init() have finally been removed. The
functions del_timer()/del_timer_sync() were renamed to
timer_delete()/timer_delete_sync() in Linux v6.15. Use conftest to
detect these changes and update the drivers as necessary.

JIRA LINQPJ14-47

Change-Id: Id3994900384aad4b91155507cda91e04898ab12c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336168
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:18 +00:00
Sanjith T D
1d9d3c1755 vblk: Fix the IOCTL issue with block device node.
IOCTL was allowed via block device node due to
mapping of wrong ioctl callback . Fixed the mapping to
the correct ioctl callback that throws error when
ioctl is done on block device node.

Jira SSV-12846

Change-Id: I13b492f216c99ac68f9ac89c509b3019a92c50f8
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3335014
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:18 +00:00
Jeungwoo Yoo
89df3ba53b nvsciipc.c: Fix CWE violations
- EXP39-C

Jira NVIPC-3397

Change-Id: Ic4be52a1032ec729442368a96af5cb8b75b99330
Signed-off-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3334619
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
3ad90175d1 drm/tegra: Update to Linux v6.14
Update Tegra DRM to align with Linux v6.14. The 'drm_client_setup.h' was
moved from the directory 'include/drm/' to 'include/drm/clients' and use
conftest to detect where it is located.

JIRA LINQPJ14-47

Change-Id: I1f1df6da4400e74d2f97926710ac0ddd5e6413e6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333837
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
540737a228 drm/tegra: Update to Linux v6.13
Update the Tegra DRM driver to align with Linux v6.13. A function
pointer 'fbdev_probe' was added to the drm_driver structure in Linux
v6.13 and so use conftest to detect this and make the necessary changes
to the Tegra DRM driver.

JIRA LINQPJ14-47

Change-Id: I0120fe9f13bc39446ce4e0a8827eb5d8b42a082c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333836
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
6be033ba85 drm/tegra: Update to Linux v6.12
Update Tegra DRM to align with Linux v6.12. The output.c driver was
updated to use the 'drm_edid_connector_add_modes()' function that was
first added in Linux v6.3. Use conftest to detect the presence of the
drm_edid_connector_add_modes() function and make the necessary changes
to the driver.

JIRA LINQPJ14-47

Change-Id: I0ff45ef0ada2f2c2353c1ba579c06ae06122727c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333835
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Zhiyuan Wang
c9f69ea5d8 linux: kmd: static analysis TOP25 04/02 Part 9
fix CERT INT08-C under the following path:
- drivers/platform/tegra/rtcpu/camera-diagnostics.c

Jira CAMERASW-32960

Change-Id: I592cab86961df8e3a23d95acadced0717f424616
Signed-off-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3334867
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vishal Agrawal (SW) <visagrawal@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
02a104cbb2 rtcpu: Add Doxygen documentation to RTCPU subsystem
Add detailed Doxygen documentation across all files in the RTCPU subsystem.
This documentation effort follows SWUD Doxygen guidelines and provides
complete API documentation for the entire RTCPU codebase.

Use Cursor Agent to generate SWUD doxygen headers

Jira CAMERASW-31120

Change-Id: I3095ff2e321402e72f0f8f5762bad798ea0ecf19
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332472
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Bhadram Varka
11843f9878 nvethernet: fix Tx-ring full issue
Issue: Below issue observed while running TCP_TX perf test
for longer duration.

nvethernet a808a10000.ethernet: [validate_ctx][1082][type:0x2][loga-0x84d2] dma_txrx: Invalid frame len
nvethernet a808a10000.ethernet mgbe0_0: Tx ring[0] is full
nvethernet a808a10000.ethernet mgbe0_0: Tx ring[0] is full
nvethernet a808910000.ethernet eqos_0: Tx ring[0] is full

This is a regression due to the below change -
https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258684

The issue is that TSO packet is being treated as Non-TSO packet.
pskb_expand_head return code is returned directly where it can
return zero for TSO packet.

Fix:
Removed pskb_expand_head since headers are not getting updated in SW.
HW takes care performing the TSO handling. Also optimized the checks
in TSO path code.

Bug 5175569

Change-Id: I7f48ed32898fec51581bf034b953f0ef7a9913f0
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322354
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:17 +00:00
cyeddu
2e075e123d nvscic2c-pcie: Fix Top25 CWE CERT-C violations
Fix total 48 violations of below CERT-C rules:

CERT ARR30-C - 1
CERT EXP34-C - 1
CERT INT08-C - 20
CERT INT30-C - 20
CERT STR07-C - 4
CERT STR31-C - 1
FORWARD_NULL - 1

JIRA NVIPC-3120

Change-Id: I2b9b35e97fe6968ec4c656cdcdd01a764640033c
Signed-off-by: Anjanii <amohil@nvidia.com>
Signed-off-by: Janardhan Reddy <jreddya@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263785
Reviewed-by: Deepak Kumar Badgaiyan <dbadgaiyan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:17 +00:00
Mallikarjun Kasoju
ae290b601b ufs: Add conftest to check is_ufs_already_enabled
Add conftest to check is_ufs_already_enabled

Change-Id: Ia830afb2a72586f4da2323a4ab7df8e7eb9cc321
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3312149
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Mallikarjun Kasoju
9a4387e137 ufs: skip ufs initialize if already done
Skip ufs initialize if already done by
earlier firmware

Bug 4757621

Change-Id: I4efdca7e879d5d568d7749abcdebc05fe019fde1
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293005
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mallikarjun Kasoju
0587b30451 scsi: ufs: Clean-up ufs driver
Done below changes:
1. Removed FPGA specific changes
2. Removed T194 specific changes.
3. Fixed issues reported by check-patch

Change-Id: I8ea07a57add151ccd2e2fdac4e3bd9d9456cc765
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274557
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Bhadram Varka
76c28404c5 ethtool: Fix ring size configuration for Thor
Fix several potential issues in ethtool ring parameter handling:

- Add bounds checking for osi_dma->mac array access
- Add NULL pointer validation for ndev, pdata and osi_dma
- Make ring size arrays static const
- Add proper error handling for network device stop

Bug 5158977

Change-Id: Ia592c14d9ff1b81bee7d3382ef171443dd30e4b2
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317305
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
bce3cb0a57 platform: tegra: rtcpu: Add runtime control for camera diagnostics
Add a new sysfs interface that allows toggling camera diagnostics on and
off at runtime without deallocating memory resources. This enhances the
camera-diagnostics driver functionality by:

- Adding a new 'control' sysfs attribute for starting/stopping diagnostics
- Implementing intelligent state checking to avoid unnecessary operations
- Providing better user feedback about the current diagnostic state
- Preserving allocated memory between stop/start cycles

The implementation checks if diagnostics are already running or already
stopped before attempting state changes, preventing redundant operations
and providing informative messages to users.

This allows us to run isp-falcon-memtest, which conflicts with
camera-diagnostics driver.

Jira CAMERASW-32042

Change-Id: I67d0e7e15a25cf000554d1c222b2890be1adce4a
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330307
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
0f10f5e639 platform: tegra: rtcpu: Implement camera diagnostics driver
This commit expands the camera-diagnostics driver to add
support for ISP PFSD tests. The implementation:

- Adds diagnostics IVC communication between kernel and RCE firmware
- Implements ISP SDL test vector loading, verification, and execution
- Provides proper memory allocation and IOMMU mapping across devices
- Supports multiple ISP instances with chip-specific configurations
  (T234/ISP6 and T264/ISP7)
- Creates sysfs interface for diagnostic status reporting
- Adds proper error handling and resources cleanup
- Implements CRC validation for test vectors

The driver enables hardware safety diagnostics for camera subsystems
to ensure reliability and functional safety of the camera pipeline.

New header files:
- camrtc-diag-messages.h: Defines messages for IVC communication
- camrtc-diag.h: Contains common diagnostic data structures

Jira CAMERASW-32042

Change-Id: I9a892b40891cffc3d460723d9fdc92854c6cda85
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313001
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
2025-07-24 10:19:17 +00:00
Sanjith T D
39392014e5 vblk: Add separate device node for FFU
In order to provide separate access control for
Device Management and Firmware Update IOCTL's,
separate device nodes are created.

 - /dev/vblkdevX.ctl is for Device Management related IOCTL's
 - /dev/vblkdevX.ffu is for Firmware Update related IOCTL's

Removed the old approach of checking for access permission
inside the driver.

Jira SSV-12846

Change-Id: Id34d37a34eb1b988559d5dc3aec0b2291dcecc8f
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324229
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
13834d4e13 drm/tegra: Update to Linux v6.8
Update the Tegra DRM driver to align with the upstream Linux v6.8 kernel
preserving all the downstream changes that still need to be upstreamed.

JIRA LINQPJ14-47

Change-Id: If0a9149bcfa2fd6276ac8100933abc3d532a5ddc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333320
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
8a28999d28 drm/tegra: Drop kernel version checks
Drop the kernel version checks from Tegra DRM because these are only
needed for pre-Linux v6.x kernels and these are no longer supported.

JIRA LINQPJ14-47

Change-Id: Ie5190eec6f3e37b477ae2ad84f2ef2f3ed9c3d8a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333319
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
7a6b9bbadb pva: Fix mixed declarations and code
When building the PVA driver with the compiler option
'-Werror=declaration-after-statement' the build fails with the following
error ...

 drivers/video/tegra/host/pva/./src/kmd/common/pva_kmd_shared_buffer.c:
  In function ‘shared_buffer_process_msg’:
 drivers/video/tegra/host/pva/./src/kmd/common/pva_kmd_shared_buffer.c:
  error: ISO C90 forbids mixed declarations and code
  [-Werror=declaration-after-statement]
  187 |    uint32_t msg_size = safe_subu32(header.size, sizeof(header));
      |    ^~~~~~~~

Fix this build issue by ensuring the variable 'msg_size' is defined at
the start of the shared_buffer_process_msg() function.

Change-Id: Ibd4a51caae06bfda2e11dfc6e3f1cf2f26d618c7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330348
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
2025-07-24 10:19:17 +00:00
Ketan Patil
838bb12196 video: tegra: nvmap: Gather pages and then flush cache
After a deeper analysis, it was found that multithreaded cache flush is
not required. Only gathering the pages and then doing cache flush is
enough to get the perf improvement, the cache flush time of each page is
almost half in this case as compared with not gathering the pages. So it
means there is continuous cache eviction is happening. So, while
allocating big pages from allocator, instead of allocating one big page
and flushing it, allocate all required big pages and then flush pages
at last.

Bug 4628529

Change-Id: I4d8113010a8c82a1cab124e26b14e8a3f5791cd1
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3325002
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
2025-07-24 10:19:17 +00:00
Ketan Patil
5bb431b8df Revert "video: tegra: nvmap: Add multithreaded cache flush support"
This reverts commit b90900fdece2eb002b5061681aead4a74401b484.
After a deeper analysis, it was found that multithreaded cache flush is
not required. Only gathering the pages and then doing cache flush is
enough to get the perf improvement, the cache flush time of each page is
almost half in this case as compared with not gathering the pages. So it
means there is continuous cache eviction is happening. Hence revert the
multithreaded cache flush support to simply the code and patch 3325002
adds gathering of pages support.

Bug 4628529

Change-Id: Ieb9237c6c2935cbf88036bc3ab83c33dc4d5e38d
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3325001
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
2025-07-24 10:19:17 +00:00
Hitesh Khode
c90336041c SerDes: EPL error reporting on irq
Add EPL reporting support in interrupt handling

JIRA TDS-17145

Change-Id: I3f7257ecbbc66880c65327cfdde52d2de5a3042a
Signed-off-by: Hitesh Khode <hkhode@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322971
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:17 +00:00
Jukka Kaartinen
9e6481e659 vi: Add check for csi_port
Validate csi_port already in the setup phase to have same
behaviour as in the QNX.

Bug 5048625

Change-Id: Id53faa8c97899fe590da9b2e90dc72cac9e1b4ae
Signed-off-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315532
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagaraj P N
a45f684085 vse: allocate priv struct during init
Also, update gmac crypto ctx free logic

Bug 4881474

Change-Id: I5e2f10814b3a1f41ff098f2c602ee2de431f6cf5
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3287699
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Ambika Prasad <ambikap@nvidia.com>
2025-07-24 10:19:17 +00:00
Manish Bhardwaj
c7180f767c nvidia-oot: update copyright year in virt drivers
Bug 4985113

Change-Id: I16682c1c2c8b2d5f76700e9133c8626a11905bfd
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328450
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
0d6655f480 video: tegra: nvmap: Fix build for Linux v6.15
In Linux v6.15, the function ioremap_prot() was updated to pass a
variable of type pgprot_t instead of an unsigned long. Add a conftest
test to check for this and update the NVMAP driver accordlingly to fix
the build for Linux v6.15.

JIRA LINQPJ14-47

Change-Id: Icff9f63bf5c914997b69076435dd9e2432f343a3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332454
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
585f64d7df gpu: host1x: Add syncpoint name and process name in syncpt_load
Update syncpt name and process info
in debug log.

Bug 5170956

Change-Id: Ie7db05a60b95febcdc645fe406297e09ad97976f
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330491
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
amitabhd
26b29860fd host1x_emu: DT Property based syncpoint memory
This change uses DT property to select syncpoint memory.
If property "syncpoints-mem" is defined hypervisor syncpoint
memory mechanism is used. Otherwise memory is allocated from
guest kernel.

Previously this was based on code level MACRO. Changing it to
DT simplify selection of syncpoint memory.

Jira HOSTX-5982

Change-Id: I5e26ef2d42d5d01d6aff0f2b43fd11c23218057d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3329245
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
Tested-by: Amitabh Dutta <amitabhd@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
2025-07-24 10:19:17 +00:00
N V S Abhishek
99b41fa0f6 tegra: nvmap: Return error instead of Bug On
Return error instead of Bug on when the ioctl
is called for prod builds. This is done to facilitate
proper error propagation to the clients.

Bug 5181576

Change-Id: Icf65e2bad08c048804bcf1b18103b757308d5d12
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328974
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Martin Radev <mradev@nvidia.com>
2025-07-24 10:19:17 +00:00
Jeungwoo Yoo
8e91b73244 nvsciipc.c: Fix CWE violations
- EXP39-C

Jira NVIPC-3397

Change-Id: Iacdcd3160f2060ffd8b1e0cc8958ff29cac670f4
Signed-off-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3326688
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
2025-07-24 10:19:17 +00:00
Ketan Patil
c20759506b video: tegra: nvmap: Add field to indicate hugetlbfs based memory
Hugetlbfs memory handles are shown under the IOVMM debugfs as the memory
comes from the system memory and not from any carveout. But it is
causing confusion among the customers. Hence add a field to indicate if
the buffer was allocated from hugetlbfs or not.

Bug 5169776

Change-Id: Ide70b7f746519ed528b5face5b91d9a4c2f9f7ca
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3332021
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagarjuna Kristam
3a9f9b5d12 linux: dma-test-common: Fix DMA re-init sequence
DMA channel is re-init based on incorrect previous and current
channel change check, fix the same. Add DMA cookie pointer info
logs for easy debugging.

Bug 4742850

Change-Id: Iec5dd32ffb3699c5d57961949597c2c80ef250ad
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330635
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagarjuna Kristam
6dbef270d8 PCI: tegra264: dma: Add poll to disarm MSI
To avoid getting spurious interrupts during XDMA channel reset,
Add polling of MSI states for NV_XDMA_CHANNEL_DEBUG_REGISTER_4_0
register once channel is disabled.

Bug 4742850

Change-Id: Id39e53f0fd33faa4358a3648e6baea8cc96c187c
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330634
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
8cb3f30c12 net: nvethernet: Fix build for Linux v6.15
In Linux v6,15, a 'speed' argument was added to the phy_loopback()
function. Add a conftest test to detect this change and update the
nvethernet driver accordingly. Note that if 'speed' is set to 0 when
calling phy_loopback(), then phy_loopback() behaves the same way as it
did before this argument was added. So by default set speed to 0 for the
nvethernet driver.

JIRA LINQPJ14-47

Change-Id: I55f775e672bfa1a00c9ccbd825c82be1868b0b52
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330685
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
9672874453 ufs: Fix Tegra UFS for Linux v6.15
In Linux v6.15, the pwr_change_notify() function was updated making the
3rd argument of type const. Add a conftest to detect this and update the
Tegra UFS driver accordingly.

JIRA LINQPJ14-47

Change-Id: I83f22bf0961200d9078fb35d408dac9149d786d2
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330680
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Kartik Rajput <kkartik@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
cf368bfa2b ASoC: tegra: Fix build for Linux v6.15
In Linux v6.15, the SOC_SINGLE_VALUE macro was updated and an 'xmin'
parameter was added. Add a conftest test to check for this and update
the Tegra ARAD driver accordingly.

JIRA LINQPJ14-47

Change-Id: I597104327dac9108a7ab106f0c3fec575947626d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328425
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
04e5d3eac8 blk: vblk: Fix build for Linux v6.15
In Linux v6.15, the 'request_queue' parameter was removed from the
function blk_rq_map_sg(). Add a conftest to check for this and update
the Tegra HV VBLK driver accordingly.

JIRA LINQPJ14-47

Change-Id: I140200fe7acbaebb383abd7939153178f0ca484a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330664
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Yuyuan Chen
b21532e8c8 kernel: nvidia-oot: Fix Static issues
Fix TAINTED_SCALAR and Directive 4.14

Jira CAMERASW-32773

Change-Id: I94534469e34d1826f09784391701838448de3dfa
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321543
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Patrick Young <payoung@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:17 +00:00
Mohit Ingale
5c39da20d5 media: camera: Reject channel setup for already configured stream id
If channel is already opened for given stream id and virtual channel id,
reject the request and error out.

Bug 5048625

Change-Id: I57c87128ce41c116fb2c8ef276908ff395864a9b
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3319273
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:17 +00:00
Prakhar Srivastava
2e68d82f52 PCI: tegra264: Remove private-soc directory
Move files from private-soc to parent controller directory.

Bug 5054840

Change-Id: I8ec5e5b34f2226bbbd051f4313033153a096e5c1
Signed-off-by: Prakhar Srivastava <prasrivastav@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3312461
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2025-07-24 10:19:17 +00:00
Johnny Liu
f654e9aed9 conftest: update tests for ICC functions
Add the existing ICC function tests in the Makefile and remove
unncessary check interconnect header file check in the tests.

Bug 4963969

Change-Id: I10f57798d444b656d8866613b1ea6db3df76bcd1
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328824
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
2025-07-24 10:19:17 +00:00
Jeungwoo Yoo
b62ef100a7 ivc-cdev.c: Fix INT30-C and INT08-C
Jira NVIPC-3395

Change-Id: Iaacae60c6e20ca9d8f9c142d12e96fada895a7e5
Signed-off-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298198
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
ac685ff9af bmi088: Remove version.h header
Kernel version definitions are no longer used in the BMI088 driver and
so remove the version.h header as it is no longer needed.

Bug 4190630

Change-Id: Id0e3052abbf85034c9f4f66f21cc9842eff3658c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330357
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Blake McHale <bmchale@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
673d69fe3a bmi088: Fix mixed declarations and code
When building the BMI088 driver with the compiler option
'-Werror=declaration-after-statement' the build fails with the following
errors ...

 drivers/bmi088/bmi088_iio.c: In function ‘bmi_iio_attr_store’:
 drivers/bmi088/bmi088_iio.c:226:9: error: ISO C90 forbids mixed
  declarations and code [-Werror=declaration-after-statement]
 226 |         struct bmi_iio_state *st = iio_priv(indio_dev);
     |         ^~~~~~

 drivers/bmi088/bmi088_iio.c: In function ‘bmi_iio_attr_show’:
 drivers/bmi088/bmi088_iio.c:283:9: error: ISO C90 forbids mixed
  declarations and code [-Werror=declaration-after-statement]
 283 |         struct bmi_iio_state *st = iio_priv(indio_dev);
     |         ^~~~~~

Fix this by ensuring that all variables are defined at the start of the
functions.

Bug 4190630

Change-Id: I52e90fbc61d4d33ab8c1dfd4e551a54461aad788
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330356
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Blake McHale <bmchale@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
454c782d5c nvsciipc: add missing check routing in set db
add pointer check routine for set_db CMD.

JIRA NVIPC-3520

Change-Id: Ie9768ae839d88519013dfece97192d111acacbb2
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3329729
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
27a2c762f1 nvsciipc: add missing authentication
added missing client authentication to ioctl func below.
nvsciipc_ioctl_get_db_by_idx()
nvsciipc_ioctl_get_vuid()

JRIA NVIPC-3513

Change-Id: I32c3c97ba1c5196ba5858d13393fada073527d2f
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324672
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
2025-07-24 10:19:17 +00:00
Ken Chang
8e90031cd8 tegra-cec: poll WR_LOCK for TX data sync
After programming the TX Register, it takes 3-4 clock cycles for TX
data synchronization to the CEC core domain. The TX_EMPTY interrupt
should not be cleared until this data synchronization is complete.

Enable CEC HW feature to automatically clears the TX_EMPTY interrupt
after TX data synchronization is complete. It takes time for HW to
clear the interrupt and TX_EMPTY can still appear high, hence SW
needs to poll WR_LOCK until it goes to 0. This will avoid SW to
attempt the next TX block during the same TX_EMPTY interrupt.

Also read RX_REGISTER based on the buffer occupancy which is
indicated by the CEC_RX_BUFFER_STAT_0 register.

Bug 4954851

Change-Id: I3ec3792c9ae3b8a00c800c921cf4e4d09369e6b9
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322519
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Tested-by: Ruopeng Huang (SW-TEGRA) <robhuang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
amitabhd
d460bf1928 host1x_emu: Support host1x dispatch api in DLA.
Add change to enable host1x dynamic dispatch api
provided by host1x-fence module.

Bug 5064819

Change-Id: Ibad4a6741d9a8227fc6c0098c83a1ed6ec0cc09a
signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3310175
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Mainak Sen <msen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
915ce6717f nvsciipc: set nvsciipc max endpoint count
validate nvsciipc max endpoint count.
validate set_db entry pointer.

JIRA NVIPC-3506

Change-Id: Id29531af24367de952b2dccebe23515ad52bfd33
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322061
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
bb01f4bcf7 nvsciipc: removed unused CMDs and structure
removed NVIPC_IVC_IOCTL_NOTIFY_REMOTE and NVIPC_IVC_IOCTL_GET_VMID.
removed nvsciipc_get_db_by_id structure because they're not
used by stakeholders any more.
They're dead code.

JIRA NVIPC-3488

Change-Id: I4fae43456cf96d37e4502042aef9c67aa167db9d
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322035
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
c9ee1f5372 nvsciipc: remove unused CMDs
removed NVIPC_IVC_IOCTL_NOTIFY_REMOTE and NVIPC_IVC_IOCTL_GET_VMID

JIRA NVIPC-3488

Change-Id: Ic511e6f059ae2149bd82e0c5980c5f95e9494b85
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322033
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:17 +00:00
Joshua Cha
e8d5a43b9f nvsciipc: add endpoint mutex
add endpoint mutex to nvsciipc KMD

JIRA NVIPC-3427

Change-Id: I1644213f59d24da4c4eeb693fa3016904388a26b
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3309493
Reviewed-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
nanwa
e677624957 pva: mirror from gitlab cv/pva-sys-sw
Gitlab commit e56dfe9c0b2c3 ("kmd: increase timeouts in nati...")

Changes since last deployment:

- kmd: increase timeouts in native debug builds
- fw: Add support to report invalid cmd index
- Honor submission timeout while waiting for space in Fence Buffer
- deploy: Make GVS polling more robust
- deploy: Update GPL 2 license
- deploy: Generate change summary in commit message
- Enabling thread safety tests
- tests: enable MultipleContexts.MaxContext_SingleThread_SingleProcessOnlyo

Change-Id: I8e9353205d322c2a6f3e93875d8b8a8025af4195
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3326483
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
970fbbcc73 gpu: host1x: Fix type casting in debug_hw.c
Fix a CERT-C Expression violation (CERT EXP39-C)
by properly casting the mapped pointer to
u32* when passing it to show_gather() function.
This ensures type compatibility between the
function parameter and the actual object
being accessed.

Fixes CID 12627322

Jira HOSTX-5971

Change-Id: I8a7224b46f4e36582a06d6d6ee1ba21da18fe43c
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324442
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
3b36d6b76f gpu: host1x: Fix NULL pointer dereference in job allocation
Fix NULL pointer dereference when num_unpins is 0,
which causes job->addr_phys to be NULL. In this
case, the code was incorrectly trying to set
job->gather_addr_phys to &job->addr_phys[num_relocs],
which would dereference a NULL pointer.

Add proper NULL checks to prevent this issue
both during allocation and when
using job->gather_addr_phys throughout the code.

Fixes CID 12627383:
- CERT-C Expression (CERT EXP34-C)
Fixes CID 12627953:
- Explicit null dereferenced (FORWARD_NULL)

Jira HOSTX-5971

Change-Id: If417ec5b5431a4f4b716ca73ddf279c9b0336c94
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3324441
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagarjuna Kristam
8759302687 linux: dma-test-common: Add SWITS Stop and Abort tests
Exisintg Abort and STOP tests hardcodes usage of all channels.
In SWITS scope, prepare tests to use single channel DMA.

JIRA NET-2991

Change-Id: I62464714bfd359ad141bcb8df8316e703e95d591
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323878
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagarjuna Kristam
56278bff69 PCI: dma-test: Update conditions for tests
Update all test logs as  *condition -<condition>- (Passed|Failed)*.
This format is parsed in the script to identify pass or fail for
corresponding test cases.

JIRA NET-3009

Change-Id: I6e7b37d5205a421d3c62142b268bfc646e89a08e
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323877
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
261488ef83 gpu: host1x-emu: Add host1x_syncpt_get_shim_info
Implement host1x_syncpt_get_shim_info function for
host1x-emu driver and add it to the dynamic dispatch
mechanism in host1x-fence.

This function provides clients with the physical address
of syncpoint aperture, stride and number of
syncpoints, which is needed by various client drivers
like ISP, VI, PVA, GPU etc

Jira HOSTX-5971

Change-Id: I50e60222a035228c981dfa993cb0088e1d15dad2
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323327
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
2025-07-24 10:19:17 +00:00
praagarwal
4a4300f0e8 gpu: host1x: address INT30-C cert violations
add checks for integer overflow in job.c

Jira HOSTX-5889

Change-Id: Id3336c5c390f2ce771492a686a57e47cc9adf9d2
Signed-off-by: Prateek Agarwal <praagarwal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299139
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:17 +00:00
Christophe JAILLET
6b5633fb93 crypto: tegra - Remove an incorrect iommu_fwspec_free() call in tegra_se_remove()
The only iommu function call in this driver is a
tegra_dev_iommu_get_stream_id() which does not allocate anything and does
not take any reference.

So there is no point in calling iommu_fwspec_free() in the remove function.

Remove this incorrect function call.

Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Tested-by: Akhil R <akhilrajeev@nvidia.com>
Acked-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

JIRA LINQPJ14-47

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I1d511caa5cff07b936d1f347c2768c43a6f1c1e3
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328426
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
990ce03a70 ASoC: tegra: Use inclusive definitions
In Linux v5.11, commit f026c123001b ("ASoC: topology: use inclusive
language for bclk and fsync") added definitions SND_SOC_DAIFMT_CBP_CFP
and SND_SOC_DAIFMT_CBC_CFC, to replace the legacy definitions
SND_SOC_DAIFMT_CBM_CFM and SND_SOC_DAIFMT_CBS_CFS, respectively. For
Linux v6.15, the legacy definitions have now been removed. Update the
Tegra ASoC machine driver to use the inclusive definitions. Note that
given that we don't support v5.x kernels any more we don't need to worry
about compatibility with older kernels.

JIRA LINQPJ14-47

Change-Id: I4dd38d6c5c9e4d37f4b28aed516c962bf87f2fbd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328424
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
2025-07-24 10:19:17 +00:00
Bitan Biswas
e30d7b7f40 dt-bindings: tegra264: Update schemas
Update tegra264 schemas as follows:
 - correct nvidia,tegra264-rtc interrupts maxItems, minItems
 - correct tegra-spidev reg maxItems, minItems.
   add missing attributes into example.
 - fix compatible in example for nvidia,tegra186-spi-slave
 - document multi-master attribute in nvidia,tegra264-bpmp-i2c

Update year range in .yaml file(s) Copyright

Change-Id: Ibcafe16aa674975a7b74328d20f4f6e8f66b51fe
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321635
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Sanath Kumar Gampa
376365d92f ethernet:Update ethtool logic to read macsec stats
Read macsec stats only if macsec is enabled in DT

Bug 5130525

Change-Id: I72de446954513ec6332566ae0647aec323178146
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313063
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:17 +00:00
nanwa
0c0870d8a4 pva: mirror from gitlab cv/pva-sys-sw
- Added support for booting from GSC on L4T and updated the VPU allowlist.
- Enabled debug logs by default for debug builds and added a DebugFS node for VPU.
- Addressed data corruption issues in QNX devctls and fixed various KMD data handling bugs.
- Updated DMA configurations and handling.
- Implemented nsight trace logging support and updated VPU stats and NVLOG implementations.
- Other minor bug fixes and documentation updates.

Gitlab commit dc34d709b865 ("intf: Enable following intf tests")

Change-Id: Ide42e0390af9eece5e9ed88ac3eba57b9272d6a1
Signed-off-by: nanwa <nanwa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3323529
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mihir Pradeep Garude
4e56706467 serdes: Allowlist for NSPECT-86XH-KQRC
Updated allowlist to skip packages which are not applicable for
Serdes.

Jira TDS-16934

Change-Id: I6df0f2754e7c9b0755c569117f1192631a6be4fb
Signed-off-by: Mihir Pradeep Garude <mgarude@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322789
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:17 +00:00
Vamsee Vardhan Thummala
15f9feb564 drm/tegra: Remove PM from virtual engine
Remove power management functionality from virtual engine driver
as it's no longer needed. This includes suspend/resume operations
and PM ops structure. The driver now relies on system's default
power management behavior.

Jira HOSTX-5933

Change-Id: I092bfa8e2a01345e149ff2c04ed526a0aa7a0944
Signed-off-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322473
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Nagaraj P N
083a40b0d3 nvtzvault: add driver for GP comm via oesp mailbox
- Allow applications to interact with TA via IOCTL
  interface, with one device node per TA/token to
  allow access control policies to be enforced.
- Validate the request parameters
- Add support to to serialize request data from application
  and deserialize response from the TA
- Include process name as part of request to enable
  TA to log required info to nvlog buffer

Jira ESSS-1713

Change-Id: I9e4c4687ecb6e01b0d88130fd640a9b4a59676aa
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3282272
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svc-percl-checker <svc-percl-checker@nvidia.com>
2025-07-24 10:19:17 +00:00
Mahesh Kumar
a23d954e3e platform: dce: Add bootsrap2 command
Add support to the bootstrap command over the admin channel,
which will be called when a client registers. This command will
perform steps that must be performed only after the client is ready.

TODO: This bootstrap-2 command will be replaced by the existing
bootstrap command which we call during DCE-FW bootstrapping once
we split admin bootstrapping and RM bootstrapping in the DCE-KMD.

Jira TDS-17135

Change-Id: I55330b9ce73e1acf20e2a80d392d7984c91ed65f
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274949
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
8a72e1a997 nvdla: Replace deprecated nvhost_syncpt_* APIs
This commit replaces the deprecated nvhost_syncpt_*
functions with the equivalent host1x_syncpt_* APIs
throughout the NVDLA driver.
The following replacements were made:

- nvhost_get_syncpt_host_managed() →
   host1x_syncpt_alloc() + host1x_syncpt_id()
- nvhost_syncpt_put_ref_ext() →
   host1x_syncpt_put()
- nvhost_syncpt_incr_max_ext() →
   host1x_syncpt_incr_max()
- nvhost_syncpt_read_maxval() →
   host1x_syncpt_read_max()
- nvhost_syncpt_is_expired_ext() →
   host1x_syncpt_wait()
- nvhost_syncpt_set_min_update() →
   host1x_syncpt_read() + host1x_syncpt_incr()

Each replacement includes:
- Obtaining syncpoint handles when necessary with
   host1x_syncpt_get_by_id_noref()
- Proper error checking for null handles and return values
- Maintaining the emulation wrapper in nvdla_sync_syncpt_emu.c

Bug 4922416

Jira HOSTX-5963

Change-Id: I8ce4299f89a8938c07895656689a59cc20a097ec
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321364
Reviewed-by: Arvind M <am@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
cdf96fa81b nvdla: Replace deprecated nvhost_module* APIs
Remove dependencies on the following deprecated
nvhost API functions by implementing their functionality
directly in the NVDLA driver:

1. nvhost_module_init:
   Replaced with direct implementation in nvdla_module_init:
   - Get clock resources and set clock rates
   - Initialize reset control
   - Set up power management runtime
   - Create debugfs entries

2. nvhost_module_deinit:
   Replaced with direct implementation in nvdla_module_deinit:
   - Disable power management runtime
   - Free falcon firmware if present
   - Clean up debugfs entries

3. nvhost_module_reset:
   Replaced with direct implementation in nvdla_module_reset:
   - Handle prepare_poweroff callback
   - Acquire and release reset control
   - Load clock gating registers
   - Handle finalize_poweron callback

4. nvhost_module_busy:
   Replaced with direct implementation in nvdla_module_busy:
   - Get PM runtime sync
   - Handle PM runtime errors

5. nvhost_module_idle and nvhost_module_idle_mult:
   Replaced with direct implementations:
   - Mark last busy for PM runtime
   - Handle autosuspend or regular PM runtime put

6. nvhost_module_pm_ops:
  Replaced with custom nvdla_pm_ops structure:
   - Implement nvdla_runtime_suspend and nvdla_runtime_resume
   - Implement nvdla_suspend and nvdla_resume
   - Configure SET_RUNTIME_PM_OPS and SET_SYSTEM_SLEEP_PM_OPS

7. nvhost_module_load_regs:
   Replaced with nvdla_module_load_regs:
   - Implement register manipulation with direct memory mapped I/O
   - Use writel instead of host1x_writel

Bug 4921620

Jira HOSTX-5963

Change-Id: I3006a92a05966da138da31730e97f74f786c9d0c
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321246
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
0f991be9e7 nvdla: Replace deprecated nvhost_client* APIs
Replace deprecated nvhost client device functions with
their direct implementations to maintain compatibility
with newer host1x drivers:

1. Replace nvhost_client_device_get_resources with
   direct implementation:
   - Get host1x data from parent device
   - Map device resources directly

2. Replace nvhost_client_device_init with
   nvdla_client_device_init:
   - Allocate character device region
   - Create device node using nvdla_client_device_create

3. Replace nvhost_client_device_release with
   nvdla_client_device_release:
   - Clean up device node
   - Unregister character device region

This change ensures the NVDLA driver continues to work
correctly with the host1x driver while removing
dependencies on deprecated functions.The device node
"nvhost-ctrl-dla" is still created with the same
functionality as before.

Bug 4921461

Jira HOSTX-5963

Change-Id: Ib27000fa47fdd72f80ca4030232d31e100c01ea4
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320695
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
2025-07-24 10:19:17 +00:00
Mainak Sen
303edb8a0e nvdla: Replace nvhost_syncpt_unit_* API Usage
Replace the deprecated nvhost_syncpt_unit_interface_init()
function with host1x_syncpt_get_shim_info() in
the NVDLA driver. This change:

1. Adds a local def of struct nvhost_syncpt_interface
2. Implements the functionality in nvdla_sync_syncpt.c
3. Adds necessary include files for IOMMU and DMA mapping

This change ensures the NVDLA driver continues to work
correctly with the host1x driver while removing the
dependency on deprecated functions.

Bug 4921461

Jira HOSTX-5963

Change-Id: I085a24045758a2ecbb026654c3ee57a8dfda9271
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320585
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:16 +00:00
Frankie Chang
0a60f5f169 kleaf: add pci.includes for tests-oot
Need to add pci.includes to build tests-oot
via kleaf build.

Bug 4344670

Change-Id: I9f032708d1787940c21a7cd1688cc9ec9dbd0d72
Signed-off-by: Frankie Chang <frankiec@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317708
Reviewed-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:16 +00:00
Robert Huang
a0aa537149 misc: cec: add wake up support.
This change adds SC7 wake support to cec driver.
CEC engine can detect TV packets in SC7 state and
can wake up when particular pattern detected.
In resume functionality, the total arrived packets on FIFO
needs to read and reported back to user-space.

This change adds -
1. Program CEC engine to activate for SC7 wake.
2. Program required opcode and physical address.
3. Register for wake and read packets in resume path.
4. Provide sysfs control to program physical address.

Verification of SC7 wake is done for below cases -
1. TV turn on and off is tested.
2. TV source input change is tested.
3. CEC Analyzer set-stream is tested.

Bug 4974679

Change-Id: Ia1ceeb13b89614c96d0b6d42f2bb58419865414b
Signed-off-by: Robert Huang <robhuang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300821
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
2025-07-24 10:19:16 +00:00
Bhadram Varka
1960558372 nvethernet: suspend/resume time profiling
Add suspend/resume time to the debugfs so that
tests can be written to monitor the SC7 KPI

Bug 4202840

Change-Id: I92531277ab7149269186f8c61237931de99a3368
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300390
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:16 +00:00
Bhadram Varka
b5a64188d3 nvethernet: don't free/alloc descriptors in SC7
- dma_alloc_coharent is taking more time while
allocating the descriptors in resume path.
- This change will not free the DMA descriptor
- It only free DMA buffers in the Rx ring while suspend
and re-allocate the DMA bufeers in the Rx ring during
resume.

Bug 5094704

Change-Id: If52471d11dd300c324a9c9bc1723fcb3d3e51bf7
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313272
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:16 +00:00
Hirak Biswas
4c9bdb3715 ASoC: tegra: Enable ARAD controls
ARAD was disabled earlier because it was
non functional from audio server side.
Re-enabling since the issue is now fixed.

Jira TAS-2594

Change-Id: Idabb617ff3150368ea62d002c3cbdce131054611
Signed-off-by: Hirak Biswas <hbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295702
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:16 +00:00
Frankie Chang
c781ccfdbc nvdla: not build axi-nvdla.ko for ACK
We don't need axi-nvdla.ko in Android,

Bug 4344670

Change-Id: I60c657638802a6e3d9c2c747e7d80ce5d7b80b21
Signed-off-by: Frankie Chang <frankiec@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320501
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:16 +00:00
Bhadram Varka
3edc4ff927 nvethernet: Add nvidia,use-random-mac-addr DT property
Adding support for generating the random MAC address
if nvidia,use-random-mac-addr is set with value 1.

Below property should be there insider ethernet DT nodes -
nvidia,use-random-mac-addr = <1>;

Recommendation is to use only for MODS setup.
This should not be enabled in the production DT.

Bug 5142789

Change-Id: I87db90685bb9769358eda4edc226b929ccdce67f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317020
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Lovie Wang <loview@nvidia.com>
2025-07-24 10:19:16 +00:00
Sanjith T D
010cb686b0 vblk: Fix top25 static analysis violations.
Jira SSV-12834

Change-Id: I9b58305b033cc5dabe9b07ebcf34633b738ae057
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317746
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
2025-07-24 10:19:16 +00:00
Nagarjuna Kristam
f61c2ced6d PCI: tegra264: ep: Fix ICD mis-matches in code
Add state checks for set_bar, map_addr and unmap_addr API's.

Bug 5132823

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: Ifb17259229a74289703f18b34e223fed18ead1eb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314131
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Nagarjuna Kristam
ab18e366eb PCI: epf: dma-test: Add negative tests for EP and DMA
Add negative tests for EP API's set_bar and clear_bar.
Add negative tests for all DMA API's

JIRA NET-2400

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: If1b171f67b4c0a372e2a515704893609b7d11b76
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313976
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Suneel Kumar Pemmineti
04ccb5c0c3 nvsciipc: enable endpoint security
- allow ioctl access if UID looked up is one of process UID
  or SGIDs.
- removed legacy codes
- set UID of set DB ioctl using sysfs

JIRA: NVIPC-2817

Change-Id: Ic910b5bdbb362e9cda0cc3af4bcd9c1642725a25
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225830
Tested-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Manish Bhardwaj
1fabab5472 hvc_sysfs: supporess hvc trace buffer error log
hvc trace buffers logs are being used for collecting
eventlib by hypervisor. Since this is not needed in
prod binary so suppressing the hvc buffer missing error.

Bug 5150377

Change-Id: I567cb2cd3e8b5e7e10a24a57e09221c6014264fc
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3320466
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ashwin Joshi <asjoshi@nvidia.com>
2025-07-24 10:19:16 +00:00
Sushil Kumar Singh
d3e47da5a4 nvethernet: disable HSI error reporting if EPL is disabled.
Issue:
During iperf test on pegasus board on customer observed below error periodically
nvethernet 6810000.ethernet: Failed to report error: reporter ID: 0x0, Error code: 0x1002, return: -19

Fix:
Disable HSI error reporting from hsi work queue function
for L4T platforms if safety component EPL is not supported.

Bug 4090612

Change-Id: Ifc51dd93fb16c1dbf7e42c648ca14443bb40550b
Signed-off-by: Sushil Kumar Singh <sushilkumars@nvidia.com>
(cherry picked from commit 983ddcae450c36cde9ec79433e16a4ed5aa89319)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313872
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318856
Tested-by: Wayne Wang (SW-TEGRA) <waywang@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Petri Niemela
58478b0ab6 rtcpu: Halt RTCPU using HSP_BYE before reset
Calling tegra_camrtc_reboot() can cause a memory fabric timeout error by
asserting reset when the RTCPU is in the middle of a memory transaction.
As a solution (similar to tegra_camrtc_halt), before asserting the
hardware reset, signaling the RTCPU to suspend its operations using
CAMRTC_HSP_BYE and waiting for RTCPU to enter WFI.

Bug 5051748

Change-Id: Iba8e4e837ee0983ffe9629e7627e0056ce1c2341
Signed-off-by: Petri Niemela <pniemela@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3317142
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
2025-07-24 10:19:16 +00:00
Johnny Liu
601567ef37 devfreq: nvhost_podgov: implementation cleanup
Previous implementation lacks of documentation and it's hard to
understand the effect of changing specific tunable parameter.

Revise the implementation so that the scaling behavior is somehow
aligned with the tegra_wmark governor supported by the actmon. The
only different is that nvhost_podgov governor is polling-based DFS
algorithm and it maintaines the moving average load in the governor
instead of hardware itself.

Bug 4892068

Change-Id: I033cb1359a484d4c9433fa4f2e7a99c42cb636b3
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315446
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
2025-07-24 10:19:16 +00:00
Nagarjuna Kristam
c451280883 PCI: tegra264: dma: Fix mis-matches with ICD
Fix tegra_pcie_dma_stop() return type to bool instead of tegra_pcie_dma_status_t.
Add NULL checks and atleast one DMA channel enable status in
tegra_pcie_dma_initialize().

Bug 5132823

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: Ie4363a9a63942256f136d018d17af488948e37a1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314130
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:16 +00:00
Blake McHale
1a1812b7e7 bmi088: add support for Linux v6.3+
Fixes two issues when using bmi088 driver on Linux v6.3+:

- support i2c_device_id on kernel >6.3
- use dev_to_iio_dev instead of dev_get_drvdata to access iio information

Change-Id: I70ad8b5d97d7b9a349f5387dbea60baf51cbbdb9
Signed-off-by: Blake McHale <bmchale@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3310726
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Zhiyuan Wang
578e8f6700 linux: kmd: static analysis TOP25 03/05 Part 9
Under the following path:
- drivers/platform/tegra/rtcpu/ivc-bus.c

Jira CAMERASW-32533

Change-Id: Iba0a529218a9aaf82f70bc4ff05b4658bbfe6fc3
Signed-off-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318779
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
2025-07-24 10:19:16 +00:00
Manish Bhardwaj
ecfef7f862 nvidia-oot: cert & misra fixes in tegra_hv_pm_ctl.c drv
using this patch fixing below cert & misra errors:-
- cert_exp39_c_violation: Accessing an object through a pointer "nlh"
  whose type "struct nlmsghdr *" is incompatible with the type of the object.
- cert_int08_c_violation: Signed integer operation "count += snprintf(buf + count, 4096UL - count, "%u ",
  data->wait_for_guests[i])" may overflow.
- cert_int08_c_violation: Unsigned integer operation "4096UL - count" may wrap.
- cert_int08_c_violation: Signed integer operation "count += snprintf(buf + count, 4096UL - count, "\n")"
  may overflow.
- cert_int32_c_violation: Signed integer operation "count += snprintf(buf + count, 4096UL - count, "%u ", data->wait_for_guests[i])"
  may overflow.
- cert_int32_c_violation: Signed integer operation "count += snprintf(buf + count, 4096UL - count, "\n")"
  may overflow.
- cert_str07_c_violation: Using unsafe interface "strncpy" instead of "strncpy_s"
  for string manipulation.
- missing_lock:	Accessing "user_client_count" without holding lock "netlink_lock".
  Elsewhere, "user_client_count" is written to with "netlink_lock" held 1 out of 1 times.

JIRA ESLC-8381

Change-Id: I2f84aa09b3a940cabda62a2391e782108755c80b
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304762
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Manish Bhardwaj
57a65081dd nvidia-oot: cert & misra fixes in cpuidle-tegra-auto.c drv
using this patch fixing below cert & misra errors:-
- cert_arr30_c_violation: "__per_cpu_offset[cpu]" evaluates
  to an address that could be at negative offset of an array.

JIRA ESLC-8401

Change-Id: I99670f9823cda5abaa41368b80821a5727414017
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304761
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Manish Bhardwaj
dd30ab0bfd nvidia-oot: cert & misra fixes in hvc_sysfs.c drv
using this patch fixing below cert & misra errors:-
- cert_int08_c_violation: Unsigned integer operation
  "vma->vm_end - vma->vm_start" may wrap.
- cert_int08_c_violation: Unsigned integer operation
  "vma->vm_end - vma->vm_start" may wrap.
- cert_str07_c_violation: Using unsafe interface
  "strncpy" instead of "strncpy_s" for string manipulation.
- cert_str07_c_violation: Using unsafe interface "strncat"
  instead of "strncat_s" for string manipulation.
- cert_exp39_c_violation: Accessing an object through a
  pointer "(uint64_t *)buf" whose type "uint64_t *" is
  incompatible with the type of the object
- cert_exp39_c_violation: Calling function
  "hyp_trace_get_mask(uint64_t *)" which accesses an object
  through a pointer "(uint64_t *)buf" whose type "uint64_t *"
  is incompatible with the type of the object. [details]
- cert_exp39_c_violation: Accessing an object through a
  pointer "(uint64_t *)buf" whose type "uint64_t *" is
  incompatible with the type of the object.

JIRA ESLC-8400

Change-Id: Ia8e03dac4e939078719543d8e6d3bbc464301b16
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304759
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
2025-07-24 10:19:16 +00:00
Nan Wang
ad2fd77097 pva: mirror from gitlab cv/pva-sys-sw
This commit has below list of fixes:
- kmd: Remove unnecessary checks
- kmd: Fix DMA validation bug
 - Add macros for verbosity controlled logging apis
- Add back pva_dbg_printf
- update copyrights for the modified files
- cleanup and fixes in nvlog support
- Implement debugfs node for setting fw debug log level
- Implement set debug log level cmd
- Add debug log verbosity level control support
- Implement circular buffer for debug logs
- kmd: fix error handling while creating context

Gitlab commit: a6acc89929f69d3aedff442068ee8e5725f03d5d

Change-Id: Ib0fc058324f19c076c3de7990b41c7415707ff28
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3318294
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
2025-07-24 10:19:16 +00:00
gkrishnakuma
70313ee7da Shield2: HDMI-IN: Make HDMI-IN driver
Build HDMI-IN kernel driver for Android builds.

Jira SHLD2-543

Change-Id: I0ff84d4ce3467c0825e379c93142307508750dc1
Signed-off-by: Guruprashanth Krishnakumar <gkrishnakuma@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3272404
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:16 +00:00
Eric Funsten
9d93957d0b Doc: remove coresight yaml files
Removes arm,embedded-trace-extension.yaml and
arm,trace-buffer-extension.yaml since we have existing files under
kernel-oot/Documentation

Jira MSST-984

Change-Id: I4f4f2d7a110b98d343cfe382345b00d7ce91d74f
Signed-off-by: Eric Funsten <efunsten@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315028
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Jon Hunter
eea9f99397 drivers: Remove CONFIG_TEGRA_VIRTUALIZATION
Remove CONFIG_TEGRA_VIRTUALIZATION so that virtualization is always
enabled for drivers. This permits the same drivers to work on bare-metal
Linux machines as well as virtual Linux machines.

Bug 5157858

Change-Id: I29d13dae957ed2273b65f95fff0bee1e06f45a27
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314409
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:16 +00:00
Jon Hunter
23e3912ef7 PCI: tegra264: Fix build issues using conftest
The Tegra264 PCIe drivers don't build for kernels that don't have:

1. The structure mrq_pcie_request_req defined
2. The function pci_epc_deinit_notify() present

This is currently being handling by building a dummy driver for kernels
that don't have these. To simplify this, use conftest to detect if the
above are present and modify the Tegra264 PCIe driver accordingly if
they are not present. By using conftest we can remove the Makefile
variable 'NV_OOT_PCIE_T264_SOC_SKIP_BUILD' and ccflag
'DNV_CONFIG_PCIE_TEGRA_DMA_DISABLE'.

Finally, the PCIe drivers are always built as modules so simplify the
Makefile and remove the usage of 'CONFIG_TEGRA_OOT_MODULE'.

Bug 4911768

Change-Id: Id282497b8607a732b5e6c90e1e7c1436589a0b5f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3245592
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:16 +00:00
Surbhi Singh
cb233ff6f5 video: tegra: nvmap: Add checks for addition overflow
Add check for overflow when two unsigned integers are added or
multiplied and return error in case of overflow condition.

JIRA TMM-5993
Bug 4479044

Change-Id: I8c9f6c55d413a2f95e445e09209d392a4c90b1e0
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3312702
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:16 +00:00
Aki Niemi
83df8b7e03 camera/rtcpu: Fix concurrency on reboot
Make sure that if a reboot is in progress, we don't attempt
to reboot the RTCPU again.

Bug 4623451

Change-Id: I8d153edb7ded48100f772e2fdd8afc7621b346bf
Signed-off-by: Aki Niemi <aniemi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3205581
(cherry picked from commit 4ac65dc2c205c840b3e70e067831de57d43952e3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281752
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:16 +00:00
Mark Mendez
37f86bfcd2 PCD: Add Ethernet schema
Change-Id: I2430eca4258a625dba6f7f9ac868edf615ef3f5e

Signed-off-by: Mark Mendez <mmendez@nvidia.com>
Change-Id: I2430eca4258a625dba6f7f9ac868edf615ef3f5e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315791
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:16 +00:00
Mohan Thadikamalla
a40f3c81dc nvethernet: icd: Add MACsec netlink events
- Added support for MACsec Netlink
message commands.
- Integrated Doxygen comments for
NvEthernetLinux documentation.

Jira NET-2816

Change-Id: I340be3451a92d8ae4e0164a2caf61da1650a2939
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3312567
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2025-07-24 10:19:16 +00:00
spatki
70570ef224 tsec: add firmware desc path as module fw
During SC7 tsec driver is unable to find the desc file for the
tsec fw and thus tsec boot fails. This might result into system
hang. Hence this change adds the tsec fw desc file path as the
module firmware so that the firmware is available to it during
SC7.

Bug 5053273

Change-Id: I4f2c9bb5288dac6973f574159fdebc48009edf2a
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3308515
(cherry picked from commit 598f951b93)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3308481
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Srishti Goel
529f22ea6a PCI: tegra264: Remove XAL mem registers programming
Remove the XAL memory register programming from the Linux driver, since
this is done by the BPMP-FW for all controllers.

Bug 5033472

Change-Id: I64ec6347d59d77125c34ae52ac3b24413e1f5479
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304008
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:16 +00:00
Khushi
62431fc5f3 VSE/Cryptodev: prefix driver name for driver print
ESSS-1756
Signed-off-by: Khushi <khushi@nvidia.com>
Change-Id: I5f65e77cda381189f59cabad04d340e795f01021
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315502
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Sheetal Tigadoli
f65d7c0543 Documentation:bindings:nvpps:Deprecate ptp_tsc_k_int property
Deprecate ptp_tsc_k_int property from nvpps.
The k_int parameter is calculated by the driver itself

Bug 4899241

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I8e492bf6748f94fbe0136c2a1a909d8ba5031aea
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300419
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:16 +00:00
Sheetal Tigadoli
e5ef698f2f drivers:nvpps:add higher PPS freq support in t23x
add higher PPS freq support in t23x

Bug 4899241

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I2fbbd0b5dbdd326d47181d03aa334c31b7b4d35c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300418
Reviewed-by: Kiran Kumar Bobbu <kbobbu@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vijay Mishra <vijaym@nvidia.com>
2025-07-24 10:19:16 +00:00
Jon Hunter
2ff6b64efd media: camera: Fix declaration-after-statement
The camera driver fails to build if the compiler option
-Werror=declaration-after-statement is enabled and the following error
is seen ...

 drivers/media/platform/tegra/camera/tegracam_ctrls.c:1120:17: error:
 ISO C90 forbids mixed declarations and code
 [-Werror=declaration-after-statement]
  1120 |                 int index = tegracam_get_ctrl_index(cid);
       |                 ^~~

JIRA CAMERASW-32529

Fix this by moving the declaration of the 'index' and 'size' variables
to the start of the for-loop code block.

Change-Id: I69590c147e8effd031b962606a077856ad4f8d07
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316537
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mike Jia <mijia@nvidia.com>
2025-07-24 10:19:16 +00:00
Zhiyuan Wang
8895bf14e8 linux: kmd: fix the bug TOP25 03/05 Part 9
Add dev-err when failure:
- drivers/media/platform/tegra/camera/vi/mc_common.c

Jira CAMERASW-32689

Change-Id: I87dc4593fe91889406a8d61843d260e953a2a1c2
Signed-off-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316291
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:16 +00:00
yongtaos
34a6c5ad76 kernel: nvidia-oot: Fix Linux KMD coverity defect
Fix NULL_RETURNS and EXP34-C coverity defects for cam_fsync.c.

Jira CAMERASW-32531

Change-Id: Id2503145229ff71802c41737722f6ad955ca3519
Signed-off-by: yongtaos <yongtaos@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316287
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
2025-07-24 10:19:16 +00:00
Ketan Patil
a477caa895 video: tegra: nvmap: Disable read/write APIs for prod_nsr
NvRmMemRead/NvRmMemWrite APIs don't have corresponding requirements in
DriveOS 7.0 Linux NSR. We have taken sign-off from the stakeholders to
confirm that they are not using these APIs in T264 Linux Prod NSR
variant. But some of them are using these APIs in dev_nsr and did not
agree to remove it from dev-nsr, L4T, HOS etc. Hence we need to
make sure that they do not accidentally start using these APIs. Add
bug_on when the corresponding ioctl is called in prod_nsr.

Bug 4980658

Change-Id: Ie9aaa9cc52fc1971b82243bb652d0ee9ce1017ca
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315736
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:16 +00:00
Jon Hunter
d38d017e88 configs: Add config for nvmainline
Add an OOT driver config for the nvmainline build to disable the OOT
drivers for BPMP Hypervisor, Hypervisor IVC and IVC EXT, so that these
can be built into the kernel.

Bug 5157858

Change-Id: Ibc1aec5aba045cc19d4663e42745d98e88ac4a26
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3316757
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
2025-07-24 10:19:16 +00:00
Mainak Sen
bfe763841a gpu: host1x: Deprecate falcon implementation from host1x driver
This commit deprecates the falcon hardware interface implementation from the host1x-nvhost driver.

falcon_exit() function will be deprecated once usage of
nvhost_module_deinit API is removed from PVA/DLA/Camera elements.

Jira HOSTX-5933

Bug 4918838

Change-Id: I268836c8c8fc2f1ab060412bb4446c7080f846c4
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311319
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Sanif Veeras <sveeras@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
1fac2c49e1 host: capture-support: Deprecate nvhost APIs
Deprecate the use of nvhost API calls.
Implement equivalent functionality for host1x_<readl, writel> by
copying parts of nvhost_client_device_get_resources to the driver.

Bug 4922171

Change-Id: I2b0a40303767a6630b6212063d66954ed4c16466
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301460
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:16 +00:00
Sanath Kumar Gampa
5193e86207 kernel-nvidia-oot: Restrict enabling MACSec in PHY
Restrict enabling MACSec support in below PHYs via MDIO

- MV-Q3244
- 88Q2221M

Jira NET-2795

Change-Id: I2cf767ad89762a5daa8ac29e753365af2e5d24fb
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3308513
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:16 +00:00
Sanath Kumar Gampa
247613d6ce nvethernet: fix top-25 issues
Fixed below issues

-FORWARD_NULL
-CERT STR07-C
-CERT INT32-C
-CERT INT30-C
-CERT INT08-C
-CERT EXP39-C
-CERT EXP34-C

JIRA NET-2044

Change-Id: I839bd5aedff30c7e9679f513a2cf7a1fbe3b2b8a
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258684
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
jaiyasha
b2a59883b3 DCE-KMD: Add logging structs in shared header
This change adds set and get log structs in shared admin cmd header file
Logging design document:
https://confluence.nvidia.com/display/TCS/DCE+Logging+support+design

JIRA TDS-15963

Change-Id: I8d6f1830a7bf7ebde1562cd31601b2ee4eadce0c
Signed-off-by: jaiyasha <jaiyasha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305936
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:16 +00:00
Ketan Patil
f44682d9fc video: tegra: nvmap: Cleanup the compatible string
Remove nvidia,carveouts-t18x and nvidia,carveouts-t19x as compatible
strings from nvmap driver code, as we should only use nvidia,carveouts
as compatible string.

JIRA TMM-6011

Change-Id: I08ed5fae564b1f0fd944ae197d568e37ad563d1c
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313960
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:16 +00:00
praagarwal
4651a49da8 drm/tegra: address INT30-C cert violations
add integer overflow checks with error handling

Jira HOSTX-5889

Change-Id: Ib31763ab073c2f9b13e2f54fd3c006d977215941
Signed-off-by: Prateek Agarwal <praagarwal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301055
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:16 +00:00
Mainak Sen
37189ffbdd drm/tegra: Deprecate Legacy DRM IOCTLs
*. TEGRA_OPEN_CHANNEL
*. TEGRA_CLOSE_CHANNEL
*. TEGRA_SYNCPT_WAIT
*. TEGRA_SYNCPT_READ

Jira HOSTX-5843

Change-Id: If1a047c5fdf86a60074e31e92eaef3397f4dce01
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315044
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Junsheng Chen
90b244eb03 linux: kmd: static analysis TOP25 S03/05 Part 4
Under the following path:
- drivers/media/platform/tegra/camera/camera_common.c
- drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c
- drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c
- drivers/media/platform/tegra/camera/sensor_common.c
- drivers/media/platform/tegra/camera/tegracam_core.c
- drivers/media/platform/tegra/camera/tegracam_utils.c
- drivers/media/platform/tegra/camera/vi/graph.c

Jira CAMERASW-32528

Change-Id: I8f3bb839dfe6e61928642f0ca32bcaf972d6c84a
Signed-off-by: Junsheng Chen <junshengc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314084
Reviewed-by: Shan Neng Chen <snchen@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
2025-07-24 10:19:16 +00:00
Mihir Pradeep Garude
46c2c0bca3 Doc: Fix Diplay yaml
nvdisplay yaml file had incorrect driver directory path and missing
iso_sid and niso_sid.

To Fix:

- Add correct driver path for OpenRm and DisplayServer
- Add iso_sid and niso_sid details.

Jira TDS-17085

Change-Id: Ib6136a168865be997a18cb15e5aaf9409eaf2ea0
Signed-off-by: Mihir Pradeep Garude <mgarude@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311956
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Mainak Sen
7c0ab66c2a drm/tegra: Disable power mode change
Compile out Power mode change related functionality
under CONFIG_TEGRA_HOST1X_POWERMODE_CONTROL flag.
This flag is currently disabled in 7.0 release
and expected to enabled in 7.2 release.

Jira HOSTX-5933

Change-Id: I7f35c67950e8684927bfdbd99c716cfaa580cb19
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311122
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vamsee Vardhan Thummala <vthummala@nvidia.com>
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:16 +00:00
Nagarjuna Kristam
b13657daac pci: tegra-pcie-dma: Remove Remote, read and sync from ICD
There are no use cases for Remote DMA or Read channel support or
SYNC mode support. Remove these fields from ICD.

JIRA NET-2663

Change-Id: I18a4cb54da5e3c1535231f746afa9b1886776667
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3310943
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Nagarjuna Kristam
ce0a05749b pci: tegra264-ep: Fix set_bar and map_addr ICD
- set_bar when called post controller initialization should be rejected.
- map_addr outcome is to be able to access remote memory rather than
  register update.

Update API documentation information accordingly.

JIRA NET-2663

Change-Id: Ie4e1b029200fa8e61685e97ba3a0f029c3e6fe9d
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3310942
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:16 +00:00
Mohan Thadikamalla
524e20def3 nvethernet: Add NvEthernetLinux ICD support
Add NvEthernetLinux Doxygen comments support
by documenting platform_driver,
net_device_ops, and ioctl command data.

Jira NET-2168

Change-Id: Ia8140290e4f01c00b6a5d310d8d64a8e0eb3b29c
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3291517
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:16 +00:00
gokull
4f98504989 blk: vblk: Enable Ioctl in tegra_hv_vblk
Previous code was using the struct request.completion_data
to pass the struct ioctl_request to the processing thread.
This member variable is removed from kernel v6.5.

Change contains:
 [1] Moving this variable from struct request to struct struct vblk_dev.
 [2] Copyright Banner is updated

This makes the passing of the struct ioctl_request independent of
linux kernel transition

Bug 4311184

Change-Id: I3dd2c4ee9861516db770adcba345362395bf3fa3
Signed-off-by: gokull <gokull@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314801
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
mijia
5ad213c183 kernel: nvidia-oot: Fix Linux KMD coverity defects
Fix INT32-C  INT32-Cand INT08-C coverity defects
for cdi_mgr.c and tegracam_ctrls.c.

JIRA CAMERASW-32529

Change-Id: I97f915f94264d78ae8e493874ccf889c9183fc93
Signed-off-by: mijia <mijia@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314543
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:16 +00:00
Zhiyuan Wang
c4fb69048c linux: kmd: static analysis TOP25 03/05 Part 9
Under the following path:
- drivers/media/platform/tegra/camera/fusa-capture/capture-vi-channel.c
- drivers/media/platform/tegra/camera/vi/mc_common.c
- drivers/platform/tegra/rtcpu/capture-ivc.c
- drivers/platform/tegra/rtcpu/ivc-bus.c
- drivers/platform/tegra/rtcpu/reset-group.c

Jira CAMERASW-32533

Change-Id: I4b3d36c77ab09cd930c80fe07846fd9e0e9c28df
Signed-off-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3314106
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2025-07-24 10:19:16 +00:00
Johnny Liu
bca162a20d kleaf: add tegra_wmark module in build targets
The tegra_wmark is a specialized devfreq governor to support
interrupt-driven DVFS algorithm with Host1x Actmon infrastructure.

This governor will be used for NVDEC/NVENC/OFA/VIC engines to
support load-based DVFS.

Bug 5147566

Change-Id: I9a60c22e8f12ea579e43e883a273a76d1170e0f5
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313827
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Frankie Chang <frankiec@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:16 +00:00
Ketan Patil
eae9dc59c1 devicetree: bindings: Update DT binding doc
- Fsi, generic and VPR carveouts follow the reserved-memory DT binding
provided by linux kernel. Hence delete these unnecessary DT binding files.
- Rename nvidia,carveouts-t19x.yaml file to nvidia,carveouts.yaml
- Update compatible string for tegra-carveouts.
- Add missing properties like disable-debug-support, memory-region for
tegra-carveouts.

JIRA TMM-6011

Change-Id: I857578bc9e8598cb4ec7a7fb314089d2f78d6950
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3312820
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Ishan Shah
3969211745 nvidia-oot: cpuidle: Support coordinated wake
Adding debugfs support for the coordinated wake state.
This will allow for the end-user to select a number of destination CPUs,
and then force them into idle together. A chosen "src" cpu will then
trigger a simultaneous wake request on all of the cores to create the
worst-case idle-exit scenario.
We also have an alternate state to support only coordinated sleep.
This can be useful for cases where select cores coordinated together can
have deeper power modes available to them.

TPS-671

Change-Id: I901f86000d36a86f9549f713ba698b58896d55b7
Signed-off-by: Ishan Shah <ishah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242284
Reviewed-by: Nathan Hartman <nhartman@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sanjay Chandrashekara <sanjayc@nvidia.com>
2025-07-24 10:19:16 +00:00
yongtaos
7512e6b575 kernel: nvidia-oot: Fix Top-25 coverity defects
Fix NULL_RETURNS and EXP34-C coverity defects for cam_fsync.c.

Jira CAMERASW-32531

Change-Id: I59090d6136c83fe0fa35386d13cd2284eb516c41
Signed-off-by: yongtaos <yongtaos@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313977
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:16 +00:00
Sanjith T D
5ee238d258 vblk: Fixed the max size for discard
- Updated the max_discard_segments to 1 for
   discarding contiguous blocks.
 - Updated the max_discard_sectors to correct value
   considering the SECTOR_SIZE.

Bug 5065629

Change-Id: I6737d77f63ff5d7330d467acdbf051b8df4097af
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313548
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:16 +00:00
Mainak Sen
88caf7f818 nvdla: kmd: Move falcon implementation from Host1x to DLA driver
This commit moves the falcon hardware interface implementation from the
host1x-nvhost driver to the NVDLA kernel driver. This change makes
the DLA driver more independent by removing its dependency on the host1x
driver for falcon functionality.

The falcon hardware interface is critical for DLA firmware loading and
execution. By moving this code into the DLA driver, we improve modularity
and make the driver more self-contained.

Changes include:
- Migrated falcon.c and falcon.h from host1x-nvhost to video/tegra/host/nvdla/flcn/
- Renamed files to nvdla_falcon.c and nvdla_falcon.h
- Added DLA-specific falcon API implementations
- Updated include paths and header guards
- Updated the DLA driver's Makefile to include the new files

Jira HOSTX-5933

Bug 4918838

Change-Id: Icb3731c4556545f98c7eb62e9e56c0396c7b6b3b
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311297
Reviewed-by: Arvind M <am@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:16 +00:00
Surbhi Singh
6173caca37 video: tegra: nvmap: Add checks for addition overflow
Add check for overflow when two unsigned integers are added or
multiplied and return error in case of overflow condition.

JIRA TMM-5993
Bug 4479044

Change-Id: I79233e276d85570e63e8b36fd1dd4778a174c69d
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306728
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
053dc08de7 host: nvcsi: Deprecate nvhost APIs
Deprecate nvhost API usage. Remove API calls that are no longer
necessary and implement equivalent functionality for those that are.

Bug 4922171
Bug 4921620

Change-Id: I5519bcbbc6b5895e7c579c7dccfc6f59c8609ff8
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3303922
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
1b1b638553 host: isp: Deprecate nvhost module APIs
Deprecate the nvhost module APIs as the nvhost driver will be
deprecated in the future.
Implement equivalent functionality by copying the contents of
nvhost_module_<init, deinit> to the ISP driver.

Bug 4921620

Change-Id: Ibdc98dcb44b2992a3ad7af830db96be416a8c7b6
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300671
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
bbdd6dd288 host: isp: Deprecate nvhost client device APIs
Deprecate the nvhost_client_device* APIs and implement equivalent
functionality in the ISP driver. Define ISP driver functions
equivalent to nvhost_client_device_init to create the nvhost-ctrl-isp
devices.

Bug 4922171

Change-Id: I2deee6f2018aefd62c45afe8b5b70f4abfa030dc
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300670
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
f97366843c host: isp: Deprecate nvhost syncpt unit interface API
Deprecate the nvhost_syncpt_unit_interface_init API and implement
equivalent functionality in the ISP driver.

Bug 4921461

Change-Id: Ic8a2753b8ac5d6d32fa3fd07e7f2170ce4059c5e
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300669
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
cb4fd77199 host: isp: Deprecate nvhost syncpt APIs
Replace Nvhost syncpt APIs with host1x equivalents in the ISP
host1x driver and the ISP channel driver.
Note the WAR to include host1x-next.h before nvhost.h. The nvhost.h
header will be deprecated in the future.

Bug 4922416

Change-Id: I2dd298d60e1a55fe7a0cbb3ae804f5aa3b5d3610
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300668
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:16 +00:00
Joshua Cha
da67f89f15 nvsciipc: add shutdown callback
print kernel message during system shutdown

JIRA NVIPC-3318

Change-Id: Ib6025c4058fc2f03d89d44e0c6f2ee90073ba8e2
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3309294
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
937203519c host: vi: Deprecate nvhost module APIs
Deprecate the nvhost module APIs as the nvhost driver will be
deprecated in the future.
Implement equivalent functionality by copying the contents of
nvhost_module_<init, deinit> to the VI driver.

Bug 4921620

Change-Id: Id88cc77a42df5c79f8f7ef8e35c3c678858743b3
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299909
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
37e79d637e host: vi: Deprecate nvhost client device APIs
Deprecate the nvhost_client_device* APIs and implement equivalent
functionality in the VI driver.
Remove the API calls to create nvhost-ctrl-vi devices as they are
no longer used.

Bug 4922171

Change-Id: If9b6db1b3792c10b7a11a86cf2cb63d4fdc8fb6f
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298848
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
348929ede2 host: vi: Deprecate nvhost syncpt unit interface API
Deprecate the nvhost_syncpt_unit_interface_init API and implement
equivalent functionality in the VI driver.

Bug 4921461

Change-Id: I86ed97cf1ad6efee4cbf8e86c7bd577f6dec3f2d
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297501
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:16 +00:00
Akihiro Mizusawa
7cbca491db host: vi: Deprecate nvhost syncpt APIs
Replace Nvhost syncpt APIs with host1x equivalents in the VI
host1x driver and the VI channel driver.
Note the WAR to include host1x-next.h before nvhost.h. The nvhost.h
header will be deprecated in the future.

Bug 4922416

Change-Id: I5dccf8bef069f894802dce777939cb8262a3cf14
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296280
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: FNU Raunak <fraunak@nvidia.com>
2025-07-24 10:19:15 +00:00
Mohit Ingale
794163ce8e media: tegra: Conditionally disable L4T-specific drivers in embedded Linux builds
This change adds conditional compilation blocks to disable L4T-specific
camera and multimedia drivers when building for embedded Linux platforms.
Key changes include:

- Add ifneq ($(NV_BUILD_SYSTEM_TYPE),embedded-linux) checks in multiple
  Makefiles to exclude L4T-specific components
- Introduce NV_IS_L4T define to conditionally include L4T functionality
- Reorganize header includes to support both L4T and embedded Linux builds
- Conditionally wrap L4T-specific struct members and function calls
- Update module dependencies (cdi_mgr now depends on cdi_dev instead of cdi_pwm)

Jira CAMERASW-32251

Change-Id: I934fdd0188e914c07b456c0f6ad379d2a08555ca
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3294869
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:15 +00:00
amitabhd
2cc3c99c6e host1x_emu: Adding API dispatch functionality
Adding dynamic APi dispatch functionality in host1x-fence
modue. This CL exports new host1x wrapper API, which can
be called by client kernel modules. The wrapper API dispatch
call to either Host1x module or Host1x-EMU depending if the
host1x-emu driver registered its interface during its probe.

Bug 5064819

Change-Id: I49445cdce7c3795a2c94fde9d0871da393993554
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306857
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:15 +00:00
Ketan Patil
1e83ec96df video: tegra: nvmap: Fix build failure
Linux v6.10 and v6.11 are failing as follow_pfn was removed since kernel
v6.10 Use conftest to detect if follow_pfn, follow_pfnmap_start
functions are present or not and based upon this result, call the
appropriate functions in nvmap code.

Bug 5007238

Change-Id: Ie7e0c9bde652fd89158a5778aa8254fc86bf4696
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311535
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:15 +00:00
Viswanath L
f985bb9f00 nvadsp: Fix priv data in show_os_version()
Fetch correct private data in show_os_version(). This function
is mapped to callback seq_file->seq_operations->show, which will
be called in seq_read() flow.

Bug 5122582

Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Change-Id: Ic8e4df342063139b91fa33297e59916ffb8b5a20
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3311120
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
gokull
d8a3d29fed block:vblk: Resolve compile error tegra_vblk V6.11
Method to configure the struct queue_limits has changed
from kernel v6.11.
The following API's are removed from v6.11
[1] blk_queue_max_secure_erase_sectors
[2] blk_queue_max_discard_sectors
[3] blk_queue_write_cache
[4] blk_queue_logical_block_size
[5] blk_queue_physical_block_size
[6] blk_queue_max_hw_sectors
[7] The semantics of the flag QUEUE_FLAG_NONROT
is set as default value for queues, so this flag
is removed in v6.11.
[8] The flag BLK_MQ_F_SHOULD_MERGE is not valid in
v6.14

The above API's are replaced by direct
assignment to the queue_limits and use the new API
queue_limits_set. This API takes the incoming
values, validates, populates the other members
of the struct accordingly and assigns the
provided queue_limits to the corresponding queue.

The change contains:
 [1] Addition of new approach that is compatible
with v6.11
 [2] Addition of a macro (NV_BLOCK_USE_QUEUE_LIMITS_SET)
for backward compatibility
 [3] This is a special case where both the variable
and the function needs to be present for the macro to be
enabled. The changes were made accordingly.
 [4] The flag BLK_MQ_F_SHOULD_MERGE is protected by
macro

Bug 4311184

Signed-off-by: gokull <gokull@nvidia.com>
Change-Id: Ida2c12de0977f6405e7cc7dec946cf0f64413c97
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3303900
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nan Wang
b63a822a1b pva: deploy V3 KMD
Jira PVAAS-17785

Change-Id: I8ebc4c49aec209c5f82c6725605b62742402500a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299880
Tested-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Vishwas M <vishwasm@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
2025-07-24 10:19:15 +00:00
Nan Wang
b5d768302a pva: move V2 to pva_v2 folder
Prepare for deploying v3 driver

Jira PVAAS-17785

Change-Id: I0a28a90c87394bdc40c587dad11d5991c46b6cab
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299879
Tested-by: Vishwas M <vishwasm@nvidia.com>
Tested-by: Nan Wang <nanwa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nan Wang <nanwa@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
2025-07-24 10:19:15 +00:00
Pritesh Raithatha
7399ae2100 platform: tegra: allow mc-utils load for non-tegra devices
Nvgpu driver has dependency on mc-utils driver so
allow the driver to get loaded for non-tegra devices.
Also update functions to fail for non-tegra devices
in case called by mistake.

Bug 5066721

Change-Id: I410c10d0155ac85001eb12b2f4bce694affb5186
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295359
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:15 +00:00
Ankur Pawar
4299b8bfe0 camera: fusa: Fix concurrency issue
Fix concurrent access issue in destroy_buffer_table().
The function is freeing buffers while only holding the
write lock during hash deletion. Other threads could
still be accessing the buffers.

Create a temporary list within the lock and then unmap
the addresses safely.

Bug 5017044

Change-Id: Ib262570aaa19f65c4cb3959123a85c5f66e5db68
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306890
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Zuyi Hu <zuyih@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
2025-07-24 10:19:15 +00:00
amitabhd
909b489e87 host1x_emu: Fence polling modification
In simulation platform enabling hrtimer fence polling
is causing kernel to block/unresposive.

This issue is not observed in sillicon platforms.
As per this CL making following changes.

1. Added flag for kernel Thread polling.
2. Enabling HRTimer fence polling for silicon platform.
   only.

Bug 5094695

Change-Id: I011900e9299be71413c92952d447e53abfd34128
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297995
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:15 +00:00
Khushi
08f05cb80d vse: Add vaildation checks for Algorithms
Bug 5058383

Change-Id: Ibeb1436938db0d87a5c4f99275aed6cec17dabe1
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3284860
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:15 +00:00
Sumit Gupta
46ea0fea4a configs: Add build config for Noble kernel
Add new file 'Makefile.config.noble' to enable NV_OOT*SKIP_BUILD
for Noble Kernel similar to Kernel-oot.
Reference change:
 https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214053

Bug 4551265

Change-Id: Ifd43a4ed775addc72a5062cf267b0481d20a5404
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305239
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:19:15 +00:00
saranyad
d0e719df4a DCE_KMD: Fix TOP 25 CWE Rule
- This patch fixes the following violations

  OVERRUN - 1 (24138320)
  - Added checks to validate boundries

  Rule: OVERRUN
  Rule Description: Out-of-bounds access to a buffer

JIRA TDS-15862

Change-Id: I4df6c7124da19143eb0d9b8027df28fccdff0b75
Signed-off-by: saranyad <saranyad@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305934
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagarjuna Kristam
4dce44a907 PCI: tegra: Add common DMA IRQ
IRQ is external interface for DMA driver. Use one IRQ handler callbacks
to register and call SoC specific handler them based on SoC type.
Add ICD documentation for common IRQ API's

JIRA NET-2663

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I51137489ebe071e2e4a3edc3c5e3fefb84c994fa
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305091
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagarjuna Kristam
330ecd452b pci: tegra264: Remove MSI info from ICD
MSI API are not supported via GuestOs decomposition. Disable documentation
for the same during ICD compilation.

JIRA NET-2663

Change-Id: Ie1a0ca75b91e848152d0748f8f49735bedd0be70
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305090
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:15 +00:00
Ketan Patil
d256920b00 video: tegra: nvmap: Handle pages mapped using remap_pfn_range in alloc from VA
OpenRM maps the buffer with remap_pfn_range and then it's user VA is
passed to libnvrm_mem to create a handle out of it. NvMap uses
get_user_pages to get user pages from the VA. It fails for the buffer
mapped with remap_pfn_range. Hence use follow_pfn/follow_pfnmap_start
functions to obtain pfn from the VA and then obtain page pointer from
it.

Bug 5007238

Change-Id: I45a6ede6b5f164e537f014d9db3475b4c6d89307
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298720
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Lakshmanan Selvi Muthusamy <lm@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
2025-07-24 10:19:15 +00:00
Mainak Sen
db0d9da92f drm/tegra: Fix Engine timestamp shift factor
In Orin and previous chipsets, engine timestamp counter
runs 32 times faster than CNTVCT register, so the actual
timestamp is obtained by right shifting with factor of 5.
In Thor onwards, this shift is not required is for VIC engine.

Jira HOSTX-5905

Change-Id: I69980fdfcf50b15db99b1fbad522aecd571a0f17
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306825
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Joshua Cha
a674701be0 nvsciipc: add suspend/resume callback
print suspend/resume status

JIRA NVIPC-3318

Change-Id: I43585ba82ccb75dda92f7276e5d5bab416087818
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297783
Reviewed-by: Jeungwoo Yoo <jeungwooy@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:15 +00:00
Mark Mendez
14c6de030c PCT: Add PIC and Title
Jira ESDP-28694

Change-Id: Ic6fa743f34b6331d85334465961ae64a91aee588
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3307869
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Mark Mendez <mmendez@nvidia.com>
2025-07-24 10:19:15 +00:00
spatki
0b1641eee3 tsec: allow sending more than 1 cmd to same unit
This change removes the check in tsec comms part of dce
which blocks sending more than 1 command to tsec fw for the
same unit. This is to let the display driver force send
command to tsec fw when it is in the middle of a command
to inform it about certain events ex: hotplug. Tsec driver
should trust that display driver is doing checks when sending
the command to tsec fw.

Bug 5008088

Change-Id: Id765c558a8350c501466685d3894a2c8349550eb
Signed-off-by: spatki <spatki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3288182
Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagaraj P N
f552a45569 cryptodev: update buf addr check for SHA requests
Input buffer VA needs to be checked only for
non-zero copy IVC queues.

Bug 4999798

Change-Id: Ic8bcc44abb65f8e2d614f6734870e81a8d5ec03c
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3306711
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:15 +00:00
Yuyuan Chen
d27873d84e kernel: nvidia-oot: Fix Static issues S2/5
Jira CAMERASW-31832

Change-Id: I67167abc5939569ab644a22cdf3ce494ee43f391
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3305725
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:15 +00:00
Manish Bhardwaj
3ccccf0df8 nvidia-oot: mempool driver header file cert & misra error fixes
using this patch fixing below cert & misra errors:-
- misra_c_2012_rule_21_2_violation: "__UAPI_NVHVIVC_MEMPOOL_IOCTL_H__", an identifier or macro name beginning with an underscore, shall not be declared.
- misra_c_2012_rule_21_1_violation: Defining or undefining a reserved name "__UAPI_NVHVIVC_MEMPOOL_IOCTL_H__", which is an identifier or macro name beginning with an underscore.
- cert_dcl37_c_violation: The reserved identifier "__UAPI_NVHVIVC_MEMPOOL_IOCTL_H__", which is reserved for use as identifiers with file scope in both the ordinary and tag name spaces, is defined.

JIRA ESLC-8398

Change-Id: I82aca2a1c87ee4d2a145671ea0284fe739cb9b16
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297795
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:15 +00:00
Manish Bhardwaj
f204e3ae77 nvidia-oot: vcpu yield driver cert & misra fixes
using this patch fixing below cert & misra errors:-
- cert_dcl37_c_violation: The reserved identifier
  "_UAPI_TEGRA_HV_VCPU_YIELD_IOCTL_H_", which is reserved for use as
  identifiers with file scope in both the ordinary and tag name spaces,
  is defined.
- misra_c_2012_rule_21_1_violation: Defining or undefining a reserved
  name "_UAPI_TEGRA_HV_VCPU_YIELD_IOCTL_H_", which is an identifier or
  macro name beginning with an underscore.
- misra_c_2012_rule_21_2_violation: "_UAPI_TEGRA_HV_VCPU_YIELD_IOCTL_H_",
  an identifier or macro name beginning with an underscore, shall not be
  declared.

JIRA ESLC-8378

Change-Id: I1d8d5f437793a0b964b1ed195f70ab84c6104895
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301267
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Manish Bhardwaj
72d65d819c nvidia-oot: pm ctl driver cert & misra fixes
using this patch fixing below cert & misra errors:-
- cert_dcl37_c_violation: The reserved identifier "_TEGRA_HV_PM_CTL_H",
  which is reserved for use as identifiers with file scope in both the
  ordinary and tag name spaces, is defined.
- misra_c_2012_rule_21_1_violation: Defining or undefining a reserved
  name "_TEGRA_HV_PM_CTL_H", which is an identifier or macro name
  beginning with an underscore.
- misra_c_2012_rule_21_2_violation: "_TEGRA_HV_PM_CTL_H", an identifier
  or macro name beginning with an underscore, shall not be declared.

JIRA ESLC-8381

Change-Id: Ib944855e143c34b3019f1f93ad9f6894ebf89085
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301268
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
omar
590c2cab5b drivers: pva: boot from file in sim
In simulation, on VDK or SCSIM, force boot from file

Bug 4872880

Change-Id: Ifc594986f4470cc82ff54a21613c5a249bdea4ae
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304778
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
omar
d3f9244dcb drivers: pva: enable boot from GSC
Bug 4872880

Change-Id: Ie3be16633e9ee1d53e582da74e157e786668172f
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296454
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Mahesh Kumar
fb5f279667 platform:dce: Add a delay between ivc reset
Add a few microseconds delay between IVC channel reset retries.
This prevents kernel logs from flooding if dce bootstrapping takes
some time for any reason.

Based on logs below, DCE is taking around 10-30 microsecond for channel reset.
So, Keeping the delay of 10-20 microseconds.

20:26:46.637409: dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x5]
20:26:46.637421: message repeated 15 times: [ dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x5]]
---
20:26:46.637429: dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x1]
20:26:46.637458: message repeated 12 times: [ dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x1]]
----
20:26:46.637461: dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x2]
20:26:46.637471: message repeated 15 times: [ dce: dce_mailbox_set_full_interrupt:157  Intr bit set multiple times for MB : [0x2]]

Jira TDS-6381

Change-Id: I0f8d3c55058019df5a52edd232eae93b3bf84276
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3304216
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagaraj P N
965bd044c6 vse/cryptodev: add memory map/unmap interface
- add support for zero copy SHA/GMAC operations
- add support to read zero copy nodes in DT
- support memory buf map/unmap ioctl interfaces
- unmap all memory buffers when FD corresponding
  to device node is closed.
- support only one open call at a time for zero
  copy nodes.

Bug 4999798

Change-Id: If110108a73b24ca9f523a8c67a47c02b922c3fd8
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292084
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:15 +00:00
Ketan Patil
268a87ecfa video: tegra: nvmap: Add DT based API disabling support
There are debug/duplicate APIs like NvRmMemGetIVCId,
NvRmMemHandleFromIVCId, NvRmMemWrite etc. which don't have corresponding
requirements in DriveOS 7.0 Linux NSR. We have taken sign-off from the
stakeholders to confirm that they are not using these APIs in T264 Linux
Prod NSR variant. But some of them are using these APIs in dev-nsr and
did not agree to remove it from dev-nsr, L4T, HOS etc. Hence we need to
make sure that they do not accidentally start using these APIs. Hence
add following DT based disabling support.

- Add disable-debug-support property in tegra-carveouts DT node in T264
prod nsr dts.
- Parse this DT node in nvmap and if the above property is present then
BUG_ON in the ioctl functions corresponding to these APIs.

Bug 4980348

Change-Id: Icdd5aadf3197d0649b61d285f433fa65ea69e806
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298507
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:15 +00:00
Mainak Sen
b45d59c4a6 gpu: host1x: Enable VI syncpoint pool
Create VI specific syncpoint pool based on
PCT configured VI syncpoint range. VI module shall
allocate syncpoint only from this pool.

Jira HOSTX-5827

Change-Id: I2d6014de2033f0878492d0243010cc7ca507c383
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3290562
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:15 +00:00
Suneel Kumar Pemmineti
38d739c860 nvsciipc: Add UID member to Config structure
- Added UID member to nvsciipc_config_entry data
structure. this is needed for implementing
test_nvsciipc_cfgblob in linux.
- removed static from ioctl function to attach eBPF program
- add error-injection.h and ALLOW_ERROR_INJECTION macro to ioctl
  to use bpf_override_return()

JIRA NVIPC-2817

Change-Id: Ic27156e321368041f41fbabff9e6375140fe1d0e
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3301786
Tested-by: Joshua Cha <joshuac@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Simon Je <sje@nvidia.com>
2025-07-24 10:19:15 +00:00
Surbhi Singh
b1af9a0347 video: tegra: nvmap: Add checks for addition overflow
Add check for overflow when two unsigned integers are added and return
error in case of overflow condition.

CID 13772217
CID 13772356
CID 13772469
CID 13772634
CID 13772882
CID 13772995

JIRA: TMM-5724
Bug 4479044

Change-Id: Iaa04cc45bfe11a0cfb2e8124d9423e3a66e39f73
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270465
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
saranyad
bb80a707cd KMD: Fix Misra-C:2012 Rule
- This patch fixes the following violations

  OVERRUN - 2 (CIDs 22827501, 22827481)
  - Added checks to validate boundries

  Rule: OVERRUN
  Rule Description: Out-of-bounds access to a buffer

JIRA TDS-15862

Change-Id: I94b19dc491583a63ec242c59cc288c5e32134cc0
Signed-off-by: saranyad <saranyad@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3299743
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Adithya Sanjeev Byalpi <abyalpi@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
2025-07-24 10:19:15 +00:00
Mallikarjun Kasoju
14d6946415 watchdog: Fix overflow error
Fixed unsigned int overflow error.

Bug 5083375

Change-Id: If8ddb802938e9ef811462a99023830e3370a00ab
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296593
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
amitabhd
090b44a9f1 host1x_emu: Enable event-service for Host1x-EMU
Add change to host1x-fence kernel module to support
its functionality over host1x-emu driver.

Jira HOSTX-5818

Change-Id: I09c7f2ee2059e0eeee11429b059c5152ffd855d5
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3285249
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:15 +00:00
Jukka Kaartinen
3e0be33037 rce: 2D Shmoo API
Add parameters for afe_hf_gain & edge_gain settings to be passed
from the user space to override prod values.
This used to tune these values.
Overriding is only enabled in the non-safety builds.

Jira CAMERASW-31125

Change-Id: I5df17d3530e59b239294acf1cfd4f2c7d3a2b9b2
Signed-off-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300110
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2025-07-24 10:19:15 +00:00
Yuyuan Chen
3b31f76f27 kernel: nvidia-oot: Fix Static issues S2/5
Jira CAMERASW-31832

Change-Id: I4060480865bf3895fae22127bb3e0c915af8af9f
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297678
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
2025-07-24 10:19:15 +00:00
Mallikarjun Kasoju
5ee83509d5 spi: Fix overflow error
Fixed overflow errors that could be
caused by arithmetic operations.

Bug 5083347

Change-Id: I96779bfa5f106e058056f16c1fe94100308a6d59
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297615
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:15 +00:00
Sanjith T D
a86effcc71 vblk: Fix mapping of SECURE_ERASE to ERASE
In 6.1+ kernel, blk_queue_max_secure_erase_sectors()
has to be used to tell block layer that vblk supports
SECURE_ERASE operation.

Bug 5011844
Bug 4311184

Change-Id: Id61edee27f4ae0db9a92a4e2d331bb3f209fdd85
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3300237
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:15 +00:00
Hongming Dong
ede67c712a kernel: nvidia-oot: Fix Linux KMD coverity defects
Fix INT30-C, INT08-C, and EXP34-C coverity defects for
cam_fsync.c and cam_cdi_tsc.c.

Jira CAMERASW-30847

Change-Id: I525ed2e0986c3987d062a9baeaefad048715c6c1
Signed-off-by: Hongming Dong <hongmingd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3280943
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2025-07-24 10:19:15 +00:00
Vishal Thoke
c5fe909fd6 nvdla: kmd: add stub debugfs nodes for DVFS/LPWR
[1] add debugfs nodes for ctrl (clk, power, rail).
    and for dvfs as well.
[2] these nodes are stubbed and will be implemented
    along with features.

Jira DLA-7681
Jira DLA-7797

Signed-off-by: Vishal Thoke <vthoke@nvidia.com>
Change-Id: I534382e78548cde838a28b2a888a8231b5b16ff1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296913
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
2025-07-24 10:19:15 +00:00
Ketan Patil
afd5300c2b video: tegra: nvmap: Don't allow executable mapping
Don't allow executable mapping during mmap on the fd corresponding to
memory buffer to prevent security risks of code injection and execution
in kernel space.

JIRA TMM-5962

Change-Id: I3d756afdd1b51c8d651230f1a634ef0909d17cc7
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298639
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:15 +00:00
Suneel Kumar Pemmineti
63a1d3e6e0 nvsciipc: Add nvsciipc_ioctl_get_db_by_idx
- Added nvsciipc_ioctl_get_db_by_idx to retrieve
the endpoint DB entry using index

JIRA: NVIPC-2818
Change-Id: I5651cf29b11dad0ff505f5f497a896572b893e94
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297838
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagarjuna Kristam
789e70d35e pci: tegra264: Add EP driver ICD documentation
JIRA NET-2663

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I5855c28c7834fe6ca8f0571321b04a4997dc6185
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293557
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:15 +00:00
Bob Zhang
9297cd7cfd kernel: nvidia-oot: Fix Linux KMD coverity defects
Fix INT32-C and INT08-C coverity defects for tegra-rtcpu-trace.c.

JIRA CAMERASW-31291

Change-Id: I2b80963663df440a38e39bdc3b15d240270f99a5
Signed-off-by: Bob Zhang <bozhang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297723
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Santosh BS
71c53e0ff0 drm/tegra: set CONFIG_TEGRA_DRM_NATIVE_DIS for emb-linux
Set export variable and build config flag, CONFIG_TEGRA_DRM_NATIVE_DIS,
based on emb-linux platform identifier flag NV_OOT_NVHOST_NATIVE_DIS.

Jira HOSTX-5885

Change-Id: I43d3c08a8494fb25524e4b4a91eb2eb68b3526f2
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297034
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:15 +00:00
Santosh BS
00a807416b nvidia-oot: enable NV_OOT_NVHOST_NATIVE_DIS for emb-linux
Export NV_OOT_NVHOST_NATIVE_DIS variable for emb-linux
configuration.

Jira HOSTX-5885

Change-Id: I1d40274faac1c45f93014fe180366de91a899625
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297021
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
ryanli
7c4412a765 kernel: nvidia-oot: Static Analysis for S01/08 P11
Fix CERT STR07-C coverity defects for cdi_mgr.c tegra_rtcpu.h

Jira CAMERASW-30850

Change-Id: I86c4cec8cdda2a1f16d5ca7ea7fbeed3a0318ad1
Signed-off-by: ryanli <ryanli@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3282774
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:15 +00:00
Santosh BS
b577e6d0e9 gpu: host1x: form u64 address for shim address
Store u64 shim address from u32 array fetched from DT.

Jira HOSTX-5885

Change-Id: Icf332585c095f81fadfc05b35cc77b16e6ab3a88
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3298399
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Akihiro Mizusawa <amizusawa@nvidia.com>
2025-07-24 10:19:15 +00:00
omar
8c01fe4f87 drivers: pva: fix recovery
When pva recovery is initiated due to command or
task submit timeout or initiated by pva-fw, queues
are cleared and tasks returned with error among other
cleanup activities and pva reset and fw reboot.

There could be multiple concurrent attempts to recover
the PVA engine.  Additionally, task and command submit
may be at varying stages of execution.

- Skip recovery requests while recovery work is pending.
- Skip task removal in case of timeout or invalidated task
  during task submit.
- Skip task submit to CCQ if task was removed during abort.
- Guard against concurrency during recovery
- Re-attempt pva reboot on fail during boot except in recovery.
- Reset driver PM state if module busy fails and PM error is set.
- Set default FW trace mask to WARN+ERROR+BOOT
- Set default driver log mask to FW TRACING
- ccq polling routine exits with timeout if abort is active

Bug 4944591

Change-Id: Id3a7388700ccada135b568c978176bb9f2c5f8a0
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3284303
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
2025-07-24 10:19:15 +00:00
omar
4cf0090819 drivers: pva: robustness under severe system load
In order to test hypothesis that severe system loads are causing
erroneous timeouts on command submit and task submit, polling
loop and event wait functions are changed to check for true timeout.

-- dump out FW traces on abort outside ISR.
-- add debug fs node to override driver timeout in mailbox wait event
   and ccq wait event.
-- add device info dump on abort.
-- dump queues

Bug 4944591

Change-Id: Iea78131016e0913d909f504272a6370bb37c35db
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3259651
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Vishnu Mandalapu
09bf300e40 drivers: tegra: virt: runtime frequency
- Add support to change VM profiler frequency in rumtime.

 Jira HYP-19279

Signed-off-by: Vishnu Reddy Mandalapu <vmandalapu@nvidia.com>
Change-Id: I2b260fff61addbd5e2bd53d9b16e441506bdf2d6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3222316
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252176
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Daniel Kudrow <dkudrow@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Alexey Lugovskoy <alugovskoy@nvidia.com>
2025-07-24 10:19:15 +00:00
Nagarjuna Kristam
8237e3463b pci: private-soc: dma: Update ICD documentation
- Add Direction and Usage info.
- Add links for API's and data fields.
- Correct info for API's and data structure comments.

JIRA NET-2663

Change-Id: I541157713070372a0487ae7879a165436be4fe26
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292839
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Santosh BS
aa7bcad3cf gpu: host1x: move actmon specific code under CONFIG_PM_DEVFREQ
Move actmon.c file under CONFIG_PM_DEVFREQ and
stub the functions when it is not enabled.

Jira HOSTX-5885

Change-Id: I8e6f86c617061587e4034a184f9a7d82a41a4a03
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297630
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Jon Hunter
2a4ac9e68f drm/tegra: Fix build for Linux v6.14
In Linux v6.14, the 'date' field was removed from the 'drm_driver'
structure. Add a test to conftest to detect this and update the Tegra
DRM driver accordingly.

Jira LINQPJ14-6

Change-Id: Ia3024321f12f8448d382deba996407f9d3232567
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297069
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Jon Hunter
cc09c0267d nvmap: Fix build for Linux v6.14
In Linux v6.14, the 'page_list' argument was dropped from the
__alloc_pages_bulk() function. Add a test to conftest to check for this
and update the NVMAP driver accordlingly to fix the build.

Jira LINQPJ14-6

Change-Id: Id3513890a9d948cb42abf7449d9fb3aa95edcf96
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3297065
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Surbhi Singh
ab4ebfc4f7 video: tegra: nvmap: Make function static.
Fix for: Sparse defects

Sparse stated that:

-symbol 'nvmap_of_ids' was not declared. Should it be static?

Making nvmap_of_ids static as it is only used in nvmap_init.c

Bug 4513982

Change-Id: Id767ef7796e978c0cc4fee83068b795aeb85d753
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3296795
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
2025-07-24 10:19:15 +00:00
Surbhi Singh
4ea9ca5d30 video: tegra: nvmap: Make function static.
Fix for: Sparse defects

Sparse stated that:

-symbol 'tegra_vpr1_dev' was not declared. Should it be static?
-symbol 'tegra_vpr_cma_dev' was not declared. Should it be static?
-symbol 'tegra_generic_cma_dev' was not declared. Should it be static?
-symbol 'tegra_vpr_dev' was not declared. Should it be static?
-symbol 'tegra_generic_dev' was not declared. Should it be static?

Making all the above functions static since it is being used in nvmap_init.c only.

Bug 4513982

Change-Id: I4887d994d9ae852a4faa7da735c18d25b393187a
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295831
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
Santosh BS
df285efd88 drm/tegra: move debug support under CONFIG_DEBUG_FS
Move debug specific code portions in virt.c under CONFIG_DEBUG_FS
config.

Jira HOSTX-5885

Change-Id: Icd90deb7c556ce100c0ee61d69719bde902514d5
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295412
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:15 +00:00
N V S Abhishek
a3e0e896a0 tegra: nvmap: Fix nvmap_query_heap for multi numa node platform
In current implementation, when NvRmMemQueryHeapParams is
called and multiple numa nodes are online:
1. For iovmm carveout, numa_id is set to garbage value,
   and we are calling compute_memory_stat with it.
2. For gpu carveout, we are returning values for
   numa_id 0.
3. For other carveouts, we are returning params for the
   first matching entry in nvmap_dev->heaps[i].

Correct this behavior as follows:
Regardless of carveout type, return params for numa_id 0
when NvRmMemQueryHeapParams is called and multiple numa
nodes are online.

In long-term, we need to disable NvRmMemQueryHeapParams
when multiple numa nodes are online. Clients should use
NvRmMemQueryHeapParamsNuma instead.

Jira TMM-5970

Change-Id: Id49289e51eda187b1d676e5192583f320835c2f4
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3290730
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Ketan Patil
73f74915ee video: tegra: nvmap: Add checks for input flags
In order to serve MEMSERV70-REQ-670 requirement, which makes validation
checks mandatory for input flowing across execution boundary. Hence add
checks for input flags in nvmap and make sure the execution does not
proceed if flag other than read or write is provided in handle
duplication, creating sciipc id or during handle creation from sciipc id
even though the checks are present at libnvrm_mem layer.

JIRA TMM-5962

Change-Id: I1fc6ce6ec4435c50220d4e49a08de50320a8f574
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295201
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:14 +00:00
Santosh BS
ebe01a47a3 drm/tegra: move tegra iommu domain support under CONFIG_TEGRA_IOMMU_SMMU
Tegra iommu domain is used in legacy chips (<= T210).
Move the related codes under CONFIG_TEGRA_IOMMU_SMMU accordingly.

Jira HOSTX-5833

Change-Id: I1e1e1dab33935b8881b905574ee006bbe8fc61d9
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293445
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:14 +00:00
Sheetal Tigadoli
2318f8689a devicetree:bindings:nvpps: Add ptp_tsc_sync_trig_interval param to doc.
Add ptp_tsc_sync_trig_interval param to nvpps doc.
This is used to define the sync trigger interval

Bug 5042311
Bug 4899241

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I881d4a57af857345adfc3e854ea06bb00e3d3a6f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3294330
(cherry picked from commit 9c14041a4f394a203f0b8f4a8afdf9053011c14a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293843
Reviewed-by: Amlan Kundu <akundu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Sheetal Tigadoli
ef2e125868 drivers:nvpps:optimize TSC align trigger freq
- use TSC lock trigger interval param from dt to optimize
As per HW suggestion we should not trigger sync on every
PPS edge. TSC needs atleast 2 PPS edges to align with the
PTP clock.

- save platform specific register offset during drv init time
instead of checking plat id everytime in monitoring thread

Bug 5042311
Bug 4899241
Bug 5082436

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I22befbc2a52c22ace1a8573b9a34a544ed1ae8f9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3294329
(cherry picked from commit 209dc26eddd2cd5e9d88ea8c6eb603706cd3c3f0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292322
Reviewed-by: Amlan Kundu <akundu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Sheetal Tigadoli
61ba5d28d0 drivers:nvpps:add upper limit check for lock threshold
add upper limit check for lock threshold for thor based platforms

Bug 5082436

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: Iabebef89c87f261baa54e5d616101bf82e15b515
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293987
(cherry picked from commit 1a7135106db544831404bb7eba658f5d31e68491)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293844
Reviewed-by: Amlan Kundu <akundu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Sheetal Tigadoli
7172871ef3 devicetree:bindings:nvpps: update doc to include Thor
update nvpps documentation to include Thor based platforms

Bug 5082436

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I4d26dab5d5eb40df449c819912a3143360a97f51
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293986
(cherry picked from commit 8dd44d031ce394923f4e02a07befcb162eedd714)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293842
Reviewed-by: Amlan Kundu <akundu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Mikko Perttunen
92ed8780d2 drm/tegra: Add new syncpoint increment IOCTL
Add new syncpoint increment IOCTL in line with the new channel/
syncpoint IOCTLs, that only allows incrementing owned syncpoints.

Change-Id: Ieed11e1ba840da31ecfe7029051bfa61b88cd2b5
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3284407
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:14 +00:00
Mikko Perttunen
5362309e7f gpu: host1x: Add option for disabling context stealing
Add kernel module parameter to allow disabling context stealing in
cases where reliability and consistency is preferred.

Change-Id: Iffa3f098814bcdd3ae760a05cb013c3c0c804ad5
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3284406
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:14 +00:00
Mikko Perttunen
48e383a1b9 drm/tegra: Add option for explicit syncpoint free
Add kernel module parameter to enable a mode where syncpoints
must be freed explicitly (using the free IOCTL) or they will be
left dangling. This ensures that, for particularly locked down
configurations, a syncpoint will be forever left in an expected
state even if the process owning it dies -- for example another
process will not be able to allocate it.

Change-Id: I2f350c710775a296c70910df21e95737a36c6a45
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3284405
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:14 +00:00
Ketan Patil
9feb2a4347 video: tegra: nvmap: Add multithreaded cache flush support
On TOT, NvMap does page by page cache flush i.e. it takes virtual
address of each page present in the buffer and then perform cache
flush on it using dcache_by_line_op. This result in very poor
performance for larger buffers. ~70% of the time taken by
NvRmMemHandleAllocAttr is consumed in cache flush.
Address this perf issue using multithreaded cache flush
- Use a threshold value of 32768 pages which is derived from perf
experiments and as per discussion with cuda as per usecases.
- When the cache flush request of >= 32768 pages is made, then vmap
pages to map them in contiguous VA space and create n number of kernel
threads; where n indicate the number of online CPUs.
- Divide the above VA range among the threads and each thread would do
cache flush on the VA range assigned to it.

This logic in resulting into following % improvement for alloc tests.
-----------------------------------
Buffer Size in MB | % improvement |
----------------------------------|
128               |   52          |
256               |   56          |
512               |   57          |
1024              |   58          |
1536              |   57          |
2048              |   58          |
2560              |   57          |
3072              |   58          |
3584              |   58          |
4096              |   58          |
4608              |   58          |
5120              |   58          |
-----------------------------------

Bug 4628529

Change-Id: I803ef5245ff9283fdc3afc497a6b642c97e89c06
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187871
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Ketan Patil
a57d56284d video: tegra: nvmap: Don't allow executable memory
Don't allow executable memory in alloc from VA code path to avoid any
security risks.

JIRA TMM-5962

Change-Id: Id32684a09f4a9a64d8e8774e993d6c1be8aaeaf0
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295143
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:14 +00:00
N V S Abhishek
f4cd590333 video: tegra: nvmap: Correct value of nvmap_total_page_allocs
Rectify overflow check for nvmap_total_page_allocs. Also, move
the value update of nvmap_total_page_allocs outside the else
block to update it for when contiguous is both true and false.

Bug 4479044

Change-Id: I9e06b7903c44f05a55d7d9aef98a04c920e102ae
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3291713
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:14 +00:00
Frankie Chang
fdd6ff24e3 Kleaf: Update kernel modules in nvidia-oot
Add the recently added kernel modules to the outs list.
- drivers/bluetooth/realtek/rtk_btusb.ko

Remove kernel modules from the outs list.
- drivers/misc/tegra-pcie-dma-sanity-test.ko
- drivers/pci/endpoint/functions/pci-epf-tegra-dma-sanity.ko

Bug 4344670

Change-Id: I6d42b29700341021e667c69f0c5c86c142007ce5
Signed-off-by: Frankie Chang <frankiec@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3256554
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
anupamg
2f69bee627 DCE-KMD: Update shared files licenses
- Updates licenses for DCE-KMD files that are shared with HVRTOS.
    - Update from GPL-2.0 to MIT as we use these files in both
      open source and closed source context.

JIRA TDS-16741

Change-Id: Icf7aeb737f2f3b294bb9ff9c36d5ed7220c13dea
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293404
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
2025-07-24 10:19:14 +00:00
yangxu
2a4976233f kernel: nvidia-oot: Fix KMD coverity defects(6)
Fix coverity defects
NULL_RETURNS
INT08-C
INT30-C
EXP34-C

Jira CAMERASW-30853

Change-Id: If9617a18367830eaa3fa3eed102c4a2214d869d2
Signed-off-by: yangxu <yangxu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3285360
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2025-07-24 10:19:14 +00:00
Bob Zhang
d1c50209ba kernel: nvidia-oot: Fix Linux KMD coverity defects
Fix INT30-C and INT08-C coverity defects for
tegra-rtcpu-trace.c.

Fix MISSING_LOCK coverity defects for cdi_mgr.c.

Fix NULL_RETURNS coverity defects for cam_fsync.c.

JIRA CAMERASW-30844

Change-Id: If000ed4459479ba0bc9f06477b25efa65e896fc7
Signed-off-by: Bob Zhang <bozhang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283172
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Patrick Young <payoung@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
2025-07-24 10:19:14 +00:00
Mainak Sen
aa3decfdb8 gpu: host1x: Add plausibility check on Host1x calibration data
When syncpoint and channel property are read from device-tree,
add plausibility check to validate against reference data.

Jira HOSTX-5843

Change-Id: I66dd9a5f18200aa8baaeecd36499dfb0ca24ba01
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293524
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:14 +00:00
Santosh BS
2e59ef0253 gpu: host1x: move disply related code under CONFIG_DRM_TEGRA_HAVE_DISPLAY
As display support is not needed for recent chips,
 move the related codes under CONFIG_DRM_TEGRA_HAVE_DISPLAY configs accordingly.

Jira HOSTX-5833

Change-Id: Ie1cfd730a69fcb7d9e26600487a11f720fc509ba
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292240
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Santosh BS
91751dfb74 drm/tegra: move disply related code under CONFIG_DRM_TEGRA_HAVE_DISPLAY
As Tegra DRM driver display support is not needed for recent chips,
move the related codes under CONFIG_DRM_TEGRA_HAVE_DISPLAY and enable
that flag based on legacy chip configs accordingly.

Jira HOSTX-5833

Change-Id: Iddf884f5abdfe2500e7195778bc77f9423acc2d3
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292246
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Santosh BS
b5acbd1bfc drm/tegra: syncpoint base support for chips <= t186
As syncpoint base feature is not supported from T194 onwards,
moving the related ioctl handling under CONFIG_HOST1X_HAVE_SYNCPT_BASE
accordingly.

Jira HOSTX-5833

Change-Id: Idb5188039ef22e8d27e0a5ddf06a1c447fb323d3
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292251
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Santosh BS
8bfe83d4ee gpu: host1x: syncpoint base support for chips <= t186
As syncpoint base feature is not supported from T194 onwards,
moving the related driver code under CONFIG_HOST1X_HAVE_SYNCPT_BASE
accordingly.

Jira HOSTX-5833

Change-Id: I388dea16527acd0153331710312efc477aa2bbde
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292180
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
Khushi
69055dd639 vse:copy from/to user buffer only once in drivers
Directly copy user buffer to/from IOVA buffer instead
of coping user buffer to kernel buffer in
Cryptodev driver and then copy the kernel
buffer to IOVA buffer in VSE driver

Bug 5058383

JIRA ESSS-1496

Change-Id: I5bc7fc209687052811c330893a272f558e6a122c
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242512
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
2025-07-24 10:19:14 +00:00
Manish Bhardwaj
b9ba6056f0 nvidia-oot: remove dependency from I2C config
- remove dependency of all gpu driver from I2C config.
- builld host1x driver
- move drm driver dependency on DRM config

bug 5070220

Change-Id: I24322224d0cc705c25b11453534ca556c2e29bbc
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3293057
Reviewed-by: Amlan Kundu <akundu@nvidia.com>
Tested-by: Bharath H S <bhs@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bharath H S <bhs@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:14 +00:00
Khushi
f148b0cc15 Bug Fix: Memory leak for HMAC_SHA_SIGN_VERIFY
Free hmac_sha_sv_ctl before releasing the lock

Bug 4881474

Change-Id: I8272ccb841e2cc156650bbfcecbddbdbc54c7f4a
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292556
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:14 +00:00
Martin Radev
bbf4752022 host1x_emu: fix syncpoint 0 WAR
This patch fixes the existing WAR to not allocate
syncpoint id 0. The bug was that indexing starts
from 1, but syncpoint array starts from 0. The fix
is to start syncpoint array iteration from 1 as
well.

Bug 5064819

Change-Id: I4120d83dd33ef134d80417dcf9e1c75b55b99719
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3287523
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Tested-by: Martin Radev <mradev@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:14 +00:00
Jon Hunter
123c86d0b1 block: vblk: Correct license
The license of the Tegra virtual block driver was incorrectly updated.
This is a GPL licensed driver and so correct the SPDX header to that
this is GPL.

Bug 5065840

Change-Id: I8d6ef106a30727b75ed5240d50b57313b73f3061
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3292278
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
amitabhd
d31f4870be host1x_emu: Fix symbol-emu header.
If the flag "CONFIG_TEGRA_HOST1X_EMU_DBG_SYMBL" is
disabled it cause build failure.

Jira HOSTX-5527

Change-Id: I540a1d4e658fac065880d55974d00cd9c3df7b00
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3289217
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:14 +00:00
Shobek Attupurath
2bec5892d2 rtl8852ce: Add Nvidia changes to driver v126
- Update paths for sourcetree
- Reduce log level
- Update roam parameters

Bug 5023692
Bug 4957055

Change-Id: I9b6eed09790bc94d6976d4d680a2aa080085130a
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246722
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:14 +00:00
Shobek Attupurath
4383fee5c2 rtl8852ce: Update driver to version v1.19.16_nv-126
Update driver version to v1.19.16_nv-126-g455ab52c9.20241107_Certified_Module
to enable roaming and fix issues with roaming

Bug 5023692
Bug 4957055

Change-Id: I7d021f599c6483e15828a564a016e4037b238c90
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246715
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2025-07-24 10:19:14 +00:00
Arvind M
29ec18d2bc nvdla: kmd: fix copyright header license to GPL v2
Bug 5065840

Change-Id: I2012645108457974e24d3c8799ee9412393408e1
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3291589
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
2025-07-24 10:19:14 +00:00
Ankur Pawar
4b3dddc90a camera: vi5: scheduling while atomic bug fix
"scheduling while atomic" bug is causing
v4l2-test-app Latency*StreamMmap test to fail.
This is seen because wait_event_interruptible
is called inside spin_lock.

This was introduced in below gerrit.
https://git-master.nvidia.com/r/3262275

Bug 4449673
Jira L4T-6439

Change-Id: I9ffc65c95bbfce0907d1174639d0ec4a6cbd691a
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3291319
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
mhulagabal
580ec7794c dce: Update copyright in the errors header file
- Added MIT and GPL licensing details

- Bug 5065840

- JIRA TDS-15862

Change-Id: I438ea8c9d52c3cfaae76fe616e09bb18692c3bd4
Signed-off-by: mhulagabal <mhulagabal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3288450
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bernd Weber <bweber@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:19:14 +00:00
Sheetal Tigadoli
7aae5929cb drivers:nvpps:nvpps: support use of higher PPS freq
- support use of higher PPS freq in nvpps. The freq value
is read from primary mac interface's "nvidia,pps_op_ctrl"
field and vetted for valid values(0,1,2,4,5 & 8).
- To use higher PPS freq, nvpps needs to update K_INT and
REF_FREQ.INC value and also increase the freq of monitoring
thread.

Bug 5042311
Bug 4899241

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I87e9be5a0ba2156054aea380c730b087d274c223
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3286820
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vijay Mishra <vijaym@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:14 +00:00
Ankur Pawar
c581e5211d media: i2c: IMX390: modify mode table
-Add gain, exposure and short exposure functions.
-Modify WDR and SDR mode table as per the settings
 provided by Sony in their camera SDK.
-Analog gain is fixed in mode table. Driver will only
 update digital gain.

Bug 4774547

Change-Id: Ia04f42062d6f1e56f16c7fbcc6e671529cb714b6
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3189759
(cherry picked from commit 3ff44d5400)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283633
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:14 +00:00
N V S Abhishek
2400426064 nvmap: Remove NVMAP_IOC_CACHE_LIST ioctl from nvmap
Remove NVMAP_IOC_CACHE_LIST ioctl from nvmap. As there
is no implementation for it in nvmap driver.
Also fix copyright info in uapi/linux/nvmap.h.

Jira TMM-5878
Bug 4590641

Change-Id: I5d890c38145811e70aee3ccdaff3e0e66c95c50b
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3279699
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:14 +00:00
Jon Hunter
b92c721efe ufs: Remove ufshcd_vops_reinit_notify
In Linux v6.13, commit 7bac65687510 ("scsi: ufs: qcom: Power off the PHY
if it was already powered on in ufs_qcom_power_up_sequence()") removed
the 'reinit_notify' function pointer from the 'ufs_hba_variant_ops'
structure. This breaks the build for the Tegra UFS driver because we
maintain a copy of the upstream header file 'ufshcd-priv.h' in order to
build the Tegra UFS driver as an out-of-tree driver.

It is possible to fix this by using conftest to detect if the
'reinit_notify' function pointer is defined in the kernel's
'ufs_hba_variant_ops' structure. However, given that the Tegra UFS
driver does not use the 'ufshcd_vops_reinit_notify' where this
function pointer is referenced, it is simpler to remove the function
ufshcd_vops_reinit_notify completely.

Bug 4991705

Change-Id: I2228f2a26640e13f61721e82856cc32b8d570809
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283377
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:14 +00:00
yangxu
ca53993417 kernel: nvidia-oot: Static Analysis MISSING_LOCK
Fix Static Analysis MISSING_LOCK for channel.c

Jira CAMERASW-30853

Change-Id: I691b5440d007f3eb68c998bea74c411540d87665
Signed-off-by: yangxu <yangxu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3285323
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
2025-07-24 10:19:14 +00:00
yangxu
a972eca4b6 kernel: nvidia-oot: Fix KMD coverity defects
Fix coverity defects
ARR38-C
STR07-C
INT30-C
INT08-C
ARR30-C

Jira CAMERASW-30853

Change-Id: I2e98db911238dca46f142f108f6563321e25b588
Signed-off-by: yangxu <yangxu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281801
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
2025-07-24 10:19:14 +00:00
Illia Ragozin
4f3230c142 v4l2loopback: Update default max buffers
CameraHAL, which is the only client to v4l2loopback always requests
four buffers from the driver.

JIRA SHLD2-370

Change-Id: If3e9dbed6d5d901f3d16954c1388d7e0c7432934
Signed-off-by: Illia Ragozin <iragozin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281574
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Kevin (Wu-Hsiu) Kuo <kevkuo@nvidia.com>
Reviewed-by: Tuomas Kulve <tkulve@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
fraunak
559e45be51 nvidia-oot: hwpm: add VI and ISP support
This change does the following:
  - adds hwpm register and unregister APIs.
  - adds hwpm registration during probe for VI and ISP.

Jira CT26X-1854

Change-Id: Id5d074f26fd69236c249b7baf32a6db4737a9623
Signed-off-by: fraunak <fraunak@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3282218
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Aki Niemi <aniemi@nvidia.com>
2025-07-24 10:19:13 +00:00
Ketan Patil
cd0e863f07 video: tegra: nvmap: Cleanup NVMAP_IOC_SET_TAG_LABEL ioctl
NvRmMemSetAllocationTagLabel is not being used by any of clients. Also,
this API does not have any SHR or JAMA requirement. Hence we are
removing support for this API on linux to have a cleaner and uniform
ICD. Remove the corresponding ioctl code from nvmap.

Bug 4980808

Change-Id: I74676e07b2c617ad6554b4538ce27ab52176e5b9
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3288404
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Bob Zhang
3aa403fa33 kernel: nvidia-oot: Fix Linux KMD coverity defects
Fix INT30-C and INT08-C coverity defects for
capture-vi.c and tegracam_ctrls.c.

Fix MISSING_LOCK coverity defects for channel.c.

JIRA CAMERASW-30788

Change-Id: I6ad218cb9184f09d04d862a4c8f3f6db35db65cf
Signed-off-by: Bob Zhang <bozhang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3275901
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:13 +00:00
Manish Bhardwaj
9f909306a0 kernel-oot: update driver license to GPL
Bug 5065840

Change-Id: If5f1783d8168af51c8964ff5605e8a04993973d6
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3289957
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:19:13 +00:00
Ankit patel
65f35b07e0 tty: wch: update copyright headers
Update copyright header to GPLv2, removed proprietary copyright headers

Bug 5065840

Change-Id: Ib0b8be01f3c0a4fc963244d7b49489960420dc27
Signed-off-by: Ankit patel <anpatel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3288499
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Manish Bhardwaj
b6c2cf9a34 nvidia-oot: check dependency of pci driver on host1x
Bug 4936618

Change-Id: I9c8d98b43cffa6cff4ea06d7bb38acf0b42819fb
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257441
Reviewed-by: Bharath H S <bhs@nvidia.com>
Tested-by: Hyong Bin Kim <hyongbink@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Hyong Bin Kim <hyongbink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Jon Hunter
005cbe4462 virt: hvc_sysfs: Another build fix for Linux v6.13
In Linux v6.13, commit 94a20fb9af16 ("sysfs: treewide: constify
attribute callback of bin_attribute::mmap()") changed the type of
the 'struct bin_attribute' argument of the bin_attribute:mmap function
pointer to const.

One instance of this change has already been fixed in the hvc_sysfs
driver but another case was recently introduced breaking the build for
Linux v6.13. Fix this in the same way as the previous instance.

Bug 4985113
Bug 4991705

Change-Id: I7f68138f3b484ebfe7a4ff5032c7b4365865f248
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3287044
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
2025-07-24 10:19:13 +00:00
Shubhi Garg
c3fdf73467 Revert "Revert "rtc: fix year calculation in max77851 pmic rtc""
This reverts commit 40b9876e2f277472677c22b947da7260cf39626e.

Reason for revert:
Initial change to fix year calculation is correct.
We do not need to blindly add +100 in year value. RTC_YEAR
register can accomodate values from 0..199. Being year base 1900
and valid rtc time being 1970, valid year values are 1970..2099.

Bug 4911320

Change-Id: Ic4183f4d85e4612b6a5a7ab53baf0483b7b6acad
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283957
Reviewed-by: Evan Wei <evwei@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:13 +00:00
Jon Hunter
ee357025ee ufs: Fix Tegra UFS for Linux v6.13
In Linux v6.13, the quirk definition 'UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS'
was removed and replaced with a function pointer than can be used to set
the DMA mask as needed for a given device. Update the Tegra UFS driver
to fix support for Linux v6.13. Note that prior to Linux v6.13, the flag
'UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS' would set the DMA mask to 32-bits
and so this change is equivalent to the configuration of prior kernels.

Bug 4991705

Change-Id: I859331e9eea918d2438d68b871642fee5e4148e0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283447
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
2025-07-24 10:19:13 +00:00
Zhiyuan Wang
82af289c71 kernel: nvidia-oot: Fix Linux KMD coverity defect
Fix STR31-C ad STR07-C for
- drivers/media/platform/tegra/cdi/cdi_gpio.c
- drivers/media/platform/tegra/cdi/cdi_mgr.c

Jira CAMERASW-30856

Change-Id: I40d2c1b47b83d2dbc6102229dd67225e1a9156ab
Signed-off-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281931
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2025-07-24 10:19:13 +00:00
Junsheng Chen
6fb5af66eb linux: kmd: static analysis S01/08 part 4
Under the following path:
- drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c
- drivers/media/platform/tegra/camera/camera_common.c
- drivers/media/platform/tegra/camera/csi/csi.c

Jira CAMERASW-30848

Change-Id: If9d04481371f28d6fe962291f1f950f6b31aa635
Signed-off-by: Junsheng Chen <junshengc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281688
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:13 +00:00
yongtaos
2b06fe0a29 kernel: nvidia-oot: Fix Top-25 coverity defects
Fix INT08-C, INT30-C and STR07-C coverity defects for rtcpu-debug.c.

Jira CAMERASW-30854

Change-Id: I0b516587b72bf631974f5f6ee99a55821744bf85
Signed-off-by: yongtaos <yongtaos@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3278378
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
2025-07-24 10:19:13 +00:00
harsukhwinde
1a3fed7006 nvethernet:change osd_usleep_range with osd_usleep
osd_usleep function using fsleep internally instead of usleep.
usleep has backward compatibility issue with andriod in gvs

Bug 4921002

Change-Id: Id3a1b5593decf9efbe175ed4490c851072437e71
Signed-off-by: Harsukhwinder Singh <harsukhwinde@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3268621
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:13 +00:00
Illia Ragozin
54f1c2665d v4l2loopback: set input name to maxine
Set input name to "maxine" so the HAL knows that the particular device
provides a maxine camera.

Change-Id: If3c2b1ee245011df71ad77f65e5d92306a22b501
Signed-off-by: Illia Ragozin <iragozin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273094
Reviewed-by: Bogdan Marian Dumitrescu <bdumitrescu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Tuomas Kulve <tkulve@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
2025-07-24 10:19:13 +00:00
Illia Ragozin
b67ddab632 v4l2loopback: Set default capabilities
Set default capabilities for virtual camera:
Resolution: 1280x720@30
Format BGR32

JIRA SHLD2-370

Change-Id: I42541804847ab6473b5797cca2ad0275436494cb
Signed-off-by: Illia Ragozin <iragozin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267280
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bogdan Marian Dumitrescu <bdumitrescu@nvidia.com>
2025-07-24 10:19:13 +00:00
Illia Ragozin
2e69020353 v4l2loopback: Allow unmapped buffers
Allow dequeuing buffers that are not mapped. It is not uncommon
for clients to map the buffer only when they are ready to read it.

JIRA SHLD2-370

Change-Id: I6d815c6bbfd0a640a2e575d6da26d5019dd7f756
Signed-off-by: Illia Ragozin <iragozin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267279
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:13 +00:00
Yuyuan Chen
ff7cf02ef2 kernel: nvidia-oot: Fix Static issues S12/11
Jira CAMERASW-30258

Change-Id: I5fd26611f6bac71ec186458a583622b55ba8735e
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262275
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:13 +00:00
Rakesh Goyal
84e2727119 nvethernet: support high pps
Issue: Ask for support PPS cmd feature for fast TSC-PTP lock

Fix: Extended the possible values for more pulse per sec

Bug 4585654
Bug 5042311

Change-Id: I8a2066cd39fdbacee3e8543712b449694aad9f6b
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3215592
Tested-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Manish Bhardwaj
517bcb5265 nvidia-oot: build crypto drivers for recovery kernel
- enabled host1x driver to build crypto drivers using
  below patch.
  https://git-master.nvidia.com/r/c/linux-stable/+/3283615/
- update dependency of modules to i2c driver giving compilation
  error after enablinghost1x driver.

bug 5053949
bug 5055469

Change-Id: I64b8c6a9c0b627cfb10b13041d6e5e7d448b5c3d
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3284482
Reviewed-by: Bharath H S <bhs@nvidia.com>
Tested-by: Hyong Bin Kim <hyongbink@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Hyong Bin Kim <hyongbink@nvidia.com>
2025-07-24 10:19:13 +00:00
Khushi
2a114f31d6 Bug Fix: Intermittent failure in NvVseTestAES
Fixed the issue caused by using common buffer in hwrng requests
which led to overwriting the buffer and mismatch during concurrent
AES operations

Bug Id: Bug 5015880

Change-Id: I52d6ae016fcc58cd9f2129d13d458d2ff9b3da59
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273901
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
Tested-by: Christoffer Arvidsson <carvidsson@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:13 +00:00
Junsheng Chen
cd6a1c3a7d linux: kmd: static analysis S12/11 part 4
Under the following path:
- drivers/media/platform/tegra/camera/fusa-capture/capture-common.c
- drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c
- drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c
- drivers/media/platform/tegra/camera/tegracam_utils.c
- drivers/media/platform/tegra/camera/vi/core.c

Jira CAMERASW-30251

Change-Id: Iec7c29a184a060b8e7f44f3614bcbc9f8182aea6
Signed-off-by: Junsheng Chen <junshengc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270228
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:13 +00:00
amitabhd
0f04d6c204 host1x_emu: HR Timer Syncpoint Fence Polling
1. This change enable HR Timer Syncpoint polling and
disable the thread based fence polling.

2. Default timer interval is 200usec. The timer value
is taken from DT. If the timer interval in DT is less
then 50usec, default timer interval is taken.

Jira HOSTX-5527

Change-Id: I6644f1362f28a8901e4e384f1290be9807c30036
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3268636
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:13 +00:00
amitabhd
a2dba7e53b host1x_emu: SyncpointIncre per-improvement
1. Add mechanism(s) to trigger syncpoint fence scan when
syncpoint increment UMD called. Following methods are added.
 - METHOD-1: Check fence expire in user context when syncpoint
   increment  UMD API is  called.
 - METHOD-2: Add tasklet based mechanism that schedule tasklet to scan for
   syncpoint fence expiry. This also improve signaling latency.

   METHOD-1 is enabled by default, to enable METHOD-2 define MACRO
   "HOST1X_EMU_SYNC_INC_TASKLET".

2. Add interface "host1x_syncpt_fence_scan()" that can be called from
   client interrupt handler to initiate syncpoint fence scan.

Jira HOSTX-5527

Change-Id: I4d5a0ba9fd67042d824a1df2794b316831001dc4
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267144
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Sanif Veeras <sveeras@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
2025-07-24 10:19:13 +00:00
Deepak Badgaiyan
676ada0f2b nvscic2c-pcie: fix bar to be used in Thor
With Thor BAR_2 should be used for data transfer.

https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246908
reverted the change made earlier to enable to Thor supported.

The revert was due to mistake hence use correct bar number
while using pci_resource_len()

Bug 5046041

Change-Id: I7627b9eab5b509fb55cb30138e86a1674841af8a
Signed-off-by: Deepak Badgaiyan <dbadgaiyan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283714
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:13 +00:00
Sanath Kumar Gampa
e0de3a4c56 NvEthernet: Add T26x EQoS XPCS separate lib
Add T26x EQoS XPCS h/w specific lib to compile nvethernet

Bug 4997903

Change-Id: Ib8171425e65fc167bf5f14ad1b1d104891f7e444
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3268504
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:13 +00:00
Jon Hunter
71e934a5ef gpu: host1x-nvhost: Drop Tegra194 support
Tegra194 is no longer supported and so remove support from the
host1x-nvhost driver.

Bug 3790154

Change-Id: Id7b50d6de985d3503c62917bd95fd2f0cd008d32
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283344
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:13 +00:00
Jon Hunter
71ac531606 gpu: host1x-nvhost: Prepare for removing nvhost_t194.h
Move the function prototypes declared in nvhost_t194.h into nvhost.h so
that we can update the necessary drivers and remove nvhost_t194.h
completely.

Bug 4472097

Change-Id: I1466561cf2ec98b0552bff84c1e45a52a74a3598
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3283337
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Jon Hunter
e709a790c4 gpu: host1x: Move host1x-next.h
Move the host1x-next.h file into the 'include/linux' directory so that
we don't need to have a specific include path that we need to provide to
the various out-of-tree drivers that use this.

Bug 4991705
Bug 5043885

Change-Id: I6ebfa291aa1c038e8bf9bbaa59362403e29ceb5a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3282045
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Ankur Pawar
07875fbe38 media: camera: v4l2-compliance fix
Fix v4l2-compliance VIDIOC_G/S_PARM failure.
Below is the function call sequence starting from
ioctl.
doioctl(VIDIOC_G_PARM)
vidioc_g_parm
tegra_channel_g_parm
v4l2_g_parm_cap
v4l2_subdev_call_state_active
v4l2_subdev_call
v4l2_subdev_call_wrappers.pad.get_frame_interval
call_get_frame_interval
check_frame_interval
check_state

In file: v4l2-subdev.c check_state() function
failed at check:
(!state || !state->pads)
Which caused the function to return -EINVAL=-22.

struct v4l2_subdev contain a member
active_state which should be initialized to
overcome the failure. To fill active_state
call v4l2_subdev_init_finalize in
tegracam_v4l2subdev_register().

This failure is seen in K6.8 because in earlier
kernel, v4l2_subdev_call() was called instead of
v4l2_subdev_call_state_active() in
v4l2_g_parm_cap(). And v4l2_subdev doesn't contain
active_state member in earlier kernel.

Bug 4449673

Change-Id: Id0fbcf9476cf6d194b721f85790e95580ff4007d
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3281759
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
anupamg
6c7b0070f8 DCE-KMD: Refactor dce client ipc registration.
- dce-client-ipc.c is a common file used by HVRTOS as well to
  register as a DCE client.

- We need to refactor existing register function due to certain
  HVRTOS restrictions at init time.
    1) Register function will be called at init time from HVRTOS.
    2) HVRTOS doesn't allow any mutex acquire calls or wait calls
       during INIT phase.

JIRA TDS-16581

Change-Id: I1b3a9587c1e237c2cca8214a3acce9ff34d98cc0
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3280251
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
2025-07-24 10:19:13 +00:00
kevixie
5ce08ee3ce nvidia-oot: cameraSW: add data validation to dt reads
+ Add the following data validation checks based on
  gaps identified when inspecting code for
  SHR-9320:
  + FSYNC: Add check to ensure existence of generators
    property before parse
  + FSYNC: Add check to ensure generators in default
    group adhere to LCM rule
  + CDI: Add check to ensure reg_len / dat_len do
    not exceed 2 bytes
  + CDI: Ensure err is set before jumping to err_probe
  + CDI: Jump to err_probe if IOExpander i2c-bus read
    fails
  + CDI-TCA: Return error if reg_len or dat_len
    out of expected range
  + FuSaCap: Ensure isp/vi-max-channels validated
  + VI: Add check for vi-mapping index found (this was
    already caught in existing code, but error message
    was non-specific)
  + camera_common: Add check for err that was set but
    never read
  + RTCPU: Add debug prints for properties not found

Jira CAMERASW-30537
Change-Id: I9953029f594c0153d6c335913944fb8906adedd9
Signed-off-by: kevixie <kevixie@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3280557
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Deepak Badgaiyan
0b94a70702 nvscic2c-pcie: update endpoint function deinit
In Thor core_deinit event is issue from pcie_epc_stop(),
Which mean we can not call pci_epc_unmap_addr() in core_deinit
due to mutex deadlock.
Release epc->lock in core_deinit before calling epc-core API's.
Take back mutex before returning.

Jira NVIPC-3183
Bug 5046041

Change-Id: Ie24bbb9cc95e4024fd95ae099cda51ef90ddd2f8
Signed-off-by: Deepak Badgaiyan <dbadgaiyan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3282858
Reviewed-by: Anish Khurana <ankhurana@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:13 +00:00
Manish Bhardwaj
ed5b67aa73 nvidia-oot: add support for nvlog buffer
Using this patch we have done below changes :-
- exposed buf_count, buf_size, region_size to userspace
  via sysfs node to read meta data related to nvlog buffers
- mmap nvlog buffer to the userspace

Bug 4985113

Change-Id: If5824f7199d63364847eecffd0f490213d2acda0
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3268716
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:13 +00:00
Jon Hunter
a2602b88b8 misc: tegra-cec: Fix build for Linux v6.11+
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the Tegra CEC driver
as necessary to fix this.

Bug 4749580

Change-Id: I3cd34f41e519240ff48378e79bb654cf78767085
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276923
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
(cherry picked from commit 66afcf9c40)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3282569
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
2025-07-24 10:19:13 +00:00
Prafull Suryawanshi
ce33039eea tegra-cec: make tegra-cec as loadable module.
This change makes tegra-cec driver as loadable module
and adds uapi tegra_cec.h file for IOCTL interface.

Verification:
Verified on orin-slt with basic cec tx-rx data with TV.

bug 4954851

Change-Id: Id3ca696429b2897aa9d80604a365f3221c94a770
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273953
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Prafull Suryawanshi
27e8c7ae95 tegra-cec: remove pre-t23x support.
This change removes pre-t23x support and removing
dependency on tegra-dc module for tegra-cec driver.

It also removes the previously used uapi header file
for user-space ioctl intefrace which will be added along
with loadable module change.

Verification:
Verified on orin-slt with basic cec tx-rx data with TV.

bug 4954851

Change-Id: Ie820ba706ac5e66da282e411a4ae74bd0e6cb58b
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264311
(cherry picked from commit 0cac4c3b02)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258901
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:13 +00:00
Surbhi Singh
7c70fdd3f1 video: tegra: nvmap: Make function static.
Fix for: Sparse defects

Sparse defect stated that "iovmm_debugfs_info" was not declared. Should it be static?
and symbol 'nvmap_max_handle_count' was not declared. Should it be static?

-Since iovmm_debugfs_info is only used in nvmap_debug.c, hence it can be
made static.
-Since nvmap_max_handle_count is only used in nvmap_handle.c, hence it can be
made static.

Bug 4513982

Change-Id: Ifb12f14c07e56c340d926f6a4a3f858a762d71fb
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274000
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Revanth Kumar Uppala
e01250d7c8 R8168: Configure Root Port MPS and MRRS in r8168 driver
This patch ensures that the Maximum Payload Size (MPS) and Maximum Read Request Size (MRRS) settings of the root port associated with r8168 ethernet endpoint are properly configured after overwritten by kernel when pcie_bus_perf is enabled.

Bug 4607316

Change-Id: I7f7b83f74e4ac2104345bd568d9d2e7c03a1441e
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273562
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:13 +00:00
Surbhi Singh
e3e3af93bc video: tegra: nvmap: Add new line.
Fix for: Sparse defects

Sparse defect stated that no newline at end of file.

-Add a new line at end of nvmap_tag.c

Bug 4513982

Change-Id: Id1ca6a61005537fc91bc8f4000cdce906f9d21bc
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273295
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Bibhay Ranjan
7d73a73146 nvethernet:set phy oldlink status correctly
Issue: on resume the mac set speed is not called due
to which the data transmissions are not happening in
alternate suspend resume cycles.

This is because the oldlink status is not set to 1 during
the successful resume, in set_speed_work_func retries

Fix: set oldlink to 1 once setspeed is successful in
function set_speed_work_func, so that next time
ether_adjust_link will call the set speed after resume

Bug 4891730

Change-Id: Iadb426f2cada99387ce180dfa2d0c9ee57e7ccd5
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260342
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:13 +00:00
gokull
6584be8cc3 Increase IVC timeout
Intermittent vblk failure during boot up.

Change Contains:
 [*] Increase the ivc_notified() timeout from
32usecs to 15msecs

Bug 4826664

Signed-off-by: gokull <gokull@nvidia.com>
Change-Id: I3a5aef2dd5288e16ae4e51cf081b53b388327022

(cherry-picked from commit
b1c28a9a2b6d919864d51cdea271001a68522d8b)

Change-Id: I3a5aef2dd5288e16ae4e51cf081b53b388327022
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3210713
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Tested-by: Gokul Vasan L J <gokull@nvidia.com>
2025-07-24 10:19:13 +00:00
yangxu
a268e2a1d2 kernel: nvidia-oot: Fix CERT ARR30-C violations
Fix CERT ARR30-C coverity defects for channel.c

Jira CAMERASW-30796

Change-Id: I1db048087f0996956d95224c0caa6c35ff971eed
Signed-off-by: yangxu <yangxu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276114
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
2025-07-24 10:19:13 +00:00
Mikko Perttunen
50c133e18d gpu: host1x-fence: Fix fence leak in fence_extract
The fence_extract IOCTL handler was only putting the fence object
on the error path. Add a put to the success path as well.

Bug 4799184

Change-Id: Ib9fa3280320f16e1cf5588bd7b58900644601649
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261313
(cherry picked from commit 03dd3ecc10)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3268519
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
2025-07-24 10:19:13 +00:00
anupamg
2bed40f6fe DCE-KMD: Refactor dce-os-worker.c/.h
- dce-os-worker.c/.h module exposes functionality which allows
  DCE KMD clients to wait/signal events.

- The current abstraction of this module has following drawbacks
  which this change attempts to address:
    * Name: dce-os-worker is a misnomer
        - Rename to dce-wait-cond.c/.h and make it a dce-kmd core file.
        - Rename functions accordingly.
    * dce-os-worker module initializes data structures from tegra_dce
      which makes it ineligible for re-use.
        - dce-client-ipc can re-use this module as it uses exact
          same functionality.
        - But this module is tied with DCE-KMD core such that it has
          functions that operate on fixed known inputs.
            - dce_os_work_cond_sw_resource_init/deinit()
                Inits/Deinits most but not all condition var resources
                from tegra_dce. Eg. dce-client-ipc resources
                are not initialized.
                    - Move this function to new core file:dce-waiters.c
            - All other functions require msg_id as input and can only
              operate on DCE_WAIT* resources making it ineligible
              to be used by other clients like dce-client-ipc.
                    - Refactor these fucntions to operate on
                      individual wait conditions so that all DCE-KMD
                      core modules can reuse them.

- Additionally, this change will also remove unused functions
  and macros from dce-os-cond.c/.h

- dce-client-ipc will also switch to use dce-wait-cond interface
  for client ipc waits.

- Make dce-os-cond.h a common file and move OS specific impl
  to dce-os-cond-internal.h

JIRA TDS-16581

Change-Id: Ie8c6ec724e48cde66917fab4aa43e7da464ef8fb
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258562
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:13 +00:00
anupamg
3e2343fa57 DCE_KMD: dce-client-ipc.c: Separate out exports
- dce-client-ipc.c has linux specific export symbols that
  are required to be exported to linux kernel module client.

- We'll be using dce-client-ipc.c as a core DCE-KMD file and
  also be compiling it for HVRTOS.

- This change will add DCE_EXPORT_SYMBOL() as wrapper
  to EXPORT_SYMBOL. This will be OS agnostic macro.
    - For HVRTOS it will be empty.

JIRA TDS-16126

Change-Id: I45fbf3b8b61321c64f88a0c64a07dbe4935296b7
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258496
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:13 +00:00
anupamg
d0bafbec62 DCE-KMD: dce-ipc.c: Remove simple wrappers
- This is a follow-up CL to address a comment in
  I55594d8e34c3b572129119d1f7240cde76cf37bd

- This change will remove below simple static wrappers
  from dce-ipc.c and directly call the corresponding OS functions.
    - _dce_ipc_get_next_write_buff()
    - _dce_ipc_get_next_read_buff()

JIRA TDS-16126

Change-Id: Ie8c08ace75f3c6e14e803c6aeccdf43a0c27f3fa
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257965
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
2025-07-24 10:19:13 +00:00
anupamg
0137495706 DCE-KMD: Make dce-client-ipc.c core file
- This change will remove linux nuances from dce-client-ipc.c
  file and make it a core DCE-KMD file agnostic to OS.

- To do that, dce-client-ipc module will repalce linux specific
  nuances for work queue related functionality with
  dce-os-work module.

- Further to support existing dce_client_ipc asyn callback function
  we need to make worker queue more generic by allowing clients
  to pass any data of their choice as data param to the
  callback function.

- Also take this opportunity to make following functions static:
    - dce_resume_work_fn()
    - dce_bootstrap_work_fn()

JIRA TDS-16581

Change-Id: I741b8675dd67ef932ee462e16cad016cbe8b7e2c
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257808
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:13 +00:00
anupamg
801a2e1d07 DCE-KMD: Update DCE OS Worker Queue abstraction
- This is pre-req to make dce-client-ipc.c a core file and use
  it for HVRTOS as well.

- dce-client-ipc.c uses worker queues today to manage async events.
  But instead of using existing dce-os-work abstraction it
  directly uses linux structs/calls.

- Current dce-os-work abstraction cannot be used as is for
  dce-client-ipc.c as it only allows scheduling work
  to system hipri work queue. But dce-client-ipc creates
  and schedules work to a new worker queue.

- To allow dce-client-ipc.c use exising dce-os-work abstraction,
  we need to make it more generic such that work can be scheduled
  either to a new queue or existing system hipri work queue.

- This CL will update worker queue abstraction to make it more generic
  and start using it for usecases which use default sys hipri WQ.

- There will be a follow-up CL for dce-client-ipc to start using
  this abstraction.

- Further, this change will also make WQ and work structs
  opaque and make dce-os-work.h a common header.

JIRA TDS-16126

Change-Id: I4d8a274a277f6dc08dc67847c1e3a3e35fb839b0
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257738
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:13 +00:00
Eric Funsten
84bb75c788 drivers: uncore_pmu: add event type check
Need to check if the event type matches the pmu type and return
ENOENT if there is a mismatch.

Bug 5035098

Change-Id: I3d1341efd1ad59dec011527a730d702ed6dfea4a
Signed-off-by: Eric Funsten <efunsten@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3279805
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Besar Wicaksono <bwicaksono@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:13 +00:00
Yuyuan Chen
188b622e75 kernel: nvidia-oot: Fix Static issues S11/27
Fix TAINTED_SCALAR and Directive 4.14

Jira CAMERASW-29899

Change-Id: I1712d392b8271be0db912d536027d960f343e3fe
Signed-off-by: Yuyuan Chen <yuyuanc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273387
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ryan Li <ryanli@nvidia.com>
2025-07-24 10:19:13 +00:00
Nagaraj P N
8e33949582 vse: update device nodes per hw instance/engine
Update cryptodev device names to indicate the hw instance
and engine name.
Update implementation to allow different DT instance ids and
driver device instance IDs.

Jira ESSS-1692

Change-Id: Ib1cf91202b41276ac8342f820e170884d139090c
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263604
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Prateek Patel
658d1e1452 drivers: cec: fix cert_c defect
Add a sanity check on cec->soc, which could be NULL.

CID 490328

Bug 3512545

Change-Id: Ibd334c5637a85342ed5307eecb697416f32e0360
Signed-off-by: Prateek Patel <prpatel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2710156
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
2025-07-24 10:19:13 +00:00
prafulls
070456617d misc: tegra-cec: replace dev_err with dev_info.
The probe retry message shall not be error message.
Replacing it with dev_info to fix kernel warning test.

bug 3578262

Change-Id: I8fd016e11b6edc14a402214a44c1e916bcc0d16e
Signed-off-by: prafulls <prafulls@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2685084
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: Gerrit_Virtual_Submit
2025-07-24 10:19:13 +00:00
Prafull Suryawanshi
a33a00e4be misc: tegra-cec: add T23x support.
This change includes below -
1. For T23x, CEC engine is moved to AON partition. As AON partition
   does not powergate, skip all powergate/unpowergate calls for t23x.
2. The clock on which CEC engine operates, 32k/rtc_clk, it is always
   running clock in AON partition. So skip clock enable/disable APIs.
3. This change also skips calls to TEGRA DC engine which is not available
   from T23x.
4. RX Buffer size is increased to 64 depth from 1 depth. So new register is
   provided to program depth so that interrupt gets triggered when certain
   depth is filled. By default it is 64 depth so program it to 1 depth
   to match old behavior.
5. When tegradc is absent, read physical address from SPARE register which
   will be populated by UEFI.
6. This change also adds new register definitions in header file which
   needs to program when adding support for CEC SC7 wakeup.
7. Timing registers updated for T23x as per HW guidelines.
8. Some initialization code is changed for T23x.
9. Add devicetree binding documentation.

bug 200727002

Change-Id: I71c2d323632c61e4c4b82bcdbca9e72179761224
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2523595
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2025-07-24 10:19:13 +00:00
Ankit Patel
ebc4fef1b7 drivers: use overlay instead of relative path
Modified misc/tegra-cec and video/tegra/dc NVIDIA git repo Makefile, Now
overlay macro will be used instead of relative path from kernel source
tree, to find the included header file.

Bug 200606454

Signed-off-by: Ankit Patel <anpatel@nvidia.com>
Change-Id: I684388e9c81be94915c05db3cdae8b6100c6db91
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2521240
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Naveen Kumar S
ba7084570c video: tegra: dc: add pm_runtime support
Add genpd/pm_runtime support to handle power domains
in Tegra Display driver. Also updated CEC and HDA_DC
drivers to add pm_runtime calls.

Added new APIs in CEC and SOR drivers to abstract
calls to pm_runtime and tegra_powergate APIs based
on specific Kernel version. Guarded powergate_id
with CONFIG_TEGRA_POWERGATE since its not needed
when pm_runtime APIs are used, and the powergate IDs
are defined in tegra_powergate.h which is not used
in K5.9.

Removed pm_runtime autosuspend setting since display
driver doesn't assign PM suspend/resume hooks at
present. Suspend/resume calls are linked to platform
device callbacks.

Removed pm_runtime_enable() call in dc_common probe
since there's logically no need of power-domains
in dc_common and also there is no power-domains node
in display_hub node in device-tree. Same with DSI.

All the power-domains handled by each DC are listed
in "power-domains" and "power-domain-names" properties
under respective dc nodes in device tree.

bug 200601926

Change-Id: I0fc9d21ff56185a69de6e0663b5932a93cf40e2b
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2358953
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: Ujwal Patel <ujwalp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2025-07-24 10:19:13 +00:00
Naveen Kumar S
78df3dae46 misc: tegra-cec: fix access_ok() API's parameters
This change fixes below follow-up issues with the earlier fix
to access_ok() API done as part of
https://git-master.nvidia.com/r/c/linux-nvidia/+/2361042:

1. Definition of VERIFY_READ and VERIFY_WRITE have been removed
after K4.14. Hence, used them only for kernel versions < K5.4.
2. Changed access_type parameter of tegra_cec_access_ok() API
to bool. WRITE or READ will be chosen based on the bool value.
3. In the last CL, VERIFY_WRITE was changed to VERIFY_READ in
two access_ok() calls by mistake. Corrected them in this CL.
4. Defined access_type variable with attribute __maybe_unused
since gcc doesn't seem to consider a variable as used if only
passed as function parameter.

bug 200601926

Change-Id: I9f3540cd028280ca679b4b69d5b4a72aa943b2ae
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2394585
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: Ujwal Patel <ujwalp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2025-07-24 10:19:13 +00:00
Naveen Kumar S
2609b37114 misc: tegra-cec: update access_ok() parameters
Starting K5.9, the access type parameter (read/write) of
access_ok() API has been removed. And also, the address
parameter has been updated to "void *" type from "unsigned
long". Introduced API tegra_access_ok() to abstract the
difference in parameters across different kernel versions.

bug 200601926

Change-Id: I0d72e03f5e0c56eb935107eaf306bc2d68ed13e3
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2361042
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Bitan Biswas
5d79fa89e6 nvidia: drivers: fix linux-5.7-rc5 build
Fix build linux-5.7-rc5 errors including following:
	- change timespec to timespec64. replace getnstimeofday
	  with ktime_get_ts64
	- replace usage of macro FIELD_SIZEOF with sizeof_field in ethtool.c
	  nvethernet and eqos files.
	- support 2 arguments for of_get_phy_mode call

bug 200617764

Change-Id: I46067d7d36d08ee9556b2722e9ccec707b8853d4
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2347244
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Ankit Patel
3685bbca00 headers : move/modified header for User-space ABI
copied/moved/modified headers from the driver directory to the
include/uapi directory, which have IOCTL components required to
get access from user space as per Linux kernel user-space ABI.

Bug 2062672

Signed-off-by: Ankit Patel <anpatel@nvidia.com>
Change-Id: Ie70b2839e0a1031a685ff3e4bb93c73741645f44
(cherry picked from commit 348c5ff55d7499222f154aea9e9893e6cfa677ce)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2318682
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Nicolin Chen
76e580a325 media: tegra: Remove temp WAR for function calls
There are two type of temp WARs in the nvidia repo:
1) Some functions are defined in driver files that depend on
   CONFIG_TEGRA_GRHOST_NVCSI. So these function call should
   have dependency protection in the header file.

2) The powergate header file is adding an unnecessary define
   check for tegra194-powergate.h and this broke two places
   that were referring one of the defines in it.

So this change fix the WARs above by:
a) Removing those temp WARs by adding dummy NOP functions for
   those platofrms that don't have CONFIG_TEGRA_GRHOST_NVCSI.
b) Removing the define check in tegra194-powergate.h and the
   version check when referring TEGRA194_POWER_DOMAIN_DISP.

Bug 2284925

Change-Id: Iad86bfe20f2981b3d31bccf5f51184799fe7e289
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1803439
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Bang <dbang@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Chun Xu
2efe0a33c4 tegra-cec: add interface to get post_recovery
Provide IOCTL interface for usersapce to get whether current boot is from
booting from recovery.

Bug 200394215

Change-Id: I45f492b766a75542ff470366001f92fa2fd65d23
Signed-off-by: Chun Xu <chunx@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1780659
(cherry picked from commit 8a4bda6d7e0904ce9c0cafabac4aefb49e879b8b)
Reviewed-on: https://git-master.nvidia.com/r/1792946
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Chun Xu
64d16c1ddf tegra_cec: suppport dump registers and snoop mode
Provide dump registers and changingRX snoop mode interface.

Bug 200382184

Change-Id: Idb55d22112bc6be9de89b8ff8e060e73de469507
Signed-off-by: Chun Xu <chunx@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1765068
(cherry picked from commit 3310df0f117d792d3d0bfab6326592851faaeed7)
Reviewed-on: https://git-master.nvidia.com/r/1641846
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Chun Xu
17312f65e0 CEC: add timeout and recovery in CEC frame sending
To avoid hang on CEC frame sending, introduce timeout and recovery.

Bug 2151251

Change-Id: Ia7c87ee874734c3ed976f3a9142ecc7e2509ec43
Reviewed-on: https://git-master.nvidia.com/r/1741606
(cherry picked from commit e0010f8fb4443cc146a84d76b8666ee831010f56)
Signed-off-by: Chun Xu <chunx@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1764220
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Aly Hirani
e5bbe61bbb misc: tegra_cec: fixing return values for wait
This change fixes the code that was checking the return value for
the wait_event_interruptible_timeout.

Change-Id: Ief6c180f1df9994dd6caa776e08cdb26e15bb32b
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1742938
(cherry picked from commit 8e4b55aa0571a10acf106d21f7c70b2d8b8108c6)
Reviewed-on: https://git-master.nvidia.com/r/1746696
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Aly Hirani
08b567761a misc: tegra_cec: Add timeout for wait_event
Bug 2151251

Change-Id: I75d16b33d1596242c28d693f824a51d72934a5c3
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1742040
(cherry picked from commit c94751ec8838dd9edd5b2dafd5c308ecefe6a8b3)
Reviewed-on: https://git-master.nvidia.com/r/1746695
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Ishwarya Balaji Gururajan
3016ea6f20 misc: tegra-cec: remove NVDISPLAY ifdefs
remove NVDISPLAY ifdefs and replace it with runtime APIs

Jira TDS-2761

Change-Id: I920fe5402a91d1780b07aadf542cc15361f73398
Signed-off-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1653842
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Chun Xu
c2f7dac806 misc: tegra-cec: add T194 CEC device
Bug 2039509
Bug 200375853

Change-Id: Iebe1956a94cbf0209b11ad8c66d8fc5b7335549a
Signed-off-by: Chun Xu <chunx@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1641039
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:13 +00:00
Ishan Mittal
56a1728ed5 drivers: Fix references to nvidia/
drivers inside platform tegra and nvdisp
point to display repo.
changing that to nvidia/

Bug 200295104

Change-Id: I91e0356555c251df3eae98218a69f4bc7e3cd208
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
2025-07-24 10:19:13 +00:00
Chun Xu
d3a2efac91 misc: tegra-cec: dump read/write buffer for debug
Dump read/write buffer with dev_dbg for debug.

TDS-2199

Change-Id: I1fa3dec9e2ccd78023c464085fd2f6e3f49a87f2
Signed-off-by: Chun Xu <chunx@nvidia.com>
Reviewed-on: http://git-master/r/1485394
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2025-07-24 10:19:13 +00:00
Nicolin Chen
df4c2972fa misc: tegra_cec: add missing cancel_work_sync()
This patch just adds missing cancel_work_sync()
in the exit path of the probe().

Bug 1887171
Bug 200289389

Change-Id: I7d42ae6d035f87b5ad1b726cbe5274fbd9755f4e
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1463243
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:13 +00:00
Vince Hsu
f3071e5d0d misc: tegra_cec: turn some prints into debug level
To prevent too many bufferred message from flushing out to serial when
we turn on/off display and blocking other high priority task due to
disabled IRQ, we change some prints to debug level to workaround that
problem as a short-term solution. The long-term will be implemented
later.

bug 200205349

Change-Id: I6609844d5c2ee58b2df6a51e9537bb7dd1448995
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Reviewed-on: http://git-master/r/1326683
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Chun Xu <chunx@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2025-07-24 10:19:13 +00:00
Santosh Reddy Galma
9b22ee78d3 misc: tegra-cec: fix power domains API for cec
use generic APIs tegra_unpowergate_partition() and
tegra_powergate_partition() to unpowergate DISP power
domain needed for CEC without enabling disp clocks so
that display pll clocks are disabled in idle state even
though DISP partition is awake.

Bug 1810989

Change-Id: I37428b9012729a4458724314732f80a571057fd6
Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com>
Reviewed-on: http://git-master/r/1317241
(cherry picked from commit dffb3d3b5fb67cb6920fdbfc72cd3d6c37f0061c)
2025-07-24 10:19:13 +00:00
Chun XU
5eb6b0d864 misc: tegra_cec: add recover IOCTL
Provide error recovery from IOCTL to user space.

Bug 1866338

Change-Id: I705ada6c8d4cb13f1c882993468f467da2908fdf
Signed-off-by: Chun XU <chunx@nvidia.com>
Reviewed-on: http://git-master/r/1300499
(cherry picked from commit a646f4903c8794641432fa838a27ee5584944eb5)
2025-07-24 10:19:13 +00:00
Chun XU
5bf170a0c1 misc: tegra_cec: turn on TV ASAP
Turn on the TV as soon as possible for better user experience
by sending <Text View On> and <ACTIVE SOURCE> CEC commands if
the previous reboot is not recovery. If the previous reboot
reason is recovery, don't send <Text View On> to avoid turning
on TV when there is an auto OTA on-going.

CEC driver uses RESERVED2 logical address as the source address.
Later, the upper layer will send OneTouchPlay command by using
its valid logical address.

Bug 200253563

Change-Id: Iecd759bb50c1f21549f55906e68e3faab905f86b
Signed-off-by: Chun XU <chunx@nvidia.com>
Reviewed-on: http://git-master/r/1277092
(cherry picked from commit 2beab2dcfc4e40712004500df99633d59ae0e70c)
2025-07-24 10:19:13 +00:00
Mikko Perttunen
33ca384a75 misc: tegra-cec: Use per-chip powergate IDs
Powergate identifiers are different on Tegra210 and Tegra186,
so add per-SoC match data to use the correct value on each
SoC.

bug 200257351

Change-Id: I81b938386ab9cbaec735baac44ee74fccf39731c
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1297136
(cherry picked from commit 5438b348e036c31dcf9db0d1364fa6c6ac053428)
2025-07-24 10:19:13 +00:00
Spencer Sutterlin
d272c5fea6 misc: tegra_cec: fix cec_logical_addr_store print
Bug 1637415

Change-Id: Ib165165b67f5ea3723914270215de06df48f6591
Signed-off-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Reviewed-on: http://git-master/r/679245
(cherry picked from commit e9eef85a417a85461d0e7c018fcec2f2838254c2)
2025-07-24 10:19:13 +00:00
Chun XU
0859614c3d misc: tegra-cec: add /sys/devices/platform symlink
Create a symlink for tegra_cec if it is not under platform bus or
it has been created with different name.

Bug 200214224
Bug 200185815
Bug 1764073

Change-Id: Ib2f89db016982ca916894c37e47bbdf177fb617e
Signed-off-by: Chun XU <chunx@nvidia.com>
Reviewed-on: http://git-master/r/1175137
(cherry picked from commit 506e6370d234c4770afb22372ef1955faa7822cf)
2025-07-24 10:19:13 +00:00
Chun XU
3a1bf5d02f misc: tegra-cec: tegra_nvdisp_powergate_partition
Use tegra_nvdisp_unpowergate_partition/tegra_nvdisp_powergate_partition
in Tegra CEC driver to control DISA power domain.

Bug 200214236
Bug 200214232
Bug 200185815

Change-Id: Ib860570f901278e9211b5262fddf8c63a700c5f9
Signed-off-by: Chun XU <chunx@nvidia.com>
Reviewed-on: http://git-master/r/1176912
(cherry picked from commit 8e9f75ac1dadf04a8f89a74dac3e67cd1a06f886)
2025-07-24 10:19:13 +00:00
Ankit Pashiney
1cd95da9b1 misc: Tegra CEC Support
Bug 1258710

Change-Id: Ie449d4b8a28388087b601a0332eb065488a32009
Signed-off-by: Ankit Pashiney <apashiney@nvidia.com>
Reviewed-on: http://git-master/r/215363
(cherry picked from commit e156fdeb84a7f750b602c746489538f5b29837cd)
Reviewed-on: http://git-master/r/1164171
(cherry picked from commit 64c30ff47c90f4dbf659570e9aaeea1270b9f756)
2025-07-24 10:19:13 +00:00
Chun XU
aae6e6e3d3 misc: tegra-cec: enable DISA temporarily in init
Unpowergate DISA power domain if it is powergated during CEC driver initialization.

Bug 200175747

Change-Id: I8b3d879fe0c33eaef74c1b4d3b549559c4977e4d
Signed-off-by: Chun XU <chunx@nvidia.com>
Reviewed-on: http://git-master/r/1142593
Reviewed-on: http://git-master/r/1164149
(cherry picked from commit c341176715597fe8268b20b291bcef07bb429500)
2025-07-24 10:19:13 +00:00
Mitch Luban
d29a9f4d3c drivers: cec: add T186 support for cec
Bug 200148417

Change-Id: I4a57303097c0687c903f284504df10930924f1ae
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/840657
Reviewed-on: http://git-master/r/1164148
(cherry picked from commit be0d9f8be8a19525c2e4794d08f0932bc53128ee)
2025-07-24 10:19:13 +00:00
Xia Yang
5fe3445d16 misc: tegra-cec: Short-circuit init on suspend
Bug 1591149

Initialization of cec engine is slow.
Short-circuit the init in event of suspend.

Change-Id: Ibfbd6f36883a7bf45fdb5137120b041a52f42086
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/714423
(cherry picked from commit d5f4a6602678c87e8caa5032e43f2415c314d800)
Reviewed-on: http://git-master/r/716496
Reviewed-on: http://git-master/r/1164147
(cherry picked from commit 82a640a1ea11e850f769b78b5d0c531731b1ffd8)
2025-07-24 10:19:13 +00:00
Toby Butzon
c851db09e1 misc: tegra_cec: enable input filtering
Bug 1605426

Change-Id: I7fdfd3eee37f91f016fcbfe573d761f551560dde
Signed-off-by: Toby Butzon <tbutzon@nvidia.com>
Reviewed-on: http://git-master/r/682207
(cherry picked from commit fb8396c2f5cc02e72dae45d9421d17565b607921)
Reviewed-on: http://git-master/r/708747
(cherry picked from commit 1c18321a0e97b6fd2568b418ea353f6716b5a2e4)
2025-07-24 10:19:13 +00:00
Spencer Sutterlin
86a00ac63f misc: tegra_cec: fix sparse warning
Fix sparse warning by adding static keyword to functions

Bug 200032218

Change-Id: I0fe65173eb0295f5b981fa44f381683efe9a980b
Signed-off-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Reviewed-on: http://git-master/r/592290
Reviewed-on: http://git-master/r/1164145
(cherry picked from commit 74cfb080d07bc8e5758dfb83c4ce7507f16e4c9a)
2025-07-24 10:19:13 +00:00
Xia Yang
920e9769c6 misc: tegra_cec: add DT matching entry
Auxdata still have to be provided in of_platform_populate()
during early boot device detection to get the device correctly
named as "tegra_cec".  Failing to do so will result in device
probe failure as of_device_make_bus_id() will name the device
as "[phys_base].tegra_cec" and cause clock assignment failure.

Bug 200013561

Change-Id: Ib0f898f89146cba7f02cffb768c6a2eb558400ce
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/433871
Reviewed-on: http://git-master/r/1164144
(cherry picked from commit 43402b18ee6def21d7d55420f5acd22403e86f1d)
2025-07-24 10:19:12 +00:00
Xia Yang
bffe74f98f tegra: cec: Driver rework
Change write() to work per frame.
Change write() to return -1 on error and set up errno

write() API:
-Userspace is responsible for re-transmission.
-Read from user-space byte by byte, each byte representing
 a block, up to 16 bytes as specified by HDMI standard.
-Return 0 on success transmission, -1 otherwise, with errno
 setup as follows:
  EIO - TX_REGISTER_UNDERRUN, should not happen, otherwise
      driver is have serious timing issue.
  ECOMM - BUS arbitration failure or anomaly BUS activity.
      Transmission is abandoned.
  ECONNRESET - For broadcast message only, someone on the BUS
      asserted NAK during transmission.
  EHOSTUNREACH - For direct message only, message was not ACK'd.
      (Required by logical address allocation)
  EMSGSIZE - Message size > 16 bit.
  EFAULT - Page fault accessing message buffer.
  EINTR - call interrupted by singal.

read() API is unchanged, works per packet with no error report.

Change-Id: Iabdd92b5658dd63c7b500a7ec88d79a64c8c0a43
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/304664
(cherry picked from commit 6ab7a446c4a3e8e4970ceec5a3c715453a24e4a5)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/347779
Reviewed-on: http://git-master/r/1164143
(cherry picked from commit 67a6c2d3cfbeeca5cb5ed57aae53f34d07decd4f)
2025-07-24 10:19:12 +00:00
Ankita Garg
063d7fb0cd misc: cec: Add sysfs node to set logical addr
Sysfs node takes string of decimal representation of logical address
Logical address must be in bit-map form, e.g., "0x10" for address 4

Bug 1395893

Change-Id: I899fe80e1ebcc9957ac6efe3c4f6d07873b2a8db
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/303968
(cherry picked from commit ff2b08c0dc1d6ff3c1d7cac012cdccfa17c6399c)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346043
Reviewed-on: http://git-master/r/1164142
(cherry picked from commit 706ba72c2cb9f05450a10110d70f2462b52046d2)
2025-07-24 10:19:12 +00:00
Xia Yang
a315f05381 misc: cec: Fix bug potentially cause system hang
Remove wait_event_interruptible() from interrupt context
Change init_done to be atomic_t and reset as early as possible

Bug 1395893

Change-Id: Ib0cf423a3405293000b0c0d9aa105da5bba22e53
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/304631
(cherry picked from commit ef034436a3c8aaf7a9ce5dd9ebaf8dc90dbcce4b)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346042
Reviewed-on: http://git-master/r/1164141
(cherry picked from commit 76e681f957b27323227c9990679631636084b6ae)
2025-07-24 10:19:12 +00:00
Deepak Nibade
36917e3988 misc: cec: cancel workqueue in suspend
cancel the workqueue in suspend method before turning
  off the clock

Bug 1360341

Change-Id: I126da686a6ba0c5eec55b67df1e9f962ce16fc48
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/280159
(cherry picked from commit 7cc6da6e41c7889f7ed8da7833d293b3b884bc0e)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346041
Reviewed-on: http://git-master/r/1164140
(cherry picked from commit e57647e7daacd5a3c22016cbe3f01ddb800d702c)
2025-07-24 10:19:12 +00:00
Shridhar Rasal
263ddf4b05 misc: cec: add wait_event for CEC ops
Add wait_event to make sure that CEC functions
do not execute until CEC init completes

Bug 1283088

Change-Id: I1d26360326338f549a14cbf109a24c2935ebe472
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/232566
(cherry picked from commit 6e94e976c1e2121d81d19018b79a97d353b11d70)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346039
Reviewed-on: http://git-master/r/1164139
(cherry picked from commit 794145e9f8c16c7e36119f3652dd185cf12eb5dc)
2025-07-24 10:19:12 +00:00
Shridhar Rasal
e5c9fb04ed misc: cec: add worker handler for resume
HDMI CEC needs 1 sec delay for reset hardware in resume
Adding work handler for CEC init

Bug 1283088

Change-Id: I4498584ec93c1a5eefddfad9966cb5a1e7776e6e
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/228332
(cherry picked from commit 596245cee4b2c239843c2f920d83c21721af2ffb)
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/346038
Reviewed-on: http://git-master/r/1164138
(cherry picked from commit f62afdb0cb72a087442db6ed450b52925d20f9b6)
2025-07-24 10:19:12 +00:00
Ankita Garg
3df8f3cbbd misc: tegra-cec: Updates for T124
In T124, the RX_REGISTER_FULL interrupt is cleared
by reading the RX_REGISTER instead of writing to the
INT_STAT register as before.

Bug 1364229

Change-Id: Ib080a48910304553b0752a3ede55ab0d7653dd77
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/275982
Reviewed-on: http://git-master/r/1164137
(cherry picked from commit b890e7f50d3d032fc3ede4c4935fdf2c4501f063)
2025-07-24 10:19:12 +00:00
Benjamin Lu
e915b41b5b misc: cec: fix warnings
tegra_cec.c: fix warnings as compilation fails after enabling warning as
errors flag

Bug 1258710

Change-Id: Iecd3051d482f5a7488c9f95f6124ad39371f0bd9
Signed-off-by: Benjamin Lu <benjaminl@nvidia.com>
Reviewed-on: http://git-master/r/1164136
(cherry picked from commit 8112e3cd46d11eca51e95cc2fed66d2f7946553a)
2025-07-24 10:19:12 +00:00
Ankit Pashiney
d4553bafd5 misc: tegra-cec: Initial CEC Driver for T3x platform
READ API:
	read API ignores count and will always return 16 bit data.
	read API expects user to supply it with min of 16 bits data
	it returns CEC packet in following format
	bit 0-7: data
	bit 8: EOM
	bit 9: ACK

WRITE API:
	write API ignores count and will always accept 32 bit data.
	write API expects user to supply it with min of 32 bits data
	it accepts CEC packet supllied in following format
	bit 0-7: data
	bit 8: EOM
	bit 12: Address mode, 0 = Direct, 1 = Broadcast
	bit 16: Generate Start bit, 0 = Disable, 1 = Enable
	bit 17: Retry frame, 0 = Disable, 1 = Enable

	Logical address is set to 4, as of now there is no mechanism to change this
	address from userspace.

Driver is disabled by default in Kconfig

Bug 200198493

Change-Id: Ia3835cec0bb717e63dabca5c5fcb1236847bf492
Reviewed-on: http://git-master/r/1164135
(cherry picked from commit 955ec819872e66c4732b38cd74c7ff3a302d95f2)
Signed-off-by: Chun XU <chunx@nvidia.com>
2025-07-24 10:19:12 +00:00
Nagaraj P N
9db0daab99 hv-vse: update err handling function
update err handling function to return -EINVAL in case of
unrecognized error code.

Bug 5015473

Change-Id: I0aa07721541bf59cb4e8cd8554e545196251e38f
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273654
(cherry picked from commit 3ac33a52485efc09054815b6824f43930de5c900)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3276070
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:12 +00:00
Shubhi Garg
fc807ba71e Revert "rtc: fix year calculation in max77851 pmic rtc"
This reverts commit b60b757d9c.

Reason for revert:
rtc_valid_tm api checks year range if it is > 70. While
max77851 RTC_YEAR register provides range from 0 to 199,
add +100 always to fall under valid range.

This fixes rtc read time issue from sysfs.
root@jetson:/home/nvidia# cat /sys/class/rtc/rtc1/time
cat: /sys/class/rtc/rtc1/time: Invalid argument

Bug 4911320

Change-Id: I70b5495bb11f9b0b6dd80e19e626ccdb8d3ac6f6
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3273546
Reviewed-by: Evan Wei <evwei@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:12 +00:00
Srishti Goel
eeb5d6e7a2 pci: epf: Correct deviceid in DMA test app
Correct device ID in the DMA test app to 0x22D7

Bug 4938994

Change-Id: Ibf8d5bc0a7bc6cc299fd92daa8fcc1bb4e2e116d
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3275919
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:12 +00:00
Srishti Goel
c7ac599207 misc: Corrected PCIe DMA test app deviceid
Corrected DMA test app deviceid to 0x22D7 and 0x229B

Bug 4938994

Change-Id: I080e7b452e8e3928d87c762855926f11c985e76c
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3275918
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:12 +00:00
Rakibul Hassan
6087c01f5d nvidia-oot: camera: isp: track stats syncpt
This change corrects the logic for tracking stats syncpoint
threshold.

In UMD, IspNg sets flag stats_aidx_flag per stats block enabled.
In RCE, this is copied over to the task descriptor as
stats_action_mask.
In Falcon, this mask is used to determine how many times the
stats syncpoint shall be incremented.

This change fixes the logic in isp_capture_request to have the
threshold be based on the same flag from IspNg, by reading it
from the program buffer.

Bug 4990722

Change-Id: I8991a2282e522d4e611e877b6be115dab27ebb63
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3265594
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
2025-07-24 10:19:12 +00:00
Manikanta Maddireddy
1f56aa1d73 PCI: tegra264: Add IO BAR support
PCI supports IO BAR with 32-bit address, however XAL HW module provide
a way to use 64-bit MMIO address as a CPU address and a 32-bit PCI
address for IO BAR. Program 64-bit MMIO address in XAL registers,
when sending the TLP over the bus, XAL truncates it to 32-bit address.

Bug 4883004

Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Change-Id: Idf2fdfa9d345ae7d0630d4ab9b1074422a9f68f4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3256977
Reviewed-by: Ankit Patel (SW-TEGRA) <anpatel@nvidia.com>
Tested-by: Ankit Patel (SW-TEGRA) <anpatel@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Rakibul Hassan
300d4852fb nvidia-oot: camera: vi: pass va of allocated desc
Bug 5014165

Change-Id: I25b967efa560cc648db378d752f33afb2ba167ca
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3272844
Tested-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Nithin Varghese <nvarghese@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:12 +00:00
amitabhd
8e20f0d104 host1x_emu: Fix Host1x_EMU devnode permission
Set R/W permission for group and others.

Bug 5019709

Change-Id: Ia007623c891a10669ba92ab4de1d50a1d4f7ce9f
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3271151
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leslin Varghese <lvarghese@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Mohit Ingale
f6ea9a46d2 tegra: fsync: Fix fsync driver for thor
we can't use just one edge register for active and inactive
edge, with 1ns tsc clock width and only 28 bits for edge offset
register, we need to split the active tsc ticks between 2 edge
registers.

Jira CAMERASW-30089

Change-Id: I290b2c131ead9e89832445b0a4ee35e9f48e27c5
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270199
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2025-07-24 10:19:12 +00:00
Mark Mendez
a2ee9f655f PCT: Create devicetree validation schema
This is the output of the automated scripts created
to parse the dtb and dts files congruently

Jira ESDP-27666

Change-Id: Ic82a3f813bcbe6e78ba5f9b68875293c5d4bc6d7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3274878
Tested-by: Mark Mendez <mmendez@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:12 +00:00
Evgeny Kornev
c4d1462fd6 tracing: Fix ftrace for ISP trace events
Fix ISP trace events due to 64 bit TS cahnges

Jira CAMERASW-30345

Change-Id: I33aa9325603ec939979e11964224bf3f113a0adb
Signed-off-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3266979
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
2025-07-24 10:19:12 +00:00
snchen
05549d41ff camera: add SBGGR12 color format
Add SBGGR12 color format to support bayer bggr12

bug 4575548

Change-Id: Ic59b6bc33e67da7f94e2a6805a18971423036e74
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173804
(cherry picked from commit f2d3ec994c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196011
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Dane Liu <danel@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:12 +00:00
chandra
9dc7f5a20f nvscic2c-pcie: Fix MISRA rule 10.3 violations
Fix total 62 violations of rule 10.3

JIRA NVIPC-3121

Change-Id: I1eae97bdbd8e1b41363469a42c66c23e8899603f
Signed-off-by: cyeddu <cyeddu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3250504
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
chandra
414c0b4cf7 nvscic2c-pcie: Fix MISRA rule 10.4 violations
Fix total 65 violations of rule 10.4

JIRA NVIPC-3121

Change-Id: I5a1bead886683cbe3ec4b0e68531ee6e2a149175
Signed-off-by: cyeddu <cyeddu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246908
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
283315b000 DCE-KMD: Rename dce-os-device.h
- Rename dce-os-device to dce-linux-device

- dce-os-device.h header is specific to OS and is only intended
  to be internally used within OS. Similarly all it's exposed
  functions are OS specific only.

- Therefore instead of having a common name for all OSs for this
  header file, make this header internal by including linux
  name to it's naming convention.

- Similary rename dce_os_device struct to dce_linux_device and
  also rename corresponding functions from this header.

JIRA TDS-16126

Change-Id: I74e2deb17f49065d242bd80d50c5a849b3dfa3a1
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3256403
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
71f130a999 DCE-KMD: Address admin buffer sync access issue
- I2b8a24f9044bc08e10e5ff8cbf0c3f51fa53ff53 change introduced
  an issue of concurrent accesses of admin message buffer
  by different admin channel clients.

- This change will fix this issue by adding set of buffers per admin
  channel client.

- When a admin channel client wants to use a buffer it will
  have to request using it's client ID.
  Buffer will be granted only if at least one buffer for that client
  is not in use.

- Admin channel clients must release the buffer once done with the
  usage so that it's available for other accesses by the same client.

- Do we need a mutex to protect this array?
    1) There's no issue if different clients are trying to get/put
       buffers concurrently since each query will operate on
       separate per client array.
    2) We've an assumption that none of the clients will be active
       during init. This is also documented as part of function
       documentation.
    3) Will we ever have a usecase where a same client does
       get/put concurrently?
    4) Is it possible for a client to be active during de-init?

- If answer to 3 or 4 is yes then we still need a mutex to protect
  the buffers.
    - Currently we've assumed that there woudn't be concurrent
      operations during init/deinit and on same client so
      we're not introducing any mutex.

JIRA TDS-16126

Change-Id: I2ab640dc7c8ee6dedc9179dbb726368c3cb7d65f
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3249307
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
0becc78306 DCE-KMD: Add helper macro to check non NULL
- This is a follow-up CL to address a comment in
  I885348a09eaac6e4362c89b59880fbd32d77d3b5

- This change will add a  helper macro, DCE_WARN_ON_NOT_NULL(x),
  to print a warning message if the input param is not NULL.
    - Added to dce.h

JIRA TDS-16126

Change-Id: I9b2c4ea89fa1682d18c20f68b14ab7696917f261
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251828
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
46895eb9cd DCE-KMD: Make certain util functions static
- This is a follow-up CL to address comment from
  I42bfe95aa81823dc077ae0964eb6288a1f25fc17

- Certain utils functions are used in single files so make
  them static and move to files in which they are used.

- Rename these from dce_os*() to dce_().

- Delete dce_get_fw_phy_addr() as it's unused.

JIRA TDS-16126

Change-Id: I6049ae1d381ac9c18acbcd3b2584d4d8ab3f2dc0
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248435
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
7813dddaff DCE-KMD: FSM: Rename init/deinit functions
- This is a follow-up CL to address comments for
  I19e10bb890a4ab6d011df4380ab3a6d5fe92c696

- Rename init/deinit functions to indicate that they are not
  thread safe.

- Also add this note to function documentations.

JIRA TDS-16126

Change-Id: Ic9d1e19a28ef940cb7fbcdc9c923fb61446e0463
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248426
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
48cb79c312 DCE-KMD: Rename dce-worker.c/.h
- dce-worker.c has os specific implementations.

- Therefore rename it to dce-os-worker.c/.h.

- Also rename functions accordingly.

JIRA TDS-16126

Change-Id: I8e1301659c65cca7c3735f4af1f1a7039409cbbe
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233180
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
7970c223dc DCE-KMD: OS abstraction renaming
- Rename following functions from dce-os-utils.c from
  dce_*() to dce_os_*()
    dce_get_phys_stream_id
    dce_get_dce_stream_id
    dce_get_fw_vm_index
    dce_get_fw_carveout_id
    dce_is_physical_id_valid
    dce_get_fw_dce_addr
    dce_get_fw_phy_addr
    dce_get_fw_name
    dce_thread*
    dce_ipc_init_region_info
    dce_ipc_de_init_region_info

- Move include/dce-thread.h to
  os/linux/include/dce-os-thread.h

JIRA TDS-16126

Change-Id: I42bfe95aa81823dc077ae0964eb6288a1f25fc17
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233170
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
cd31698771 DCE-KMD: dce-ipc.c: Abstract out iosys
- Abstract out iosys_* dependencies for writing/reading to/from
  message header and memcpy to os specific implementation.
    - Add new dce-os-ipc.c

- Cannot add these functions to existing 'dce-os-ivc.h' as
  static inline functions because these functions access
  dce_ipc_channel defined in dce_ipc.h.
    - Cannot include dce_ipc.h to this file as it creates
      a circular dependency.

- Also fix exsisting issue of not defining 'tegra_dce' inside
  dce-ipc.h
    - This is exposed now because we're including dce-ipc.h to
      dce-os-ipc.c which doesn't include any prior headers which
      define tegra_dce.
    - Fix by doing forward define to avoid circular dependency
      with dce.h

- Additionally fix below iosys issues:
1) Change Iabebef33719c38a8aa4db8573a0dd7dd7e5f83f6 introduced
   an issue because NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP demands
   different prototypes for below functions:
     - dce_os_ivc_get_next_write_frame()
     - dce_os_ivc_get_next_read_frame()

2) Now since dce_ipc_is_data_available() uses
   dce_os_ivc_get_next_read_frame(), it needs to define
   frame with iosys_map for IOSYS Linux 6.2 usecase. So need
   to creata a OS abstraction for this too.

JIRA TDS-16126

Change-Id: I55594d8e34c3b572129119d1f7240cde76cf37bd
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233117
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
7b46601f2e DCE-KMD: Update DCE OS abstraction - Part 7
Module covered: dce-trace

This is not a functional change. It does the following:
1) Add new os/linux/include/dce-os-trace.h to abstract
   trace event functionality. Define static inline
   wrappers dce_os_trace_*() to corresponding existing
   trace_*() functions.

2) Remove intermediate os header os/include/os-dce-events.h
   and replace all includes directly with <dce-os-trace.h>`

JIRA TDS-16126

Change-Id: I800be4a2b9b51214af4c2531e34dbdd41caccaea
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3229379
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
c0e60a639a DCE-KMD: Update DCE OS abstraction - Part 6
Module covered: dce-workqueue

This is not a functional change. It does the following:
1) Move include/dce-workqueue.h to
   os/linux/include/dce-os-work.h

2) s/dce_work/dce_os_work/g

3) s/dce_init_work/dce_os_work_init/g

4) s/dce_schedule_work/dce_os_work_schedule/g

5) Remove intermediate os header os/include/os-dce-workqueue.h
   and replace all includes directly with <dce-os-work.h>

JIRA TDS-16126

Change-Id: I4d88cf68a187a061fd0c8c084ea074fb9e74d315
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228552
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
9f31ca7c42 DCE-KMD: Update DCE OS abstraction - Part 5
Modules covered in this CL: dce-os-ivc

This is not a functional CL. It does the following:
1) Move os/include/linux-kmd/os-ivc.h to
   os/linux/include/dce-os-ivc.h

2) s/os_ivc/dce_os_ivc/g

3) Delete old intermediate header os/include/os-ivc.h and include
   <dce-os-ivc.h> directly.

JIRA TDS-16126

Change-Id: Ib6264a39910dbb4a107fd2261005c5e593b4b9b7
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228545
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
562347a94e DCE-KMD: Update DCE OS abstraction - Part 4
Module covered in this CL: dce-cond

This is not a functional CL. It does the following.
1) Move os/include/linux-kmd/os-cond.h to
   os/linux/include/dce-os-cond.h

2) s/dce_cond/dce_os_cond/g

3) s/DCE_COND/DCE_OS_COND/g

4) Delete intermediate include os/include/os-cond.h and replace
   all includes with <dce-os-cond.h>

JIRA TDS-16126

Change-Id: Ib4f3cbe5402b2abe114be89f36e25a6fe47e8b13
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228543
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
ff65048da5 DCE-KMD: Update DCE OS abstraction - Part 3
Modules covered in this CL: dce-lock

This is not a function CL. It does the following:
1) Move dce-lock.h to os/linux/include/dce-os-lock.h
2) s/dce_mutex/dce_os_mutex/g
3) Remove intermediate includes previously introduced:
    a) Delete os/include/os-lock.h

JIRA TDS-16126

Change-Id: I994bcbf75ec87461c0dc2714b300d0ad1e3ee018
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228541
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
ea36afee6c DCE-KMD: Update OS abstraction - Part 2
Modules covered in this CL:
1) dce-os-log

This is not a functional CL. It does the following:
1) Rename dce_<info/err/debug/warn> to
   dce_os_<info/err/debug/warn>

2) Rename dce_log_msg() to dce_os_log_msg()

3) Rename DCE_<WARNING/ERROR/INFO/DEBUG> to
   DCE_OS_<WARNING/ERROR/INFO/DEBUG>

4) Move dce-log.h to os/linux/include/dce-os-log.h

5) Stop using old abstraction:
    a) Replace <os-dce-log.h> includes with <dce-os-log.h>

6) Delete all related old deprecated log files:
    a) os/include/linux-kmd/os-dce-log.h
    b) os/include/os-dce-log.h

JIRA TDS-16126

Change-Id: I75ebe98a785c298678d80371184efae6e46932ee
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228536
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
2f1230b256 DCE-KMD: Update DCE OS abstraction - Part 1
- We will keep single abstraction layer for linux.
    - File: dce-os-*
    - Fn: dce_os_*()

Modules covered in this CL:
1) dce-os-types
2) dce-os-atomic
3) dce-os-utils
4) dce-os-device
    - This is renamed to dce-linux-device in
      I74e2deb17f49065d242bd80d50c5a849b3dfa3a1

JIRA TDS-16126

Change-Id: I2d5eb45da4f245c1491645b27e2be9141bc038df
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228474
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
7726f604ca DCE-KMD: Revert "DCE-KMD: Add define for USE(x)"
- Revert commit to add USE() define as we've removed all
  usages by adding meningful checks instead.

This reverts commit 4c584ae1dbfd0516178a3fa9227ec6ded40363c8.

JIRA TDS-16126

Change-Id: Ic22ca046a036e8c9883d2857a8de325ee1874980
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232193
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
302458450a DCE-KMD: pm.c: Remove USE() usage
- We're using USE() to forcefully use a parameter to avoid
  compilation errors in HVRTOS.

- Add a validity check instead to such parameters. This will
  resolve unused varaiable errors as well as add meaningful
  checks, instead of forcefully using params.

JIRA TDS-16126

Change-Id: I4bad1b8fff8ebabc9eb3bd6edfe7cf1f1549e7ef
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225292
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
90a02e9ca3 DCE-KMD: fsm.c: Remove USE() usage
- We're using USE() to forcefully use a parameter to avoid
  compilation errors in HVRTOS.

- Add a validity check instead to such parameters. This will
  resolve unused varaiable errors as well as add meaningful
  checks, instead of forcefully using params.

JIRA TDS-16126

Change-Id: I672dc9bf6ebcf31ae76ff4ed17bc3c246838c124
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225283
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
b5e4092538 DCE-KMD: bootstrap.c: Remove USE() usage
- We're using USE() to forcefully use a parameter to avoid
  compilation errors in HVRTOS.

- Add a validity check instead to such parameters. This will
  resolve unused varaiable errors as well as add meaningful
  checks, instead of forcefully using params.

JIRA TDS-16126

Change-Id: I885348a09eaac6e4362c89b59880fbd32d77d3b5
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225254
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
7f0ed24743 DCE-KMD: Add check for params arg in dce_admin...
- Add check for params arg in dce_admin_handle_ipc_received_event().

- dce_admin_handle_ipc_received_event() is a one of the FSM event
  functions which shares common FSM event function prototype:
    int (*fsm_event_handle)(struct tegra_dce *d, void *params);

- But dce_admin_handle_ipc_received_event() implementation doesn't
  need 'params' argument and therefore callers are expected to
  pass NULL.

- This change will add a check inside this function to check
  if the params are NULL and print a warning message otherwise.

JIRA TDS-16126

Change-Id: I70b73d195d866b7b6bb43b5430dccfb0bc3cb486
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225248
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
f03b71480a DCE-KMD: Add new DCE OS interface: types.h
- This change will add new DCE OS interface for types.h.

- This DCE OS interface layer will act as entry point to OS layer
  from core DCE-KMD code.

- The intended usage is as follows.
    - DCE-KMD core will include respective OS header file from
      DCE OS interface.
        Eg. In dce-fsm.c
            #include <dce-os-types.h>
    - DCE OS interface will further include OS specific files
        Eg. In dce-os-types.h
            #include <os-types.h>
    - OS specific files will reside in respective OS specific paths.
        Eg. for Linux the path will be
            kernel/nvidia-oot/../dce/os/include/linux/os-types.h
        For HVRTOS the path will be
            display/server/os/include/hvrtos/os-types.h
    - The OS specific paths will be directly included in respective
      OS makefiles during compilation so that we don't need to use
      ifdefs within DCE OS interface layer.

- This is first change to follow this convention for types.h.
  We will have follow-up CLs to follow this suite for all other
  OS dependencies for DCE-KMD.

JIRA TDS-16126

Change-Id: Ied7bee6eac5de9134b973e74020df200707afa10
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3224052
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
d9528502bc DCE-KMD: Remove dce.h include from dce-pm.h
- Remove dce.h include from dce-pm.h to resolve circular
  dependency betweeen dce.h and dce-pm.h

- This is an existing circular dependency but has floated
  up now due to some re-org in DCE-KMD code.

JIRA TDS-16052

Change-Id: I046743cf70f344d87500e7f9d595f8cfe2379446
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192713
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
644c60d35c DCE-KMD: Refactor dce_work_cond_sw_resource_init()
- Move resource init specific to PM and bootstrap modules
  to respective PM and bootstrap init functions.

- Motivation here is 2 fold:
    1) To keep common code common across OSs.
    2) Move resource init to respective sub-modules.
        - We will have separate PM module for HVRTOS.
        - We will have separate dce-worker module for HVRTOS.

JIRA TDS-16052

Change-Id: I40f6943eb4173a0da7201dc58afb19aee2a0d04e
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3190873
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
06db88ae67 DCE-KMD: dce-worker.h - Remove dce-thread.h ref
- Remove un-neessary/un-used dce-thread.h inlcude from
  dce-worker.h.

JIRA TDS-16052

Change-Id: I13a465a63226db7a3d378ed5945264a84cf3381b
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3189332
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
484423c54b DCE-KMD: Use os abstraction for events.
- Start using os abstraction for dce-events.

JIRA TDS-16052

Change-Id: I538d6c6748bf09135e7c3bffc607dc9b8571c0ab
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188480
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
57991f0020 DCE-KMD: Use os abstraction for IVC comm
- Use OS abstraction for IVC commmunication calls.

- Also remove un-necessary mutex lock/unlock calls during init
  as they are not supported on HVRTOS.
    - Accordingly rename
        dce_ipc_channel_init() -> dce_ipc_channel_init_unlocked()
        dce_ipc_channel_deinit() -> dce_ipc_channel_deinit_unlocked()

JIRA TDS-16052

Change-Id: Ia7b062486f0920672c62fb5753ad3d73488f9bde
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180404
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
1b6b1c620b DCE-KMD: Move IPC region alloc/free calls to OS
- Move IPC region alloc/free calls to OS layer because
  they mean different for different OSs.

- For Linux it will allocate/dma map memory for IVC comm.

- For HVRTOS it will simply fetch pre-allocated memory details
  since the memory allocation is only allowed in hypervisor module.

- Accordingly, rename the API dce_ipc_allocate_region() ->
  dce_ipc_init_region_info(). Similarly for free as well.

JIRA TDS-16052

Change-Id: I201cb5b1bc7384a9b0ccdbf5bc72bbd78d6b1506
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180405
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
f5d25922eb DCE-KMD: admin: Allocate msg buffer at init time
- Reserve message buffer for DCE admin channel at init time
  since dynamic memory allocations are restricted on HVRTOS.
    - Free this during channel deinit.

- Use this reserved message buffer at all other callsites.

JIRA TDS-16052

Change-Id: I2b8a24f9044bc08e10e5ff8cbf0c3f51fa53ff53
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180403
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
84e1c1d01f DCE-KMD: Decouple resources init and start logic
- In DCE_KMD, dce_fsm_start() schedules start of state machine
  functionality which involves the waiting for DCE-FW boot completion,
  IPC admin setup and communication etc.

- HVRTOS restricts certain functionalities like waiting on events,
  acquiring locks, etc in initialize phase.

- Also for HVRTOS we are executing worker queue work in same
  thread context directly from where it's called from.

- For above reasons, we need to decouple SW resource allocation and
  init logic and actual execution start logic which was part of
  dce_driver_init() earlier into 2 phases:
    - dce_driver_init()
        - This will do all resource allocation/init and will be called
          during resource initialization phase.
            - Module probe for Linux
            - Initialize() context for HVRTOS.
    - dce_driver_start()
        - This will start actual DCE logic execution after all
          resources are allocated and initialized and will be executed
          separately.
            - In Linux, both will be executed from the same probe
              while in HVRTOS, the former is in process initialize
              stage and dce_driver_start is run in the
              Thread initialize stage.

JIRA TDS-16052

Change-Id: I1176d748bc705106bb0c8ca7e647713abf2d4a00
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192613
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
e9fdb45f72 DCE-KMD: FSM: Don't acquire locks during init/de..
Dont't acquire locks during init/deinit.

- FSM init/deinit is expected to be called during init/deinit phase
  when everything else and FSM itself is inactive.

- FSM mutex is just initialized/deinit in the same functions where
  we're trying to acquire lock/release.
    - While it is techically ok in general but not requried.
    - Also HVRTOS restriction prevents to acquire mutexes in
      initialization phase.
        - Deinit can be called in Initization context to deinit
          if init fails.

JIRA TDS-16052

Change-Id: I19e10bb890a4ab6d011df4380ab3a6d5fe92c696
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3178697
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
4a304392dd DCE-KMD: Fix un-used params errors
- Force use unused parameters in commmon DCE-KMD
  codebase to fix unused parameters errors on HVRTOS.

JIRA TDS-16052

Change-Id: Id58c87d27a248d7ad3d6ee58f51dd869e6623c32
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173706
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
cac31260fe DCE-KMD: Add define for USE(x)
- Add define for USE(x) for Linux. It's required to resolve
  warnings for unused variables across DCE-KMD codebase.
  For HVRTOS such warnings are treated as errors so this is
  a must.

- For HVRTOS the define comes from os_port.h

- USE(x) is removed in Ic22ca046a036e8c9883d2857a8de325ee1874980
  after replacing the USE(x) usages with appropriate checks.

JIRA TDS-16052

Change-Id: Icb2c14036a4194bcff89ede3a5f500f71568a2a7
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188577
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
66b010a691 DCE-KMD: Use OS abstraction for work queue
- Start using OS abstraction for work queue.

JIRA TDS-16052

Change-Id: Ic8fa7b5aa38e92be1fd6dc1ddb07be4ecf7bad68
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188432
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
6aed7136dd DCE-KMD: Decouple dce-thread.h from dce.h
- dce-thread.h only used in dce-util-common.c so move it from
  dce.h to dce-util-common.c

- The dce_thread*() APIs in dce-util-common.c are unused.

- This change is required to avoid creating these unused APIs
  for other OSs like HVRTOS.

JIRA TDS-16052

Change-Id: I67e5e7201671aa6ddc07bfb4a869c825fb53e6c5
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172731
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
aec0d24ecd DCE-KMD: Use OS abstraction for condition vars
- Use OS abstraction added to display/drivers/server
  for OS condition variables support.

JIRA TDS-16052

Change-Id: If4ae2698308f1a037e5e0d6ec0c9724695a008d3
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172718
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
59ead11048 DCE-KMD: Use OS abstraction for locking
- Use OS abstraction added to display/drivers/server
  for OS locking support.

JIRA TDS-16052

Change-Id: I3678458e8cf62a29cc313c4b3abae38188eb0fa6
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172702
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
4a07fca949 DCE-KMD: Use OS abstraction for logging
- Use OS abstraction added to display/drivers/server
  for OS logging support.

JIRA TDS-16052

Change-Id: I73f36f1c50b52f5323496bb6dc180b1bd8ddabe3
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172655
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
0dfd61c0e7 DCE-KMD: Use OS abstraction for dce_device
- Use OS abstraction added to display/drivers/server
  for dce_device.

JIRA TDS-16052

Change-Id: I2339ad423ad38e8c3ba0f3205d80f172a4d0abe9
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172565
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
8f1271978c DCE-KMD: Use OS abstraction of utils
- Start using OS abstraction for all utility functions.

JIRA TDS-16052

Change-Id: Ic1e0f059194e15ff7dff0fa97997bd0d69dfc58c
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172545
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
50d6a0cb32 DCE-KMD: Use OS abstraction for atomic operations
- Replace linux specific implementation with OS absraction
  added to display/drivers

JIRA TDS-16052

Change-Id: I089dd75954cb8cfa533a697dddc2ae9c501c26a0
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171169
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
8533f2be4a DCE-KMD: Use OS abstraction for types.h
- DCE-KMD code is only compiled on Linux Kernel today. So it has
  some linux specific dependencies.

- We will be compiling the same code for new DispalySerer HVRTOS
  process. To support this we will need to abstract out OS
  specific dependencies from DCE-KMD.

- Common OS abstraction code will be developed under display/drivers/
  server/ repo.

- DCE-KMD will start using that os abtsaction and this is the first
  CL towards that effort.

JIRA TDS-16052

Change-Id: I51fba684ac285139225a2999338e73c724d9d499
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3167249
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
2025-07-24 10:19:12 +00:00
anupamg
d8cf86fa95 DCE-KMD: Add OS abstraction
- Add OS abstraction for DCE-KMD driver as it will be used
  for Linux as well as HVRTOS.

- The original OS abstraction headers are maintined under
  display/drivers repo (display/drivers/server/os/include/).
    - From that copy, only linux-kmd relevant headers
      are mirrored here as there's no need to mirror HVRTOS
      related headers.

- But we need a copy here as we cannot include external paths
  in kernel builds.

JIRA TDS-16126

Change-Id: Iabebef33719c38a8aa4db8573a0dd7dd7e5f83f6
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3194862
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Shiqi Jiao
821e55ab50 kenel nvidia-oot: Fix Static Analysis issues
Jira CAMERASW-29896

Change-Id: Ibe6a81a0ef0e7226acd78a8b42e8ccc05545bed3
Signed-off-by: Shiqi Jiao <shiqij@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261568
Reviewed-by: Ryan Li <ryanli@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:12 +00:00
Jon Hunter
9cdba26d40 media: camera: Fix build for Linux v6.8+
In Linux v6.8, the 'g_frame_interval' and 's_frame_interval' function
pointers were removed from the 'v4l2_subdev_video_ops' structure and
replaced by 'get_frame_interval' and 'set_frame_interval' that were
added to the 'v4l2_subdev_pad_ops' structure.

This change was previously fixed for the Tegra CSI driver by adding the
necessary conftest changes. A new update to the Tegra Cam V4L2 causes
the build to fail for Linux v6.8+ kernels because of the same issue. Fix
up the Tegra Cam V4L2 driver in the same way as the Tegra CSI driver,
but update the name of the conftest test to indicate that this is
applicable for both the 'get_frame_interval' and 'set_frame_interval'
function pointers.

Bug 4448428
Bug 4807063

Change-Id: Ica47f3aaece0bf81e2adc3c431056ea51b64a893
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231775
(cherry picked from commit 91416b264c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246399
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:12 +00:00
Praveen AC
073fc28ecd [t23x][camera]: Fix VIDIOC_G/S_PARM v4l2-compliance test fail.
Implemented VIDIOC_G/S_PARM ioctl calls to fix
v4l2-compliance test fail.

Bug 4807063

Change-Id: Ia03b161b5659c710976084f277064a44d10aec15
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221436
(cherry picked from commit c3b8c1cd3e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232021
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Ankur Pawar <ankurp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
rajangam
6163a70525 t264: Changes to support SMMU on OESP
1. No need to handle OESP case separately to load
values into mailbox registers.
2. OESP now supports SMMU one can use DRAM to share data.

Bug 3247553

Signed-off-by: rajangam <rajangam@nvidia.com>

Change-Id: I0463d1ccf26f173a1bea9304373cbad192e58d20
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3211209
Tested-by: Jason Li (SW-TEGRA) <jasl@nvidia.com>
Reviewed-by: David Pu <dpu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jason Li (SW-TEGRA) <jasl@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:12 +00:00
Jason Li
1440655254 psc: Add support for mutex mailbox
This change adds support for mailbox with mutex.

In OESP/SB, GP mailboxes are used. Since they are mailbox with mutex,
the driver needs to acquire mutex before using it.

Jira SEC-15577

Signed-off-by: Jason Li (SW-TEGRA) <jasl@nvidia.com>
Change-Id: I8bc95402b1a4fc7227058aded1d417cfa3e5fae6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261139
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: David Pu <dpu@nvidia.com>
2025-07-24 10:19:12 +00:00
Jon Hunter
00ab7abbb6 gpu/drm: tegra: Fix support for Linux v6.12
In Linux v6.12, commit 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to
fop_flags") moves the setting of the FMODE_UNSIGNED_OFFSET into the
various drivers and renames this flag. This change is causing various
tests to fail because opening the DRM device is failing.

Use the presence of the new FOP_UNSIGNED_OFFSET flag in the kernel to
determine if we need to set this flag in the Tegra DRM driver.

Bug 4876974

Change-Id: Ie72a9340187b1c206f0cda6d7e3dab44d603a41c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3269063
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
yangxu
e078bbbe94 kernel: nvidia-oot: Fix KMD coverity defects
Fix INT30-C, ARR30-C, EXP34-C, and MEM30-C coverity defects for channel.c

Jira CAMERASW-29897

Change-Id: I0ae0ee26273455b6e5a80a0ea5099e648dbc4097
Signed-off-by: yangxu <yangxu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3265973
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Xiaoming Xiang <xxiang@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:12 +00:00
Thierry Reding
1cd89f4693 gpu: host1x: Set up device DMA parameters
In order to store device DMA parameters, the DMA framework depends on
the device's dma_parms field to point at a valid memory location. Add
backing storage for this in struct host1x_memory_context and point to
it.

Reported-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240916133320.368620-1-thierry.reding@gmail.com
(cherry picked from commit b4ad4ef374d66cc8df3188bb1ddb65bce5fc9e50)

Bug 4876974

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I0a7f9c9f49a5e4580193d5814ff4a6a15f8014c8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3268196
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Mikko Perttunen
c0d1bdc684 gpu: host1x: Return error when context device not attached to IOMMU
If a context device was not attached to IOMMU, we kept the old
success err value causing context devices to be unregistered but
success to be returned. This would mean that things would go on
but with context isolation disabled.

To decide on an explicit behavior, let's return an error code
here instead. If someone wants to go without IOMMU on a platform
modern enough to support context isolation, they can remove the
context devices from device tree.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230413082202.114721-2-cyndis@kapsi.fi
(cherry picked from commit b02e6e040af7fa7fd59b0eb71d927dbc149bc20d)

Bug 4876974

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I09ce70f416e56a1a39ce31fb2485e6d28b568230
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270635
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Yang Yingliang
545c57385f gpu: host1x: Fix memory leak of device names
The device names allocated by dev_set_name() need be freed
before module unloading, but they can not be freed because
the kobject's refcount which was set in device_initialize()
has not be decreased to 0.

As comment of device_add() says, if it fails, use only
put_device() drop the refcount, then the name will be
freed in kobejct_cleanup().

device_del() and put_device() can be replaced with
device_unregister(), so call it to unregister the added
successfully devices, and just call put_device() to the
not added device.

Add a release() function to device to avoid null release()
function WARNING in device_release(), it's empty, because
the context devices are freed together in
host1x_memory_context_list_free().

Fixes: 8aa5bcb61612 ("gpu: host1x: Add context device management code")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
(cherry picked from commit 55879dad0f3ae8468444b42f785ad79eac05fe5b)

Bug 4876974

Change-Id: I6d9419f429f34022519db428b6a12c361f901c14
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3268195
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Jon Hunter
bce8ac3556 nvmap: Fix build for Linux v6.13
In Linux v6.13, commit b129125e1f96 ("arm64: asm-offsets: remove
DMA_{TO,FROM}_DEVICE") removes the definitions DMA_TO/FROM_DEVICE from
the assembly header file 'asm-offsets.h' which is used by the functions
__dma_map_area() and __dma_unmap_area() in nvmap_cache_maint.S.

From reviewing the NVMAP code, the function __dma_unmap_area() is never
used and so we can simply remove this. Split the __dma_map_area() into
two functions __dma_map_area_to_device() and
__dma_map_area_from_device() to avoid having to pass the direction.

Bug 4991895

Change-Id: I4a0f658401beff5c5e5457de72050b21acf820fa
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261710
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:12 +00:00
Junsheng Chen
58779763a1 linux: kmd: static analysis S11/27 part 4
Under the following path:
- nvidia-oot/drivers/media/platform/tegra/camera/tegracam_ctrls.c

Jira CAMERASW-29893

Change-Id: I3a8a8177e49228cedc1359a7fe395ba379500614
Signed-off-by: Junsheng Chen <junshengc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264225
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Bhushan Rayrikar
27aee01b20 cam-fsync: change method to get TSC ticks
Change the source of TSC ticks from MTSC to CNTPCT.
MTSC values drift away from TSC values over time.

Bug 4968802

Signed-off-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Change-Id: I02a7fd92d7c751ff7268430c5ad61b4ddd5b4576
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3257831
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Laszlo Weber <lweber@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261378
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
2025-07-24 10:19:12 +00:00
Mikko Perttunen
18a165f104 gpu: host1x: When out of memory contexts, wait for free context
Instead of immediately returning an error when trying to allocate
a context device and none are free, log a warning and stall the
submit until a usable context becomes available.

Bug 4712458

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I964c906e94a8624ded04a5f3851f8c3dbbe76d8b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227684
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Satvik Raj Gupta
4b785c2e35 Revert "video: tegra: nvmap: Fix INT30-C overflow defects"
This reverts commit 537bcc28c6cc97586028a72c1555d7b70b6ed21b.

Reason for revert: Bug 5017529

Signed-off-by: Satvik Raj Gupta <satvikrajg@nvidia.com>
Change-Id: I7350199fe8d3929139ad3d88975ff65285363af7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270140
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:12 +00:00
Deepak Badgaiyan
d1f2b6a051 nvscic2c: Add Thor support
Configure BAR and MSI for Thor.

Add checks for chip id for chip specific code
between Orin and Thor.

Separate Stream ID's are assigned to upstream and downstream
struct device in Rootport client driver.
While accessing Rootport local memory upstream Stream ID should be used.
While accessing memories over BAR downstream Stream ID should be used.

Jira NVIPC-2877
Jira NVIPC-2484

Change-Id: I67df4b78e57b6de36f9bfaf966978f7ee875d596
Signed-off-by: Deepak Badgaiyan <dbadgaiyan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226748
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
Reviewed-by: Sivagamy Govindasamy <sivagamyg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
77d5f0295e video: tegra: nvmap: Fix INT30-C overflow defect
Add check for subtraction overflow using BUG_ON.

JIRA: TMM-5724
Bug 4479044

Change-Id: If4b63979c207d6246ea4c8a3fffa5f89032956ba
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3268715
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
13e35c27dd drm/tegra: Backport fbdev updates
The following upstream commits have been back-ported to the out-of-tree
Tegra DRM driver to align with upstream to help pull in the latest
updates from upstream.

Changes from Linux v6.2:
 7ad4384d53c6 drm/tegra: Add missing clk_disable_unprepare() in
              tegra_dc_probe()

Changes from Linux v6.3:
 3fb1f62f80a1 drm/fb-helper: Remove drm_fb_helper_unprepare() from
              drm_fb_helper_fini()

Changes from Linux v6.4:
 71ec16f45ef8 drm/tegra: Implement fbdev emulation as in-kernel client
 25dda38e0b07 drm/tegra: Initialize fbdev DRM client
 1ac45068af9d drm/tegra: Hide fbdev support behind config option
 08263e91f260 drm/tegra: Removed fb from struct tegra_fbdev
 434434608a91 drm/tegra: Remove struct tegra_fbdev
 dc06f4a495df drm/tegra: Include <linux/i2c.h>
 f68b63ebc433 drm/tegra: Include <linux/of.h>
 437405403ab4 drm/tegra: rgb: Make tegra_dc_rgb_remove() return void

The changes have been back-ported to ensure that they build for all
kernel versions supported and utilise conftest as necessary to handle
kernel differences.

Bug 4876974

Change-Id: I6c8403325a7b4874f3ad1c6a0b1f662c1494c397
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267798
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
6f788dbe13 drm/tegra: Fix build for Linux v6.12
In Linux v6.12, commit 446d0f4849b1 ("drm: Remove struct
drm_mode_config_funcs.output_poll_changed") removes
'output_poll_changed' function pointer from 'drm_mode_config_funcs'
structure and commit b5757a5be2fa ("drm: Remove struct
drm_driver.lastclose") removes 'lastclose' from the 'drm_driver'
structure. This is breaking build the Tegra DRM out-of-tree driver for
Linux v6.12.

Fix this by partially back-porting commit 71ec16f45ef8 ("drm/tegra:
Implement fbdev emulation as in-kernel client") from Linux v6.4 which
removed the use of the 'output_poll_changed' and 'lastclose' function
pointers from the Tegra DRM driver. Note that it is safe to partially
back-port this for now because we don't use the frame-buffer support in
the Tegra DRM driver for Tegra234+ devices.

To keep the Tegra DRM out-of-tree driver aligned with upstream, the
remaining parts of commit '71ec16f45ef8' will be back-ported in another
change that will be part of a bigger change to align the frame-buffer
support with the upstream driver. For now just fix the build for Linux
v6.12.

Bug 4876974

Change-Id: Idc9b1c198c067ccb59f1337866154c9a8f0a5623
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3267797
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
07f3c29dbb video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow  when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I65bc1f62c40575becc64b6ec8d8b6f4718edba52
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232159
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
34af0526fd video: tegra: nvmap: Fix INT30-C overflow defect
Add check for addition overflow using BUG_ON.

JIRA: TMM-5724
Bug 4479044

Change-Id: I6f611aa2f45945ad66c3f9565f50fea97eb17611
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263949
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Illia Ragozin
1d7553347f tegra: Add v4l2loopback module
Build v4l2loopback that provides a virtual camera device.
Virtual cameras will be used to enable AI effects for use cases as
video conferencing or game streaming.

JIRA SHLD2-370

Change-Id: I822ab2c127960ec343daa7b9799d5698434f4b75
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3266248
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Illia Ragozin <iragozin@nvidia.com>
Tested-by: Illia Ragozin <iragozin@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
1697f4acfb video: tegra: nvmap: Fix INT30-C overflow defect
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I25f2f304038cd197c91c66f1f82de90bf9dfbe73
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3266601
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Jerry Chang
dd4270216a kernel: camera: add DOL support formats
add 10-bit and 12-bit DOL support formats

Bug 4962075

Change-Id: Ie631d6a079754aab6321eb485a5168e7fb3eb9a0
Signed-off-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251864
(cherry picked from commit 51f89ad89e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264243
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
8a948abd7b video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I8c66af46a68b64502fbfe754aa973bf068342003
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263286
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
amitabhd
d1d3b883df host1x_emu: Fix NvHost Interface and IOCTL
1. The nvhost interface like syncpoint offset/aperture were
taking "pdev" of Host1x device, but emulated syncpoint driver
implementd the interface with "pdev" of clinet device. This was
done to align all other interface input parameter.

This patch revert the above alignment of intput parameter change.

2. This patch modify SyncpointWait IOCTL handler to return timestamp
of signal observed by KMD to UMD

Bug 4895937

Change-Id: I61ba02992963ba272e5c2514ffe8c24fff510c3a
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226744
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
2025-07-24 10:19:11 +00:00
Santosh BS
d32b4667a5 drm/tegra: move legacy chip support under config option
- Update Makefile to build the legacy chip related
  files only when any of the below configs are set.
  CONFIG_ARCH_TEGRA_2x_SOC
  CONFIG_ARCH_TEGRA_3x_SOC
  CONFIG_ARCH_TEGRA_114_SOC
  CONFIG_ARCH_TEGRA_124_SOC
  CONFIG_ARCH_TEGRA_132_SOC
  CONFIG_ARCH_TEGRA_210_SOC
  CONFIG_ARCH_TEGRA_186_SOC
  CONFIG_ARCH_TEGRA_194_SOC

- Update drm.c/.h to build legacy chip specific
  code portions for the respective configs accordingly.

Jira HOSTX-5727

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: I3d2235923011073d82dcfe6b1fd6618ae70d37bb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253132
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Khushi
9aae5199d7 vse: allocate buffer during init 2
TSEC CMAC SV
RNG
HMAC SV
CMAC SV HW verify
GCM Enc/Dec HW verify
GMAC SV HW verify

JIRA ESSS-1495

Change-Id: I9cabee686d99d3c94d46e2a72d51151ae62e7630
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227547
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
Santosh BS
7a904d2b62 gpu: host1x: move legacy chip support under config option
- Update Makefile to build the legacy chip specific
  files according to the below configs.
  CONFIG_ARCH_TEGRA_2x_SOC
  CONFIG_ARCH_TEGRA_3x_SOC
  CONFIG_ARCH_TEGRA_114_SOC
  CONFIG_ARCH_TEGRA_124_SOC
  CONFIG_ARCH_TEGRA_132_SOC
  CONFIG_ARCH_TEGRA_210_SOC
  CONFIG_ARCH_TEGRA_186_SOC
  CONFIG_ARCH_TEGRA_194_SOC

- Update dev.c/.h to build legacy chip specific
  code portions for the respective configs.

Jira HOSTX-5727

Change-Id: I7dbd23ab1c91c859941c4965123bb60e518063fc
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263215
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:11 +00:00
Sanath Kumar Gampa
c5aa651596 kernel:nvidia-oot:Support for multiple MACSec SCs
Add support to accept multiple supplicant launch on same VF so that DUT
can have multiple MACSEC links with different ethernet peers

Pass Peer MACID to OSI such that the same is added to SCI LUT

Bug 4754899

Change-Id: Iaf56eb4d7ebc3266a0d3ceb3dbc76a1547ed608c
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237500
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
omar
fe18381161 drivers: pva: dump FW logs on error
add dump of FW logs on error to pva_abort() and
task completion/task errors.

pva_abort handles most error cases since it is
invoked to recover. task completion and error
are handled by scheduling work to dump out
the buffers.

Jira PVAAS-17237

Change-Id: Ib5f07d81b16357310ab19b11a087003b455daa66
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264720
Reviewed-by: Reshma Prabhu <rprabhu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
1f2a35edf4 video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow in nvmap_pp.c and nvmap_ioctl.c when two unsigned integers are added and return error in case of overflow condition

JIRA: TMM-5724
Bug 4479044

Change-Id: Icecbb45498672d5e55a66c60f2be59c3970bf75d
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3256309
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Ketan Patil
2727334720 video: tegra: nvmap: Do not expose sysfs nodes in embedded
NvMap page pool expose some sysfs nodes to enable/disable page pool,
change the size of page pool, shrink the page pool. There is no
need/usecase of dynamic changes in page pool size for DriveOS. Hence
disable resizing code for embedded builds. If we want to keep the sysfs
nodes then we need to have proper uid/gid support to satisfy security
analysis for DriveOS, as there are no usecases of these nodes, disable
them only for embedded builds.

JIRA TMM-5864

Change-Id: Ia7fec558402ed3aa64ee1e0d49acdc844a66c82a
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3265223
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
738812f585 tegra: nvmap: Fix CERT addition overflow defects
Add calls to check_add_overflow from overflow.h to fix CERT INT 08-C and
CERT INT 30-C defects in nvmap_handle.h.

Total Defects Fixed: 2 CERT INT 08-C and 2CERT INT 30-C

Bug 4479044

Change-Id: If41c1aefb26bae478c549be5d00245ba3cd559d2
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3264713
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
83038b634b misc: mods: Fix MODULE_IMPORT_NS for Linux v6.13
In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Update the mods_dmabuf driver as
necessary to fix this.

Bug 4991705

Change-Id: I9326e360fe8daae4c43941812301818d8b35c825
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263799
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
chandra
20c4af34ac nvscic2c-pcie: Fix Top25 CWE CERT-C violations
Fix total 13 violations of rule CERT-C EXP34-C and EXP39-C

JIRA NVIPC-3120

Change-Id: Ie96f1a93964a019645ecf38a338efa5768ca24fc
Signed-off-by: chandra <cyeddu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261129
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
chandra
e946c2cbcc nvscic2c-pcie: Fix Top25 CWE CERT-C violations
Fix total 20 violations of rule CERT-C EXP34-C

JIRA NVIPC-3120

Change-Id: I1e8940269a2859a0483215cf44170dd669f637ea
Signed-off-by: chandra <cyeddu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260920
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:11 +00:00
amitabhd
d5573ecc31 host1x_emu: Fix fence object memory leak
Set release callback function for dma_fence
object to release struct host1x_syncpt_fence.

Jira HOSTX-5546
Bug 4919054

Change-Id: I0f06fc6e4b1d1b38f56c779898fb09990364cc87
Signed-off-by: amitabhd <amitabhd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260748
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Sanif Veeras <sveeras@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Nagarjuna Kristam
276faff8d4 pci: tegra264: turn off controller when no link
When Link up fails during driver probe, controller is kept powered
on, even when controller is not configured as hot plug capable.
This results in more power consumption. Turn off controller when
no link detected during driver probe, only when controller does not
have hot-plug capability.
Ignore resume and remove AI's when no link during probe for no
hot-pluggable controllers.
Ignore Link state check for VDK, on which it cannot be detected.

Bug 4688706

Change-Id: I80a2b5845d48b07f25f65dc7cf5509aeb5778399
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246221
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
5f650ef93c video: tegra: nvmap: Fix INT30-C overflow defect
Add check for addition overflow using BUG_ON.

JIRA: TMM-5724
Bug 4479044

Change-Id: Ie22c37d163b37dc4f12d3e6eb092188263b1ab46
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263945
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
9568aaa35d tegra: nvmap: Fix SAST defects in nvmap_ioctl
Add call to check_add_overflow to fix CERT INT 30-C and INT 8-C defects.

Add boundary check for offset value to fix default coverity
TAINTED_SCALAR and MISRA 4.14 defects. Offset value is being passed on
and eventually used as a loop boundary. So, a check at the beginning is
required.

Total Defects Fixed: 4 Defects

Bug 4479044

Change-Id: Ie687c5d7d84cd3f7897d5e6e04ab90d0ed2e1619
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263923
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
9e1909d9e1 video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I5799097a3d63d0df62a9d17f022120f8051297b8
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263482
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
63d23bed16 video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I908e4cfc2f401b3e4dea7f4ddf67308b91251c22
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263469
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
16d2204183 tegra: nvmap: Fix overflow CERT C SAST defects
Fix subtraction CERT-C overflow defects using check_sub_overflow and
addition CERT-C overflow defects using check_add_overflow, in
nvmap_heap.c and nvmap_init.c files.

Fix count:
- CERT-C INT08-C: 3
- CERT-C INT32-C: 3

Bug 4479044

Change-Id: I337a4cf11f3f94e05243070e08c0b1fc2448d276
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263324
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
281c0247df video: tegra: nvmap: Fix INT30-C overflow defect
Add check for addition overflow using BUG_ON.

JIRA: TMM-5724
Bug 4479044

Change-Id: I59b5e8bd7c69069e507e58d69086c0b84301d35f
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262721
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Tested-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
caaae6b1d9 tegra: nvmap: Decrement variable with correct value to avoid wrap around
Decrement hrange->offs_start with hs[i]->size instead of tot_sz. tot_sz
holds the cumulitive sum of hs[0...i]->size and decrementing this from
hrange->offs_start will decrement values from 0..(i-1) multiple times,
which is incorrect and can cause a wrap around.

Bug 4479044

Change-Id: If6afe9f05fc0d246d42a95fa6d9708361efcc9f8
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263927
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
9ab979381c video: tegra: nvmap: Fix INT30-C overflow defects
Add check for overflow when two unsigned integers are added and return
error in case of overflow condition.

JIRA : TMM-5857
Bug 4479044

Change-Id: Iae3f401df65baa6bd08ffceed8dd8c1222cd75bc
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260308
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Rakibul Hassan
652c032bb5 nvidia-oot: camera: isp: track syncpt threshold
This change does the following:
 - Keep the capture progress syncpt threshold up to date by
   incrementing it when a capture request is made
 - Fast forward the syncpoints via host1x api on reset

Bug 4882047

Change-Id: If971bf4f248bd7a0be6a79ccb0e124f2768c0af4
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248427
(cherry picked from commit cbac4a12165c2d19f9f5889cbeffffb3b63e54d0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253387
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Rakibul Hassan
d4f85d7379 nvidia-oot: camera: vi: track syncpt threshold
This change does the following:
 - Keep the capture progress syncpt threshold up to date by
   incrementing it when a capture request is made
 - Fast forward the syncpoints via host1x api on reset

Bug 4882047

Change-Id: Ic2a677575d9ade45ae6b69de5fd49d40029f7053
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248336
(cherry picked from commit 6343864b8b7f70f1bc87f8503f28b07a3bb024bc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3240448
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Vishwaroop A
8c6e34801c drivers: virt_mtd: incorporate review comments
Incorporate review comments received on
adding sysfs nodes for exposing requested
variables.

JIRA SSV-12115
Bug 4791020

Signed-off-by: Vishwaroop A <va@nvidia.com>
Change-Id: I840338c4d051b42175757272a504ecdd05db6e2f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3190000
(cherry picked from commit dbbfdb0c48ee7609802e316402fd4b1776c36c2b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3265306
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:11 +00:00
Vishwaroop A
ba503dd9aa mtd: virt_mtd: add sysfs nodes
Add mechanism to read manufacture_id,
device_id size and ecc_info through guest vm
add the sysfs nodes to achieve this.

JIRA SSV-12115

Signed-off-by: Vishwaroop A <va@nvidia.com>
Change-Id: Ib9311c2da8c4f5ccf1efcc7aeb16026bc5159c0c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183733
(cherry picked from commit 402b93d8537cc51b56288de1dee729b30b663368)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198295
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
976ca5efb1 tegra: nvmap: Fix overflow CERT defects in nvmap_alloc.c
Fix addition overflow defects in nvmap_alloc.c by using overflow.h APIs.
Fix 4 CERT INT 08-C and 3 CERT INT 30-C defects.

Bug 4479044

Change-Id: Id4f9d8a5fd15e3ded38d31b58c8ab3693ab1707e
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262969
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
ff48ee63b1 drivers: Fix MODULE_IMPORT_NS for Linux v6.13
In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Use conftest to detect if
MODULE_IMPORT_NS takes a string literal as an argument and update the
various drivers accordingly.

Bug 4991705

Change-Id: I8f34860648965dc2334e2916d5404522510778ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263798
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
66ddf2ba6f virt: hvc_sysfs: Fix build for Linux v6.13
In Linux v6.13, commit 94a20fb9af16 ("sysfs: treewide: constify
attribute callback of bin_attribute::mmap()") changed the type of the
'struct bin_attribute' argument of the bin_attribute:mmap function
pointer to const. Use conftest to detect if this argument is const or
not in the kernel the driver is being compiled against to fix the build.

Bug 4991705

Change-Id: I791d6c9dde50f1444d0339ebd8a18434045f9026
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261699
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
ef57537991 spi: Fix build for Linux v6.13
Commit 0809a9ccac4a ("spi: remove {devm_}spi_alloc_master/slave()")
removed devm_spi_alloc_master() and this breaks building the Tegra124
and Tegra210 SPI drivers for Linux v6.13. Commit b8d3b056a78d ("spi:
introduce new helpers with using modern naming") previously added new
helpers in Linux v6.2 which should be instead. Add a test for conftest
to detect if the kernel supports the function devm_spi_alloc_host()
and if so use this function.

Bug 4991705

Change-Id: I1d639297ef7adfdcde50927360607639b45a4a60
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261698
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
a8777837dd drm/tegra: Fix aperture support for Linux v6.13
In Linux v6.13, commit 689274a56c0c ("drm: Remove DRM aperture helpers")
removed the DRM aperture helper functions and drivers should simply use
the existing video helpers. Update the Tegra DRM driver to use
aperture_remove_all_conflicting_devices() if available to align with
upstream.

Bug 4991705

Change-Id: Ie4b78a4ea519ffcaaf972417ec2cbe7c436eb808
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261694
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
23ce6a67ae video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: Iacf625ea2425acfc10e27820c12219f1bb898a5d
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232480
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
snchen
14f79046eb kernel: camera: add bayer raw14 format.
Add raw14 bayer format driver support

bug 4335141

Change-Id: I45c4fb2f692a98cf33d81415104e815c14340a68
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176545
(cherry picked from commit b2db309d50)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226512
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
390f3cb907 tegra: nvmap: Add union for dma_coherent_mem types to fix SAST defects
When struct dma_coherent_mem* is typecasted to struct
dma_coherent_mem_replica* coverity complains with CERT EXP 39-C defect.
This defect says that we can not access a variable through a pointer of
an incompatible type.

Coverity is not able to detect that both the types essentially contain
the same members and also, we can not use struct dma_coherent_mem*
directly.

Add an union datatype to have both struct dma_coherent_mem* and struct
dma_coherent_mem_replica*. Union makes the coverity tool accept the
usage of both the types together.

Fix 4 CERT EXP39-C defects.

Bug 4479044

Change-Id: Ia29ede9b47b3e1e110450f365e125cc2b77d2ee7
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262832
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
36e3d424b8 Revert "nvsciipc: Include change for nvsciipc_ioctl.h"
This reverts commit ee72e995da1ee31177a06053b4c89f3ba6a1060a.

Reason for revert: This breaks building the OOT modules standalone without the GPU sources which are not public. Futhermore, this header
appears to be internal and so should not be included in sources that
are distributed publicly.

Jira: NVIPC-2817

Change-Id: I9a98056b004b7b6454473957f488020718eabfd4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263605
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Shobek Attupurath
ca13555cc5 rtl8852ce: Disable driver logging
Default logging is set to INFO, move this to NONE to reduce the
logs shown in kernel logs

Bug 4995363

Change-Id: Ib386a0bc8ba82d45dd0ba333733e4b14e9970b8d
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262102
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
ed9db43d54 drivers: gpu: Fix IOMMU support for Linux v6.13
In Linux v6.13, commit f6440fcc9c7b ("iommu: Remove
iommu_domain_alloc()") removed iommu_domain_alloc() and was replaced by
iommu_paging_domain_alloc(). Use conftest to detect if the function
iommu_paging_domain_alloc() is supported by the kernel and update the
Tegra DRM and Host1x drivers accordingly.

Bug 4991705

Change-Id: I86221d96232396fdb6bdccf40c412e029881c513
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261695
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
eb7a615b59 drm/tegra: Fix genpd support for Linux v6.13
In Linux v6.13, commit d6caca30a548 ("OPP: Drop redundant
*_opp_attach|detach_genpd()") removed devm_pm_opp_attach_genpd(). This
has been replaced by devm_pm_domain_attach_list(). Use conftest to
detect the presence of devm_pm_domain_attach_list() and update the Tegra
DRM driver accordingly.

Bug 4991705

Change-Id: I5a3bd258d3fce5b09fd4ba84adad166e4cf47cfb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261693
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
329cbf5ff0 tegra: nvmap: Fix overflow defects in nvmap_dev.c
Fix subtraction and addition overflow defects in nvmap_dev.c using
overflow.h APIs. Add fix for 1 INT 08-C and 1 INT 30-C defect.

Bug 4479044

Change-Id: I5dbd4d66b661c61967847c155f4e03fd9140087c
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262873
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
df3b6e37ff video: tegra: nvmap: Replace IS_ERR with IS_ERR_OR_NULL
-  Replace IS_ERR with IS_ERR_OR_NULL as the pointer is getting
derefrenced. Derefrencing a null pointer can lead to errors.

JIRA: TMM-5724
Bug 4479044

Change-Id: Ia432dc4bd4b7b5db89548c99b9873c3f34471ae4
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261658
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
f666d39d4d nvidia: timed out wait for userspace response
Using this patch we are waiting for 5secs for
response from userspace else we are returning
error.

Bug 3712829

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I43ee139d4c2f737851ec1cf375e463d7c7c7d6f7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2760068
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261630
Tested-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svc-bootloader-acv <svc-bootloader-acv@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
cdefe42278 video: tegra: nvmap: Fix INT30-C overflow defects
Add check for overflow in nvmap_debug.c when two unsigned integers are
 added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I4f051ed6db7bfee6eb49e4f818f46f15961037ea
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235335
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Suneel Kumar Pemmineti
936e6687ef nvsciipc: Include change for nvsciipc_ioctl.h
- KMD to refer nvsciipc_ioctl.h from
$TEGRA_TOP/gpu/drv/drivers/nvsci/nvsciipc/inc-linux

Jira: NVIPC-2817
Change-Id: Ic8d86c1320759bf9260d5bb9b4ee82441b0bbb71
Signed-off-by: Suneel Kumar Pemmineti <spemmineti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252263
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
Laxman Dewangan
9eaa638dfe nvidia-oot: fix the logic of path of makefile
The current makefile path is identified by the lastword of
MAKEFILE_LIST. This works fine till none of the makefile is
included before using the MAKEFILE_LIST, else the value of
the MAKEFILE_LIST get changed with new included makefile path
as last word.

Fix this by getting the path of current makefile at beginning
before including any new makefile path.

JIRA TMM-5842

Change-Id: I9d59e0b2f589dfa036d1f43850a05bc71f84aa48
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262527
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:11 +00:00
Ketan Patil
6af855f1d0 video: tegra: nvmap: Don't expose non-embedded code in embedded builds
The following functions are exported from nvmap code and being used by
nvgpu in non-DriveOS code like L4T. Hence we should not include these
functions in embedded builds.
- nvmap_get_vpr_dev
- nvmap_get_vpr1_dev

The following functions get used in DriveOS as well by nvmap, but no
need to export to nvgpu, as they are not supposed to be used on DrivOS
by other modules. Hence do not export this in embedded builds.
- nvmap_dma_alloc_attrs
- nvmap_dma_free_attrs

In order to achieve this, define a new config file for embedded-linux
and define config and ccflag which can be used in any OOT driver to
differentiate between embedded-linux and non embedded-linux builds.

JIRA TMM-5842

Change-Id: Ic52106709723910e03362977472fb3597dc255f0
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258866
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Arvind M
47b40e9b56 nvdla: kmd: enable syncpoint emulator dependency
- Adds syncpt emulator wrapper class for axi-nvdla.ko module
- Fixes minor bugs
    - The behavior of SHIM write differs between the nvhost
      syncpoint and nvhost-emu. The DLA KMD accommodates the
      same.
    - For the simulator, there is no proper management for loading
      and unloading the firmware. This will lead to a undefined
      behavior. This commit fixes the issue through use of refcnt.
    - The RISCV will be in halted state and will continue from where
      it left off. Due to a security configuration, the DLA cannot
      reload the firmware again and again after booting the system.
      As a WAR, the simulator avoids reloading the IMEM and DMEM.
      Raised a Bug 4960393 to provide a proper fix and work around
      is protected using macro BUG_4960393=1
    - The FPGA is always considered on. Raised a Bug 4972382 to
      enable power management and work around to skip the power
      operation through macro BUG_4972382=1

Bug 4942853

Change-Id: I0bf0262d6fde3b3da47f040c493d915ae6a1f98a
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248734
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
2025-07-24 10:19:11 +00:00
Vikram Kanigiri
873e573464 vblk: use interrupted wait API instead of normal wait
Currently vblk driver uses wait_for_completion() for the requests from block layer or responses from Storage Server.  wait_for_completion() make the current waiter to be un-interrutable. But linux top utility loadavg metric includes the processes both in running state and uninterruptable sate.

Replace wait_for_completion() with wait_for_completion_interruptible()  in driver, so that vblk wait will not be included in loadavg.
This changes is made as per customer request. It is for only cosmetic or for accounting purposes and no effect in functionality.

Bug 4767390

Change-Id: I2b885a1623b7d2d3a7af00951c5421dacf9d3d26
Signed-off-by: Vikram Kanigiri <vkanigiri@nvidia.com>
(cherry picked from commit ff34c49236bf57542eae09a7e7f7189ac8bddd13)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219307
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
(cherry picked from commit 2784d7b651cea6eb22195443d2cf43593084324b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262249
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
2025-07-24 10:19:11 +00:00
gokull
e41e3efcb8 [Vblk]: Get vcpu affinity from the DT node
mpidr will not give the correct HRO VPU
when it is floorswept.

The Change contains:
 [1] Get the VCPU affinity from the DT rather
from mpidr.
 [2] Remove the Mpidr Logic

Bug 4856912

Change-Id: I4d21ed90a8effc94fd3b12a977752b56b3915548
Signed-off-by: Gokul Vasan L J <gokull@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213689
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Gokul Vasan L J <gokull@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262165
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
06c3fe671a storage: use single core for init request
storage server has restriction to send the init request
also on core 2. So send the connection establishment request
and config request on core 2.

Bug 4619213

Change-Id: I157b5c9d3a4b39129be66235b593a648642cd7cc
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144043
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262173
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
efe8229d72 vblk: use normal wait API instead of io wait
Since thread is waiting for request to come
from filesystem layer instead of actual IO request
to process.So use normal wait API in thread instead
of IO wait API.

Bug 4553019

Change-Id: Ib72bca088b555353ebd3dc6362cd0e24de0a570f
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3100480
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Zuyu Liao <zuyul@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260664
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
dc071fdd4c VSC: fix lcpu to vcpu conversion logic
-fix lcpu to vcpu conversion logic by
 considering the missing cluster or holes also.
-if the conversion is not successful then we are
 not pinning the VSCD threads to lcpu.
-populate lcpu to vcpu table once.

Bug 4372079

Change-Id: I8379496da1b7f85d984e1bac1680f830740fea09
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015784
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260665
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
b918dd5111 vsc: pin vsc thread to default core
pin the vsc thread to default logical core 2
if the lcpu_affinity dts property is missing

Bug 4231381

Change-Id: I6d9787ae26d5b6562c8379df6d05b9218a02b0b3
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3011514
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260488
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
c1e81c594f nvidia: protect the vsc driver initialisation path
Using this patch we flashing the below crash issue by
protecting the initialisation path.
05:00:08: [   12.819857] Call trace:
05:00:08: [   12.820282]  swake_up_locked.part.0+0x24/0x60
05:00:08: [   12.820581]  swake_up_locked+0x38/0x50
05:00:08: [   12.820841]  complete+0x50/0x80
05:00:08: [   12.820937] tegra_hv_vblk tegra_virt_storage3: send config cmd to ivc #111
05:00:08: [   12.821000]  0xffff8000012f1714
05:00:08: [   12.821388] tegra_hv_vblk tegra_virt_storage20: allocate drvdata buffer
05:00:08: [   12.821455]  irq_forced_thread_fn+0x48/0xf0
05:00:08: [   12.822010]  irq_thread+0x198/0x2d0
05:00:08: [   12.822244]  kthread+0x198/0x1c0
05:00:08: [   12.822476]  ret_from_fork+0x10/0x20

Bug 4231381
Bug 4365516

Change-Id: I6de423edb18097f29c9983b23fd154b8ffc5f6e2
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3009693
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010050
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Manish Bhardwaj
16324a47de vblk: create partition specific threads.
create kernel thread for every partition to handle
bio requested based on the partition priority.

Bug 4231381

Change-Id: I4e0b6398bdcc14a204c2de8136d66e09521cd4df
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2998760
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2980340
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Gokul Vasan L J <gokull@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:11 +00:00
Mallikarjun Kasoju
15244dd468 ufs: Enable mphy power change clock boost for T264
Enable mphy power change clock boost for T264.

Bug 4757621

Change-Id: I714b10f40026296dfd769a066e1413eec933361f
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3262100
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
f521823831 thermal: tegra-oc-event: Fix build for Linux v6.13
When compiling the tegra-oc-event driver with Linux v6.13 the build
fails with the following error:

 drivers/thermal/tegra234-oc-event.c:127:48: error: missing braces around
  initialiser [-Werror=missing-braces]
  127 | static const struct attribute_group oc1_data = {
      |                                                ^

The 'NULL' initialiser is not needed in the above structure because it
is not any array. Fix the build for Linux v6.13 by removing the NULL
initialisers from the appropriate structure declarations.

Bug 4991705

Change-Id: I2ddb99a316aa0124e9a4c1850ba1ea87d16abcbc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261689
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
b34e2f9554 video: tegra: nvmap: Fix f_count for Linux v6.13
In Linux v6.13, 'f_count' has been replaced by 'f_ref' in the 'file'
structure. Use conftest to detect if 'f_ref' is present and update the
NVMAP driver accordingly.

Please note that in most cases we can simply use the 'file_count' macro
for getting the count and this has been supported since Linux v2.6.

Bug 4991705

Change-Id: I3ccaf88bd6c3dca5b364205cf03a577945f62092
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260939
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:11 +00:00
N V S Abhishek
cb2e183b22 nvmap: Fix incorrect deallocator SAST defect
Deallocator vfree is used when kfree should be used. Use nvmap_altfree
earlier and set pages to NULL, to use appropriate deallocator function
and fix 1 ALLOC_FREE_MISMATCH SAST defect.

Bug 4479044

Change-Id: I0257107fcef31271f14775bc3f6354390caf08f0
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3118540
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
efeecacbd1 tegra: rtcpu: Fix build for Linux v6.12
In Linux v6.12 the definition 'no_llseek' was finally removed. Since
Linux v6.0 it had been redefined as NULL. Add a test to conftest to
determine if 'no_llseek' is present and if not then it is no longer
necessary to populate this and we can leave as NULL.

Bug 4876974

Change-Id: Idc0f5eff6f95f404a24b6d795f6a9460b99639e4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261670
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pushpesh Pranjal <ppranjal@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
52a4903b87 ASoC: tegra: Fix build for Linux v6.13
In Linux v6.13, commit 1bd775da9ba9 ("ASoC: add symmetric_ prefix for
dai->rate/channels/sample_bits") added a 'symmetric_' prefix to some
member of the 'snd_soc_dai' structure. Use conftest to determine if
these structure members have the 'symmetric_' prefix and update the
Tegra Mixer Control driver accordingly.

Bug 4991705

Change-Id: I366595f31932caaa447033c0d0e3b1d2b8dba6e3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261697
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
c9d5d23a33 cpuidle: Fix build for Linux v6.13
Commit ef4c675dc296 ("genirq: Unexport nr_irqs") unexported 'nr_irqs' in
Linux v6.13 and this breaks the build for the cpuidle-debugfs driver.
For Linux v6.13 the number of IRQs can be queried by using the function
irq_get_nr_irqs() instead. Fix the build by using conftest to detect if
the function irq_get_nr_irqs() and use this function if it is present.

Bug 4991705

Change-Id: I98d477896fcf9e8d2e1afa21e2f7ba4d071ab442
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261690
Reviewed-by: Ishan Shah <ishah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Preetham Chandru R <pchandru@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
4b5bdb9393 nvadsp: t264: Add missing bits.h header
With Linux v6.13, the Tegra264 NVADSP driver fails to build and the
following errors are observed:

 In file included from drivers/platform/tegra/nvadsp/dev-t264.c:4:
  include/linux/reset.h:30:49: error: implicit declaration of function
  ‘BIT’ [-Werror=implicit-function-declaration]
   30 | #define RESET_CONTROL_FLAGS_BIT_ACQUIRED        BIT(2)
      |                                                 ^~~

 In file included from drivers/platform/tegra/nvadsp/dev-t264-aon.c:4:
  /include/linux/reset.h:30:49: error: implicit declaration of function
  ‘BIT’ [-Werror=implicit-function-declaration]
   30 | #define RESET_CONTROL_FLAGS_BIT_ACQUIRED        BIT(2)
      |                                                 ^~~

Fix this by adding the missing 'bits.h' header.

Bug 4991705

Change-Id: I08a6cb59339f8e5221fdc3f39b2a7323cae0cd1f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261688
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
1bdabd6286 ASoC: tegra-virt-alt: Fix build for Linux v6.13
Building the tegra-virt-alt driver with Linux v6.13 fails because some
of the header files are not found ...

 sound/soc/tegra-virt-alt/tegra210_virt_alt_admaif.c:17:10: fatal error:
  tegra_pcm_alt.h: No such file or directory
   17 | #include "tegra_pcm_alt.h"
      |          ^~~~~~~~~~~~~~~~~

The 'tegra_pcm_alt.h' header is located in a 'include' sub-directory and
although the cflags add this path for find headers, the header is not
found because the '#include' of the file uses double-quotes and not
"<>". This could be fixed by simply updating the file with
'#include <tegra_pcm_alt.h>'. However, reviewing the code it simplifies
the Makefile to remove the 'include' sub-directory and directly include
the header files. Similarly, we can remove the search path of the
'nvaudio_ivc' headers and directly include these.

Bug 4991705

Change-Id: I1993d1f619698f33fc9edab05ad9235334fd3b5b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260938
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
1ab9257209 video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for multiplication overflow and return error in case of
overflow condition.

No. of defects fixed - 4 INT30-C and INT 08-C.

JIRA: TMM-5724
Bug 4479044

Change-Id: I00d4a65787a2c516f5c2c410729dfc2a89f65e25
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258030
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
447103907c bt: realtek: Fix build for Linux v6.12
In Linux v6.12, commit 5f60d5f6bbc1 ("move asm/unaligned.h to
linux/unaligned.h") moved the 'unaligned.h' header file. The 'rtk_bt.c'
source file does not need this header and so it can be removed. It is
needed in the 'rtk_misc.c' header and so fix this accordingly.

Bug 4876974

Change-Id: Iabeb6d8a95e131a8b6bc2d1e2b97e8539babf19f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252433
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Pushpesh Pranjal
007a357ab1 kernel: nvidia-oot: fix GVS build issue
- fix for no prototype issue
- class_create failure
- ISO C90 mixed declarations

Jira CAMERASW-29337

Change-Id: I16cc1b6f36df1e1f59acc6add927f30e5a963302
Signed-off-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248722
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Pushpesh Pranjal
cbf1e15fdc kernel: nvidia-oot: adding use case to discard existing traces
- Add usecase to discard existing traces, using a write call,
that sets last read event index to header's next event index.

Jira CAMERASW-29336

Change-Id: Ibfc94cf5f5484b5a4ad9c2cc6f9eaeb4937ac564
Signed-off-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242168
(cherry picked from commit 148495ac64e645aff04abdf1d0334e7ea6400982)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248850
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
2025-07-24 10:19:11 +00:00
Pushpesh Pranjal
1ad8bfcf97 kernel: nvidia-oot: adding non-blocking use case
- adding non-blocking use case for fetching raw traces

Jira CAMERASW-27488

Change-Id: Ic60ceb08e9d3e68bf5db20c0da9325c3c183169e
Signed-off-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227561
(cherry picked from commit 04b0de1c19db16fb6cfc9b8057d395000c9f6011)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3241812
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Pushpesh Pranjal
2ac9b955e8 tegra: rtcpu : add device node for fetching raw traces
- added a device node to fetch the raw traces
- keeping both option available: existing worker method,
  using device node to fetch raw traces
- both blocking & non-blocking call support,
  user can decide it
- multiple file open support, each file descriptor
  context have its own read pointer of trace memory

Jira CAMERASW-27486
Jira CAMERASW-27487
Jira CAMERASW-27774

Change-Id: I93942d273570857b0073e0e863e41c221c36ebb7
Signed-off-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3215749
(cherry picked from commit 21a9c245ea4be51117c379d77c45de1ddc3a167c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3241811
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
a44ed47cf4 video: tegra: nvmap: Fix INT30-C overflow defects
Add check for overflow in nvmap_handle.c when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I0f9075796d944cc0c28db15cc611df8a2da780d4
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3250694
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
a50f7f6fc9 video: tegra: nvmap: Fix MISRA C-2012 Rule 19.1
MISRA C-2012 Rule 19.1:
An object shall not be assigned or copied to an overlapping object.

JIRA: TMM-5724
Bug 4479044

Change-Id: I3d5d0cee2bea8ffb79bccb75fd3af1b7bc5b4e36
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258136
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Shubhi Garg
0b75e99ebf oot: fix mutex unlocking in vrs rtc
Kernel throws a dump trace upon setting wakealarm time on VRS RTC.
We are unlocking mutex twice in a single API call. Delete one instance
which is not required.

[  590.301592] Call trace:
[  590.304035]  __mutex_unlock_slowpath.isra.0+0x1d4/0x2d0
[  590.309274]  mutex_unlock+0x60/0x80
[  590.312766]  0xffff80007ce0e6ec
[  590.315909]  __rtc_set_alarm+0x100/0x200
[  590.319751]  rtc_timer_enqueue+0x168/0x2e8
[  590.331275]  dev_attr_store+0x20/0x601e8
[  590.335117]  sysfs_kf_write+0x4c/0x88
[  590.338609]  kernfs_fop_write_iter+0x144/0x1d8
[  590.343149]  vfs_write+0x254/0x398
[  590.353626]  invoke_syscall+0x50/0x14040
[  590.357468]  el0_svc_common.constprop.0+0x48/0x100
[  590.362357]  do_el0_svc+0x24/0x40
[  590.365501]  el0_svc+0x34/0xc8
[  590.372835]  el0t_64_sync+0x194/0x19830/0x140
[  590.376679] ---[ end trace 0000000000000000 ]---

Bug 4715238

Change-Id: I7e070772c81474eb22859f2a00934211e6dad834
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258911
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
1993b57947 video: tegra: nvmap: Fix INT32-C overflow defects
-dupes variable is decremented within the while loop after each call to nvmap_handle_put(ref->handle).

-This prevents an infinite loop scenario where dupes remains greater than 0.

JIRA: TMM-5724
Bug 4479044

Change-Id: Ideea8e05be4d175c5e78895eb5d76fed4b655968
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3258081
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Surbhi Singh
ba177f2f7d video: tegra: nvmap: Fix CERT EXP39-C defects
CERT EXP39-C:
Do not access a variable through a pointer of an incompatible type.

- Typecast &h->vaddr to (void *) and then to atomic_long_t *.

JIRA: TMM-5724
Bug 4479044

Change-Id: I50ae755026924fe3795bbc488a72a325b703d36f
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3256925
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:10 +00:00
Akihiro Mizusawa
627f4ff832 nv-oot: camrtc: Add channel error codes
Add additional CamRTCChannelErrors error codes.

Jira CAMERASW-27854

Change-Id: I01ee983b3834e1ef006a2ac4ade14ba6fceda58f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228740
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
(cherry picked from commit cedd502e4d11becf7f76873b04d89fcccc3ae238)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242222
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:10 +00:00
Akihiro Mizusawa
1b9fe868bc nv-oot: Add early boot HSP commands
Add HSP commands related to RCE early boot logging.

Jira CAMERASW-27443

Change-Id: Ib80a5e5157474119663a010d2b6aa476cd17cdd7
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228077
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239621
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:10 +00:00
Akihiro Mizusawa
1656f9c566 nv-oot: rtcpu: Check early boot logs
- Define boot log related HSP message ID's.
- Call camrtc_hsp_vm_read_boot_log as the first step during the HSP
handshake.
- The read_boot_log function will wait for 2000 ms for a boot log
message. If the RCE has hung during boot, this will timeout, and return
with error.
- Move dev_set_drvdata to before camrtc_hsp_probe in camrtc_hsp_create.
Explanation: The RCE, during a normal boot sequence, will boot before
the RTCPU KMD starts probing, so the mailbox will already be full
when the HSP driver is initializing. The RTCPU HSP full interrupt
handler will be called immediately after the handlers are registered
by the mailbox driver. The interrupt handler will reference the HSP
device's drvdata, and it was a race condition as to whether the
interrupt handler would be called before the drvdata was set.
Thus, this change sets drvdata before the interrupt handlers are
installed to prevent this race condition.
- Update the full interrupt handler to return if camhsp is null.

Jira CAMERASW-27443

Change-Id: Ibb7ed41771d2178e0d06adb94ae1955db61b9d92
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239620
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:10 +00:00
ayush
e22e088b96 oot: Fix error handling in isp_capture_setup
This patch implements the following improvements:
1. Add proper NULL pointer checks to prevent dereferencing
   NULL pointers
2. Break down the isp_capture_setup function into smaller, more
   manageable chunks to improve readability and error handling
3. Consistently set error codes before jumping to failure handling
4. Standardize the use of goto statements for error cases
5. Improve error logging using dev_err() to provide more context
   for debugging

Bug 4778298
Jira CAMERASW-27054

Change-Id: I62ff4868b81107ac41e8561729cf1b9bede6c909
Signed-off-by: ayush <ajef@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220092

(cherry picked from commit 905ff68fe62a42685a97402e58a1fa3cbcab28f4)

Change-Id: I7ec8f31ce058f2658d776080c62e44dd5b190463
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3250557
Tested-by: Ayush Jef <ajef@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:10 +00:00
Akhil R
a49c68b4e2 crypto: tegra: Use separate buffer for each host1x command
Allocate separate buffer for each host1x command. The single buffer used
for host1x commands can get corrupted when independent crypto operations
overlap.

Bug 4883011

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I43029364c8e65e5014a5b7068cb45225c039aaf8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251597
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Mikko Perttunen
adaf80c7df conftest: Add test for of_property_read_reg
Add test for of_property_read_reg function presence, used by
the host1x driver.

Change-Id: I2f735dece273cae6bc3c75f40704be6d08eb213d
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253531
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:10 +00:00
Mikko Perttunen
5f7d8f89c6 drm/tegra: Add syncpoint memory export interface
Add a userspace interface for providing access to the memory syncpoint
shim through dma-buf file descriptors. Applications can pass references
to syncpoints to other devices that only support memory semaphores to
facilitate synchronization with syncpoints.

Only syncpoints allocated through the DRM file descriptor ("owned" by
the application) can be exported read-write. All syncpoints can be
exported read-only.

Jira HOSTX-5722
Bug 4919132

Change-Id: I4f5c007b7f9ba65780c418b4e22c5f59a11ef84d
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252026
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:10 +00:00
Mikko Perttunen
af2a177038 gpu: host1x: Retrieve syncpoint shim information
Retrieve information for the memory syncpoint shim from the device tree
and add an interface to provide the information to other drivers.

The memory syncpoint shim is a special area on the data backbone,
where each memory page corresponds to a host1x syncpoint. Reading
the page returns the value of the syncpoint, and writing to it
increments the syncpoint by one.

Jira HOSTX-5722
Bug 4919132

Change-Id: Ie892abd754f7543fbc56844dcc40cab3f837e305
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252025
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:10 +00:00
Mohit Ingale
62c37911c9 tegra: cam_fsync: fix precise freq add extra ticks for all generators
Extra ticks must be added for all generator

Bug 4951965

Change-Id: Ie3a7bdb52fd2f06188b32a1c90896c6ba4aa12cc
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3249235
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251915
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
2025-07-24 10:19:10 +00:00
Frankie Chang
8f35375054 kleaf: fix regression for kleaf build
1. update kernel_module list.
2. ccflags += directories of the header files.

Bug 4344670

Change-Id: Idd0991b3b755f907fadbd7723c9bbbf6129eeb60
Signed-off-by: Frankie Chang <frankiec@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3249508
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:10 +00:00
Srishti Goel
8fbbb20a8d Revert "linux: Add PCIe DMA sanity header"
This reverts commit 658adea9cdeb40b955b1e720f0c18467f02c3574.

Reason for revert: Moving to tests-oot

Bug 4865361

Change-Id: I0d52195aca8cff8559f017d088a64d0c8ae0b25d
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246560
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Srishti Goel
b1c91c65d2 Revert "misc: Add EP client DMA sanity test driver"
This reverts commit ec12e025881e0a83912e800b128bec56ef0c0aa9.

Reason for revert: Moving to tests-oot directory

Bug 4865361

Change-Id: Ide1fb87f90fbf31c9445ce248d3f54dd60e2037e
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246559
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:10 +00:00
Srishti Goel
5a0c14c4df Revert "PCI: endpoint: Add DMA sanity test function driver"
This reverts commit f22862928ad7bd08df0008fa40074df850aaec12.

Reason for revert: Changing this to tests-oot directory

Bug 4865361

Change-Id: I7f0c9d6466e21c34bd6d1be3b32401eb68db637d
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246558
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:10 +00:00
Srishti Goel
64e63a9ca3 Revert "PCI: endpoint: Fix DMA sanity for Linux v6.11"
This reverts commit 2f3e25b601c241bf50a30b07a0aaa64413c57925.

Reason for revert: Changing this to tests-oot directory

Bug 4865361

Change-Id: I19002466616450cf073e2a66a1dd27da9e3409a2
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246783
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Shobek Attupurath
806b6cec9c bluetooth: Disable realtek bluetooth for RHIVOS-1
Disabling build of Realtek BT USB driver for RHIVOS-1 kernel
as this is not required for RHIVOS-1.

Bug 4915378

Change-Id: I8a50a5d69d1c836a2dbbf5de1d39f7f6dc2a62de
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234144
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:10 +00:00
Shobek Attupurath
08f5f9d7fd rtk_btusb: Add support for RTL8852CE Azurewave modules
1. Add support for RTL8852CE modules with PID 1675 and 3586
2. Move RTK_DBG to KERN_DEBUG

Bug 4915378

Change-Id: I194a67878f306931db058e4b113ddf279f655d9a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242459
(cherry picked from commit 7791d0db52)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3249195
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:10 +00:00
Shobek Attupurath
76aa342b73 rtk_btusb: Fix potential buffer overflow in cfg_list_item struct
The `cfg_list_item` struct previously defined the `data` array with a zero-length,
which can lead to buffer overflow issues detected by the `fortify_memcpy_chk` function.
So change the zero-length array to a flexible array length.

Bug 4915378

Change-Id: I3420406e73a9eec892665380bb15d680df12e751
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237079
(cherry picked from commit 9c30467627)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233101
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:10 +00:00
Shobek Attupurath
1f6ba48285 rtk_btusb: Update driver version to 3.1.65ab490.20240531-141726
- Update driver to 3.1.65ab490.20240531-141726
- Add support for 8852CE

Bug 4915378

Change-Id: Ib3f695047ee306fd07db424239c985195619aad1
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237077
(cherry picked from commit 3d15bb40b5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233099
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:10 +00:00
Nagaraj P N
13859c153d vse: use new req format for tsec sign request
Jira ESSS-1569

Change-Id: I284c648bb9b171d65cfb2c45386df40ac7d3f123
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3206645
(cherry picked from commit 1077db9ad07b6db001b0cdfdd9bda86125926e9a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3224563
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: Rounak Agarwal <rounaka@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:19:10 +00:00
Rounak Agarwal
84c1be5f3c vse: Changes for TSEC batch request
JIRA ESSS-1560

Change-Id: Ie76afb6eed36e12d4ff42d793afc3c4ccc73b010
Signed-off-by: Rounak Agarwal <rounaka@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3206546
(cherry picked from commit 89d290edcbe70ad734ba23deb5021d16ae116b05)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3224562
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:10 +00:00
Ketan Patil
9d36b14826 video: tegra: nvmap: Remove unnecessary export symbols
If we have any export symbols in nvmap, we would have to show the
interactions between KMDs as a path in our threat model.
Hence remove the following unnecessary export symbols from nvmap.
- nvmap_register_vidmem_carveout: Not being used on TOT
- nvmap_dev: Used by one of nvmap_ktest which is also being cleaned up.

JIRA TMM-5842

Change-Id: I65d466a37ef51f3222bed4d084efaff92480a21f
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3254553
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:10 +00:00
Mikko Perttunen
7438b785d4 gpu: host1x-nvhost: Retry interrupted firmware requests
Firmware requests triggered by userspace action can be executed
in interruptible context, which can cause signals to interrupt
firmware loading.

Ordinarily, one would propagate the error code to userspace and
let it retry. However, request_firmware does not have proper
handling of retryable errors, as sysfs fallbacks will clobber
the original error code. Furthermore, pm_runtime, through which
we would propagate the error code, doesn't support transient
resume failures either.

As such, as a quick fix, change to request_firmware_direct and
retry it directly in situ 10 times.

Bug 4753613

Co-developed-by: Zuyi Hu <zuyih@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Idb9a04d4fa80aeffbfd0ad0176cce55c4dedf488
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202848
(cherry picked from commit a17e81cad18bbdfef0194471524b675d74501054)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219109
(cherry picked from commit 30c08f369a8f3acd642fcec70814086bd472e734)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3253514
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
Tested-by: Zuyi Hu <zuyih@nvidia.com>
2025-07-24 10:19:10 +00:00
Jon Hunter
5a77eeb8a3 drm/tegra: Remove 'unaligned.h' header
In Linux v6.12, commit 5f60d5f6bbc1 ("move asm/unaligned.h to
linux/unaligned.h") moved the 'unaligned.h' header file. The
'unaligned.h' is not needed by the Tegra DRM RISC-V driver and so remove
this header.

Bug 4876974

Change-Id: If5993d6ea8291557de6fd41e4f55552bae45505b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3252432
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Chandra Sekhar Meduri
843dfc5269 PVA: Add allowlist file
Add all paths that are not relevant to PVA under PVA nspect ID

JIRA PVAAS-15513

Change-Id: I83d34a05d14cc6afcac0ccb221b65b4566270bd9
Signed-off-by: Chandra Sekhar Meduri <msekhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3246589
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Ashwin Rao <ashwinr@nvidia.com>
2025-07-24 10:19:10 +00:00
Mahesh Kumar
119816136c platform: dce: fix ipc_client_unregister race cond
This patch fixes a race condition between
tegra_dce_unregister_ipc_client and dce_client_ipc_wakeup.

If dce_client_ipc_wakeup is called just after unregistering
it'll result in accessing already freed data structures and
kernel crash. This patch adds a check to validate if the client_ipc
struct is valid before accessing its members.

Bug 4913921

Change-Id: Ie7f25379d7254d1f1ad4fb17baafee353f6d9eca
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239873
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
8f7e9f5ec8 ufs: Program Auto-hibernate
Added Auto-hibernate for better power
consumption in idle state.

Bug 4812738

Change-Id: I5ef80b8de7d94f8a2bad3adf546061520fb38958
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3239657
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Nagaraj P N
74e8b62f72 vse: sha: implement new sha_update API
- Initialize lock per device node and take lock at the
  start of processing of each ioctl command. This is needed
  because there is only one set of IOVA buffers allocated
  during init per device node. Without lock it leads to
  race conditions when more than one app uses the same
  device node.
- Release tfm after each API call for both sha and hmac-sha
- Validate rng buffer size provided by user
- Support buf size up to HW supported limit for GCM-Dec req
  if tag verify is supported by HW.

Jira ESSS-1517
Bug 4881474

Change-Id: I338558656ac00b91750e74990bb47c5a35f31e08
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233377
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2025-07-24 10:19:10 +00:00
Surbhi Singh
80c3e3003f video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow in nvmap_heap.c when two unsigned integers are added and return error in case of overflow condition

JIRA: TMM-5724
Bug 4479044

Change-Id: I4da3f31a508de8e4d6fab033e5a149de6b423ead
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3241765
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
238299ffb5 scsi: ufs: Enable Writebooster
Enable writebooster capabilities.

Bug 4782274

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: Ib7e98daa935b7c3922c6050dba64e45c50c82228
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248799
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:10 +00:00
Santosh BS
75509a244a drm/tegra: move native engine support under config option
- Update makefile to skip building native engine specific
  files when CONFIG_TEGRA_DRM_NATIVE_DIS is set
- Update drm.c to skip native engine platform drivers
  when CONFIG_TEGRA_DRM_NATIVE_DIS is set

Jira HOSTX-5705

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: I86e1db76ea8712165a57cb3b0188c251c56da513
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248092
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Johnny Liu
58f09dbbaf drivers: video: Remove legacy code regarding bwmgr
CONFIG_TEGRA_BWMGR is a downstream solution in the kernel before
K5.15, and the implementation now is completed moved to BPMP side.

Since it is not supported anymore, remove the legacy code for
maintainability.

Bug 4955427

Change-Id: If639871f286ba84177e31a351757e25ce621905b
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248364
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:10 +00:00
Johnny Liu
f9d2fc0ff0 platform/tegra: Remove legacy code regarding bwmgr
CONFIG_TEGRA_BWMGR is a downstream solution in the kernel before
K5.15, and the implementation now is completed moved to BPMP side.

Since it is not supported anymore, remove the legacy code for
maintainability.

Bug 4955427

Change-Id: I688c44288bfb8522ddfebd8abe294b0410ca8dc1
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3248363
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:19:10 +00:00
Arvind M
1acb4426db nvdla: kmd: fix DLA3 bringup bugs
- Compile axi-nvdla.ko alongside nvhost-nvdla.ko driver.
- Fix the sequence of register programming that is unique
    to DLA3.
- Introduce a debugfs node for bitbang loading the IMEM/DMEM
    contents.
- Raised Bug 4942853 to track the syncpoint features.
- Address review comments from the previous patchsets in
    regard to the DLA3 updates.

Bug 4916080

Change-Id: I6859868e6cdd3e11f90e76a8bcf79a9676cd5a52
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3205466
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mitch Harwell <mharwell@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Vishal Thoke <vthoke@nvidia.com>
2025-07-24 10:19:10 +00:00
Narayan Reddy
442dd0068f nvethernet: deregister fixed link in remove
issue: PHY ID allocation is failing during the
stress test of insmod and rmmod of nvethernet
module, since PHYIDs were exhausing during the
module insertion.

fix: deregister fixed link in remove for
freeing up the PHYIDs which were allocated during
probe.

Bug 4754744

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I6e71c684d4fcc5bb99a971c7d4d41726998cd8ec
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3245742
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
2025-07-24 10:19:10 +00:00
Surbhi Singh
20e9790c9e video: tegra: nvmap: Fix INT30-C overflow defects
Adding check for overflow in nvmap_fault.c when two unsigned integers are added and return error in case of overflow condition.

JIRA: TMM-5724
Bug 4479044

Change-Id: I6043e5ab6e964daee552912d9c3a217d050ef6a6
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233543
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:10 +00:00
Ketan Patil
54aee56239 video: tegra: nvmap: Remove use of iommu_present API
Upstream has removed iommu_present function from k6.13, hence remove
call to this function from nvmap, as IOMMU will be always present in
any latest SOC. We will rely on dont-convert-iovmm-to-carveout property
from DT to avoid converting the entire IOVMM to carveout.

Bug 4923950

Change-Id: Ia7e374e81ab8c78f3d17187aebd2fcf0170fabdc
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3243903
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:10 +00:00
Jon Hunter
9410c97b90 crypto: tegra: Fix build for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Fix the build for Linux v6.11
by simply removing the 'remove' callback for the Tegra SE KDS driver
because it does nothing.

Bug 4749580

Change-Id: Ic335005a99ff7387053bfb78c994bbabafba7b81
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242554
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:10 +00:00
Chris Dragan
1a07aff1bc misc: mods: update mods driver to 4.28
Change-Id: Ia7f855439f48549fc387d8735fa4c0e7252750cc
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242129
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:10 +00:00
Nagaraj Annaiah
731489e015 Ethernet: Add Sysfs Support to test Tx and Rx bandwidth
Transmit: Add test_tx_bandwidth_dump_enable support to
transmit packets from the driver which helps measure
line rate for 25G and 10G.
pkt1500, pkt8192, pkt64 packet sizes can be configured.
Receive- Drop Packets at the driver level.

Bug 4742868

Change-Id: I52fe1b73b169dfedc06afea5fb62d7bc21fd9ba1
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197198
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Jon Hunter
4dd9cd92d4 video: tegra: nvmap: Add missing vmalloc.h
After removing nvmap_priv.h, nvmap no longer builds for Linux v6.10+
kernels and error such as the following are observed ...

 drivers/video/tegra/nvmap/nvmap_alloc.c:41:24: error: implicit
 declaration of function 'vzalloc'; did you mean 'kzalloc'?
 [-Werror=implicit-function-declaration]
   41 |                 return vzalloc(len);
      |                        ^~~~~~~
      |                        kzalloc
 drivers/video/tegra/nvmap/nvmap_alloc.c:52:17:
 error: implicit declaration of function 'vfree'; did you mean
 'kvfree'? [-Werror=implicit-function-declaration]
   52 |                 vfree(ptr);
      |                 ^~~~~
      |                 kvfree

Fix this by including vmalloc.h in the necessary files.

JIRA TMM-5751

Change-Id: I49fae7ea5a78f0029706c2bd12b5553e5903f31b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3243752
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:10 +00:00
Jon Hunter
a6898e3968 net: rtl8852ce: Don't build driver for Linux v6.10+
The rtl8852ce driver now builds fine for Linux v6.6 to v6.9 and so
update the Makefile to only disable building the driver for Linux v6.10+
kernels.

Bug 4667769

Change-Id: I0ff0e7a58e27d7252c3d3ae1a7e2878227a51644
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3243757
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Jon Hunter
6663581564 net: rtl8852ce: Don't build driver for Linux v6.6+
Building the rtl8852ce driver with various different Linux v6.x kernels
fail for various reasons.

For Linux v6.6 the build fails with errors such as ...

 drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c: In function
  'phl_cmd_set_seciv_hdl':
 drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c:4907:16: error:
   implicit conversion from 'enum rtw_hal_status' to
   'enum rtw_phl_status' [-Werror=enum-conversion]
 4907 |         return rtw_hal_set_dctrl_tbl_seciv((void*)phl_info->hal,
      |                                             sta, sta->sec_iv);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For Linux v6.8 the build fails with the above and the following ...

 drivers/net/wireless/realtek/rtl8852ce/phl/phl_sta.c:301:5: error:
  no previous declaration for '_phl_get_macid'
  [-Werror=missing-declarations]
  301 | u16 _phl_get_macid(struct phl_info_t *phl_info,
      |     ^~~~~~~~~~~~~~

For Linux v6.10 the build fails with the above and the following ...

 drivers/net/wireless/realtek/rtl8852ce/core/rtw_ap.c:6265:9: error:
  suggest braces around empty body in an 'else' statement
  [-Werror=empty-body]
 6265 |         ;
      |         ^

 drivers/net/wireless/realtek/rtl8852ce/core/rtw_sta_mgt.c:742:1: error:
  'static' is not at beginning of declaration
   [-Werror=old-style-declaration]
 742 | u32 static _rtw_free_core_stainfo(_adapter *padapter , struct
     |                                   sta_info *psta, u8 aid,
     |                                    const u8 *hwaddr)
     | ^~~

For Linux v6.12, the driver build is completely broken because of the
following build error ...

 drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/wifi_regd.c:1007:17:
  error: too few arguments to function 'cfg80211_cac_event'
 1007 |                 cfg80211_cac_event(evt->netdev, &evt->chandef,
      |                                    evt->event, GFP_KERNEL);
      |                 ^~~~~~~~~~~~~~~~~~

For Linux v6.6+ mark the driver as broken and do not build this for
Linux v6.6+ kernels until these issues are addressed.

Bug 4667769

Change-Id: Id6b060f6b39ba4ef64d6388e06ef1e038c19206f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226276
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242573
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
2025-07-24 10:19:10 +00:00
Frankie Chang
abee36afa0 nvdla: support kleaf build
1. use srctree.* in Makefile to fix kleaf build error.
2. remove redundant slash.

Bug 4344670

Change-Id: I16d135b2173ff183b1e6d70f77bacadfaa6977d2
Signed-off-by: Frankie Chang <frankiec@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3240803
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:10 +00:00
Junghyun Kim
ea5440f147 cdi: Add fsync_ctrl_port variable
Parse fsync_ctrl_port property in DT to overwrite
FSYNC control GPIO port of IO expander

JIRA CAMERASW-29219

Change-Id: I2311739d0460ad0601e1e40990201a4c0fd01ded
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233562
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:10 +00:00
Jian-Min Liu
1dcd39e05b Kleaf: Update kernel modules in nvidia-oot
Add the recently added kernel modules to the outs list.

Bug 4344670

Change-Id: Iafc5af5b6909726b1083585ac7ad61881f71bc5d
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Signed-off-by: Frankie Chang <frankiec@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183045
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:10 +00:00
Jon Hunter
f51248fd49 PCI: endpoint: Fix DMA sanity for Linux v6.11
The Tegra PCI endpoint DMA sanity driver build fails for Linux v6.11
because the 'core_init' callback was renamed to 'epc_init'. Update the
driver accordingly to fix the build for Linux v6.11.

Bug 4749580

Change-Id: I66a3c848f3f01b607d045c221bcc2ed21ac3df61
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3242701
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Srishti Goel <srgoel@nvidia.com>
2025-07-24 10:19:10 +00:00
mhulagabal
4c3f0cf0b4 dce: Convert error codes to hex and group errors
- Converted error codes from decimal to hexadecimal
- Segregated the errors group-wise
- Changed unsigned to signed

- JIRA TDS-15862

Change-Id: I9da522265ce858d05065908c3e345661bf0b3f65
Signed-off-by: mhulagabal <mhulagabal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3236309
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
2025-07-24 10:19:10 +00:00
Revanth Kumar Uppala
e997938c0e Revert "r8168: Enable CONFIG_SOC_LAN"
This reverts commit c63de1c5e2c16fabccfd21ac858693438e8bb427.

Reason for revert: Throughput reduced with this change

Change-Id: Ie2293f9cedd9b00c28f1ce08c24dbee68674dde9
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232362
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:10 +00:00
Akhil R
84e4d456fa i2c: tegra-slave: Support 10-bit addressing
Support 10-bit addressing in Tegra I2C slave mode

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I199e636d7c8058cd3d4ae83abcfd48cfa02febf2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233634
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
omar
79633ca404 drivers: pva: add fence update method
Fence update method is defined as increment or set.
when method ios set, the fence value is set to the value
requested.

This applies only to semaphores.

Bug

Change-Id: I1c744826868dde7950c9482ae9a0c601e63a63a1
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231374
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashwin Rao <ashwinr@nvidia.com>
Tested-by: Ashwin Rao <ashwinr@nvidia.com>
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Tested-by: Sreehari Mohan <sreeharim@nvidia.com>
2025-07-24 10:19:10 +00:00
Paritosh Dixit
af52a2b6c0 nvidia-oot: Add .gitignore
Add .gitignore so that git status does not show build artifacts.

Bug 4814000

Change-Id: Iae3ef2be2107db92350038131628903c12b1f1c7
Signed-off-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3240531
(cherry picked from commit 696fd39c49)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3241033
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:10 +00:00
Khushi
e57f71b4d0 vse : GCSE1/2 AES Linux
Added engine id in linux vse driver for GCSE1/2 AES0/1
Jira ESSS-1413

Change-Id: Icb38941c2c17e04fe0979070c80abaac9d018e74
Signed-off-by: Rounak Agarwal <rounaka@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168936
Tested-by: Khushi . <khushi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:19:10 +00:00
Mahesh Patil
a1291a7323 nvethernet: Set the mac clk rate in driver
1) Setting mac clk rate correctly in driver
2) Set speed correctly if phy_iface_mode set to USX-5G/USX-10G
3) Set the mgbe/eqos rx clocks during interface up

Bug 4874956
Bug 4872381
Bug 4745869

Change-Id: Ie3c39f44b713661e10a4fb20090c26d09667beea
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3216075
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Praveen James
2d1629804e fsicom: update hsp mb assignment to fsi core
Hsp mb for fsicom notifications are
assigned to configured fsi notification
core in sequence.

Bug 4825460
Jira FSIS-565

Change-Id: I9365f7c8c6459ad749f6fbf0a0dd9775b4225822
Signed-off-by: Praveen James <pjames@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204135
(cherry picked from commit b0b1e5cbbf888a558aedd563d81057301ee4ac8a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3206769
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Kovid Kumar <kovidk@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217463
2025-07-24 10:19:10 +00:00
Praveen James
55847ce7a0 fsicom: Add support for fsi core2 and core3
fsicom driver updated to support fsicom
channels without notification. With notification
disabled channels fsicom can support all four
cores of FSI

Bug 4805453
DOS-SHR-10636

Change-Id: I6cf4dd36c1570505dbcf582499189bd974ed095f
Signed-off-by: Praveen James <pjames@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197598
(cherry picked from commit 1dbdf63d67b102908c845671d18ddf4d14ae498f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3206768
Reviewed-by: Kovid Kumar <kovidk@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217458
2025-07-24 10:19:10 +00:00
Janardhan Reddy
1fb5a4f931 nvscic2c-pcie: Fix edma error reporting issue
pci_client abstraction supports notification to application.
Each endpoint has to register with pci_client for notification which
return link_event_id after registration.
link_event_id is index in lookup table with total size as MAX_ENDPOINT.
This link_event_id is allocated sequential and does not match with ep_id
which is endpoint index with max as MAX_ENDPOINT.

stream-extension is not aware about link_event_id and uses ep_id for
notification which leads to mismatch in look up table finally dropping
notification.

Registering for link event in sequential manner does not help much as
registration against ep_id will make lookup table and endpoint database
one-to-one mapping.

Update endpoint registration for link event based on ep_id and use ep_id
in lookup table for notification purpose.

Bug 4913236

Change-Id: I75bfdbf0e8e5b7b11b0cca7dc266f01f492362f6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233789
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
2025-07-24 10:19:10 +00:00
Srishti Goel
9c40df022c PCI: endpoint: Add DMA sanity test function driver
Added a sanity DMA testing driver which submits 2 descriptors of 0.5MB,
2.5MB and 6.25MB each. Repeats this 10 times and captures the perf,
bit-transfer errors and time taken.

Bug 4865361

Change-Id: Ibda3d55d848c918bb3b97412b0cbb33b0a460f6e
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220195
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Srishti Goel
05ad3c46c6 misc: Add EP client DMA sanity test driver
Added a DMA EPC testing driver which submits 2 descriptors of 0.5MB,
2.5MB, and 6.25MB each. Repeats this 10 times and captures the perf,
bit-transfer errors and time-taken.

Bug 4865361

Change-Id: I56c63a983e4ff4f45adc77fb89e9fe0f77b36bcd
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221078
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Srishti Goel
556ee3c643 linux: Add PCIe DMA sanity header
Add common DMA sanity helper header that can be used by both EP client
and EP function sanity DMA test drivers.

Bug 4865361

Change-Id: Ia448065a694e3784b5bd158ebb8a9b049c1fa62c
Signed-off-by: Srishti Goel <srgoel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225560
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:10 +00:00
Sanath Kumar Gampa
9d5d4f6e37 NvEthernet: Addition of common OSI MACSec file
Reorged OSI MACSec and added a common MACSec OSI file

Bug 4874880

Change-Id: Ib6db144b5df271ab6b82f707f8813d1a7ed79455
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214901
Reviewed-by: Sanath Kumar Gampa <sgampa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
2025-07-24 10:19:10 +00:00
Sanath Kumar Gampa
6ca5a03728 nvethernet: Add MACSec counters to ethtool stats
Bug 4915922

Change-Id: I21920fe788d8a3789faeaa13a82d6961ee1371a4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233767
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:10 +00:00
Surbhi Singh
a47c3ef56d video: tegra: nvmap: Fix INT08-C using overflow.h
JIRA: TMM-5724
Bug 4479044

Change-Id: I72fd476edf686a2154a8976fdeb4a686a24ddbb8
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233433
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:10 +00:00
Ketan Patil
44a095795e video: tegra: nvmap: Move relevant code to respective units
- Move the code from nvmap_priv.h to relevant units.
- Delete nvmap_priv.h

JIRA TMM-5751

Change-Id: Ic0df459fb9db0714a1b2a65b463fae8adbbc49f1
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232636
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:10 +00:00
Pritesh Raithatha
cfda55996f video: tegra: nvmap: move dmabuf code to dmabuf unit
Move dmabuf code to dmabuf unit. This will help to deprecate
nvmap_priv.h.

JIRA TMM-5721

Change-Id: I5fc2a6e0d8ff1939df5e5623fc9d12fa3592e3bd
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234588
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:10 +00:00
Surbhi Singh
c79fe58101 video: tegra: nvmap: Fix INT08-C using overflow.h
- pend-pstart may wrap, hence using check_sub_overflow.

JIRA: TMM-5724

Bug 4479044

Change-Id: I0214a453919ab6d789811b3cb02525d3c78b7932
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232443
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:10 +00:00
snchen
28668cde01 vi5: camera: add ovrride capture timeout control
add CID to override the capture timeout.

bug 4737219

Change-Id: I6df8e760ce8051054ba34a8b85b00bb237f9cd98
Signed-off-by: snchen <snchen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173821
(cherry picked from commit 20374db85d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196700
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:10 +00:00
Laxman Dewangan
267eedc25d ufs: Add conftest to check UFSHCD_QUIRK_BROKEN_PWR_SEQUENCE
Not all kernel define the enum UFSHCD_QUIRK_BROKEN_PWR_SEQUENCE

Add conftest to find out whether kernel has define the enum
UFSHCD_QUIRK_BROKEN_PWR_SEQUENCE or not and then check for macro
before using it.

Bug 4911768

Change-Id: I4eba6f02ab79c1d4a5bdefb3ec831cc4ae34d527
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
ac4e44ec34 scsi: ufs: Assert before de-assert
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I8c11d202b20fd90320dae510e3da2193a1d8dfdf
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
24e024444b scsi: ufs: check for go bit status
GO bit will be cleared after driver
writing it to 1. Need to check the
clear status. Added check for the same.

Bug 4782274

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I71f035a27fb95de3e37d515a34c48c493f827a44
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
e86ab401cc add delay after hdiv
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I357dd071ad76dc81d16810f8b5f0e44cf42fa8a3
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
f66b44645e scsi: ufs: Set pll3 rate_b
Set PLL3 RATEB rate as 582400000.

Bug 4757621

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I18652261b7224d162a502de3d30e5eb354fd6675
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
fb95615c17 ufs: Remove rx calibration
Removed rx calibration in resume.

Change-Id: Ib7eb0c306cb1f424b4dca707e39e70f2a42fe4e0
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
701657e6f7 ufs: Set utmi_pll1 as parent for cpu_isc clocks
Set utmi_pll1 as parent for cpu_isc clocks

Bug 4782274

Change-Id: Iab71527dc6de3f46d4b7880c3dd00eadc130c5ba
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
711b5110fc scsi: ufs: Enable quirks for power sequence change
Change-Id: I658e6b56cd05cb366a6ae3d277d05fb97a663f6a
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
179dc474f7 ufs: scsi: enable lane1 rx calibration first
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I549a15b2853c1b890aec7e66c5296d56b8616f25
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
0b489f8588 ufs: Do not disable clocks in suspend
Do not disable clocks in suepend.

Bug 4732470

Change-Id: Iabf05c1d80e3339c10f7824edcc333cef065bc33
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
14d246d8a3 scsi: ufs: Remove dev_err for information prints
dev_err is used for information prints.
Changed them to dev_info and dev_dbg.

Bug 4736849

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I990edef75566ca718fab611b36385f6ec5f12c44
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
c3d33b827c ufs: Enable ufs for RDL fix parts only
Read fuse to check if chip has RDL fix or not.
Return error for non-RDL chips.

Bug 4243018

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: Ibe441ca136c18e03cebbc1cd5d0cc529d45005c6
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
347e5727ac ufs: Fix ufs crash
Change-Id: I4d266fa940ce3428cc57805ada917f7f42d0ed32
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
66e8bf380a ufs: ufs clock change to use ufs_cg_sys_div
Change-Id: I3d79d442fb10cbfc3d2e4e8d8803190dce839c93
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
e318d3196c scsi: ufs: Do not enable pllrefe clk in T264
pllrefe is not used in T264 ufs. Do not enable it.

Bug 4199271

Change-Id: I0d940b66e1a30ac2b097c07a1ba470ddc2f41de4
2025-07-24 10:19:10 +00:00
Mallikarjun Kasoju
5ed0a15b2d scsi: ufs: Corrected ufs parent clock name
Corrected ufs parent clock name.

Bug 4199271

Change-Id: I528d32f246ec6f6167e7895b8bec30b1f6c959b1
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:09 +00:00
Mallikarjun Kasoju
f869389dfc ufs: Corrected ufs parent clock
UFS parent clock in T264 is pllrefufs_clkout624
and the rate is to 208 MHz.

Bug 4199271

Change-Id: I5b86e199f93fc1c81506cb29391b96efdc7de3a4
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:09 +00:00
Mallikarjun Kasoju
728681aa60 ufs: Set ufs HCLKDIV clock to 0xD0
Set HCLKDIV to 0xD0 as per IAS.

Bug 4199271

Change-Id: I4779c74c657d8723a27a167096dfac9d22128436
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:09 +00:00
Mallikarjun Kasoju
e850611327 ufs: Enable mphy_l0_uphy_tx_fifo clock
Enable mphy_l0_uphy_tx_fifo clock.

Bug 4199271

Change-Id: Idabbf61851446ae3f3f405ffe4fdb0a514eed01d
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:09 +00:00
Mallikarjun Kasoju
248a85dbbc ufs: Add mphy TX calibration support
Added mphy TX calibration support.

Bug 4199271

Change-Id: Ia48945b026ac9d264d24937f9737484de8f203cd
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
2025-07-24 10:19:09 +00:00
Laxman Dewangan
055bd73cbb camera: Use conftest for finding tegra264_io_pad_power_* available
Use conftest for finding whether APIs tegra264_io_pad_power_*
are available or not before using it.

Bug 4911768

Change-Id: Ic8df4a0109a270d5a486a67900ed7fe4c57b79be
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:09 +00:00
Dara Ramesh
09d2e16146 tegra-virt-alt: Added support for T264 ADSP Audio
Added new DT compatible string for t264
Extended T210 MUX/CTRL to use for T264

Bug 4635899

Change-Id: Ia2b2c8bc77eba65bf3530f28ccb1d23bcf93e0dd
2025-07-24 10:19:09 +00:00
Dara Ramesh
ed4c071bfa tegra-virt-alt: T264 ADSP support for machine driver
Extended T210 ADSP DAI LINKS  to use for T264

Bug 4635899

Change-Id: I613698aef930458f031462ddc7fd8bfbe72768a3
2025-07-24 10:19:09 +00:00
Sheetal
7e6dc18387 tegra-virt-alt: Unify Mixer controls with L4T
- Rename the mixer controls to match with L4T mixer controls.
- As most of the controls are matching between t234 and t264,
  the difference controls are added as part of component driver
  probe.
- Comment ARAD and regdump controls as ARAD and regdump are
  non-functional currently.
- Remove unused controls. MIXER, ASRC and AMX Enable controls are
  not required to be set explicitly as AudioServer handles this.

Bug 4796520

Change-Id: Ia6fdd507819b1b354544b2b1217d9aa399e106b9
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
Mikko Perttunen
e71627a4e5 drm/tegra: vic: Fix CRC enable for T264
The change to write the INTF_CRC_CFG register was inadvertently
left out. Correct this.

Bug 4809300

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I208da56d03e90e72ce26dffe7bef1cdeab95fab6
2025-07-24 10:19:09 +00:00
Uday Gupta
c8cb7c0808 Updated changes for XBAR
Change-Id: Ibb90f15b2a1edad00abbd2c5a3ab149ba9b468a6
Signed-off-by: Uday Gupta <udayg@nvidia.com>
2025-07-24 10:19:09 +00:00
Mikko Perttunen
6cf81885cf CRC enable for Tegra264
Change-Id: I9f38b199c36a0baf600a68e9dfd344440abe7fa0
2025-07-24 10:19:09 +00:00
Vishwaroop A
e147027277 drivers: spi: update misc register programming
Update the misc register programming for T264
for slave.

Bug 4711327

Change-Id: Ia6409bbee66e9984f83ad792d67c730fa637f58d
Signed-off-by: Vishwaroop A <va@nvidia.com>
2025-07-24 10:19:09 +00:00
vasukis
7789bd9c0a tegra: hwpm: VIC: HWPM-NvHost Profiling support
Add support to profile NvHost IPs on various chips
by HWPM module.

Bug 4170421
DOS-SHR-7966

Signed-off-by: vasukis <vasukis@nvidia.com>
Change-Id: I42ac3b5fa79d7b6f97e66098cb84277cda2aff4d
2025-07-24 10:19:09 +00:00
Vishwaroop A
32ae8fdb4c drivers: tach: add support for 1MHZ clock
T264 has 1MHz clock for tach. Add support for this
clock.

Signed-off-by: Vishwaroop A <va@nvidia.com>
Change-Id: Ic2ecc5dd2494f3b55340f1b925ca616c4844ed6f
2025-07-24 10:19:09 +00:00
Akihiro Mizusawa
dadd61f04c tegra rtcpu: add debug map test buffers for ISP1
Add debug map test buffers for ISP1.

Jira CT26X-427

Change-Id: If3f12b789263aa3d8dbbb3b88157cce429335ea9
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
2025-07-24 10:19:09 +00:00
Kartik
0bfc29c691 watchdog: Add support for Tegra264
Tegra264 use a different base address than Tegra234.

Update the logic of parsing Base Timer and WDT index from iomem resource
beginning.

Bug 4729969

Change-Id: I68d4f03373d2d648c1cf3b82bf74972361693bb5
Signed-off-by: Kartik <kkartik@nvidia.com>
2025-07-24 10:19:09 +00:00
Akhil R
df09ef1b31 pinctl: misc-dpaux: Add T264 support
Add support for T264 which has four I2C/DP-AUX instances and four
separate registers to configure each of it. The four registers are
in consecutive addresses, but follow the same bitmap as T234.

T264 I2C <-> DPAUX map is as below:
I2C6  <-> DPAUX0
I2C10 <-> DPAUX1
I2C4  <-> DPAUX2
I2C8  <-> DPAUX3

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I0a38a9a96894fc2d9bb1c0647f4f9cf06e13aaf1
2025-07-24 10:19:09 +00:00
Shubhi Garg
975ca77f46 mttcan: support T264 FSI CAN from ccplex
Adding support in existing mttcan driver to control T264 FSI
CAN controllers from CCPLEX whether FSI firmware is loaded on
system or not. FSI CAN clocks will be enabled by FSI crystal clock
upon boot. SW does not need to enable or control clocks. CCPLEX cannot
control FSI controller resets, reset can be handled during boot, thus
disabled clocks and reset for T264 SOC.

Bug 4317516

Change-Id: I8e6b20640c8763ebc0a9d9192e3212a49902f9b4
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
d727e987bb tegra-virt-alt: admaif: Add T264 support
- Update controls and DAIs based on AHUB modules instances updated.
- Update the ADMAIF CIF channels to 32.
- Update the ARAD sources.

Jira TAS-2330

Change-Id: I1a4c1184916b9b66d5180f3cfd2f94c26abe0074
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
ecb8c0bb89 tegra-virt-alt: T264 support for machine driver
- Defined the 32 dai-links for T264.
- Add T264 soc_data to fetch the number of channels based on soc.

Jira TAS-2331

Change-Id: I75b331ef34b8015b30ec48c72e6adceded10924b
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
1dfa6285d3 ASoC: tegra: T264 in tegra mixer control driver
Add I2S, AMX and ADX controls as chip specific data to fetch
controls based on Max number of channels supported by chip.

Jira TAS-2387

Change-Id: Ieac8f7d55581856a595ffff093fa9d1b8ef493f9
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
pmedawala
4a8d285e19 tegra-virt-alt: Added changes for XBAR
Jira TAS-2292

Change-Id: I69c47dcfe4de3bf0c958dc0f9b0954b66dd52830
2025-07-24 10:19:09 +00:00
Santosh BS
021bbbedb0 drm/tegra: nvhost virtualisation support for t264
Add compatibility string for virtualised nodes

Bug 4587237
Jira HOSTX-5297

Change-Id: I53ff8b03989f4001dee73dc2d3d64ba60a0e3ae3
Signed-off-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:09 +00:00
Viswanath L
77f78b0348 bus: aocluster: Add T264 support
Add compatible for T264 aocluster.

Bug 4165898

Change-Id: I2d5ac7e4de4c16968f6309f0152dc595a757571d
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
251e41bc50 tegra-virt-alt: Add minimal support for T264
- CIF register bitmask is updated in T264, it is mandatory
  to update it for T264 audio usecases.
- With this change all T234 AHUB usecases can be verified.

TAS-2330

Change-Id: I9b64fcb5725bfd4dd01ef29466f7255bdfd6a53f
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
Petlozu Pravareshwar
54fc0656e6 Camera: OOT: Add T264 specific PMC calls
For Tegra264, new PMC driver is introduced to support instance specific
driver data. As per the design, on Tegra264, if client drivers are using
below PMC exported APIs, they need to pass their struct device pointer
as an argument. Also it is expected that clients dt node should have
"nvidia,pmc" property populated with appropriate PMC instance phandle.
 - *_io_pad_power_enable()
 - *_io_pad_power_disable()

Bug 4470933

Change-Id: Idb41b95cd863f313496110a4e3c4b5ea61a1df8f
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
2025-07-24 10:19:09 +00:00
Viswanath L
a87e58326b nvadsp: Add T264 ADSP and AON support
- Add compatible and chip data for T264 ADSP[1:0] and AON
- Add T264 dev files to build makefile

DNS

Bug 3682950
Bug 4165898

Change-Id: Idbaef1950ff2f736c7844ee0525d55b596b11132
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
2025-07-24 10:19:09 +00:00
Akhil R
a29b51cd58 crypto: tegra: Add Tegra SE driver for T264
Add Tegra Security Engine driver which supports AES-ECB/CBC/CTR/XTS
SHA1/SHA2/SHA3 AES-GCM, AES CCM, SM4, SM3 algorithms.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I86be2fcc485c31988496395183cb44a386907668
2025-07-24 10:19:09 +00:00
Johnny Liu
897629c033 gpu: host1x-fence: share host1x compatible string
Same compatible string can be shared between host1x_next and
host1x_fence kernel modules so that those two modules will get
automatically loaded.

Bug 4291144

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I9901f4e094d1d6484f6d6cec6b9890c9a51ad1f6
2025-07-24 10:19:09 +00:00
jianjunm
a9701b22c1 gpu: host1x-fence: support for t264
host1x-fence driver is updated to support t264.

Bug 4132685

Change-Id: I239d12864d6336cc6acca2265dbec3cd05ee629b
Signed-off-by: jianjunm <jianjunm@nvidia.com>
2025-07-24 10:19:09 +00:00
Santosh BS
c508c47cfa gpu: host1x-nvhost: syncpoint shim support for t264
Update syncpoint shim base and page size for t264.

Bug 4132685

Change-Id: If66987245e0df7552059e0db61d33d952ec427b1
Signed-off-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:09 +00:00
Santosh BS
26b1cb4a82 drm/tegra: nvhost support for t264
- VIC RISC-V EB boot support
- Programming sequence modification needed for Thor
- Reloc block linear addressing not needed for t264

Bug 4132685

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: I8ad47cce31cfd06020e33d3457a0d674a11e4d49
2025-07-24 10:19:09 +00:00
Santosh BS
340bd4418f gpu: host1x: add t264 hw specific nvhost changes
- Add chip specific nvhost files for t264
- Programming sequence modification needed for Thor
- Update the register addresses accordingly for
  mmio-vm, classid-vm, streamid base-limit, channel,
  gating registers .etc

Bug 4132685

Change-Id: I03e710c0941a68e0b6bc1352134eae6d6fd9c2b0
Signed-off-by: Santosh BS <santoshb@nvidia.com>
2025-07-24 10:19:09 +00:00
fraunak
47917521d4 kernel-oot: update pm register offsets
Added t264 specific pdata struct to
use r5_ctrl and pwr_status registers
values.

Jira CAMERASW-11038

Change-Id: I4ae6b3ffee48eff61a6b7a7309c251c38d68bf30
Signed-off-by: fraunak <fraunak@nvidia.com>
2025-07-24 10:19:09 +00:00
Johnny Liu
214da5fa51 platform: tegra: central actmon support for t264
Add new compatible string for t264.

Bug 4630271

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I6d175fef4f0f8789aae7520d91566ae7fab2ae90
2025-07-24 10:19:09 +00:00
Karthik SM
0590272184 drivers: pva: Add debug log buffer header
Jira PVAAS-15616

Change-Id: Ibc3af2b1c0b4ec5cef43efb5672f273da288c513
Signed-off-by: Karthik SM <kmaheshwarap@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176627
Reviewed-by: Bhushan Patil <bhushanp@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Arvind Prasad <arvindp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3230149
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Karthik SM
4de9787bf1 drivers: pva: move debug log buf to the beginning
Currently, debug buffer is in the end of priv 2 segment address
space. In Safety prod, we only support debug buffer and hence
moving it to the beginning of priv 2 segment buffers

Jira PVAAS-15616

Change-Id: I090db61a7b1c387ca7df476af1f3cede53499e1e
Signed-off-by: Karthik SM <kmaheshwarap@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176293
Reviewed-by: Bhushan Patil <bhushanp@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
Reviewed-by: Arvind Prasad <arvindp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3230148
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Sanjith T D
89e53fde2f vblk: Handle SCSI IOCTL case when dxfer_direction is 0
Some user space applications set the dxfer_direction to 0 when
the dxfer_len is set to 0. The native SCSI driver (sg.c) handles this
by checking for both dxfer_direction and dxfer_len.
To be compatible with the native SCSI driver, set the dxfer_direction
to SG_DXFER_NONE when dxfer_len is <= 0.

Bug 4617391
Bug 4318509

Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133692
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
(cherry picked from commit 3fc4ded22141268c8a28bb40234899c042e49ce4)
Signed-off-by: Sanjith T D <std@nvidia.com>
Change-Id: Ie56128a84d21579de1c187c4bb5611ec33ae2f1b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237146
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
2025-07-24 10:19:09 +00:00
Ishan Shah
ab3d2a477f nvidia-oot: cpuidle: Add module to disable cg
Adding a module that disables cg on t264 specifically. This is meant for
purely internal usage by the SSG and noise-characterization teams.
We are making use of some override signals that remain on a per-core
basis for this purpose.

Bug 4697511

Change-Id: I04093b97b10e1a87bfaa2615573b284a6f1ef4f3
Signed-off-by: Ishan Shah <ishah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237175
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
99b291c567 platform: dce: remove unused parameter
This patch removes unused parameter w_type from dce_admin_ipc_wait
function.

Jira TDS-15438

Change-Id: Ida2bbca042a32b5aede32821157995b4aaa2db47
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3236783
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Laxman Dewangan
b4c6c5f2a4 tegra-pcie-dma: Disable CONFIG_PCIE_TEGRA_DMA for non-supported kernel
Disable CONFIG_PCIE_TEGRA_DMA for few kernel like jammy-src, stable and
rhivos-1 where PCIE_TEGRA_DMA is not supported.

Bug 4911768

Change-Id: I4c3a379a2bc9facff2744ae83300f3e12587ec17
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237170
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Manikanta Maddireddy
3b4ea40773 PCI: Define CONFIG_PCIE_TEGRA_DMA option
Enable CONFIG_PCIE_TEGRA_DMA to support Tegra PCIe generic DMA driver.

Bug 4712065

Change-Id: I061268d023234fe395ab01cd8a2cf523252dfd52
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237169
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
2e000ca873 ASoC: tegra: Fix ASRC ratio restore issue
"alsactl restore" was not able to restore the value
goes beyond the signed int range for Ratio control.
As Ratio control expected 64bit Integer, change the
type and bits to 64 for "ASRC1 Ratio<x>" controls.

Bug 4870215

Change-Id: I96967968af151fa7b00d1d63bacade4c4d1ccce4
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221692
Reviewed-by: Hirak Biswas <hbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2025-07-24 10:19:09 +00:00
Jon Hunter
ccdd799b54 misc: mods: Fix build for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the MODS drivers as
necessary to fix this. Note that we can simply remove the mods_dmabuf
'remove' function because it does nothing.

Bug 4749580

Change-Id: I8ac05a7b713916b9aca1694ca828682808df3287
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235514
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Carl Dong <carld@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
9a1b69df09 platform: dce: Add t264 halify function support
This patch moves T264 files to nvidia-oot repo and adds support
to to Halify HSP functions for T239.

Jira TDS-15438

Change-Id: Ie42d15ab27f9a71312063a4067629030be6869c8
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233122
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
2d2fc21cec platform: dce: move hw headers to soc folder
This patch moves HW headers to SOC-specific subfolder to avoid conflict.

Jira TDS-15438

Change-Id: I45796dbe445319dd5d71a304732e11c858135345
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3227902
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
9a401f8077 platform: dce: Halify HSP functions
This patch Halify HSP access functions. SOC-specific HSP functions
are assigned during driver prob based on of_device_is_compatible check.

Jira TDS-15438

Change-Id: Ia8d68cd658eaa06dd5d06e8ba92f32907a31fd4f
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225858
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
46b8dfe796 platform: dce: Pass hsp-id to the hsp smb functions
This patch modifies HSP SMB functions to use hsp-id as an input.
This is a prework to support multiple instances of DCE HSP.

Jira TDS-15438

Change-Id: I046e456979b58c74bd39b91889b9cf12065646cb
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225857
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Mahesh Kumar
96b5772e6d platform: dce: Pass hsp-id to the hsp ss functions
This patch modifies HSP SS functions to use hsp-id a s input.
This is a prework to support multiple instances of DCE HSP.

Jira TDS-15438

Change-Id: Ie359032100fac593dc789fa2f3aefda6123dce7b
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3225856
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Jon Hunter
5f0c2eed41 memory: tegra: Fix build for Linux v6.10+
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the Tegra264 memory
drivers as necessary to ensure that they can be built for Linux v6.11+
kernels.

The mem-qual driver is missing the vmalloc.h header file and this also
causes the build to fail for Linux v6.10+ kernels to fail.

Finally, remove the version.h file from the mem-qual driver as this is
not needed.

Bug 4749580

Change-Id: I2f6273dff68fddf0d4eff4c2f4d57c445b3de291
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3235930
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:09 +00:00
Akhil R
f01dd75c1b crypto: tegra: Fix size of buffer allocated
Allocate the buffer based on the request instead of a fixed buffer
length. In operations which may require larger buffer size, a fixed
buffer may fail. Similar patch was added for AES algorithms. Fix the
same for HASH algorithms as well.

Bug 4908156

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: Idd2c1ceae1a85434a5a51154a17dce8c927bb66c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233718
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Evgeny Kornev
46e6c161b5 camera: firmware-api: add log and wrapped flag
Add log level as one of the trace header fields
RCE FW would use it to specify log level error strings
and so KMD could split them between such levels during parsing.

Add wrapped counter to signal the KMD of log wrapping around

Jira CAMERASW-27782

Change-Id: I1cd17331fb76ba422d56f8a8b6245ce2c2f4a9a8
Signed-off-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217717
(cherry picked from commit fcd3f87311866f1cc5fa1c362fe6860d4296c101)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228155
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:09 +00:00
Evgeny Kornev
83a23200ef rtcpu: adjust header len
Len for camrtc_event_header is reduced
to uint16_t so ajust casting to uint16_t

Jira CAMERASW-27782

Change-Id: I5da60c9eb4e1d82d1c9251942d5c51dae06fc374
Signed-off-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3218684
(cherry picked from commit 003f7f7e7a32341162c5b07b6fb1725b15859b75)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228154
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Khushi
c68a2ed191 vse: GCSE1/2 SHA Linux
JIRA ESSS-1400

Change-Id: Ie18857f05275cf8063d735526079d815b62c76fb
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221278
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:09 +00:00
Shobek Attupurath
04fa635c7d rtl8852ce: Add Nvidia changes to v1.19.16.1-0-g1fe335ba1.20240815_PC
1. Update makefiles to add Nvidia source path
2. Change file permissions to 0644
3. Delete files with .orig extensions
4. Fix compilation issue due to enum-int mismatch

Bug 4667769
Bug 4667981

Change-Id: I0df6f3073780daf6879c4165cd97fd62fd0a4b65
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195602
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
2025-07-24 10:19:09 +00:00
Shobek Attupurath
7dd632ff96 rtl8852ce: Add base driver v1.19.16.1-0-g1fe335ba1.20240815_PC
- support Android-14
- support Linux kernel 6.9
- support 6G regulation
- support Thermal protection
- support TX shortcut to reduce CPU loading
- fix some coverity issues
- Use RTW regulatory version rtk_8852CE_M.2_2230-67-52
- default enable con-current and MCC

Bug 4667769
Bug 4667981

Change-Id: Iee069ecdd1f00a0b78285d0a4ef5778ed9ace478
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195601
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:08 +00:00
Shobek Attupurath
5220de6faa rtl8852ce: Disable realtek 8852CE build for RHIVOS-1 kernel
Disabling build of Realtek RTL8852CE for RHIVOS-1 kernel
as this is not required for RHIVOS-1.

Bug 4667769

Change-Id: I2ac2ac84a3e2efdba5461816b02e92a17e2a6167
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186855
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Kirill Artamonov
de16c140ff video: tegra: isp: Add T264 nvhost client support
Extends ISP5 nvhost client driver to support T264 ISP device
instances.

Jira: CT26X-464

Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
Change-Id: I14eb6812b9af0f1c748a9683940478104d75841a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3006537
Tested-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3232409
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:08 +00:00
Amruta Bhamidipati
7ce3d4734a drivers: pva: Update HW Sequencer Validation
- Update HW Sequencer Validation checks to
  accommodate Tensor Data Flow

Jira PVAAS-16700

Change-Id: Ia9f599a59af45c168d6c480f6686a0051dc78d2c
Signed-off-by: Amruta Bhamidipati <abhamidipati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3229698
Reviewed-by: Michael Chen (SW-TEGRA) <michaelch@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
2025-07-24 10:19:08 +00:00
Nagaraj P N
71ccb24bdc vse: hmac-sha: return error for hash mismatch
Jira ESSS-1632

Change-Id: Ib879b67f360750ca7a3961aee6740d8dcb411513
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231084
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
a813cd8c7f PCI: tegra264: Don't initialise core_init_notifier
The 'core_init_notifier' has been removed from the pci_epc_features
structure in Linux v6.10. Given that this is a static structure and it
is initialised as 'false', we don't need to explicitly initialise this
because it will always be initialised as 'false' by default for kernels
that support this.

Bug 4787193
Bug 4593750

Change-Id: Ic2abaa3d2ab1a5c766a805936fd8ab394214bf42
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233999
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
124386b140 video: tegra: nvmap: Refactor nvmap_handle unit
Move the data-structures and functions/declarations belonging to
nvmap_handle into it's header file.

JIRA TMM-5693

Change-Id: I8a19a22512ae7932d645bd306b663fcd437d74d0
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226562
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
e023efadf0 video: tegra: nvmap: Update NvRmMemQueryHandleParams for foreign fd
Add support to query handle parameters For a foreign fd pointing to a
buffer created by OpenRM. Protect the code inside a config. Minimal info
is provided like buffer size and alignment. Other info is not required
as per the discussion with VIC and NvMM team.

Bug 4699600

Change-Id: I286a7f13d5ce33290b72748c9a745164fdff78ea
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181574
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
7ca94a27fa PCI: tegra264: Use conftest
Building the Tegra264 PCI Endpoint driver fails with certain kernel
versions such as Linux v6.7. Use the existing conftest definitions for
detecting differences between kernel versions instead of relying on
kernel version itself.

Bug 4911768

Change-Id: I1a755c9f2bc4a58e15c6caf1ecde261faebd57bb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234750
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
cded4cedac PCI: tegra264: Add missing module.h header
The Tegra264 PCIe Endpoint driver is missing the module.h header and
when compiling on some Linux kernel versions the build fails because
the various module functions and macros prototypes are not defined.

Bug 4911768

Change-Id: I4bd83bd1bb8049ad7828aa4ce452fe2ecbbc6be7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234210
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
87799bf046 PCI: tegra264: Fix build for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the Tegra264 PCI drivers
as necessary to ensure that they can be built for Linux v6.11+ kernels.

Bug 4749580
Bug 4911768

Change-Id: I9081f7cb61e9020ec8c1462a3c1b21118d7025bc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233981
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
f01227d4ea drivers: Drop inline from driver remove wrapper
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.

Bug 4749580

Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Laxman Dewangan
96dd1cf2ee memory: use conftest test for class_create
In Linux v6.4, the module pointer argument is removed from the
class_create() function. Add a test to the conftest script that checks
if this argument for the class_create() function has been removed and
use the definition created by conftest to select which version of the
function is used.

Bug 4183168
Bug 4221847

Change-Id: Ic1aef0216eae64b32273dc085b8b8306d1235d9b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3234808
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
01b31bbabb memory: tegra: Update allowlist of PERFMUX registers
Add few PERFMUX register offsets to allowlist for SOC-HWPM to access.

Bug 4704678

Change-Id: Ica7c6d2a7fc47699abf0969eef1b4b4a518a5b78
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3221623
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
6d78ed22c7 memory: tegra: Restrict access to non-PERMUX registers
SOC-HWPM shouldn't request read/write to non-PERMUX registers of
MC-Channels or MSS-HUB. If it does, restrict the access and return
error.

Bug 4704678

Change-Id: I03bae82dfcf4bb9b63e135132b03b5b1e67632f1
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3198241
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
ba80679071 memory: tegra: Add driver or smmu-hwpm interface
Bug 4704679

Change-Id: If02ceec6c4b147fe76f578eba678c35500e381ba
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3186439
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
80cc12def2 drivers: tegra: Add mem-qual driver
Add a loadable module for mem-qual STG IP client.
- This driver exposes following device nodes under /dev.
qualdev-0, qualdev-1, qualdev-2, qualdev-3, qualdev-4
- This driver provides 2 ioctls, one is to alloc a buffer and create
IOVA for it by mapping the buffer into the IOVA space of the respective
device.
- Second ioctl is to free the IOVA mapping and pages associated with the
buffer.
- Users of this driver will open the mem qual device node and then call
the first ioctl with size of the buffer as input during init time and
receive the IOVA.
- During deinit time, users will call the second ioctl with the IOVA as
input and the ioctl will free the IOVA mapping and buffer.

Bug 4546339

Change-Id: Idc7279ecf5118de5dbde100d40877150fef29ca5
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3145175
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
45eab8b2ae memory: tegra: mc-t26x: Fix ioremap on MCB aperture
MCB aperture is already ioremapped in MC driver using
devm_ioremap_resource(). This doesn't allow other driver to ioremap
this aperture using devm_ioremap* calls.
mc-t26x driver need to access MCB aperture to get carveout info.
So, fix this by using just ioremap on aperture without using devm*
APIs.
Also, fix the carveout apertures.

Bug 4707077

Change-Id: Ie7426ad3519306dd4dffdf54e4c58e81f3c8fb34
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3158697
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
a76cf2b65e memory: tegra: Remove downstream loadable mc-err driver
Downstream mc-err loadable module won't be able to print mc-err during
boot. Hence we are making this a static driver in kernel-oot.
Later on we need to update the upstream mc driver to incorporate the
changes.

Bug 4345191

Change-Id: I97eeb6804234f97d7a8209037f8ad5e7dea4d6c1
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3154336
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
c549b0894f platform: tegra: mc-utils: Update compatible string
Update compatible string in mc-utils driver to use
nvidia,tegra264-mc-utils instead of nvidia,tegra-t26x-mc, as we want a
separate DT node for mc-utils and dram_channels property would be added
in that DT node, which is required for HV+L case.

Bug 4090660

Change-Id: I9f988da4b264738d66b329d478b231bf36e71a18
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3138031
Tested-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
2b75cb208d memory: tegra: Update mc-err driver as per latest flow
Update mc-err driver for t264 as per the latest flow provided by HW
team.
- Correct register offsets.
- Add mc-error handling flow for MCF, HUB, HUBC, SBS and MC Channel.
- Register interrupt handlers for interrupts from these different
MSS components.

Bug 4345191

Change-Id: Ic0746949a92bebd545bf69f585d48b5c5818cd13
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3131096
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
1cfbb80f3c platform: tegra: mc-utils: Enable debugfs node
Enable debugfs node of mc-utils number of mc channels for t264.
Due to this change, we don't have to enable debug logs while verifying
mc-utils. This will save our time during bringup.

Bug 4090660

Change-Id: I1cf15d182ddeed7f2c93dc5bc65cebdc16590d2b
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3104229
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
3bc182a772 platform: tegra: mc-utils: Correct register offset
The offset of MC_EMEM_ADR_CFG_CHANNEL_ENABLE_0 register is incorrect in
the driver, correct it as per the latest spec.

Bug 4090660

Change-Id: I0eec6fd8a82bdc5152af7a0742bbd00541507818
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3101731
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
deaa196fd0 platform: tegra: mc-utils: Cleanup unnecessary functions
No client need the dram_clk_to_mc_clk, tegra_dram_types functions from
mc-utils. Hence remove these functions.
get_dram_num_channels is needed by resman team, hence update it to
return number of channels for t264.

Bug 4090660

Change-Id: I3e7571be73cfd94b3e2feebb6320a57b46b5fd48
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3047611
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
0fe1f6b8b0 nvidia-t264: Fix missing-prototypes
The compiler option -Wmissing-prototypes is being enabled globally in
the upstream Linux kernel and this causes build failures. The build
failures occur because either the driver is missing an include file
which has the prototype or because the function is not declared
statically when it should be (ie. there are no external users).

Fix the various build failures that are seen when enabling
-Wmissing-prototypes.

Bug 4404965

Change-Id: I0f9189250655c3b3006909e51ffe3aca7fbf763b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3028738
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
b2999bef41 memory: tegra: Update number of MC channels
MC has 16 channels and one broadcast channel on T264.
Update same in mc-hwpm driver for T264.

Bug 3846055

Change-Id: I625198b346069501eb9384cf41e6031627a89709
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2944957
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
aafa45a665 memory: tegra: Handle incorrect mc interrupt mask case
Cert-C is flagging following issue in mc-err code:
cert_exp33_c_violation: Using uninitialized value status_reg when
calling mc_ch_readl.

Fix the above issue by adding a default case for MC interrupt mask and
return from there by printing the error.

CID 681739

Change-Id: I6dfaa8e830b6b3545c0018a3ebaf2d1f208a1347
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2950862
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
0c103ec66e memory: tegra: Add support for mc-err driver
Add support for mc-err driver on T264. Maintain driver similar to
current upstream mc-err driver, so that upstreaming diff for T264 would
be straight forward. Current IRQ handling logic is as follows:
- Read MCF int status from MCB
- Find out the MC channel responsible for generating error
- Read address register from that MC channel block to get the address
- Find out type of error from status register

Current implementation is as per the information received so far,
further updates will be made once HW team provide programming
guidelines.

Bug 3846055

Change-Id: I71508a88521e8b5c3d046b087efe4baf2769ceb3
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2929112
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
2710f2b3bd platform: tegra: Update compatible string check
On T264 simulation platform, the top level compatible strings is updated
to nvidia,t264sim. Because of which, the mc-utils driver is not able to
probe. Update the mc-utils driver to check for this new compatible
string as well.

Bug 4090660

Change-Id: I4c29cc9cf0cf87c72cd6f9dceb66473ce4cf4feb
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2933473
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
66cb141d65 memory: tegra: fix coverity overflow defect
mc_readl() returns 32-bit value. The value is getting left-shifted by
17-bits which can cause overflow and loss of data.
Fix this by casting the return value of mc_readl() to u64.

CID 10171820

Bug 3952896

Change-Id: I4fc7af5620f696a881701ce75b5740ac51f68c3a
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2930231
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
e6106d4ecb memory: tegra: Add mc-hwpm driver for T264
Add mc-hwpm driver for T264. This driver registers hwpm_ip_ops
which is used by hwpm driver to evaluate performance of MC channels.

Bug 4110130

Change-Id: I72af8dc60e834195129292d2d5263a6db1cf6f1a
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2914644
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
e7db60a58d memory: tegra: Enable building of mc-t26x
mc-t26x driver was not getting built because it's entry was missing in
kernel-src-files-copy-list.txt. Add files required for mc-t26x in
kernel-src-files-copy-list.txt.
Also, move the mc-t26x driver to a private-soc directory to build
separately from existing files in memory/tegra directory.

Bug 3960743

Change-Id: I71a6271dcc5c962630a3c939f84ba0b511cae4dd
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2914088
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
446ff87f28 platform: tegra: Update DRAM clk to MC clk formula
As per info received from HW team, we should not hardcode 1600 in DRAM
clock to MC clock conversion function. DRAM clk to EMC clk ratio is
always 4:1 while EMC clk to MC clk ratio can be found in CAR register
CLK_RST_CONTROLLER_CLK_SOURCE_EMC_0.MC_EMC_SAME_FREQ bit.
If it's 0 then MC frequency is half of EMC frequency, otherwise MC freq
is same as EMC freq. Hence update DRAM clock to MC clock function as per
above logic.

Bug 4090660

Change-Id: I5a7586aeee29fe1c98437cf0dd5b820d8f540072
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2915138
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
13412069a0 platform: tegra: Add mc-utils support for T264
mc-utils driver should support the following functionality on T264.
Update mc-utils driver for these functionalities for T264:
- EMC freq to BW conversion
- BW to freq conversion
- DRAM clock to MC clock coversion

Bug 4090660

Change-Id: If5ee54d49024d03620dad01049fe35bbcaf3f812
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2900181
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ketan Patil
86efe596c5 platform: tegra: Copy mc-utils driver
mc-utils driver support is needed on T264, and it should be present in
nvidia-t264 repo, so as to avoid leaking any information. Also, we need
to make sure once T264 is public the existing mc-utils driver can be
updated easily for T264 support.
Hence first copy the existing mc-utils driver from nvidia-oot into
nvidia-t264, then make changes for T264 and finally when T264 is public,
just cherry-pick the addional changes in nvidia-oot and clean up driver
from nvidia-t264. This change is doing the first step i.e. copying
existing mc-utils driver code from nvidia-oot into nvidia-t264.

Bug 4090660

Change-Id: I95eff8d3f7fef267a5c0f0e2137c4343a615d4aa
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2911970
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
c403177a9f dt-bindings: memory: Fix client names for HSS and XUSB
All HSS clients and XUSB client were having same names causing multiple
defines for same client.
Fix them with appropriate names and client IDs.

Bug 3960743

Change-Id: I88a3de1047f68448eccd4527017ebe7dc3435cdc
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2913061
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:08 +00:00
Ashish Mhetre
8bd8900183 include: memory: Add MC client ID header
Add header file for Tegra264 MC clients ID.

Bug 3960743

Change-Id: I51dbb171c1df3e805ef7f68f91a84f94b9a3de19
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2912359
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:08 +00:00
Laxman Dewangan
217b544137 mc-utils: Prepare tree for collapsing T264 OOT drivers
Remove some of the files which were added as optional for
non-existing of T264 patches. As T264 OOT drivers are
collapsing into the core tree, remove such optional files.

Change-Id: I83116585369f4893d14b527356752fbf2a9a80c8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:08 +00:00
Viswanath L
051d5cb932 nvadsp: t264: Toggle AON_CPU clk at suspend/resume
Enable/disable AON_CPU clock at runtime resume/suspend
so that the clock is enabled only upon need and we do not
depend on MB2 to enable the clock unconditionally.

Also disable runtime suspend/resume if AON CPU is already in
running state at driver probe, indicating always ON operation.

Bug 4777122

Change-Id: I0b6037bd47b54d012af7ccfcea2c3a6102ced781
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3223014
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233301
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:08 +00:00
Sanath Kumar Gampa
5e947589fe nvethernet: macsec:DT param enables VLAN in clear
Issue: No config option to place the vlan tag before or after sectag

Fix: Add a DT param to decide the position of VLAN tag respective to
sectag

Bug 4134079

Change-Id: I1b5d674ea289e905cad6ae6cc9c7c0bb7fef004d
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231494
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Arvind M
48a651f8b4 nvdla: kmd: switch to using portability layer
- Revamp the core logic to use the portability layer.
- Introduce ping debugfs node.

Bug:
- Update the abort retry logic for -EAGAIN error code. In
  the absence of this logic, the queue becomes unavailable
  due to race between the reset and the flush command.

Jira DLA-7294
Jira DLA-7310

Change-Id: I9f54f14334736189a00d2236f374188c2bac6155
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196673
Reviewed-by: Akshata Bhat <akshatab@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Arvind M
9a42ad2d63 nvdla: kmd: introduce portability layer
- Define nvdla_sync_* handles and interfaces for sync management.
- Define nvdla_fw_* interfaces for communication with firmware.
- Define nvdla_device_* interfaces for device management.

Jira DLA-7294
Jira DLA-7310

Change-Id: I2af5b16f3ad8ca0e478aea30d7f192daf9c69f66
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3161042
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Akshata Bhat <akshatab@nvidia.com>
2025-07-24 10:19:08 +00:00
Akshata
a917df5927 nvdla: kmd: switch to on-demand cleanup tasklist
[1] In the event of busy CPU, the delayed interrupt or the
    delayed callback from nvhost will result in the submission
    failure.
[2] This commit fixes the issue by performing mandatory and controlled
    cleanups.
        - Atmost 2 slots are cleaned up prior to the submission.
        - Complete queue cleanup during the suspend preparation.
        - Complete queue cleanup after successful abort operation.
[3] Additionally, the commit fixes some potential leaks in the error
    path.

Bug 4503438
Bug 4414867

Change-Id: Ic40f0c4b1f3c653d5d5e613adab01d3cbc3b9722
Signed-off-by: Arvind M <am@nvidia.com>
Signed-off-by: Akshata Bhat <akshatab@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3105861
(cherry picked from commit 438e8f8e96483971798e2d9014ed4a999143d082)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3120798
(cherry picked from commit 5668f6439643d44b3384bcd750a645d8db6ee0c9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196672
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
2025-07-24 10:19:08 +00:00
Arvind M
cd5a44401b dla: kmd: fix race between reset and submission
[1] Prior to this commit, the reset may happen in parallel with the
    submissions. This results in timeout during the falcon boot.
[2] This commit manages the availability status to ensure that,
    the submissions fail gracefully when the reset is in progress.

Bug 4252264

Change-Id: I499fbb742165f0584cafed00fd0c9f8a0ef47e65
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3046052
(cherry picked from commit ed8345cf3dd8942ef680e9c9bb63ea145dfb517b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182574
Reviewed-by: Ken Adams <kadams@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Akshata Bhat <akshatab@nvidia.com>
2025-07-24 10:19:08 +00:00
Laxman Dewangan
17ef98bafa pcie: T264: Skip build of T264 specific PCIE driver for few kernel
Skip T264 PCIE drivers for the few kernels like jammy-src, rhivos-1 and
stable.

Bug 4911768

Change-Id: I198fb279712594a69950b72d6b8f14a9ef151e5f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:08 +00:00
Laxman Dewangan
1e0bef1f51 pci: Implement function of tegra_pcie if proper config is selected
To avoid the duplicate function defintion between the header and
source, use the proper config to protect it.

Bug 4911768

Change-Id: I8d6880833c122eb2eb7194929eb5ea2cb78a9c45
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:08 +00:00
ruppala
3909cff8d5 PCI: tegra264: Add support for PEX WAKE GPIO
Add support for handling the PEX WAKE GPIO (pex_wake_gpiod) by
parsing the pex-wake GPIO from the device tree and setup the
interrupt line.

Enable and disable the wake-up interrupt during system
suspend/resume.

Bug 4788812

Change-Id: Ie8936aa9cc551db1a5d24b277b091de5fbc0439e
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3212875
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2025-07-24 10:19:08 +00:00
Nagarjuna Kristam
f4df943461 PCI: tegra264-ep: Disable SW PME_TO_ACK
SW PME_TO_ACK is no longer used as BLCG is applied for EP
between L2 and controller powergate.

Bug 4844371

Change-Id: Ibc5c0735aa1e46b91a3a0dfa828cf72ce16e6e12
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3208143
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
a558aeb624 PCI: tegra264: On EP_RESET poll for detect reset LTSSM
When Root port applies secondary bus reset(SBR) or link disable, EP_RESET
interrupt is received at Endpoint. On EP_RESET poll for detect reset LTSSM
state which confirms that SBR reset released or link disable is cleared.
After polling perform Endpoint controller cold reset.

Due to HW bug 4777981, C2 x2/x1 LTSSM state doesn't move to detect reset
when SBR reset is released, instead it stays in hot reset state. In this
case perform Endpoint controller cold reset after poll timeout. PCIe link
still comes up in this case.

Bug 4777981
Bug 4785875

Change-Id: I89402aa7c963082510170b88a1f7a4ec481162be
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3197116
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:08 +00:00
Nagarjuna Kristam
216461effa PCI: tegra264: Add pinctl support
Configure pinmux settings if any available in DT.

Bug 3191308

Change-Id: I79b1965dfe95f39322828ce5ea9acb22d2cb43e1
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3191308
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:08 +00:00
Nagarjuna Kristam
49f357d6e1 pci: t264-xdma: Fix MSI error handling
Issue:
When XDMA interrupt is received and only error is set, interrupt is not
processed resulting in DMA HW halt and no further transfers working.

Fix:
Process XDMA irq, when either transfer complete or error status is set.

Bug 4747322

Change-Id: Ic71f3bf93343e986a1f4be9b570bcc36f03afeeb
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3175952
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Nagarjuna Kristam
8774bd321b pci: t264: xdma: Fix MSI for local and remote
Use different MSI channels for local and remote use case to avoid
configuring same registers with different info.

Bug 4779415

Change-Id: I13fab912589d47484881cd862fc9eaf0f602e64e
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3186319
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
c51582e26e PCI: Enable CONFIG_PCIE_TEGRA_DMA flag in header file
Tegra DMA driver functions are defined in nvidia-t264 repo and these
functions are used in nvidia-oot repo. Prototypes of these functions
are defined in nvidia-oot repo header file tegra-pcie-dma.h. Enable
CONFIG_PCIE_TEGRA_DMA flag to expose the function prototypes to the
drivers in nvidia-oot repo. This functions should be exposed only if
nvidia-t264 drivers are included in kernel compilation.

Bug 4712065

Change-Id: I74bb98bd9efbf2e36ed05aae866760a92a4ee7dd
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3164961
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:08 +00:00
Nagarjuna Kristam
bb8ac1d6be PCI: tegra264: Update EP state change handling
When Thor EP is connected to Thor RP, PERST# signal don't get toggle
post Thor RP boot.
- When EP start is triggered, de-assert EP if RP PERST# is released.
- When EP stop is triggered, assert EP directly.

Bug 4567932

Change-Id: I86e9251205a7c19dd32789052a10669fc3b48098
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3170657
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
4ab2bfd19c PCI: Fix crash in PCIe dma test deinit
PCIe deinit function tegra_pcie_dma_deinit() takes cookie double pointer
as argument. Add null check for pointer stored in double pointer variable
to avoid crash in tegra_pcie_dma_deinit().

Bug 4712065

Change-Id: Ib272058f558738c7e6b5a20c6f2ba85c2bf2a781
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3163949
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
f439ffe285 PCI: tegra264: Fix kernel crash during outbound map
Kernel crash is observed during outbound mapping since memory is not
allocated for ob_addr pointer. Tegra264 support fixed 8 outbound channels,
so change ob_addr pointer as a static array to fix the kernel crash.

Bug 4705050

Change-Id: Ibf675c1d00abcbd8596f9be9b76ae7ef19d2fd38
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3163948
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Nagarjuna Kristam <nkristam@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
e9881b2cee PCI: tegra264: Add link disable and SBR support
When PCIe link is disabled or secondary bus reset is done by RP,
EP LTSSM state goes to link disable or hot reset respectively.
Update the LTSSM state check accordingly to support link disable
and secondary bus reset.

XTL_EP_PRI_BAR_CONFIG and XTL_EP_PRI_RESIZE_BAR1 are part of
hot reset domain, when link is going through hot reset, these
registers are not accessible. So, remove these register programming
in tegra264_pcie_ep_clear_bar(). After hot reset these registers
come back with reset values.

Bug 4712053

Change-Id: Ieaf37ed9fed6722db8a16027947121b1cfd1ef4c
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3163927
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
d091253965 PCI: tegra264: Add driver unbind support
Add remove callback function support driver unbind.

Bug 4712048

Change-Id: I9c855d6403f187de1c93c00ba8cc270e4fed37f4
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3163926
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
26c5dc150d PCI: Fix XDMA reset flow
When XDMA error is observed driver resets the XDMA engine.
xdma_ll_ch_init() function is called to reinitialize the
XDMA engine. Incorrect value is passed as the argument for
channel type. Fix this issue by using correct variable for
channel type.

Bug 4707453

Change-Id: Ic06563d599bfd7c0979c9db0a20cebeaa18fe3c8
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3163925
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
c1de5ba655 PCI: Add Tegra264 PCIe DMA driver
Copy T234 DMA driver and add Tegra264 PCIe DMA driver with common wrapper
to support both T264 and T234 PCIe DMA.

Bug 4549851

Change-Id: Ie4f55021aadd4c4f9b468b49fe34a562cdf3fa6c
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3124399
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Jon Hunter
4d4e8e54eb PCI: tegra264: Fix build for Linux v6.9
The pci_epc_features structure was updated in Linux v6.9 to move various
fields under a new pci_epc_bar_desc structure. Use conftest to determine
if the new pci_epc_bar_desc structure is present.

Finally, add the endpoint alignment for the inbound ATU on Tegra264
which is 64kB.

Bug 4627271

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Change-Id: I074e19ca53cea0e13d9872b240a023dd83779ae7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3129630
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:08 +00:00
Manikanta Maddireddy
0bf232b1d8 PCI: tegra264: Add PCIe EP controller driver
Register Tegra264 PCIe EP controller platform driver. Handle PERST#
deassert and send MRQ call to initialize PCIe HW. Register with EPC
core driver and define EPC core ops callback functions.

Bug 4549851

Change-Id: I353209852d0162d8219fa66b523a3cb3daf642a7
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2994454
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
c81c525baf PCI: tegra264: Remove private headers
The only functions needed from the private pci.h header are
pci_dev_is_disconnected() and of_get_pci_domain_nr().

Starting with Linux v6.9, pci_dev_is_disconnected() has been moved to
the public header and now the private header conflicts with the public
due to multiple definitions. It is better to remove the private pci.h
header file and backport the upstream change that moves the definition
of pci_dev_is_disconnected() to the public header.

With regard to the function of_get_pci_domain_nr(), just declare an
extern for the function prototype in the driver file rather than
copying the entire kernel header.

Bug 4471899

Change-Id: I10e7c3c6a92e9ba87153b2682cc3e69ced8c1a31
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3117272
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Manikanta Maddireddy
f0ec6ab5f5 PCI: tegra264: Add PCIe resume support
Per PCIe r5.0, 6.6.1 wait for 100 ms after DLL up. Optimize PCIe link up
poll logic. Add resume_noirq() callback back function in PCIe driver and
call tegra264_pcie_init() to deassert PERST# and get PCIe link up.
Also, fix minor coding style issues.

Bug 4404453

Change-Id: Iad2d22166eb0c80a20b74ada2ee2766f8d3e174f
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3107413
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Manikanta Maddireddy
ef4d11362e PCI: tegra264: Move driver file to new dir t264
nvidia-t264 drivers are copied to nvidia-oot path and compile them to
create out-of-the-tree driver modules. Create new directory to avoid
replacing exisiting Makefile in out-of-the-tree repo.

Bug 4000789

Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Change-Id: I8040a86102b164feae6e1fd2251c69d3dc039dde
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2870776
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Laxman Dewangan
050b888cca pcie: remove private-soc makefile to prepare to merge T264 pcie drivers
Remvoe the existing makefile as preparation to merge T264 specific
PCIE drivers into core repo.

Bug 4911768

Change-Id: Ifa65e36b5253bf2dc4ab62fe8caaf10a53e7cff3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:07 +00:00
Dara Ramesh
056b1ab0eb nvadsp: t264: Set HWMBOX to pass OS config
Set the TYPE1_DATA3 register (offset 0x08054) of
HWMBOX1 to pass the OS config to the firmware

In the OS config info set Bit 1 (VIRT CONFIG) if
the OS configuration is virtualized

Bug 4635899

Change-Id: I294e710fc7beb9e21401fb73a5eb1b53f735ef41
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3207575
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Aditya Bavanari <abavanari@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
4714f80198 nvadsp: t264: Implement AON_CPU assert/deassert
Implement CAR assert/deassert of AON_CPU so that
it is pulled into reset at os_suspend() call.

Bug 3916054

Change-Id: I6069c2f12b5809e6ec8db8f304f9e5bf65a0b636
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3181031
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
a9663f6164 nvadsp: t264: Set HWMBOX to pass CPU freq
Set TYPE1_DATA2 register (offset 0x08050) of
HWMBOX1 to pass CPU freq to firmware.

Bug 4678940

Change-Id: I54a882cf329b3e0bb24b8cff5f6196d58b60f072
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3180576
Reviewed-by: Asha T <atalambedu@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Asha Talambedu
bd3f20d097 nvadsp: aon: t264: Map hwmbx interrupts
Maps mbox 0's full and mbox 1's empty interrupt to
shared interrupt lines 3 and 2 respectively.

Note that this is WAR and actual fix will use single interrupt
line i.e SI_1 to map both full and empty interrupts

Bug 4165898

Change-Id: Iaf26d38dc460160d68d7b58c59500599f5afd3a2
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3139919
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
5442215da4 nvadsp: t264: Set no interrupt for WFI on AON
AON F1 does not generate interrupt on entering WAITI, so
set no_wfi_irq flag to true. WFI status can be queried by
reading AO_MISC register.

Bug 3916054

Change-Id: I3e9e3e66fdb4d9dab25b74484fee07df211ceab6
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3139592
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
f2c62be7fb nvadsp: t264: Add WAITI status query for ADSP
Implement WFI (WAITI) status check for ADSP by reading AMISC register.

Bug 3916054

Change-Id: If62bcf18ac56bba1cc9afb5a0c5e27f01e3807bc
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3139380
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
d75315355c nvadsp: t264: Reorg and update chip data
- Move chip data from patch files to dev-*.c files for
    ease of maintenance
 - Add patch file to patch compatible and chip data into
    dev.c file, also add dev-*.c files to build makefile
 - Add stub for dump_core_state function pointer
 - ADSP updates
    - Use AMISC base directly from reg DT prop as it will
       be offset as per the DSP instance (drop adsp_prid)
    - Set amc_not_avlbl to true for ADSP[1], so only ADSP[0]
       will access AMC
    - Change compatible of ADSP[0] to "nvidia,tegra264-adsp"
       in order to keep continuity with previous chip
       generations (unique identifier string is "adsp")

Also remove T264 adsp support from kprev.

Bug 3682950
Bug 4165898

Change-Id: I22abf3fda01f4e0e259759ba1816a9580a474d40
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3107870
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
2025-07-24 10:19:07 +00:00
Aditya Bavanari
224ba02a19 nvadsp: t264: Invoke reset controls in assert/deassert
In assert and deassert callbacks, invoke the reset control
assert and deassert functions respectively through
"adsp" reset property.

Bug 3682950

Change-Id: I8bed0b3979e879e218af95d3fd1f836b6d2cca9e
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3081997
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Asha Talambedu
64b01b7616 nvadsp: t264: Extended for AON DSP
- Added function definitions to control AON from
kernel on T264.

- Copy files dev-t264-aon.c and dev-t264-aon.h to
drivers/platform/tegra/nvadsp/

- Patch chip_data,compatible and hdrs to dev.c for T264 AON

Bug 4165898

Change-Id: Iad31d89a7bff722fed47f4c28b0b7193c13ce414
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3009638
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
d85d5d657d nvadsp: t264: Fix include of dev.h
Allow dev.h to be included from source directory.

Bug 4164138
Bug 3682950

Change-Id: If6be232a428c843a45a14f155d957850d28847a9
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2979502
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
19387d860f nvadsp: t264: Add chip support
Added chip_data and function definitions to support nvadsp
driver for T264.

 - Clock config and CAR assert/deassert are TBD
 - Booting is from default reset vector

Bug 3682950

Change-Id: If4cad64aa57a865b9d1afa8204c55904661ea5b8
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2894325
Reviewed-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Laxman Dewangan
e1bbd222ab pva: Do not build for ACK
Do not build PVA for android kernel as this is not
required for Android.

Bug 4911768

Change-Id: Ibc35c074a8a340afa57cd634e00399e408a416fb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:07 +00:00
omar
35e17c237e drivers: pva: update SID programming for PVA
Jira PVAAS-15366

Change-Id: Id0a541350afc62bb6d1eef59fb301b8650d16254
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3160296
Tested-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Amruta Bhamidipati
ee9b187f9a drivers: pva: t26x: Fix HWSEQ RRA validation check
HWSEQ buffer is validated for each frame for all addressing modes
while verifying the hwseq blob because in t26x multiple frames
with different modes can be linked in HW to describe a use case.

Removing checking all the frames specifically for RRA mode here.

Bug 4588253

Signed-off-by: Amruta Bhamidipati<abhamidipati@nvidia.com>

Change-Id: Ib4c386dccca6554bbf4bace046ed182b5910da00
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3153300
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Tested-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Krish Agarwal <krisha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
2025-07-24 10:19:07 +00:00
sreeharim
1a030099f0 drivers: PVA : Update the PVE SID
- Update the PVE SID to match the GSC access SID
  for PPE to access the embedded clear code

Jira PVAAS-14913

Change-Id: Icc5a6d2a4cd5faf4711134f48d27263cf1d72879
Signed-off-by: sreeharim <sreeharim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3122900
Tested-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
omar
501dcc7eca nvidia-oot: support pva oot t264 build
Bug 4246530

Change-Id: I984f567ff33e322987494c891d60810e2de5cfa3
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2999242
Reviewed-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
abhinayaa
9ca1d59884 drivers: pva: t26x: Fix HWSEQ RRA validation check
In RRA mode, HWSEQ buffer should be validated for each frame.
However, at present, the validation is being done only for
the first frame. Fix this.

Also, record which descriptors will be used in RRA mode as this
information is needed elsewhere in the driver.

Bug 4245426

Change-Id: Ibe572f43350faba27f2e973d6e39ac6e6a4ad1c9
Signed-off-by: abhinayaa <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2988532
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
abhinayaa
569844dd83 drivers: pva: Update HW SEQ and ADB for T26x
- T26x support 304 ADBs compared to 272 on T23x. Add code to support
this distinction.

- T26x introduces the following updates to HWSEQ:
	- a new HWSEQ mode - Random Region Access (RRA).
	- increased HWSEQ RAM size of 2KB.
  Add code to support these changes.

Jira PVAAS-13252

Change-Id: I92d65524b526eda1be8f8dc81dc4e41d0db7f488
Signed-off-by: abhinayaa <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2926761
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
abhinayaa
1f317971e6 drivers: pva: Update t26x channel and desc limit
- T26x supports upto 96 descriptors. Add a new macro to support this.
- Add a new macro to support the number of channels in T26x.

Note that in T26x, the reserved descriptors are at indices 60-63 as
is also the case in other PVA generations. Since the reserved
descriptors are not at the end of the descriptor range in T26x,
special handling of descriptors is needed to ensure that the
reservered descriptors are not patched or linked to.

Jira PVAAS-13252

Change-Id: I2543aa4645a72d1c737baae4dcb3405eb879c0ae
Signed-off-by: abhinayaa <abhinayaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2926759
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Amruta Bhamidipati
fb031a3ea6 drivers: pva: Disable carveout for T264 by default
GSC path has not yet been enabled on T264, use carveout disabled
settings by default for T264.

Signed-off-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Change-Id: I44abc2ebb13f4c28bd641d44bbcf9ea0dece647f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2942352
Reviewed-by: Abhinaya Agrawal <abhinayaa@nvidia.com>
Reviewed-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
abhamidipati
d85e055a1e drivers: pva: Add support for T264
- Programming sequence and Driver private data modification for T264
- Add chip specific defines for number of context devices and
context device name length
- Update the VMEM start and end region addresses for T264

JIRA PVAAS-13227

Change-Id: Ib4512e5690d006f8a5139e37c680e74d7d566492
Signed-off-by: abhamidipati<abhamidipati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/2927484
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Laxman Dewangan
9037910a40 pva: Remove makefile to prepare for T264 patch apply
To apply the T264 PVA drivers cleanly, remove the Makefile
of PVA as the content will be provided from patch.

Bug 4911768

Change-Id: Iafdc13f79a851076279c248e5ca9a0a9e9a0128e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:07 +00:00
Pritesh Raithatha
36d513f3cd video: tegra: nvmap: refactor nvmap debug unit
-Created nvmap_debug.c and nvmap_debug.h with moving debug related
code from nvmap_dev to nvmap_debug.
-Refactor code to have all debugfs creation in one function and
call it from nvmap_dev. Same for debugfs removal.
-Build nvmap_debug only when CONFIG_DEBUG_FS is enabled.

JIRA TMM-5721

Change-Id: Ib6482be63bdd56c7ff09804c7b1edaa6e4cf2f21
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226784
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
5a54d4161a drivers: Fix build for Linux v6.12
In Linux v6.12 the definition 'no_llseek' was finally removed. Since
Linux v6.0 it had been redefined as NULL. Add a test to conftest to
determine if 'no_llseek' is present and if not then it is no longer
necessary to populate this and we can leave as NULL.

Bug 4876974

Change-Id: I051fdb285b32260b5913dad89cabe0be04253f67
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3222106
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
fraunak
cc49f73763 nvidia-oot: add tracing support to identify isp
This change adds the isp logging to identify which isp instance is being
run in the rtcpu traces.

Jira CT26X-1790

Change-Id: I87744fd15629bb9faa96f5970b5f5ecea4b59937
Signed-off-by: fraunak <fraunak@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221517
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2025-07-24 10:19:07 +00:00
Johnny Liu
d21ee3b3a8 devfreq: nvhost_podgov: fix build issue for K519+
Since K519+, frequency table and max_state information is stored in the
devfreq struct directly, not in the devfreq_dev_profile struct. Use
nvidia conftest to conditionally build the governor and choose the
correct data structure for accessing the information.

Kernel build won't complain anything when build the governor, but when
the devfreq driver (e.g. nvgpu) trying to add the devfreq device
with the nvhost_pogdov governor, it will fail to add the devfreq
device since the frequency table information is NULL in the
devfreq_dev_profile and the governor use the wrong information.

Bug 4883576

Change-Id: I885bc4ceac885eea5644416b6eacefbbea523a2b
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3229870
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2025-07-24 10:19:07 +00:00
Viswanath L
a2c75bcda2 nvadsp: Add flag for always ON operation
Add flag 'is_always_on' in driver state that will be set
if DSP CPU is already in running state at driver probe.

Bug 4777122

Change-Id: I99e255266f12f8cc0655f78e269e95ea303c1233
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223695
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2025-07-24 10:19:07 +00:00
Ankur Pawar
ea7b98682a media: i2c: fix IMX390 SDR mode corruption
Bottom two lines in IMX390 SDR mode are completely
black. Fix issue in SDR mode table. Also change the
image resolution to 1936x1096.

Last two line are removed by disabling SMPG(Safety Mechanism Pattern Generator) using register 0x2DFC, 0x2E24.

Bug 4505240

Change-Id: I92047ea83d20f1b4ca4e712718051a9c6e69cfcb
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3147214
(cherry picked from commit 3c87c18fcf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3228151
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Addarsh Srivastava <addarshs@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Sheetal Tigadoli
d5575a5915 drivers:nvpps:Add PTP-TSC HW Locking suport on T26X
Add PTP-TSC HW Locking suport on T26X based platforms.

Bug 4791366

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: Ib285ca3d945ca93ab3cc0e8473c9fe07f88d0589
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219460
Reviewed-by: Vijay Mishra <vijaym@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2025-07-24 10:19:07 +00:00
Shubham Chandra
7b1b8e17b5 nv_hawk_owl: add error check for reading gpio prop
Add error checks for reading GPIO properties from
device-tree nodes in nv_hawk_owl driver.

Bug 4715132

Change-Id: I6f539d04430883ab839aeaab957809ebb6049238
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168601
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:07 +00:00
Shubham Chandra
f6fab5cebe drivers: cam_cdi_tsc: update driver for T264
Update cam_cdi_tsc driver to support TSC - 1ns
per tick for T264.

Bug 4715132

Change-Id: I4c38cde4f8b959ec3c3f5310d1467e18b7d104bd
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184213
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Sanjith T D
7dca31ebf6 vblk: Add access control for FFU and Device management.
Jira SSV-11935

Change-Id: I3cd0e22cdc57ffa3833e9d2710f3c3b1a521d4f8
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202276
(cherry picked from commit 1fbb9cb8033a76fcda190968436b51d42819d929)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221220
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
kevixie
2cb9cb0925 sipl: add Linux FSYNC driver reconfiguration support
Align Linux FSYNC functionality to QNX non-safety by
adding two non-safety public interfaces to the FSYNC
Kernel Driver to stop and reconfigure FSYNC groups and
their generators.

Also removes individual nodes exposed for each fsync
group and instead accepts group ID as a parameter to
align with QNX functionality and allow configurability
for default group

The design of this feature is documented in Confluence:
CAMERA/FSYNC Reconfiguration for Crosstraffic Cameras

Jira CAMERASW-22038

Change-Id: I3570cd11f62f807464589677c449e899a49f98fc
Signed-off-by: kevixie <kevixie@nvidia.com>
(cherry picked from commit cca0c2364824b025daf2cabc393878907abe03e4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196632
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202934
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
2025-07-24 10:19:07 +00:00
Janardhan Reddy
cfaad9cd6d nvscic2c-pcie: Add Buffer limts per endpoint
Address security ARR: DOS60-REQ-7169 in streaming mode.
Add per endpoint streaming mode buffer limits.

Bug 4883175
JIRA NVIPC-2453

Change-Id: I31edb2bacf4a8af560e7e6da7d378da874d105bd
Signed-off-by: Janardhan Reddy <jreddya@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196300
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Ankur Pawar
6c9bba8912 media: i2c: enable IMX390 WDR mode
Enable WDR(wide dynamic range) mode for IMX390.
The following modification and addition are done:
1 Add WDR mode table
2 Restructure IMX390 driver for WDR gain and framerate
3 Use common driver to configure serializer(max9295) and
  deserializer(max9296)

Bug 4505240

Change-Id: I52fc3f03a66fe4e2446d7b41f409ed4154c42f02
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3105249
(cherry picked from commit adc35280cb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3117215
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Ketan Patil
f384316969 video: tegra: nvmap: Refactor nvmap_dev unit
- Add nvmap_dev.h file which include declaration for functions and data
structs which are exposed by nvmap_dev unit to other units.
- Also, add nvmap_dev_int.h file which include declaration for
functions which are internal to nvmap_dev unit that can be called by
files within nvmap_dev unit.
- Move definition of nvmap_handle_get_from_id, nvmap_install_fd,
find_range_of_handles to nvmap_handle.c as they belong to nvmap_handle
unit.
- Cleanup nvmap_priv.h by moving all relevant items for nvmap_dev unit
to nvmap_dev unit.
- Remove nvmap_mm.c file as nvmap_zap_handle is the only function
present; move it to nvmap_cache.c where it's being called.
- Remove function declarations whose definition are not present.

JIRA TMM-5694
JIRA TMM-5730

Change-Id: Ifd45235076da2ef0c628f3179d828c0ccadf6df2
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223994
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Mainak Sen
da4fcf255a gpu: host1x: Remove spin loop from Host1x Syncpoint Wait Path
CL 2916412 added a spin loop in Host1x Syncpoint Wait driver to detect
syncpoint threshold expiry condition for the tasks expected
to be completed in a very short time. The objective of this change
was to avoid the creation of Host1x dma fence for very short syncpoint
waits. The downside of this change is adding an extra 5usec penalty
for unexpired syncpoint wait causing perf regression.

This reverts CL 2916412.

Bug 4803002

Change-Id: Ib543a06f4bc3c56123c19375d332b58da650680d
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217067
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:07 +00:00
Pekka Pessi
b53b1d832a rtcpu: validate trace event length
Add checks for trace event length.

A trace event with too small or too large len value could cause a
crash and kernel panic.

Bug 4446545

Change-Id: I404a4e3ba1a4dad04d05583b6ea8126556d0753b
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126815
(cherry picked from commit 01e1c1b3b3fabd28375aa6ef214ea759175c01f1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132086
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Evgeny Kornev <ekornev@nvidia.com>
Reviewed-by: Jukka Kaartinen <jkaartinen@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Evgeny Kornev <ekornev@nvidia.com>
2025-07-24 10:19:07 +00:00
Deepak Badgaiyan
ee10f0e501 nvscic2c: common DMA integration
Integrate with common PCIe eDMA calls.
Common PCIe eDMA will support same calls between
T234 and T264.

Fix pci_epc_set_msi() failure. Initialize msi count.

Jira NVIPC-2448
Jira NVIPC-2708
Change-Id: I860fd2ee86950e558d2b6a362c05dba7988368e9
Signed-off-by: Deepak Badgaiyan <dbadgaiyan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197105
Reviewed-by: Sivagamy Govindasamy <sivagamyg@nvidia.com>
Reviewed-by: Janardhan Reddy AnnapuReddy <jreddya@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
ruppala
ea972737f0 r8168: Enable CONFIG_SOC_LAN
Enable CONFIG_SOC_LAN for ethernet to support pcie_bus_perf
kernel command line option.

Bug 4607316

Change-Id: I724364a5804d796c13f837f73254e686f59dc0b4
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162196
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2025-07-24 10:19:07 +00:00
Johnny Liu
5b3ba584c3 devfreq: use conftest for conditional module build
Some distros might use old kernel source but with some latest upstream
kernel patches backported to their kernel source tree. To deal with this
scenario and avoid kernel compilation failure, use conftest to check the
existence of features against the kernel source tree which the OOT
modules are built upon and do the conditional build based on the test
result generated with the conftest tool.

Use NV_DEVFREQ_HAS_FREQ_TABLE to determine whether freq_table field is
there in struct devfreq data strcuture, and choose the correct path for
building the module.

Use tegra_wmark-specific devfreq_get_freq_range always to avoid kernel
version check and conftest check. Since devfreq_get_freq_range exists in
the devfreq-specific governor.h (e.g. drivers/devfreq/governor.h) file
instead of globabl linux kernel include header files
(e.g. include/linux/devfreq.h), conftest cannot be used to the existence
of devfreq_get_freq_range kernel function.

Bug 4884092

Change-Id: I5bde4c712f59f38de74c1d8d95135c9b25d621b1
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220896
(cherry picked from commit c580fd0d06)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220970
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Yi-Wei Wang
e049967a27 i2c: nvvrs11: Report power in milliWatts
The unit of the voltage is in milliVolts and the current is in Amperes
for VRS11. So, the power can be reported in milliWatts which provides
higher resolution for better profiling.

Bug 200718059

Change-Id: I0ae52dafa4c7dcc751d9c65b410205163a4fbc45
Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223011
(cherry picked from commit 3741667390)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3223041
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
7adb4caf5b misc: nvsciipc: Fix build for Linux v6.12
In Linux v6.12, commit 88a2f6468d01 ("struct fd: representation change")
removed the 'struct file' pointer from 'struct fd'. This breaks building
the NVSCIIPC driver that tries to directly access the 'file' pointer
from the 'fd' structure. Fix this by using the helper macros 'fd_empty'
and 'fd_file' as necessary to fix the build.

Bug 4593750

Change-Id: I0f84736b408f533a732476175a8745091bc8542f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217429
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
c69cddda5d video: tegra: nvmap: Fix build for Linux v6.12
In Linux v6.12, commit ("4ffca5a96678 mm: support only one page_type per
page") removed the definition PAGE_MAPCOUNT_RESERVE and this breaks the
build for NVMAP. The function 'page_has_type()' was added in Linux v5.0
and performs the necessary check and so use this instead to fix the
build.

Bug 4593750

Change-Id: Iaa7393ae11de9730b4ec876a971223e62a7f3f7d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217428
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
68321dfd20 video: tegra: dc: Correct GPIO definitions
In Linux v6.12, commit 8c045ca534d0 ("gpiolib: legacy: Kill GPIOF_DIR_*
definitions") removed the GPIOF_DIR_* definitions and updated drivers to
use the equivalent GPIOF_* definitions instead. The GPIOF_* definitions
were added in Linux v3.0 and so update the appropriate drivers to use
these definitions.

Note that when calling devm_gpio_request_one() with GPIOF_DIR_OUT for
the flags, then because no explicit output level is specified, the GPIO
driver core defaults to low. Hence, in this case we replace
GPIOF_DIR_OUT with GPIOF_OUT_INIT_LOW.

Bug 4593750

Change-Id: I05664fd4e0abf5755c9514dffe64b239266c92fa
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217397
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
e3be40a73f pwm: tegra-tachometer: Fix build for Linux v6.12
In Linux v6.12, commit f9ecc2febf6f ("pwm: Don't export pwm_capture()")
made pwm_capture an internal function and this broke the build for the
Tegra Tachometer driver. The pwm_capture() function simply calls the
drivers '.capture' callback and so fix this by directly calling the
function pwm_tegra_tacho_capture() instead. Note that the rpm_show()
function is also moved to after the declaration of the
pwm_tegra_tacho_capture() function.

Bug 4876974

Change-Id: Idf7fbc16382a9077c651755d9907ded7652610cc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217391
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Yi-Wei Wang <yiweiw@nvidia.com>
2025-07-24 10:19:07 +00:00
Ketan Patil
46cb2cd937 video: tegra: nvmap: Move Alloc related code to Alloc Unit
- Query heap functionality belongs to nvmap_alloc unit, as heap is
managed by it. Hence move the function to query the heap to nvmap_alloc
unit.
- Move nvmap_get_user_pages function to nvmap_alloc unit as it is
relevant for nvmap_alloc unit.
- Move nvmap_dma_alloc_attrs/free_attrs functions to nvmap_alloc unit
as they are more relevant for nvmap_alloc unit.
- Move dma_coherent_mem_replica, nvmap_carveout_node structs to
nvmap_alloc unit.
- Cleanup unused macros from nvmap_priv.h

JIRA TMM-5694

Change-Id: I8884831771443de7db0e95c3b2dfc43c03f7c48e
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214196
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Mahesh Patil
0cca8547a9 nvethernet: Add PCS BASE-R FEC sysfs
Adding PCS BASE-R FEC setting using sysfs node

Bug 4674473

Change-Id: I8f65d66f928c8288218bd404390e9b8117eaef15
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201972
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2025-07-24 10:19:07 +00:00
Aki Niemi
4c71b3d40d camera/capture: Fix NULL checks on channel release
Make cure the channel is non-NULL when releasing and unpinning
the VI channel and capture descriptor buffers, respectively.

Bug 4623451

Change-Id: Ieb7f48b2d69a08fb00f7dd8f57fba376d66f9dcd
Signed-off-by: Aki Niemi <aniemi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192587
(cherry picked from commit 99b3c9be9c85b2fb2f06aa1551d893fe11134afe)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219712
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
2025-07-24 10:19:07 +00:00
Aki Niemi
462a2ca50f camera: Fix ISP channel release and reset
ISP channels are not released cleanly if the IVC send for
CAPTURE_CHANNEL_ISP_RELEASE_REQ were to fail, leaving the
rest of the release steps undone, including unregistering
the capture and control callbacks. This will prevent any
new channel setups, e.g., after an app restart, because
the channel is deemed busy.

Another problem with ISP channel release is that were the
aforementioned IVC sends to fail, the driver will not
attempt an RCE reboot to recover the IVC communications.

Similarly, if the channel reset IVC request fails or
returns an error, the pending capture and program buffers
won't be unpinned and their related waits won't be
completed.

This fix always performs the cleanups regardless of the
fate of the control channel requests.

Bug 4623451
Bug 4765177

Change-Id: I41ada4bc7dcc72676170d3d30515b5e741120252
Signed-off-by: Aki Niemi <aniemi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192586
(cherry picked from commit feb2be84d1077bec942825bf3cbffc58729f0560)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219711
Reviewed-by: Ganesh Ram Savithri Sreenivas Murthy <ganeshrams@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: Mohit Ingale <mohiti@nvidia.com>
2025-07-24 10:19:07 +00:00
Sanjith T D
bcb56180c8 vblk: Update the max size for IOCTL.
Jira SSV-11935
Bug 4809400

Change-Id: I4daa668a6744c7015596305cb4616da55e416f54
Signed-off-by: Sanjith T D <std@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188733
(cherry picked from commit 791b821b984f1fcfe9a4b00817db9e82d3bb73d8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221206
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Mainak Sen
7afa86700c drm/tegra: Add sysfs to trigger SOC power mode change.
For Sentry Mode SHR, Host1x client engine clock needs to configured
to a lower rate or clock-gated. a new IVC comand is added to send
power mode change notification to NvHost Server to perform the clock
rate update.

Jira HOSTX-5373

Change-Id: I9039c5243d5fd40f1da2f11e4449ea2e9b0dfc42
Signed-off-by: Mainak Sen <msen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181703
(cherry picked from commit dab7c0e0537cf1c18697f69fe9eba8a150b2245a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220776
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
2025-07-24 10:19:07 +00:00
Yash Bhatt
49d30a84cc nvidia-oot: Make fuzzing build similar to kernel-oot
Make fuzzing build similar to oot by adding required config support to
skip building oot drivers from nvidia-oot repo and start building with
oot kernel as inbuilt driver.

Bug 4615347

Change-Id: Ib4121d177f1b4de52ad04fa2923ca24518962816
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220762
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2025-07-24 10:19:07 +00:00
Sheetal
7d06982db7 ASoC: tegra: Fix Mixer fade status control
"MIXER1 Fade Status" was listing 30 entries but
MIXER has only 10 streams, hence it should show
10 entries. Update the control.

JIRA TAS-2467

Change-Id: I87eeeb64b4a32221ee630ad49c266972501fef96
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220158
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2025-07-24 10:19:07 +00:00
Nagaraj P N
bc6885d338 vse: allocate dma buffers during driver init
Use dma_alloc_coherent to allocate DMA buffers during probe
instead of on per request basis for SHA/AES requests.

Bug 4637856

Change-Id: I1321b224c61d2f0cda559525b7806504943a81d7
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
(cherry picked from commit ef746fdaec135d114ce04cb7418230c86c8746c1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213894
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Tested-by: Khushi . <khushi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
56127d0d9b nvidia-oot: add support to use upstream ivc driver
add conftest support to use upstream ivc driver
if tegra_ivc_empty API is exported by kernel.

Bug 4551265

Change-Id: I030bf0c4012aedf4ec623fba2b397869972061a1
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214054
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
1c3c34f33f nvidia-oot: tegra_bpmp: add dummy driver support
For some of the kernel tegra_bpmp is part of core kernel and
hence it is nto required to use the OOT tegra_bpmp driver.

However, some packaging still expect the tegra_bpmp.ko from
the OOT path. To trick the packaging file, add dummy tegra_bpmp
driver which does not have anything other than module_init/module_exit.

Bug 4551265

Change-Id: Ifae52acb63be009029c820b0ba7b15da6ea7a12e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198304
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
150beca335 nvidia-oot: tegra_hv: add dummy driver support
For some of the kernel tegra_hv is part of core kernel and
hence it is nto required to use the OOT tegra_hv driver.

However, some packaging still expect the tegra_hv.ko from
the OOT path. To trick the packaging file, add dummy tegra_hv
driver which does not have anything other than module_init/module_exit.

Bug 4551265

Change-Id: I59f6233705e2cfb510470ae3b9c1ce7d39618330
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197802
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
2d8579274a nvidia-oot: use ivc APIs based on conftest flag
Bug 4551265

Change-Id: I75809a5c112b9e3cd5da570c2d9641bd89cfe07e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217450
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
Manish Bhardwaj
65d85c5c16 nvidia-oot: ivc_ext: add dummy driver support
For some of the kernel ivc_ext is part of core kernel and
hence it is nto required to use the OOT ivc_ext driver.

However, some packaging still expect the ivc_ext.ko from
the OOT path. To trick the packaging file, add dummy ivc_ext
driver which does not have anything other than module_init/module_exit.

Bug 4551265

Change-Id: I315c9f302e65b4cdc1376815a7bc23e4b7ca3e00
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3214053
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Mahesh Patil
4a4aaf586f nvethernet: Set dma chan bit mask for MC/BC chan
Set the default MC/BC channel mask for packet duplicate

Bug 4844451

Change-Id: I9cfc6eb745dd3fedbf7220c77e30e79bcf91eeb8
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3209202
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Bharat Nihalani
3361d37248 tegra_bl_debug: Read USC_TIMER base from DT
The physical address of Tegra Microsecond Timer USEC_CNTR_USECCVR_0
is currently hard-coded with the address from T234.

The address of this register changes with newer chips. Hence, read
this address from device tree.

Get rid of hard-coded values of address and size.

Change-Id: I416166f6f01cdb6009d4c53717e19f61cebe92e3
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213600
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svc-bootloader-acv <svc-bootloader-acv@nvidia.com>
2025-07-24 10:19:07 +00:00
Johnny Liu
727ee719a2 conftest: update tests for devfreq and thermal
Introduce the following three tests:
1. devfreq_dev_profile_has_is_cooling_device
2. devfreq_has_freq_table
3. thermal_zone_for_each_trip

Bug 4854967

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I5fe2f7102f667a31d61550487a153590584ed638
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213844
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Surbhi Singh
8a471e9088 video: tegra: nvmap: Make function static
Fix for: Sparse defects

Sparse defect stated that "symbol 'debug_free_size_fops' was not declared. Should it be static?"

-Since carveouts also have free_size debugfs and it is directly using
 the field from heap struct.
-So to make free_size_fops static we are changing DEBUGFS_OPEN_FOPS to DEBUGFS_OPEN_FOPS_STATIC

Bug 4513982

Change-Id: I296bf95a421a9c751cc11266a896d2806bfc82b4
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3205061
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:07 +00:00
Sanath Kumar Gampa
bba351803a nvethernet:Update CAR programming for MACSec
Issue: 1. Not able to launch supplicant on second VF
2. When launching supplicant on VF1, MACSec link on VF0 is getting lost

Fix: Do not program CAR registers as part of OSD as the same is being
taken care by Server and also do not register for MACSec interrupts.
Same is being handled in Server
2. Enabled packet duplication for MultiCast frames when launching
supplicant

Bug 4824402

Change-Id: I7b26298da8c94df2da823e36476bc37acf6123cd
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201116
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:07 +00:00
ruppala
cf9a462531 nvethernet: Modify Wframe-larger-than flag for KASAN
KASAN increases the stack usage and that causes a build error for
crossing the stack-frame limits. Increase the frame-larger-than limit
for KASAN from 2048 to 4096 bytes.

Bug 4625047

Change-Id: I77550e524722af377745d47c6a0255e9341f8414
Signed-off-by: ruppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166783
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2025-07-24 10:19:07 +00:00
Ashish Mhetre
d2d52d6786 video: tegra: nvmap: Refactor nvmap_handle unit
- Files for nvmap_handle unit: nvmap_handle.c, nvmap_sci_ipc.c,
  nvmap_id_array.c.
- Define external header for nvmap_handle unit as nvmap_handle.h and
  move declarations of all external APIs of nvmap_handle unit to this
  header.
- Define internal header for nvmap_handle unit as nvmap_handle_int.h and
  move declarations of all internally called APIs to this header.

JIRA TMM-5651

Change-Id: Ie4922c0839070491f9893f23744eb700cabb9828
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3211591
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Ketan Patil
ebabca3f65 video: tegra: nvmap: Fix data race between create and destroy client
nvmap uses pid of group_leader task to indicate a client process. During
create_client operation, whenever any client with the same group_leader
pid already exists in clients list of nvmap_device, then nvmap
increments the count field of nvmap_client struct. Otherwise, create a
new nvmap_client. Both of the operations i.e. checking the list for
client and incrementing the counter happen inside lock. On the other
hand, during nvmap_release, first the counter is decremented and checked
if it's zero or not. If it's zero then the lock is taken and client is
removed from client list of nvmap_device. As both the operations i.e.
decrementing the counter value and removing client from list (if the
counter becomes 0) are not happening inside a lock, it's resulting into
the following data race scenario.
1) nvmap_release on existing client process 1
   - decrement client's counter
   - counter value has become zero
   - client is yet to be removed from the dev->clients list
   - context switch happen to __nvmap_create_client as another
namespace/thread with same with same group_leader pid is created.
2) __nvmap_create_client
   - as the client with same pid exists in dev->client list, it
increments counter value to 1, instead of creating a new client struct.
   - context switch happen to nvmap_release from step 1
3) nvmap_release
   - It calls destroy_client and remove the client from dev->client
list.
   - Completes rest of the operations in destroy_client and returns.
   - Context switch to remaining operations from step 2
4) nvmap_release
   - Now, when the nvmap_release will be called for the thread/namespace
which was created in step 2, then list_del operation would fail as the
client struct was already removed from dev->client list.

Fix the above issue by doing both operations i.e. decrementing the
counter value and removing the client struct from dev->client list in a
single lock.

Bug 4829958

Change-Id: I87ebbcb45b18114d0ec75520443bee010f88d59e
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3209794
(cherry picked from commit cc74d1fe1b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3207520
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2025-07-24 10:19:07 +00:00
Matti Ryttylainen
5f010bd073 camera: Fix ISP prefence address calculation
If syncpoint_info is on page boundary the address
calculation for where to write syncpoint address
wraps to beginning of the page. Fix ISP prefence
syncpoint address calculation on page boundary.

Bug 4811006

Change-Id: I8b5b39c9ad55ff5b7c4d365588e27282258191d9
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3199341
Reviewed-by: Akihiro Mizusawa <amizusawa@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2025-07-24 10:19:07 +00:00
Shubhi Garg
21a95b938b drivers: mttcan: fix bus-off restart txfer
[Issue]: CAN freezes/stops to send messages after restart from bus-off state.
Throws following log from kernel: "write: No buffer space available"

[Reason]: When message txfer starts, tx_object (which keeps track of active tx)
gets filled. If CAN goes to bus-off state, txfer remains incomplete for some
messages. In such case, tx_object bits will not get cleared. It will stop
adding more messages in controller RAM.

Along with tx_object, from network layer, there are socket echo buffers.
When CAN is initialized and up on network, netif_start_queue is pushed to start
transmission. When msg txfer starts, socket buffer gets filled and freed only
when txfer completes. During bus-off, since network queue remains ON, all the
queued msgs get filled in socket buffers and does not allow upcoming msgs.
Therefore we see "write: No buffer space available".

[Fix]: Clear tx_object when device goes to bus-off state and stop network queue.
Start network queue again during restart from bus-off.

Bug 4438223

Change-Id: I3cbc6529a90f357372c8b0095bdce4217b133e9b
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142091
(cherry picked from commit f902d95962)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144103
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
yong zhang
7af5789560 nvvse: Extend DRNG data length range
- From 512 to 1024

JIRA MAKO-8039
Bug 4839934

Change-Id: Ie949b2abe549174a3c2872aa2daecc9d72de9e8b
Signed-off-by: yong zhang <yongz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197637
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Ian Reid <ireid@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Hirak Biswas
4ed4816f4c ASoC: tegra: Add sound card driver name
Set audio card driver name to tegra-ape to avoid KWT errors
on GVS. The name is kept same as on L4T native drivers.

Bug 4755296

Change-Id: Id2e06c95703554119f8a7363a35d0c3041c7168e
Signed-off-by: Hirak Biswas <hbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3207867
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
33ffbe3ff2 gpu: host1x-emu: Fix build for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update the host1x-emu drivers
as necessary to fix this.

Bug 4749580

Change-Id: I9b4bddd4ae57087c34ce34cea7e8b54b14d4793c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202780
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:07 +00:00
prafulls
66ed7619bf nvdisp serdes: first revision
This change includes
1. First version of nvdisp serdes driver.
2. Opcode parsing and implementation as per nvdisp serdes opcode specification.
3. ERRB generic interrupt handler with ERRB specific opcode parsing.
4. Suspend-Resume functionality.
5. Device tree binding documentation.

Verification:
* It is verified with MAX96851 DP serializer on P3710 and P3960.
* GMSL2 and GMSL3, MST like features verified.
* Suspend/Resume functionality verified.
* Internal and Remote video CRC error detection verified.

JIRA TDS-15967

Signed-off-by: prafulls <prafulls@nvidia.com>
Change-Id: I61b9c216b5a7d4bd402dfe55e31f652824c8cc43
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3175316
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Eric Funsten
ec5a4957aa drivers: uncore_pmu: fix event attr
- event attr should be bits 4-19

Bug 4813144

Change-Id: If0956c64ebb5c9de52e8f223ccab17aaf5f57405
Signed-off-by: Eric Funsten <efunsten@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204405
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Besar Wicaksono <bwicaksono@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
Mahesh Patil
ea427d0f7c nvethernet: ethtool to show 48 VDMA channels stats
Enable ethtool to show 48 channel tx/rx packets stats

Bug 4746911
Change-Id: I8ab615910903f3b3b6a21e1aa6a2d42d6552c5ed
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3178610
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:07 +00:00
Ketan Patil
aed1fbf6cd video: tegra: nvmap: Move items to correct nvmap unit
- Move macro definitions from nvmap_priv.h to nvmap_alloc unit wherever
required.
- Cleanup unnecessary macros.
- Add function to cleanup the memory allocated for debugfs_info for
iovmm. This was missed in the previous patch where the allocation for
debugfs_info is moved to dynamic memory allocation.
- Move nvmap page pool related data structs from nvmap_priv to
nvmap_alloc unit.

JIRA TMM-5621

Change-Id: I3b668b2d6182da1bf0d2034c66834efc02d3179f
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3203118
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Pritesh Raithatha
db0a9ab702 video: tegra: nvmap: Add header file for nvmap_dmabuf unit
Refactor nvmap dmabuf code by creating header file for functions
exposed by the unit and make internal functions static.

JIRA TMM-5625

Change-Id: Ic5e99506a3362937dc5d1eb3bd05047c9ffdac6a
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3203525
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:07 +00:00
Nagarjuna Kristam
b55db09752 pci: epf: dma-test: Fix free_irq during remove
Issue: epf-dma-test driver uses MSI IRQ for CRC handling, however, different
IRQ is used when free the same.

Fix: Correct IRQ number to free. Correct ordering of free_irq and
platform MSI irq free.

Bug 4820157

Change-Id: Idbbaed61ddbd45a52e8e833e76c6b64f0fd3e48f
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204910
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:07 +00:00
Nagarjuna Kristam
8d11854283 misc: dma-test: Fix free_irq during unbind
Issue: dma-test driver uses MSI IRQ for CRC handling, however, different
IRQ is used when free the same.

Fix: Correct IRQ to free

Bug 4820157

Change-Id: I8b1e5339e8f4e66f12666b0cf2faf4a3991d5129
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204909
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2025-07-24 10:19:06 +00:00
Surbhi Singh
c150a9c18e video: tegra: nvmap: Add NULL and 0 checks
Fix for Rule: Misra-C 2012 Rule 10.1

- Data type of client is a pointer, hence compare it with NULL.

- Data type of co is a pointer, hence compare it with NULL.

- h is a pointer, hence compare with NULL.

- size is of data type size_t, hence compare it with OU.

- Data type of node is a pointer, hence compare it with NULL.

- Data type of priv, priv->handle is a pointer,
hence compare with NULL.

- Data value of Kzalloc is pointer not a boolean, hence compare new with NULL.

- Data type of vma is a pointer, hence compare it with NULL.

- Data type of elem_size and count is unsigned long, hence compare it
with 0.

- Data type of nr is u32, hence compare it with 0U.

- Data type of ret is int, hence compare it with 0.

- Data type of heap is pointer, hence compare it with NULL.

CID 1675220
CID 1677129
CID 1680522
CID 1680855
CID 1682355
CID 1684748
CID 1685031
CID 1688104
CID 1691439
CID 1691492
CID 1697576
CID 1700206
CID 1703733
CID 1705732
CID 1713149
CID 1713881
CID 1715301
CID 1716395
CID 1718186
CID 1724356
CID 1736224
CID 1737251
CID 1742375
CID 1742507
CID 1743460
CID 1747820
CID 1751065
CID 1753197
CID 1754913
CID 1756020
CID 1758334
CID 1761585
CID 1762790
CID 1763725

JIRA TMM-5594

Change-Id: Iec045c45555b364b5869de856b9bb8a8586dfe02
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201341
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:06 +00:00
Rakibul Hassan
20ce5d1519 capture: isp: add file ops
This change does the following:
 - Rename tegra194_isp5_ctrl_ops to isp_ctrl_ops
 - Add isp_ctrl_ops to structs that missed it

Without this change, we see errors from core_scf
when it attempts to open /dev/nvhost-ctrl-isp
and /dev/nvhost-ctrl-isp1

Jira CT26X-1679

Change-Id: Ief17d6a5e25efb9549f430bb41e3efd201e118db
Signed-off-by: Rakibul Hassan <rakibulh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168176
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Tested-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2025-07-24 10:19:06 +00:00
Shobek Attupurath
b5fdfc6e7f rtl8822ce: Add Nvidia changes on v5.14.0.4-250
1. Add custom roam parameters
2. Add path for power file
3. Add source tree path for Makefile
4. Add section in Makefile for TEGRA platform
5. Update permissions from 0755 to 0644 for files
6. Move roaming debug prints to RTW_INFO
7. Remove pr_debug redefinition
8. Move LOG_LEVEL to 0

Bug 4556940

Change-Id: Ic6de0172e6e866c6e81fa84685a929b60051ffce
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3140409
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202806
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:06 +00:00
Shobek Attupurath
b99dfab495 rtl8822ce: Add driver version v5.14.0.4-250
Release Notes:
1. Add extra queue to handle EAPOL
    Mark include/autoconf.h RTW_EAPOL_QUEUE to disable it
2. Use xmit_ext queue to TX eapol packet
3. Flush roam_buf_pkt after roaming is fail
4. Do NOT roam if previous roam does NOT finish
5. Report to WPS after all roam retries are failed
6. Support 11K beacon report fragmentation
7. Fix compile error on Kernel 5.19.2

Bug 4556940

Change-Id: I2137a24a1eadb1b5eac8e53126909863cec4747b
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202805
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2025-07-24 10:19:06 +00:00
Ketan Patil
8971a981c5 video: tegra: nvmap: Add helper functions for nvmap_heap
- Move all data structures from nvmap_heap.h header file to
nvmap_alloc_int.h file as they are owned by nvmap_alloc unit.
- Provide getter and setter functions to get or set the members of these
data structures.
- Provide forward declaration of such data structures.
- Remove nvmap_heap.h header file as nvmap_heap is part of the
nvmap_alloc unit and nvmap_alloc unit exposes nvmap_alloc.h as header
file to other units.

JIRA TMM-5621

Change-Id: I2c4dd95a1a1011e4a7c1b425aa7521c6f13202da
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201354
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:06 +00:00
Ketan Patil
98b0460f42 video: tegra: nvmap: Add header files for nvmap_alloc unit
As part of the nvmap_refactoring, add nvmap_alloc.h file which include
declaration for functions which are exposed by nvmap_alloc unit to other
units. Also, add nvmap_alloc_int.h file which include declaration for
functions which are internal to nvmap_alloc unit that can be called by
files within nvmap_alloc unit.

JIRA TMM-5621

Change-Id: Ie30e5e8a4f87591eb9c49a0a349f837a22726fa5
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198546
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:06 +00:00
Ketan Patil
26287ab7ab video: tegra: nvmap: Correct handle alignment
For the handle allocated from GPU heap, the alignment should be 2MB, as
nvmap allocates huge pages for GPU heap. Make an update for this.

Bug 4510173

Change-Id: I94e11fae2452853be2f3e0a430ee474ff88544f4
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3199230
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:06 +00:00
N V S Abhishek
fcd1fdd03e nvmap: Update license info for Nvmap
Update license info for NvMap with SPDX-FileCopyrightText and latest
year.

Change-Id: I9f000d842a37e607d647d01e0439d2537192cec1
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3117889
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:06 +00:00
Viswanath L
83dded8dd6 nvadsp: Access MSGQ ptrs via pointer increment
Accessing queue and payload fields of MSGQ via array index
causes out-of-bound warnings in new kernel version as they
are initialized as arrays of size 1:
  index 53 is out of range for type 'int32_t [1]'
  index 2045 is out of range for type 'int32_t [1]'

Addressing this by accessing the fields via pointer
increment instead of array index.

Bug 4420795

Change-Id: I873dbe08a894d1eea8866bb8a16018816d0e4db3
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3199294
Reviewed-by: Asha T <atalambedu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:06 +00:00
Surbhi Singh
056a1e6459 video: tegra: nvmap: Add NULL check
Fix for Rule: Misra-C 2012 Rule 10.1

-In nvmap_alloc.c h is of type pointer, hence compare with NULL.

-In nvmap_handle.c
    -the return type of kzalloc is pointer, hence compare it with NULL.

    -Client is a pointer, hence compare it with NULL.

-In nvmap_ioctl.c vaddr is a pointer, hence compare it with NULL.

-In nvmap_pp.c
    - the data type of nvmap_root is pointer, hence compare with NULL.

    - the data type of page is pointer, hence compare with NULL.

-In  nvmap_dmabuf.c
    -  the return type of kzalloc is pointer, hence compare it with NULL.

    - the data type of dev is a pointer, hence compare with NULL.

-In nvmap_priv.c pages are pointer, hence compare it with NULL.

-In nvmap_dev.c dev is a pointer, hence compare it with NULL.

CID 1634656
CID 1637713
CID 1647382
CID 1654006
CID 1657629
CID 1668126
CID 1668779
CID 1671917
CID 1672384
CID 1672959
CID 1653291

JIRA TMM-5627

Change-Id: I2ca971d7957040bf0fbef60b58497c509ca1153f
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198648
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:06 +00:00
Santosh BS
98a6db4289 gpu: host1x-fence: fence support for multi-instance host1x
Update host1x-fence driver for handling fences for
multi-instance host1x

Bug 4793553
Jira HOSTX-5413

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: Ice32d6f7ffe5bced50e2d50abe71530a5c75928f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198410
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:06 +00:00
Omar Nemri
edf6adc357 gpu: host1x-nvhost: export nvhost_get_host1x_device API
Export the API, that can be used by other modules, for retrieving
the host1x platform_device data for the right host1x instance.

Bug 4793553
Jira HOSTX-5414

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: Iadfb9f1f28468a4ff470ea505512a27f9092e2f2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196481
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2025-07-24 10:19:06 +00:00
Akhil R
d789effad6 crypto: tegra: Fix size of buffer allocated
Allocate the buffer based on the request instead of a fixed buffer
length. In operations which may require larger buffer size, a fixed
buffer may fail.

Bug 4798264

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I0eac3e04aed89b07f5674cf69828d3ac0801a6c7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3194058
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:06 +00:00
Surbhi Singh
9d96826773 video: tegra: nvmap: Add Check for NULL & 0 Value
Fix for Rule: Misra-C 2012 Rule 10.1

-In nvmap_pp.c return type of non_zero_cnt is integer not boolean, hence
compare it with 0.

-In nvmap_dmabuf.c the result for & operation would be 0 or 1, hence
compare it with 0.

-In nvmap_core.c the return type of kzalloc is pointer, hence compare it
with NULL.

-In nvmap_dev.c priv is a pointer, hence compare it with NULL.

CID 1608945
CID 1617267
CID 1622229
CID 1625991
CID 1630899

JIRA TMM-5627

Change-Id: Ib40286f852cdade2e115384d18f615ae52134bdd
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197795
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
2025-07-24 10:19:06 +00:00
Yash Bhatt
4a1b0df1df crypto: Fix stack frame size exceeded error in fuzzing build
Enabling KASAN is causing stack frame size exceeded error in crypto
driver, Fix this by allocating struct get_ivc_db dynamically while
enabling KASAN for fuzzing build.

Bug 4615347

Change-Id: Ie1959b3c79c8ca2f31f79ea76aeb55490bd9917b
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3196965
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:06 +00:00
Johnny Liu
66e40e599c conftest: Check presence of get_trip_type
Since Linux 6.5, get_trip_type function pointer is removed from
thermal_zone_device_ops struct. For drivers that need to get the trip
type should directly access trips array inside the thermal_zone_device
struct.

Bug 4740200

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I5fca83c215adaf937a2acc81a943c455e2280a04
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197038
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2025-07-24 10:19:06 +00:00
amitabhd
872cead7b6 host1x: Emulated Syncpoint KMD Driver
1. Update Host1x-Syncpt
   - add syncpt-list in syncpoint-pool structure.
   - add exported "host1x-syncpt-*" interface and supporting private interface.
2. Update Host1x-NvHost
   - add support for nvhost-syncpt and nvhost-client interface and supporting private interface.
   - falcon and pm interface not supported
3. Update Host1x-Fence
   - add exported "host1x-fence-*" interface and supporting private interface.
4. Add Host1x-Poll
   - Per Pool polling workequeue created
   - add poll supporting private interface.
5. Add new IOCTL

Jira HOSTX-5514

Change-Id: I187fa7ed89a3479e51b79f9d8d438ede75e1a36a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3136834
Tested-by: Amitabh Dutta <amitabhd@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amitabh Dutta <amitabhd@nvidia.com>
2025-07-24 10:18:57 +00:00
Ketan Patil
644d35281a Revert "video: tegra: nvmap: Add flag to skip cache cleaning at alloc"
This reverts commit fcb299a9cd.

Reason for revert: The zeroed memory may not reflect in case of non-coherent devices

Bug 4628529

Change-Id: I6bb0c10ebf273a912e71b8252a5ddfd33c70e1fe
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197357
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
2024-08-22 05:11:30 -07:00
Shawn Bai
612482b7df [MODS]Check return value of dma_request_chan
Bug 4766784

Change-Id: Ib82eaa709717a43b34066f52fcf47fd5bdd07c72
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192131
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-by: Shawn Bai <xueyuanb@nvidia.com>
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
2024-08-22 04:59:50 -07:00
Sanath Kumar Gampa
564d844a70 nvethernet:Fix the negative values in MACSec mmc
Bug 4802208

Change-Id: I4bd975efa4e2668597068910eccc7e98e23de822
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187063
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-08-22 04:50:43 -07:00
Praveen AC
d2fcc70dca camera: Fix v4l2-compliance test fails
Fix following test cases:
1.test invalid ioctls test
2.test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF

return proper error value from the driver.

Bug 4587577

Change-Id: Iee1114d4cc74ba27c3bef30190f936f69cbc32ac
Signed-off-by: Praveen AC <pac@nvidia.com>
(cherry picked from commit 7373b7bc0b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195935
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2024-08-20 17:51:39 -07:00
Surbhi Singh
5e61dccf81 video: tegra: nvmap: Add NULL Check
Fix for Rule: Misra-C 2012 Rule 10.1

Return value of Kzalloc is pointer not a boolean,
hence compare it with NULL.

CID 1606979

JIRA TMM-5594

Change-Id: I8a275ad38031067045bad6ac4c4cb0199f8f0e12
Signed-off-by: Surbhi Singh <surbhis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3195085
Reviewed-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-08-20 17:47:48 -07:00
Ketan Patil
fcb299a9cd video: tegra: nvmap: Add flag to skip cache cleaning at alloc
For bigger buffer allocation (e.g. 4GB, 5GB etc) from IOMMU heap, 70% of
the total time is consumed in cache cleaning. CUDA team confirmed that,
it is not always necessary to clean the CPU cache during allocation
flow. Hence provide an option to users of libnvrm_mem to skip cache
cleaning whenever required.

Bug 4628529

Change-Id: I9f4cdc930fcc673b69344f0167c8bc1378ec8d61
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192376
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-20 17:44:16 -07:00
Mohit Ingale
3dfd89c75e vi: Don't create debugfs node if base addr is NULL
A crash is observed when trying to access ch1 debugfs register in vi0
and vi1 folder. This is because the base reg address is not defined in
DT. This seems like an old legacy code which is ported over. The
registers accessed by this debugfs node are not longer directly
accessible using CCPLEX. While we wait on confirmation for this, adding
this check to not create debugfs node, if register base address is not
defined.

Bug 4626339

Change-Id: Ife714fa7e989bcaf187956920d757870e5fd9701
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184450
(cherry picked from commit 1fb6c087c924a540b151183cb5be13311f2c4af1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185971
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-17 15:07:16 -07:00
Robert Kelly
98be04181c rtcpu: set op point via sysfs
Create and register set and get operating point sysfs functions.

The operating point notification will contain the requested
operating point.

The nvcap resource manager will extract the operating point
from the notfication and send it to rce via the hsp command
interface.

In turn, rce will apply the operating point by adjusting the
functional clock frequencies for the following camera ip:

- rce hardware
- vi hardware
- isp hardware
- nvcsi

Jira CAMERASW-26378

Signed-off-by: Robert Kelly <rkelly@nvidia.com>
Change-Id: Ia814b2716d3738efb3cbc37307a267140b555f42
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3179593
(cherry picked from commit d259727a57ecf4b9463030b3418715891b3b1209)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3189078
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-17 10:38:56 -07:00
vinodg
d7a9c5b734 dce: update for mods test
DCE FW will run the dma test using 512 bytes of transfer
between dram and tcm for 400 iterations and alu test
generating 100 prime numbers for 200 iterations.
DCE running above 600Mhz will take nearly 50msec
for each test.

Jira TDS-16211

Change-Id: I34570acd4db6b8103bd2451833b280dc8e32131a
Signed-off-by: vinodg <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192552
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-16 11:01:46 -07:00
Nagaraj P N
ff7c18fc0b vse: add mempool support for GCM decryption
Jira ESSS-359

Change-Id: I1e49b331ec5be2bde208ae0fcac40d7af2fd082a
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132632
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191163
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-16 10:52:17 -07:00
Mikko Perttunen
e594972dd7 drm/tegra: virt: Fix nvenc usage measurement
Communication with BPMP attempted to use 'msenc' as engine name.
Correct this to use 'nvenc' while keeping userspace debugfs directory
as 'msenc'.

Bug 4559545

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I4fef852dd3312c763c5845bf8b43fac082863bad
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141443
(cherry picked from commit f2543128b14fb5df7764df7bfa3456bf0df4f945)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3193472
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-15 16:57:04 -07:00
Nagaraj P N
97434deea4 vse: add support for SM4 GMAC
Jira ESSS-1417

Change-Id: Ica5cdb08f04e75fba50badb9bd3342f2cd2004b9
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3172038
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-14 17:48:41 -07:00
Prashant Parihar
afb2145beb nvvse: Enable SM4 CMAC support
Jira ESSS-1409

Change-Id: Ib13b2901cbec8e4b9670fbe43960514e614a60c0
Signed-off-by: Prashant Parihar <pparihar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170104
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-14 17:48:31 -07:00
jianjunm
783f728b32 Restore "host1x-fence:Free the kzalloc mem"
Restore the memory leak fix that was reverted
due to it caused[k6.8/l4t/]ap_compute_level1_test
to fail in GVS.

New fix is intended to ensure that the fence
and callback cannot be referenced after release.

This reverts commit 42645ad049.

Bug 4779016

Change-Id: Ie2845e1830bb00cb49e7a3c03a91129b28ca62e9
Signed-off-by: jianjunm <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188619
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-13 23:46:48 -07:00
Jason Mei
9d2dcd5e46 host1x-fence: Remove callback and cancel fence
Issue: [k6.8/l4t/] ap_compute_level1_test is failing in GVS
[ 2720.076010] Call trace:
[ 2720.078520]  kmalloc_trace+0xa8/0x270
[ 2720.082275]  0xffffcb8bdce9f9ac
[ 2720.085497]  __arm64_sys_ioctl+0xa8/0x100
[ 2720.089618]  invoke_syscall+0x44/0x128
[ 2720.093466]  el0_svc_common.constprop.0+0x3c/0xec
[ 2720.098290]  do_el0_svc+0x1c/0x2c
[ 2720.101690]  el0_svc+0x30/0xbc
[ 2720.104831]  el0t_64_sync_handler+0x13c/0x158
[ 2720.109304]  el0t_64_sync+0x16c/0x170
[ 2720.113060] Code: aa1403e1 f9405e64 8b000282 dac00c42 (f8606a95)
[ 2720.119320] ---[ end trace 0000000000000000 ]---
[ 2720.212951] Kernel panic - not syncing: Oops: Fatal exception

Fix: Remove callback and cancel fence in poll

Bug 4779016

Change-Id: I49f2a67cdcb7e8882664fa203fcc90adf8c9341a
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187581
(cherry picked from commit ae8e0690e8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188581
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2024-08-13 23:46:39 -07:00
Sheetal Tigadoli
f83d436f52 drivers:nvpps:add support for t26x support
add support for t26x support

Bug 4715145

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: Ide5dc1b0de05e0948bd604f4c709df260888470a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191794
(cherry picked from commit 97ce1021b4be9450cfbd325c29c0b7e2421f49fd)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3192841
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2024-08-13 23:42:33 -07:00
Santosh BS
8ad09fb980 gpu: host1x: utility for local<->global syncpt id conversion
Expose utilities for converting:
- Local syncpoint id to global syncpoint id
- Gobal syncpoint id to local syncpoint id

Bug 4793553
Jira HOSTX-5413

Change-Id: I956ef05a929547aaad4ecf0d1627a6e061618856
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191230
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-13 10:55:47 -07:00
Krishna Yarlagadda
9dc14f1027 tegra: prod: use legacy prod settings
Remove references to upstream prod settings and use legacy prod.

Bug 4765671

Change-Id: Iafe36bdeab027ae121a99bfda665cc28089907c6
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186209
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-13 10:46:51 -07:00
Krishna Yarlagadda
2ca08ce7f4 conftest: update test for prod settings
Change prod settings test from header to apis. Check if legacy prod
settings defined. Remove references to new prod settings.

Bug 4765671

Change-Id: I77e55cf473f75216ded5d7eae3de2bd9a7ae91d4
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186208
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-08-13 10:46:42 -07:00
N V S Abhishek
3fdb84d2c8 tegra: nvmap: Reduce reported freemem from QueryHeapParams
Reduce free memory reported by QueryHeapParams by 0.1% to avoid
OOM issues for Iovmm_heap. For the overall free memory reported
by the query heap params api, page align it to the previous page
to avoid any failures in allocattr due to page align of requested
size, when requested size is equal to reported free size. Update
allocattr api as well so that it checks the available free memory
before allocating.

Bug 4719292

Change-Id: I7ecd69216d58c36ee5d0750107546601400e722d
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165599
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-08-12 21:25:09 -07:00
Bitan Biswas
4593cff331 platform: tegra: rtcpu: fix Mem abort
Fix k6.8 Mem abort after dma_sync_sg_for_cpu
call when running ap_bringup -> camera tests including
test_isp_debugfs_isp6_ob
 - Add pointer NULL check and pass same arguments
   to dma_sync_sg_for_cpu as dma_map_sg

Bug 4396374
Bug 3879036

Change-Id: I8dcad3d3fb21c1bed096d89a879a3343a0358400
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3191329
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-08-12 14:11:25 -07:00
Sheetal Tigadoli
a20117f5c2 nvpps: read TSC timestamp from arm generic timer
read TSC timestamp from arm generic timer in
NVPPS_GETTIMESTAMP ioctl instead of using kernel
maintained software monotonic time. As there is
difference b/w timestamps provided by these methods

Bug 4640166

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I458dd97198fcf5e7677a6347956c21a1e2f10020
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133646
(cherry picked from commit 2731b361a3b2380749e623f5d88107c12cf65c0b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3188880
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-11 17:28:10 -07:00
Jon Hunter
951b2423a8 drivers: Fix platform_driver remove for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.

Bug 4749580

Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-11 17:20:34 -07:00
Aditya Bavanari
e7b93be004 ASoC: tegra: Invoke multi instance APIs
- Invoke the new multi instance ADSP OS and app
  APIs in the adsp and virt-alt adsp ASoC drivers.
- Currently, it is hardcoded to get the ADSP0 handle
  and invoke the respective APIs. Multi instance
  support is to be added later in these drivers.

Bug 4606840
Bug 4635899

Change-Id: I6c95693d738a2b77e953195698bfe2cab8f13dba
Signed-off-by: Aditya Bavanari <abavanari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145896
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2024-08-09 21:41:31 -07:00
Mahesh Patil
939e786e16 nvethernet: T264 Fix eqos clk and mgbe gbe mode
- Set eqos app clk speed as IAS for 1G speed
- Update mgbe speed correctly for gbe mode 25G in set speed retry

Bug 4713751

Change-Id: Iebdaecdb47193e6bb50b579223fc411d7b6939f7
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187408
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-08 05:00:34 -07:00
Mikko Perttunen
e19e56a251 gpu: host1x: Remove mid-job CDMA flushes
The current code can issue CDMA flushes (DMAPUT bumps) in the middle
of a job, before all opcodes have been written into the pushbuffer.
This can happen when pushbuffer fills up. Presumably this made sense
at some point in the past, but it doesn't anymore, as it cannot lead
to more space appearing in the pushbuffer as it is only cleaned full
jobs at a time.

Mid-job flushes can also cause problems, as in an extreme situation
(seen in practice), the hardware can run through the entire pushbuffer
including the prefix of a partially written job without the driver
being able to process any CDMA updates. This can cause the engine
MLOCK to be taken and held for extended periods as the tail of the
job is not yet available to hardware.

Bug 4606343

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I68ca317150e917428d757d4ee8a68c2c15eaf8de
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186138
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-08-06 15:51:12 -07:00
Jon Hunter
b0ff4f1358 pci: endpoint: Update drivers for Linux v6.11
For Linux v6.11, the 'pci_epc_event_ops' structure 'core_init' callback
was renamed to 'epc_init' and a new 'epc_deinit' callback was added.

Update the PCI endpoint drivers for Linux v6.11 by:

 1. Adding tests to conftest to detect the presence of 'epc_init' and
    'epc_deinit'.
 2. Update the drivers as necessary to use the appropriate callback
    depending upon what is present in the kernel.

Bug 4749580

Change-Id: Ife7e2d5d18332bf84f22142c9727dc1ece913c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186686
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-05 12:28:50 -07:00
Nagarjuna Kristam
6a29330225 pci: epf: dma-test: Use predefined macros for MSI
Use pre-defined  MSI interrupt numbers for read, write and CRC.

Bug 4779415

Change-Id: I03fd5c9d5f955c2aeefdf26b2fb7d10a2b080d5b
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186459
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-08-05 12:27:32 -07:00
Nagarjuna Kristam
9b979e7516 misc: dma-test: Use predefined macros for MSI
Use pre-defined  MSI interrupt numbers for read, write and CRC.

Bug 4779415
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>

Change-Id: I2a7f02abe43703ceff5c471fbb3b77a07d35ddd2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186458
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Tested-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
2024-08-05 12:27:28 -07:00
Nagarjuna Kristam
19f9a6939a linux: pcie: Add MSI vector macros
Define MSI read, write and CRC vector macros.

Bug 4779415

Change-Id: Icc6ac9c6b765ca9bfe01e7026381f9ec2052e0d0
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186457
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-08-05 12:27:25 -07:00
Jon Hunter
24826db83f scripts: Add scripts for platform_driver remove
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. This change impacts all OOT
platform drivers and so instead of editing each manually, add a
coccinelle script to handle updating all platform drivers. This script
is ran by executing the following command ...

 $ spatch --in-place \
   --sp-file /path/to/scripts/coccinelle/platform_driver_remove.cocci
   <driver-source-directory>

Finally, add a test to the conftest script that is used to detect if the
platform driver 'remove' callback returns 'void'.

Bug 4749580

Change-Id: I53d25cc36cc3be97a6eeeb4ccbdf9b7dfda338a9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176834
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-05 12:21:58 -07:00
Jon Hunter
da1b446b64 scripts: conftest: Fix of_property_for_each_u32 test
The conftest test for detecting the number of arguments for the macro
of_property_for_each_u32() is not working as expected because the header
file for the function pr_info() is not included. Fix and simplify this
by removing pr_info() altogether.

Bug 4749580

Change-Id: I42eb91e1cb647b44f3e0c87f1c56fe5e29a56b34
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186544
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-04 12:33:14 -07:00
Ketan Patil
8c52af9b59 video: tegra: nvmap: Add hugetlbfs support
- For NvRmHeap_GpuMem, we are switching from a carveout to huge pages
obtained from hugetlbfs.
- Allocate a handle from VA using get_user_pages, when allocation is
requested from GPU heap.
- Introduce a new field to indicate that the pages are allocated from
hugetlbfs. This field will be useful while returning the correct heap
while querying the handle params for a handle which was created using
hugetlbfs.
- Update the query heap API for GpuMem heap to return the huge pages
memory values from meminfo.

Bug 4510173

Change-Id: I0dbef4c4e95969f8e3975a6dc58f10255db0635e
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3174720
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-03 04:57:32 -07:00
Ketan Patil
9c92d38302 video: tegra: nvmap: Cleanup gpu carveout support
Cleanup gpu carveout support as we are moving to hugetlbfs.

Bug 4510173

Change-Id: I68b88e81d2c4da7e35e241f2f29633ec39a4bcbe
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3174619
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-03 04:57:23 -07:00
Nagarjuna Kristam
38bbe2a3b0 pci: endpoint: functions: dma-test: Remove read and add IRQ handling
Remove readtest debugfs, as same can be achieved from regular DMA tests.
Add RP IRQ handling to calculate CRC.

Bug 4747330

Change-Id: Iac07195eb3fcc05b8af16ca6d7e5e8849b14a98c
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184953
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2024-08-02 16:44:06 -07:00
Nagarjuna Kristam
997f2a1219 misc: pcie-dma-test: Add raise IRQ support.
Read MSI bar info and write MSI data on MSI BAR to generate interrupt
on EPF. Add additional info for CRC check used for this interrupt.

Bug 4747330

Change-Id: Ifead9f385d2c2a87abfed85ef36571b10529f420
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185638
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-08-02 16:44:02 -07:00
Laxman Dewangan
42645ad049 Revert "host1x-fence:Free the kzalloc mem"
This reverts the commit 20c43e79ff ("host1x-fence:Free
the kzalloc mem")

This change is causing the kernel crash when running the
ap_compue_level_1 on kernel 6.8 and kernel 6.9.

Reverting the change while more investigation is in progress
for proper fix of memory leak.

Bug 4779016

Change-Id: Ib7a1cf81cbc2f23d2e0a64115b4374da34a2961b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184970
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-01 19:07:51 -07:00
Junghyun Kim
076b6e793c media: camera: Remove power control in release API
cdi_mgr_power_down() is used to control Des's power which is dup of
the power control logic in release API.
Remove the Des's power control in release API

Bug 4704962

Change-Id: I472e5cea02f0adaab74689b4425fc08c612199b0
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181211
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2024-08-01 19:05:39 -07:00
Thierry Reding
61c41d5dc9 gpu: host1x: Do not setup DMA for virtual devices
The host1x devices are virtual compound devices and do not perform DMA
accesses themselves, so they do not need to be set up for DMA.

Ideally we would also not need to set up DMA masks for the virtual
devices, but we currently still need those for legacy support on old
hardware.

Tested-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240314154943.2487549-1-thierry.reding@gmail.com

Bug 4473025

Change-Id: I09b108a6ee8ed22fa6758c70f7b453de21fd110e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176001
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-01 19:03:53 -07:00
Praveen AC
ebb6c5604b nv_hawk_owl:Fix fail to read 2nd Hawk EEPROM.
Changed the i2c trans address from 0x42 to 0x15 for
2nd Hawks EEPROM to avoid fail to read serial number.

Bug 4244937

Change-Id: Ib118e921294031df32e1f0d9389edbb3f4269dfd
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2964334
(cherry picked from commit 49f817e90dcc4609dfea6005fe20e47c5346835d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130799
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
2024-08-01 19:01:13 -07:00
Jon Hunter
fc171fe539 drivers: Fix bus->match for Linux v6.11
In Linux v6.11, the 'bus_type' structure match() callback was updated to
make its 'drv' argument constant. Add a conftest test to detect this and
update the relevant drivers according to fix building them for Linux
v6.11.

Bug 4749580

Change-Id: I895d97241a7357074bb34b8e7a5bdfa2e31d5ca5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183068
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-31 08:06:48 -07:00
Jon Hunter
19c93284bd misc: mods: Disable MODS for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. This breaks the build for
various MODS drivers and so disable these for Linux v6.11 and greater.

Bug 4749580

Change-Id: Ie76da62af1b9645d24964165fd656b21ea67f78c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183067
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-07-31 08:06:39 -07:00
Jon Hunter
d8bc5883f3 drivers: pva: Fix build for Linux v6.11
In Linux v6.11, commit 1a251f52cfdc ("minmax: make generic MIN() and
MAX() macros available everywhere") causes the PVA driver build to fail
with the following error:

 include/uapi/linux/nvpva_ioctl.h:601: error: "MAX" redefined [-Werror]
 601 | #define MAX(a, b) ((a) > (b) ? (a) : (b))

Fix this by add guards around the definition of 'MAX' in the
nvpva_ioctl.h file.

Bug 4749580

Change-Id: If7960e0617e659f4e264b1e638e9f8c98a027a73
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184093
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
2024-07-31 08:06:29 -07:00
Jon Hunter
8f1e881a2f hwmon: f75308: Fix build for Linux v6.11
The macro of_property_for_each_u32() was updated for Linux v6.11 to
remove two of the arguments that were only used internally in the macro
and do not need to be passed. Add a test to conftest to detect the
version of the of_property_for_each_u32() that is present in the kernel
and fix the f75308 driver accordingly.

Bug 4749580

Change-Id: If787a40d0af49989d93d9563dd6a84e906cb5209
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184092
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-31 08:06:25 -07:00
Sanath Kumar Gampa
a30f14e5b3 nvethernet:Handle MACSec CAR in driver removal
Issue: Unexpected bevahior seen when driver is removed and reloaded

Fix: Handle the CAR registers as part of MACSec removal

Bug 4736014

Change-Id: I196203a97e327f03ea4b61acffc8015e3d017469
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3179251
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-30 09:04:07 -07:00
Jon Hunter
4941bf8dc8 block: virtual-storage: Add dummy driver for Linux v6.11
The Tegra virtual storage driver fails to build for Linux v6.11 because
of the following issues:

 1. The functions blk_queue_logical_block_size(),
    blk_queue_physical_block_size() and blk_queue_max_discard_sectors()
    have been removed.
 2. The function blk_queue_write_cache() has too many arguments for
    Linux v6.11.
 3. The flag QUEUE_FLAG_NONROT is not defined for Linux v6.11.

Add a dummy driver for this driver for Linux v6.11 until this driver is
fixed.

Bug 4311184
Bug 4749580

Change-Id: I56f811d6ee29dd0025a5dc199ae84e3fc0f37b21
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162886
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-30 08:54:05 -07:00
Mikko Perttunen
ec4681358b drm/tegra: nvdec: Enable SLCG/PG
Add register writes to enable second level clock gating /
power gating. For now only for Tegra234.

Bug 4475968

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Ie2e3b6d375bb6b7772b71999df81d73bea7ad550
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116201
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-30 08:52:07 -07:00
sitalluri
121870b4aa misc: mods: Add support for AON invocation
- Enable MODS kernel driver ADSP APIs
- Updated CONFIG_TEGRA_NVADSP to MODS_HAS_TEGRA
- get_handle call is invoked for each API
      - To avoid regression on parallel WAT testing
- Fork nvidia-oot from nvidia-kernel
      - Firmware APIs do not support 5.1 version.
- Updating the same IOCTLs as its being used by AON and ADSP tests.

Bug 4149877

Change-Id: I0063f6610c078395ce9ce3f348bbab360e7dc676
Signed-off-by: sitalluri <sitalluri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3057290
Reviewed-by: Kuan Luo <kluo@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: John Lu <johlu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: John Lu <johlu@nvidia.com>
2024-07-30 08:51:55 -07:00
Jon Hunter
6e9c85dd91 conftest: Fix PCI EPC has core_init_notifier
The conftest test for detecting if the structure 'pci_epc_features' has
the member 'core_init_notifier' is not working as expected because it is
a bit field in the structure. Re-work the conftest test to fix this.

Bug 4593750
Bug 4748899

Change-Id: Ib93e4ae869c6a28922c0feed28ce90912371ff66
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181508
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-28 21:57:40 -07:00
Matti Ryttylainen
8bb21ea435 Camera: Add task_fence events for VI/ISP
Nsight needs task_fence events from camera engines.
Add task_fence event traces to be emitted during ISP task begin/end
and during VI frame end.

Jira CAMERASW-24223

Change-Id: Ia44baf73777f30abc823459f5e7dfd4d495d3ca6
Signed-off-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141174
(cherry picked from commit ad0f0cba98173bbf055f5e69ebf175d9daf1ac3b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181495
Reviewed-by: Sampatlal Arjunram Jangid <sjangid@nvidia.com>
Tested-by: Devang Kubavat <dkubavat@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Pushpesh Pranjal <ppranjal@nvidia.com>
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
2024-07-28 21:57:31 -07:00
Jon Hunter
f327656ea3 nvmap: Implement nvmap_page_mapcount()
Upstream commit cdd9a571b7d8 ("fs/proc: move page_mapcount() to
fs/proc/internal.h") made page_mapcount() an internal function for Linux
v6.11. This function is used by the NVMAP driver and so implement this
function in the NVMAP driver directly instead. Note that newer kernels
implement folio_entire_mapcount() for compound page counts where as
older kernels use compound_mapcount(). Use conftest to detect which of
these functions is present in the kernel.

Bug 4749580

Change-Id: I6504448727d6b3e9f2caa8581a66aad464ae2426
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180097
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-28 21:44:06 -07:00
Sheetal Tigadoli
d71b21ebb9 drivers:nvpps: clear TSC CAPTURE interrupt enable bit
Clear INTR_EN bit from TSC_CAPTURE_CONFIGURATION_PTX
register as part of PTP TSC sync initialization sequence
as nvpps does not use capture interrupts for PTP-TSC
functioning.

Bug 4640129

Signed-off-by: Sheetal Tigadoli <stigadoli@nvidia.com>
Change-Id: I9f374d8cde49cabcbc57e9edaf92031c07b6ada1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3177373
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vijay Mishra <vijaym@nvidia.com>
2024-07-28 21:41:19 -07:00
Prashant Parihar
a21f30c983 nvvse: Add SM4 implementation
- Add VSE driver and crypto driver changes for SM4
CBC/CTR functionality
- Utilize existing function for AES CBC/CTR for SM4

Jira ESSS-1409

Change-Id: Ifaab10dd81c33b047554c28a37c399a3cb0d3419
Signed-off-by: Prashant Parihar <pparihar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3143320
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2024-07-28 12:47:58 -07:00
jianjunm
20c43e79ff host1x-fence:Free the kzalloc mem
Issue: ioctl call host1x-fence cause memory leak
The kmemleak log shows:
  unreferenced object 0xffff0001ac305500 (size 128):
  comm "deepstream-test", pid 4370, jiffies 4295045195 (age 133.220s)
  hex dump (first 32 bytes):
    00 01 00 00 00 00 ad de 22 01 00 00 00 00 ad de  ........".......
    28 aa 67 bf 00 00 ff ff 00 7c ed 1f 01 00 ff ff  (.g......|......
  backtrace:
    [<000000000d2d94dc>] kmem_cache_alloc_trace+0x2bc/0x3d0
    [<000000006a957993>] dev_file_ioctl+0x588/0x86c [host1x_fence]
    [<000000003528f698>] __arm64_sys_ioctl+0xb4/0x100
    [<00000000d39dabe0>] invoke_syscall+0x5c/0x130
    [<00000000aee791e3>] el0_svc_common.constprop.0+0x64/0x110
    [<0000000050bcd11c>] do_el0_svc+0x74/0xa0
    [<00000000530f0cc4>] el0_svc+0x28/0x80
    [<00000000b6d076a3>] el0t_64_sync_handler+0xa4/0x130
    [<000000008943bb27>] el0t_64_sync+0x1a4/0x1a8

Fix: release the kzalloc memory after finish using

Bug 4738188

Change-Id: Ifeb316a2a52432f0199ad22d3de277b123acda24
Signed-off-by: jianjunm <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3175899
(cherry picked from commit 84de937501)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3181288
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-07-27 07:54:53 -07:00
Viswanath L
e0de45f88a nvadsp: Pass CPU freq to firmware via HWMBOX
Pass CPU freq, read from clock property "cpu_clock", to
firmware via HWMOX set in adsp_cpu_freq_hwmbox field.

Bug 4678940

Change-Id: Iebebb0cade69c8686b5d17b65a3405783fb5690e
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180569
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
2024-07-25 14:05:47 -07:00
Viswanath L
13814dc9f7 nvadsp: Set shared_mem_hwmbox in resume flow
Platforms that implement suspend-resume as clean firmware
restart need to latch the shared mem address in every
suspend-resume cycle, but mbox value may be lost due to
module reset, so ensure that shared_mem_hwmbox is written
unconditionally in os_start flow.

Bug 3916054

Change-Id: I649d70871401475d66e0e50abeeaf4c347040119
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180285
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2024-07-25 14:05:44 -07:00
Bitan Biswas
cba663d0db crypto: fix crypto_engine_ctx build error
struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Change-Id: Iaf565c4ef74fdd87ea0020b369bc3d882d32326e
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176823
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-07-25 06:13:35 -07:00
Akhil R
abb0a027b2 crypto: tegra: Align with upstream
Fix the known bugs in the SE driver and align the driver with upstream
add Makefile flags so it will build SE driver for v6.1 or less

Bug 4488964

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: I6efa471b6efcd161d36167a0784185f3e0266d7c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3124250
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-25 06:13:31 -07:00
Ashish Mhetre
37e1ae733d video: tegra: nvmap: Export VPR device only if VPR is enabled
Bug 4731544

Change-Id: I095d0a6f87c63a65ba586fd6fcfdfef9dafc1d04
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171188
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-21 03:25:37 -07:00
Jon Hunter
9d6283ca4f net: nvethernet: Fix build for Linux v6.11
In Linux v6.11, the structure 'kernel_ethtool_ts_info' was added as a
copy of the existing 'ethtool_ts_info' for the kernel and the various
kernel functions were updated to use the new structure. This broke the
build for the nvethernet driver, so add a test to the conftest script to
detect the presence of this new strucutue and update the nvethernet
driver accordingly.

Bug 4749580

Change-Id: I2c5daa0132edee8c98eec3a66e19144484325ab0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176868
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-07-19 03:13:55 -07:00
Liang Cheng
a6d19ed508 psc: fix the spurous interrupt
ccplex side sees two interrupts. The first one is handled
properly while the second one does not have bit MBOX_OUT_VAID
being set.

Fixing this by reading psc_ext_ctrl register after writing.

Bug 4741744

Change-Id: I22ac1619b7f88a96658c8d197f09daccf3bb40d8
Signed-off-by: Liang Cheng <licheng@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3174350
Reviewed-by: David Pu <dpu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-19 03:11:03 -07:00
Rakibul Hassan
7cba06ad35 capture: Move VI syncpt funcs to host1x client
Change removed the vi-thi driver and moves the syncpt
creation function into VI host1x client driver.

Jira CT26X-1602

Change-Id: I7f1880f61aa89e650014870dba596d7e0db4c1b2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165150
Reviewed-by: Semi Malinen <smalinen@nvidia.com>
Tested-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
2024-07-19 03:08:04 -07:00
Praveen AC
8ba7c4a320 media: i2c: update ar0234 EEPROM data structure
- Integrate calibration data structure from
  Leopard Imaging hawk driver into NVIDIA
  hawk driver
- Rearrange EEPROM calibration data structure to
  maintain backward compatibility with HAWK, OWL
  modules with EEPROMs programmed using earlier
  calibration data structure
- Use separate structures for tracking imu noise
  parameters and place it after the module
  serial number.
- Change module serial number length used for
  reading the serial number from EEPROM data

L4T-4649

Change-Id: I17613905e63fef3fc690dca42a0a10bd1f4fc24d
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3072846
(cherry picked from commit 518ae94bb4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3073820
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-07-19 03:05:51 -07:00
Jon Hunter
f308807197 media: camera: Use of_pwm_xlate_with_flags()
In Linux v6.11, commit d6f66e292676 ("pwm: Make pwm_request_from_chip()
private to the core") made the function pwm_request_from_chip() a
private function to the PWM core driver. This function is used by both
the CDI and ISC camera drivers and so these driver no longer build
against Linux v6.11.

Fix this by updating the CDI and ISC drivers to use the function
of_pwm_xlate_with_flags() which has been supported since Linux v3.8.
This function internally calls pwm_request_from_chip() and configures
the pwm->args.period parameter and is therefore, equivalent to the
existing code.

Bug 4749580

Change-Id: Id1381ebc08730aaaa6c3591d90bcc4cc95a6c235
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176063
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-18 18:43:41 -07:00
Ashish Mhetre
acc19f5003 video: tegra: nvmap: Allow CPU read on VPR buffers
This patch allows CPU to read and mmap VPR buffers by restricting CPU
VPR read restrictions for pre-si platforms. The knob for controlling the
access is /sys/kernel/debug/nvmap/vpr/vpr_cpu_acces and by default VPR
CPU read is disallowed.
This change is necessary to support pre-si VPR validation for platforms
where there may not be a HW engine that supports CRC computation for VPR
buffers.

Bug 4670086

Change-Id: Ic0d575abbda3cdda10f075a2c7092ced09723333
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145680
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-07-18 18:36:07 -07:00
Jason Mei
6fea0b4122 nvethernet:Fix cbb error when ifconfig down
Issue:  CBB bus error when running ifconfig down
	on the nvethernet interface.

Fix:    All MDIO interfaces must be disabled
	before resetting the MAC. The MDIO was
	accessed by the MAC.

Bug 4714627

Change-Id: Ib75cfae70b13093cc574cd0cd07334cc03468ad7
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165268
(cherry picked from commit bd0a8befee)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3174678
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-07-17 06:27:03 -07:00
Vincent Chung
3b2ffad838 drivers: tegra: cam_fsync: add high precision support
Update the cam_fsync (TSC edge generation) driver to support
1us prevision

Bug 4704962

Change-Id: I88782acef36101acb57603a3f52b79306a9bc27b
Signed-off-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170858
(cherry picked from commit 5c82b64311078feaad42923201020bac038679f4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168172
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
Reviewed-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
2024-07-17 06:17:30 -07:00
Akihiro Mizusawa
1f825ee8cd oot: capture-isp: Add h2 surface
Add h2 surface pinning in the capture-isp driver.
Also add image_def_mr2 to capture descriptor.

Jira CT26X-1728
Bug 4716542

Change-Id: Ib1657e7cebb335e78fb4eed855a6dad309c397f7
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164329
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
2024-07-17 06:09:19 -07:00
Nagaraj P N
0b77774c92 vse: Add support for HMAC SHA Sign/Verify
Add support for both old and new chip

Jira ESSS-1336
Jira ESSS-1371

Change-Id: Ie4010bc7f3d8f3b71e3f49197c21911cd11a6dea
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144907
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2024-07-17 06:01:20 -07:00
Praveen AC
9cdefe40e0 cam_cdi_tsc: Fix Fsync IOCTL fail sometimes.
Make sure tsc is stopped during device close, when the app
is failed to send stop IOCTL for tsc generator.Hence, it avoids
inconsistency in starting the External Fsync trigger.

Bug 4220418

Change-Id: I13286d42a62c85cb52e0d1eabf714865e8fe6956
Signed-off-by: Praveen AC <pac@nvidia.com>
(cherry picked from commit 716ec492d8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141448
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-16 17:15:51 -07:00
Chinniah Poosapadi
cbc914d16d capture: Move ISP syncpt funcs to host1x client
Change removed the isp-thi driver and moves the syncpt
creation function into ISP host1x client driver.

Jira CT26X-1602

Change-Id: I1242fb198a06a1e6b037030ee2558142ff7a6ff6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164905
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-16 02:05:25 -07:00
Akihiro Mizusawa
1f2ef6588e video: tegra: add support for T264 isp
Move capture-isp-channel registration from host to
capture-isp driver.

Make tegra-capture-isp a separate driver module.

Implement support for T264.

Add isp_unit affinity to ISP_CAPTURE_SETUP ioctl.

CT26X-468
CT26X-469
CT26X-467
CT26X-466
CT26X-464
CT26X-465

Change-Id: If644d6aa0ad1b12d34457dc94249ed09f9f9f720
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095788
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
2024-07-16 02:04:36 -07:00
Akihiro Mizusawa
c37b941d16 fusa-capture: create standalone capture-isp driver
This change converts the capture-isp driver to
independent module which can be probed. This is
needed as per 2nd ISP Design for associating ISP
processing channels with right ISP unit.

JIRA CT26X-462
Change-Id: I720714b5221833c7df5cd56febd213ea6db02c48
Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095787
Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-07-16 02:04:32 -07:00
Jon Hunter
24acf38e0b media: camera: Fix crash in sensor drivers
When CONFIG_V4L2_ASYNC is not enabled and CONFIG_DEBUG_LIST is enabled
then the following kernel panic is observed ...

 imx219: probe of 9-0010 failed with error -524
 list_add corruption. next->prev should be prev (ffffb2b2e95dad78),
  but was 0000000000000000. (next=ffff000088baf508).
 ------------[ cut here ]------------
 kernel BUG at lib/list_debug.c:23!
 Internal error: Oops - BUG: 00000000f2000800 [#1] SMP

If CONFIG_V4L2_ASYNC is not enabled in the kernel, then the function
tegracam_v4l2subdev_register() will return -ENOTSUPP and this will cause
the probe of the sensor drivers to fail. Although failing to probe the
driver is expected in this case, it is not expected that this will
trigger a kernel panic if CONFIG_DEBUG_LIST is enabled. The panic is
caused because tegracam_device_unregister() is not being called in the
exit path of the probe function when tegracam_v4l2subdev_register()
returns an error.

Bug 4704110

Change-Id: I4875a31e55c24b5ab0932a683f16a7a74695a6b6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162389
(cherry picked from commit 118cd4e0a6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3173737
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-14 05:22:05 -07:00
Pranjal Singh Mandloi
f95a7d53c4 NVVSE: GCM/GMAC Linux changes
Jira ESSS-1378

Change-Id: Ie47a432c73cc99ae209fb4b61dfc0acbe399aaff
Signed-off-by: Pranjal Singh Mandloi<pmandloi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163800
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-13 21:37:56 -07:00
Nagarjuna Kristam
c0896b1af7 pci: epf: dma-test: Clear bar only for T23x
During EP deinit, BAR is cleared. However, For T26x, this notification
is triggered from stop() ops callback. Both stop and clear bar executes
on EPC mutex lock, resulting in deadlock.
Since during EP deinit all EP registers are cleared, clear_bar execution
is not needed.

Bug 4567932

Change-Id: I7b28a85a4da51bdaf5228b6462fb723758c46753
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171420
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-13 12:45:34 -07:00
Jason Mei
b8d1d9a28e PCI: EPF: tvnet: disable the edma interrupt
1. Disable the corresponding PCIe EP controller
   EDMA interrupt.
2. Disable IP checksum to improve performance
   since the PCIe link is reliable.
3. DMA unmap matches the map size.
4. Adjust the SKB buffer link list handle.

Bug 4704944

Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Change-Id: I05f76fa60e3533c2dd01e53ed17664d6898fcffd
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158126
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164057
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-07-13 12:35:19 -07:00
Jon Hunter
d449f6cfd6 PCI: EPF: dma-test: Fix build for Linux v6.10
In Linux v6.10, the 'core_init_notifier' flag has been removed and
dw_pcie_ep_init_notify() is now called by the designware endpoint driver
so it is not necessary to call from the EPF DMA test driver. Add a test
to the conftest script to detect the presence of the
'core_init_notifier' flag and update the EPF DMA test driver as
necessary.

Bug 4593750

Change-Id: I1c3862df2c673fcb2d7c19ebbf5e7d1cbdefea1f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152309
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-13 02:47:36 -07:00
Jon Hunter
27bc2f4757 media: camera: cdi-mgr: Fix crash freeing GPIOs
When booting Linux v6.10-rc5 on Tegra234 the CDI MGR driver was failing
to setup the GPIOs. If the driver fails to setup the GPIOs then we
expect the probe of the driver to fail. However, in this case when the
probe failed, it then crashed the kernel completely and the following
crash log was observed ...

 cdi-mgr sipl_devblk_3: cdi_mgr_configure_gpios Failed to allocate gpio
  desc
 cdi-mgr sipl_devblk_3: cdi_mgr_probe(): GPIO setup failed
 Unable to handle kernel NULL pointer dereference at virtual address
  0000000000000300
 ...
 Call trace:
  rt_spin_lock+0x24/0xa8
  devres_remove+0x38/0x174
  devres_release+0x1c/0x80
  devm_gpiod_put+0x24/0x4c
  cdi_delete_lst+0x18c/0x1200 [cdi_mgr]
  cdi_mgr_debugfs_init+0x608/0x11b0 [cdi_mgr]
  platform_probe+0x64/0xec
  really_probe+0xb8/0x284
  __driver_probe_device+0x74/0x12c
  driver_probe_device+0x38/0x114
  __driver_attach+0x74/0x13c
  bus_for_each_dev+0x74/0xf0
  driver_attach+0x20/0x30
  bus_add_driver+0xe4/0x20c
  driver_register+0x5c/0x130
  __platform_driver_register+0x24/0x34
  init_module+0x1c/0x1000 [cdi_mgr]
  do_one_initcall+0x44/0x2e8
  do_init_module+0x58/0x1f8
  load_module+0x1b94/0x1cf8
  init_module_from_file+0x84/0xc8
  __arm64_sys_finit_module+0x1b8/0x270
  invoke_syscall+0x40/0x11c
  el0_svc_common.constprop.0+0xc4/0xe4
  do_el0_svc+0x18/0x28
  el0_svc+0x30/0xe0
  el0t_64_sync_handler+0xc8/0xcc
  el0t_64_sync+0x16c/0x170
 Code: b9447420 d503201f 91006262 d2800000 (c8e07c41)
 ---[ end trace 0000000000000000]---

The problem is that the CDI MGR allocated the gpio descriptors by
calling the function devm_fwnode_gpiod_get_index(). This function
returns an ERR_PTR() on failure. When this does fail and cdi_mgr_del()
is called to clean-up, this does not check to see if the descriptor
IS_ERR(), but simply check if it is NULL or not, which is not correct.
Hence, we end up calling devm_gpiod_put() for an invalid descriptor and
the above crash is observed. Given that we are calling
devm_fwnode_gpiod_get_index() to allocate the descriptor, it is not
necessary to call devm_gpiod_put() at all, because the kernel will
automtically call this for us. Therefore, fix this by removing the call
to devm_gpiod_put() completely.

Please note that although this was caught with Linux v6.10-rc5, this is
applicable to all kernel versions.

Bug 4627271

Change-Id: I576a984ebaaeea590c5acea1b489284379832ae9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3148004
Reviewed-by: Frank Chen <frankc@nvidia.com>
2024-07-12 22:38:49 -07:00
Manish Bhardwaj
5626a33be3 storage: update kernel version check
Support pstore client driver to store crash logs
in persistent storage device

JIRA ESLC-8017

Change-Id: I199e31f8ddf2f457326b98b5443daff67e60179a
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168608
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-12 15:27:22 -07:00
Laxman Dewangan
5349b1398f ethernet: Disable realtek R8168 build for RHIVOS-1 kernel
Disabling build of Realtek R8168 for RHIVOS-1 kernel
as this is not required for RHIVOS-1.

Bug 4729493

Change-Id: Iee3af848b2ffd8b4cbe684ae2d37ec7191d69581
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170563
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-11 15:54:50 -07:00
Jon Hunter
4f7910695a net: realtek: Add option to disable drivers
The RealTek drivers do not build against all Linux distributions because
some Linux distributions have back-ported upstream changes and so the
KERNEL_VERSION checks in the driver do not work for these distributions.

Add compilation flags for these drivers so that we can skip the building
of these drivers for certain Linux distributions.

Please note that the RealTek drivers build fine against Linux v5.14 and
so we should not prevent these driver being built against all Linux
v5.14 kernels.

Bug 4729493

Change-Id: I004d61a884c6f01b4629de56ecc17b55d4fa2cd1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171274
(cherry picked from commit 408ef72fb9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152308
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-07-11 15:54:46 -07:00
Laxman Dewangan
d356293253 nvidia-oot: correct the kernel config path
The kernel and system type specific configuration files are
placed at config/*. Adjust the path accordingly in master
Makefile.

Jira HOSTX-5375

Change-Id: I0883473b81a1e9c84ab80840c3f04e23e6b81075
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3169511
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-09 03:16:16 -07:00
Nagaraj P N
e9f3b6f0aa vse: rng: allocate buffer in generate callback
Allocation within init function cannot be performed as the
context structure does not have the node_id info populated
yet by cryptodev which causes the DMA buffer to be allocated
for the wrong engine/SID.

ESSS-1402

Change-Id: I58435cbe381812dfa314d86e6e46ee1e7ff77d0d
Signed-off-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3167473
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-08 15:58:27 -07:00
Narayan Reddy
0bca2438be nvethernet:set clocks based on serdes speed
1) set eqos rx clock based on serdes speed
2) set mgbe app parent based on serdes speed

Bug 4713751

Change-Id: If776c84807f7aa0373e1106c218b60da51921e79
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166928
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2024-07-08 15:55:49 -07:00
Jon Hunter
083d7038d1 trace: Fix build for Linux v6.10
In Linux v6.10, the __assign_str() macro was updated to remove the 2nd
argument. Add a test to the conftest script to detect this and update
the various trace header files as necessary.

Bug 4593750

Change-Id: I495e78658249baa84cca5b864f4e172c1f3f0838
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152310
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-07 12:50:13 -07:00
Laxman Dewangan
4e62fd7ed9 nvidia-oot: Add rhivos-1 specific configuration file
Add redhat kernel rhivos-1 specific OOT configuration files to
configure the OOT driver build accordingly.

Currently, disabling realtek R8126 and Realtek RTL8822CE build.

Jira HOSTX-5375

Change-Id: Id33c19171e1f61c94d9e9a7b90324e86a7e17072
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3169502
2024-07-06 01:31:41 -07:00
Laxman Dewangan
02d32d24ba Makefile: Parse kernel name and system type get specific configurations
The OOT driver requires the kernel and system type specific configuration.
These configuration is set in OOT drivers itself by parsing the kernel name
and system type.
The configuration are done in config file which is included from makefile
based on kernel name and system type.

Jira HOSTX-5375

Change-Id: I12b71e4cb6330706e0e53292f6d0c3073b199173
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3168812
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-06 01:28:35 -07:00
Mikko Perttunen
60b43d6545 gpu: host1x: Request syncpoint IRQs only during probe
Syncpoint IRQs are currently requested in a code path that runs
during resume. Due to this, we get multiple overlapping registered
interrupt handlers as host1x is suspended and resumed.

Rearrange interrupt code to only request IRQs during initialization.

Bug 4658418

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I25e129452aeb39c23aa2d6f6a54729f60390d088
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145171
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-06 00:09:14 -07:00
lchiu
d2a5a35cfe vse: support 64 bit keyslot for tsec
Bug 4620571

Change-Id: Iea2f42167245308348a0a50e9fde14036c3f0736
Signed-off-by: lchiu <lchiu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130036
(cherry picked from commit ba8f79f3e14b755ebb99464de2ff8d1c2d173e24)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3140529
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-06 00:07:00 -07:00
Khushi
b7a1a14256 NVVSE SM3 Implementation
Implements SM3 in NVVSE crypto driver linux
ESSS-1346

Change-Id: I9f8b9bc18d7c30d8dac04e8f19941ef061aa8478
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3131643
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-04 09:23:09 -07:00
David Pu
a5b6d4a5b6 psc: fix oops when rmmod and clean up the driver
This patch fixes kernel Oops due to freeing psc_debug device multiple
times.

bug 4699764

Change-Id: I0a57317b1b064c08d657752a726d855533ec4d3c
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166051
Tested-by: Liang Cheng (SW) <licheng@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-04 05:18:50 -07:00
Laxman Dewangan
edbb5317f8 nvidia-oot: Remove the builds of device tree from nvidia-oot
The build of device tree is moved to new folder/repo and hence
it is not required to have build support file for device-tree.

Remove the unused file.

Bug 4654821

Change-Id: Id01d634d551d36bc9b36c8971b13ed27f7b6b6d6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3165347
2024-07-04 05:10:03 -07:00
Manish Bhardwaj
3a04791c47 vsc: add priority member in vsc config structure
Bug 4709721

Change-Id: I17442674bab6ca6b854cb85483250c679cb62502
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164956
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Sreenivas Velpula <svelpula@nvidia.com>
Reviewed-by: Kasinadha Dendukuri <kdendukuri@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-03 14:21:27 -07:00
Junghyun Kim
74316123dc media: camera: Update device creation
Use %d instead of %x to match with the number used in cdi

Bug 4704962

Change-Id: I911b6596ba1efcef3ad9a0d0c0056ac430fcea6c
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163825
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Igor Mitsyanko <imitsyanko@nvidia.com>
2024-07-03 14:05:09 -07:00
Prathamesh Shete
1a85000f63 cdi_mgr: pass parent node instead of child
Bug 4704962

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Change-Id: Ib18f1de8e129916036913ec25bf5300d6f19def4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149773
Tested-by: Justin Kim (SW-TEGRA) <juskim@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chinmay Mahajan <cmahajan@nvidia.com>
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
2024-07-03 14:05:01 -07:00
Jian-Min Liu
f308ec7c39 kleaf: Add p4root symlink into conftest group
The execution of conftest currently relies on the GNU toolchain located
in the P4ROOT path. However, since kleaf is a hermetic build, the P4ROOT
environment variable is cleaned up during the kleaf setup. To address
this, we create a symlink to connect the original P4ROOT path to the
kleaf build path.

Bug 4344670

Change-Id: I7877fd5d5543f73001dd1a017dfd0cc552802658
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3161994
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-03 13:58:26 -07:00
Jian-Min Liu
a984cae1fc kleaf: Use kernel-source path as kbuild
Use the kernel-source folder name to hide the kernel version path,
and this folder will be created as symlink. Before building kernel,
the script will build the symlink based on the kernel version of
environment variable. The advantage of this is that there is no need
to change the path whenever the version is updated, and the build
can be switched between different kernel version.

Bug 4344670

Change-Id: Idfc285fee7472bb3d76b6a6cdc1334df5958f4a0
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158772
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-07-03 13:58:19 -07:00
Jian-Min Liu
7ca2ec7115 Kleaf: Update kernel modules in nvidia-oot
The kernel modules in "outs" field should match to
the number of modules in build output, otherwise build
will fail.

Bug 4344670

Change-Id: Ideb8d002b6ca118ae3d61b57148059ca88a3ba99
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3129470
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-07-03 13:58:11 -07:00
Laxman Dewangan
13027c8c90 pci: Port pci-epf-tegra-vnet to support 5.14.0
Most of the code in the file pci-epf-tegra-vnet.c is written
to support the linux kernel version 5.14.x (x != 0), all minor
version above 0.
Make the condition of linux version check such that 5.14.0 is
also part of 5.14.x i.e. (5.14).

Jira HOSTX-5375

Change-Id: Ib3d7ca619497761b8bc77796c9fe0f59c2ab9cf8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166767
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-03 07:47:55 -07:00
Laxman Dewangan
00a95facef pci: Add conftest to determine if msi_get_virq() present
The API msi_get_virq() get added by commit 98043704f375 ("genirq/msi:
Make msi_get_virq() device domain aware") in Linux v6.1. Use
conftest to determine if this API is available or not.

Jira HOSTX-5375

Change-Id: I5e4cef9622d852fc889d9652e6631a79f2d21f9b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166766
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-03 07:47:50 -07:00
Laxman Dewangan
b260a8f442 pci: Use conf test to determine API change of pci_epc_write_header()
Add conftest to determine if the pci_epc_write_header() has the vfn
argument or not.

Commit 53fd3cbe5e9d791("PCI: endpoint: Add virtual function number
in pci_epc ops") added virtual function number as argument in the
APIs in Linux 5.14.

Jira HOSTX-5375

Change-Id: Ib0b1fbc2a33f9159f3497374d253e264a90f7b4d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166765
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-03 07:47:40 -07:00
Laxman Dewangan
b02764ce1c net: Disable realtek driver to compile for K5.14
Disabling build of ethernet and wireless realtek driver
for building with k5.14 kernel due to build issue.

Drivers are r8126 and rtl8822ce.

Bug 4729493

Change-Id: I016484a81c9a28a460a8592e80e123a7ca11222e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166764
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-07-03 07:47:35 -07:00
Laxman Dewangan
1707f60f8b conftest: Add macro to determine if MODULE_IMPORT_NS present
Add conftest to determine if the MODULE_IMPORT_NS macro present.
This macro is added in commit 80140a81f7f833 ("module.h: simplify
MODULE_IMPORT_NS") in Linux 5.18.

Jira HOSTX-5375

Change-Id: Ie61dd169d21a0169c44060eb0e3f3fe4a9c149e8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3166547
2024-07-03 07:47:30 -07:00
Sanath Kumar Gampa
d5ff462449 nvethernet: Generate Hkey based on SAK
- Remove restriction to allow multicast addresses to be added to byp_lut
and sci_lut
- Also update the usage of macsec_enable node to enable/disable both Tx
and Rx traffic
- Fix the issue of generating same Hkey for differet SAK by moving the Hey
key generation logic post obtaining SAK

Bug 4715173
Bug 4715001

Change-Id: I7d3088a1f58203a474b659c7197bacc05e8510dd
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164153
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-02 05:21:31 -07:00
Sanath Kumar Gampa
beb276a468 osd: fix mmc counters issue
As the mmc counters of macsec are reduced to 4 bytes update the
same in sysfs debugging

Bug 4703442

Change-Id: I02b80d876dad823a0ba302e05acd129fb4d9121d
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163254
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
2024-07-02 05:07:51 -07:00
Manikanta Maddireddy
49bb1dec11 PCI: EPF: dma-test: Add outbound ATU test function
PCIe endpoint controller supports 8 outbound channels to map Root port
address and access it as memory mapped IO. Add test function to verify
this feature.

Bug 4705051

Change-Id: I126e94619c581ed15f1d6db54845de209742af0e
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163953
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
2024-07-01 14:38:00 -07:00
Manikanta Maddireddy
fb5a616f92 PCI: EPF: dma-test: Fix unaligned offset during dma reinit
Clear the unaligned offset when reinitializing the DMA with new settings
to avoid CRC check fail.

Bug 4712065

Change-Id: I9faee6b5c74be32a421a594c8bb842d2b2cb97c2
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163952
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
2024-07-01 14:37:56 -07:00
Jon Hunter
65900a51a9 media: virtual-i2c-mux: Fix build for Linux v6.10
In Linux v6.10, the 'class' argument was removed from the
i2c_mux_add_adapter() function. Add a test to conftest to detect the
correct number of arguments for i2c_mux_add_adapter() and update the
virtual-i2c-mux driver accordingly to fix the build for Linux v6.10.

Bug 4593750

Change-Id: I7333a511b487b7c2f2fa0ce7c34f2df5f061fbe4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142398
(cherry picked from commit 5e0562c90d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142376
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-06-29 12:18:28 -07:00
Jon Hunter
5c02e2fd0b media: camera: Fix build for Linux v6.10
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra camera drivers accordingly to fix
the build for Linux v6.10.

Bug 4593750

Change-Id: I05e15e2a63383ab2f96be6c20e81705de9581869
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123220
(cherry picked from commit 1b72d87cce)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142228
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-06-29 12:18:18 -07:00
Jon Hunter
9b118c56c7 pwm: tachometer: Fix build for Linux v6.10
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra PWM Tachometer driver accordingly
to fix the build for Linux v6.10.

Bug 4593750

Change-Id: I9d629746290282b5c1858f8308128d94ff155c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123219
(cherry picked from commit 0104837e60)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142227
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-06-29 12:18:13 -07:00
Jon Hunter
bcd5a6c812 thermal: Fix build for Linux v6.10
In Linux v6.10, commit b1ae92dcfa8e ("thermal: core: Make struct
thermal_zone_device definition internal") made the structure
'thermal_zone_device' internal and so the 'devdata' member is no longer
directly accessible. The function thermal_zone_device_priv() was added
in Linux v6.4 for retrieving the 'devdata' and so update the various
thermal drivers to use this function if present.

Bug 4593750

Change-Id: Ic53de9bbd5459c99a3ac26759aa8a966cd775fe5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123221
(cherry picked from commit d95c0d0add)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141886
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-06-29 12:18:03 -07:00
Revanth Kumar Uppala
19e5f2fafa nvethernet: macsec: Add module param for macsec.
Add module parameter to enable/disable macsec.

By default macsec will be enabled and it can be disabled
with help of module parameter "macsec_enable"

Bug 4640382

Change-Id: I3b6ffde52a73760cd65f02abe472c3133996b698
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3156387
(cherry picked from commit f870a5f9fc)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3138588
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-06-29 08:15:41 -07:00
Revanth Kumar Uppala
6f80c397ed bt: realtek: Fix potential buffer overflow in cfg_list_item struct
The `cfg_list_item` struct previously defined the `data` array with a zero-length,
which can lead to buffer overflow issues detected by the `fortify_memcpy_chk` function.
So change the zero-length array to a flexible array length.

Bug 4701669

Change-Id: I3c4575efbab681fa8b6039793c410b23c4179106
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159595
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-06-29 05:04:00 -07:00
Mahesh Patil
00e9f705d4 nvethernet: Ignore lane bringup restart task
- Adding WAR to ignore lane bringup restart task
 as it is causing lane bring up failures in SLT EQOS/MGBE
- Populate RSS hash table with enabled num_of_dma channels

Bug 4709627

Change-Id: I195db0371f69dfcedc1c67023c1279af426dd7e6
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3162313
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-06-26 22:56:52 -07:00
Aniruddha Paul
b7a7a2cba5 nvethernet: Fix Copyright year
Bug 4669190

Change-Id: I7b683d10fa230711ae38aac48e24c05b1033c1c8
Signed-off-by: Aniruddha Paul <anpaul@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3150773
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Tested-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
2024-06-26 22:40:57 -07:00
omar
38b4ef0bdd drivers: pva: support PVA on Thor with HV
Jira PVAAS-15366

Change-Id: I74b37d6e2dee09d40b1b64647d8a98a643e23f05
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3160295
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
2024-06-26 18:11:53 -07:00
Jon Hunter
955de38d70 net: nvethernet: Fix support for Linux v6.9
When nvethernet was updated to support Linux v6.9 kernels, the code that
checks if the variable 'eee_req->advertised' is zero or non-zero was not
updated correctly. For Linux v6.9, the variable 'eee_req->advertised' is
a bitmask and so cannot be checked directly to see if it is zero or
non-zero. Building the nvethernet driver with the flag '-Werror=address'
exposed this issue. Fix this by using the 'linkmode_empty()' function to
determine if 'eee_req->advertised' is zero or non-zero for Linux v6.9
kernels.

Bug 4471899
Bug 4662166

Change-Id: Id4080d62006226648cd398dc8652578c74dd8158
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158064
Tested-by: Shanker Donthineni <sdonthineni@nvidia.com>
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Shanker Donthineni <sdonthineni@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Rohit Khanna <rokhanna@nvidia.com>
2024-06-26 06:30:19 -07:00
Sanath Kumar Gampa
cb7e8e2116 macsec: Enable clocks for t264 eqos macsec
Bug 4703442

Change-Id: I5966661a6e5b6ea53d2acded93d3c3a1c70bf181
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159609
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-24 11:11:40 -07:00
Ashutosh Patel
2cda57413f NVVSE: Enable Linux IVC_DB Bringup
Changes:
    - Enabled Linux IVC_DB changes
    - Added Host1x compatible string

Jira ESSS-1389

Change-Id: I3032db25b53e230693813fb3bb096d59bafec7e9
Signed-off-by: Pranjal Singh Mandloi<pmandloi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154005
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Patel <ashutoshp@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
2024-06-24 11:09:42 -07:00
omar
0a6f107a51 pva: drivers: enable HWPM for all PVA GEN
allow HWPM registration for all PVA generations

Jira PVAAS-15361

Change-Id: Ifede72fb0377e1798e6746f569cf7369087360ae
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159758
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
2024-06-23 19:52:59 -07:00
Omar Nemri
baee98bcb9 drivers:pva: support up to 96 descriptors for MISR
Jira PVAAS-15361

Change-Id: Ic1c7b0396304a858c478292533ff3d1d05871741
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158078
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-23 19:52:45 -07:00
Krish Agarwal
d86f5508cd drivers: pva: update sys allow list
Jira PVAAS-15362

Change-Id: I36666e58169530d66e69bf2c3d08b66e647e0cd6
Signed-off-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3160789
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
2024-06-23 16:42:05 -07:00
koenz
c7f7e97fec driver:misc:mods: Increase max mods SMMU devices to 128
- More tested IPs require alloc memory through SMMU

Bug 4467535

Signed-off-by: Koen Zhao <koenz@nvidia.com>

Change-Id: I59fb622b9cd026257b31386e3822dd9511e93a4f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3160528
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Carl Dong <carld@nvidia.com>
Tested-by: Koen Zhao <koenz@nvidia.com>
2024-06-23 13:05:53 -07:00
Khushi
df2a7fda9c CMAC for Linux
CMAC implementation for 64 bit addressing
Remove unsupported legacy cmac function
Implemented CMAC for new chip

ESSS-1375

Change-Id: I43bc4a03b03a5914ab1e4656bef90ad179744f1a
Signed-off-by: Khushi <khushi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3146556
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Tested-by: Pranjal Singh Mandloi <pmandloi@nvidia.com>
2024-06-22 07:43:34 -07:00
Amruta Bhamidipati
a4607dbdfd drivers: pva: Update HWSEQ checks
Add additional HW SEQ validation checks
- Validate all frames with different addressing modes in a
  HW SEQ blob
- Validate multiple frames on a single channel in RDF
  frame-linking mode
- Validate each column/row within a given frame since
  multiple column/rows are supported in next chip

Bug 4588239

Signed-off-by: Amruta Bhamidipati<abhamidipati@nvidia.com>

Change-Id: Ic30c8c1982c5ac21a960f0546c39e5a28cc7d4bd
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3153297
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Krish Agarwal <krisha@nvidia.com>
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
2024-06-21 23:05:14 -07:00
Ketan Patil
a163533e77 video: tegra: nvmap: Restore handle size
NvRmMemHandleAllocAttr can be called with multiple input heaps, if
allocation from first heap fails, then allocation from next heap is
attempted and so on. In case of GPU carveout, the handle size is aligned
to next 2MB while for other heaps, it is aligned to 4KB. If the user
provides an array of heaps, where first one is GPU carveout, then the
handle size is aligned to 2MB and then if the enough memory is not
available in GPU carveout the allocation call fails, but the handle size
is not restored back to 4KB aligned size. So the next allocation attempt
from the second heap would request for incorrect buffer size. Correct
this behavior by restoring the handle size back to 4KB aligned size, if
allocation from GPU carveout fails.

Bug 4661684

Change-Id: I6d93eb96b21e384554df888d9819dcfc2f3565fa
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159925
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
2024-06-20 05:03:30 -07:00
Ketan Patil
caeb9cd1b8 video: tegra: nvmap: Return error if any handles exist
When nvmap module is unloaded and if there are any existing handles then
return an error -EBUSY.

Bug 4603770

Change-Id: I74d9b0ee8d95a78c1784998e7b913578a83b3cef
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149415
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
2024-06-20 02:23:37 -07:00
Revanth Kumar Uppala
ee37ee732d r8126: Enable support for RSS
Enable support for Receive Side Scaling (RSS)
in Makefile

Bug 4478230

Change-Id: Iafb026ba3b9b152ea7e44933562093144bfcf062
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159352
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Tested-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-19 02:56:56 -07:00
Yash Bhatt
f2065a85cc video: tegra: nvmap: Remove use_numa parameter
Remove use_numa parameter from nvmap_alloc.c because its redundant.

Bug 4479027

Change-Id: I611b2e606299389d5ff0880b263abe6c161c2d0d
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158948
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
2024-06-19 00:59:17 -07:00
Yash Bhatt
31f41ea186 video: tegra: nvmap: Fix null error pointer dereference.
In function nvmap_ioctl_get_fd_from_list, the return pointer from nvmap_handle_get_from_id is being dereferenced without checking if it is valid. This is causing a kernel panic crash in syzkaller. Fix this by checking whether the pointer is valid or not before dereferencing it.

Bug 4479038

Change-Id: Ia65341e9eb12873e660baae44d28966e71317377
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154940
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-06-19 00:58:55 -07:00
Yash Bhatt
601fdeaed2 video: tegra: nvmap: Remove WARN_ON and exit gracefully
Remove WARN_ON macro invocation and exit gracefully from the nvmap_query_heap_params function when the heap_mask parameter is not a power of two. This is because if two or more bits are set in heap_mask, then it's an invalid parameter because NvMap can allocate buffer from only one heap at a time.

Bug 4479038

Change-Id: I6cfca911115f7f29e2c4e46816a89fa1869adae4
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154939
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-06-19 00:58:45 -07:00
Yash Bhatt
42585a86f3 video: tegra: nvmap: Fix stack frame size exceeded error in nvmap
Fix stack frame size exceeded error in nvmap_ioctl.c by allocating the buf array dynamically.

Bug 4663827

Change-Id: I4ccb86b2f82e09417bf957830777c516dcf1ee47
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154936
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-19 00:58:35 -07:00
Revanth Kumar Uppala
3cc7aea47d ethernet: Add dummy driver for r8126
r8126 driver build is disabled on K6.10 and later. This is
causing the packaging failure where module is not available.

Add dummy driver when real driver is not available to make
packaging success.

Bug 4478230

Change-Id: I6ceef7f92863499c58edaf4ddd19ae65b12a2a00
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152064
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sandipan Patra <spatra@nvidia.com>
Tested-by: Sandipan Patra <spatra@nvidia.com>
2024-06-19 00:55:32 -07:00
Revanth Kumar Uppala
881b71be5d r8126: Add r8126 driver version 10.013.00-NAPI-PTP
Add support for r8126 ethernet driverversion 10.013.00-NAPI-PTP
which adds support for PTP and supports till K6.9

Bug 4478230

Change-Id: I381d3689a188e5d365ff89092a98023eeaa2a095
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3151529
Tested-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sandipan Patra <spatra@nvidia.com>
2024-06-19 00:55:27 -07:00
Bharat Nihalani
a6af56f96c tegra_bl_debug: Copy profiler data to buffer
As part of profiler show operation triggered through sysfs,
profiler data is only seen in the kernel log.

Add a change to copy the profiler contents in the profiler
buffer as well so that the buffer content is visible at the
place where sysfs read is issued.

Note that there is a limitation in buffer size used in sysfs
read and write operations, which is equal to PAGE_SIZE.
And so, checks are added to detect buffer overflow while
writing profiler data in the buffer.

Jira ASSA-934

Change-Id: Ice3eccdfffbd7734ac7a20a0a8ca52ba00af865e
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154262
(cherry picked from commit b619de032dfd58ffc385b08d26353991e2ae3d9b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3158713
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
2024-06-18 22:05:59 -07:00
Mahesh Patil
c765f98235 nvethernet: T26x EQOS changes
1) Added T26X EQOS bring up changes
2) Fixes added during bring up

Bug 4639097

Change-Id: I624fc5c2f9ef4304fe2ae1df6905195d7d969c68
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152935
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
2024-06-18 11:37:23 -07:00
Gerrit Code Review
9d4d563987 Merge "Merge remote-tracking branch 'origin/dev/t264-ethernet' into dev-t264" into dev-t264 2024-06-18 11:37:18 -07:00
Ketan Patil
bcdc838be7 video: tegra: nvmap: Remove incorrect check
len which is of type size_t is checked with UINT_MAX. The condition will
result into an issue when len is more than UINT_MAX. Hence remove this
incorrect check.

Bug 4650102

Change-Id: Ie1a5de8e3fbdb56aff1a15456db81cc449c63bbf
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154778
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-06-18 09:34:58 -07:00
Laxman Dewangan
1cf1d3f858 pcie: private-soc: Add dummy driver for soc specific pcie driver
The L4T packaging needs the soc specific dummy driver to be
available always. However, it is not available in generic build and
it creates the packaging/configuration fail.

Add soc specific dummy driver for pcie so that the respective binary
should be available always.

Bug 4695516

Change-Id: Ic40e60a12de35cebc7e9acec9b09e39aa267276b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154314
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-06-13 10:15:06 -07:00
Bhadram Varka
ba8b33f91b Merge remote-tracking branch 'origin/dev/t264-ethernet' into dev-t264
Bug 4687787

Change-Id: Ib6a8c7e6c6424f2b338efcd88f54fe4343f8036f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2024-06-07 15:14:03 +00:00
Sanath Kumar Gampa
96d89392f0 NvEthernet: macsec: Fix the nla policy issue
Issue: IOCTLs from supplicanta pplication are not reaching Nvidia
Ethernet driver in kernel 6.1

Fix: Filled the correct policy while registering with netlink. Added
Cipher Suite attribute to genl macsec policy

Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3126784

Bug 4316709

Change-Id: I7d0b86d14b1d5bb9aff34b79d635bfccd7443ebf
2024-06-07 13:10:54 +00:00
Mahesh Patil
6bc9570126 nvethernet: T26x CAR changes
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3126090

Bug 4228185

Change-Id: I74b0607de28b9a635afeae80dbc31cb79bd45f30
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>

fix compilation error

Change-Id: I088609c66a180aeacf8baeb9dad0d29a38550726
2024-06-07 13:10:54 +00:00
Mahesh Patil
54ca566b6a nvethernet:add idle timer window interrupt support
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2963539

Bug 4246781

Change-Id: I683dd14ffbc92755c60f04ba35e5e5bfe98c5a0f
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Rakesh Goyal
eb29db2879 nvethernet: ptp support for upcoming chip
Bug 4221043

Change-Id: I4689259e48705aa975ec33dddaba8fd7e941d304
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/nvethernet-docs/+/2968051
Tested-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
7e2c08add0 nvethernet: Allow more than 31 l2 filter index
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3027949

Bug 4297989

Change-Id: Ic978dc44dd2d16b03effc5322d2470a238c7ccc9
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Nagaraj Annaiah
a0d0c09294 osd: Add FRP and L2 support for t264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3004699

Bug 4334269

Change-Id: I66d2071e8ead23b99657590f731e3584653ea2b3
2024-06-07 13:10:54 +00:00
Sanath Kumar Gampa
77315f1197 nvethernet: Defature MACSEC debug buffer for T264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3016482

Bug 4134804

Change-Id: I9f5023d6dd6598bd666d4dbe68bc92106da10908
2024-06-07 13:10:54 +00:00
Sanath Kumar Gampa
6be26babe2 Nvethernet: Split MACSEC sysfs nodes
As PAGE_SIZE is not sufficient to accommodate 48 SC channel.
Split some of the nodes to Tx and Rx.

Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2931105

Bug 4361623

Change-Id: I487e67058fa9528ae36880bb57ad848ba7d8c56a
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
2024-06-07 13:10:54 +00:00
Rakesh Goyal
4cd40b0b3b nvethernet: T26X MAC_Address0_High reg AE bit
In T26X, MAC_Address0_High reg AE bit R/W, so changing
UC and BC address indexing to 0 and 1.

Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2987634

Bug 4325242

Change-Id: Id2e6d757ceee750a31bf1fdf3821bc5dd892f08b
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
2024-06-07 13:10:54 +00:00
Sanath Kumar Gampa
62e5a277df nvethernet: Adding support for encryption and confidentiality offset support
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2935715

Bug 4193186

Change-Id: I3b8a20bc4df975f5d74d614c7cea1b91bd42b597
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
501aeb6edc nvethernet: Macsec Bring up on T264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2904856

Bug 4122114

Change-Id: I3be0d8c545f4edac678f5444044aa5ccd54b08fe
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
2b4c6bc2fb nvethernet: match stats count to num of vdma
In T164 MTL Q numbers are not same as VDMA, so change
ether_xtra_stat_counters to match VDMA number

Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2992110

Bug 4316080

Change-Id: Id8e4f1b37f4aa6d84e4faa0c2b03c42d1cfd4cc2
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
90a31dac49 nvethernet: Add T264 changes to include 48 filters
Add support to include 48 filters for T264 from feature register

Ported from -
https://git-master.nvidia.com/r/c/linux-nv-oot/+/3148383

Bug 4291865

Change-Id: Ic3df0db74dc86bebcacff2f77238f1a6bcf38657
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
0e5f26d308 nvethernet: Enable RSS feature for T264
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2981671

Bug 4291539

Change-Id: I9568635d04d9198a073e2c6758953a16ba408cb4
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
2a77d85ced nvethernet: Remove Rx channel0 WAR fix
MGBE NET07 bit file fixes Rx Channel 0 data
tranfer not working issue. Removing WAR fix

Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2972125

Bug 4182455

Change-Id: I0774dc47eee15246989dfbd8c09f0bc001b2a15c
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Mahesh Patil
5edac49a28 nvethernet: T264 Enable 20 VDMA channel support
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2940794

Bug 4043836

Change-Id: I763bfdaa78082de035219e10ef1c131bdbba5e35
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2024-06-07 13:10:54 +00:00
Manish Bhardwaj
e44802987e vsc: fix out of bound memory access
kernel panic when doing a IOCTL on UFS virtual partition
with pass thru enabled. IOCTL require larger space than
the mempool size (512KB) and the len check fails and leads
to a out-of-bound memory access.

Bug 4683333

Change-Id: Ie8d13bbed13a257e73087c9472054aa4083cf3eb
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3151274
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Tonny Liang <tonnyl@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Tonny Liang <tonnyl@nvidia.com>
Reviewed-by: Sanjith T D <std@nvidia.com>
2024-06-06 09:05:58 -07:00
Rakesh Goyal
2a104ca84d nvethernet: T264 VDMA feature and initial bring up
Bug 4043836

Ported from the change -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2896006

Change-Id: I844112cc71e387f6ae04c2cc7f64b71abb4283fd
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149289
Tested-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-05 02:51:08 -07:00
Laxman Dewangan
e7777958d3 r8126: Fix typo in the object name
Fix typo in object name for the driver of r8126.

Bug 4478230

Change-Id: I20e0d3f9ad2074ea4ca69eb8bf108272ba4e3e8d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149558
Tested-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
2024-06-04 12:03:30 -07:00
Santosh BS
776ab71140 gpu: host1x-nvhost: fetch host1x data based on instance
Get the right host1x data pointer according to the instance passed.

Bug 4505161
Jira NVGPU-11046

Change-Id: I2bf671236a2fb3a89c87c22d2d7b5f81cf035524
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149447
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Tested-by: Seema Khowala <seemaj@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-04 12:03:25 -07:00
Ketan Patil
dc9b7b572c video: tegra: nvmap: Correct the data type
When granule_size of type u32 and size is more than 4GB (i.e. value
having more than 32 bits), then ALIGN_GRANULE_SIZE would return
incorrect value due to ~(GRANULE_SIZE - 1),  as this would be in 32
bits. Hence change the granule size's data type to size_t, so that the
above value is not restricted to 32 bits.

Bug 4650102

Change-Id: If44f2663b6a4735c193d3a80b233b53d70772335
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149162
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-06-03 09:20:36 -07:00
Asha Talambedu
e670902c1f nvadsp: Fix typo in irq parsing
While parsing irqs from dt, one of the condition employs
wrong count due to typo. Fixed the same

Bug 4165898
Bug 3916054

Change-Id: I4d3225a47eea3410bb0074d0c7af1d28714c8b38
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3148652
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
2024-05-31 15:54:47 -07:00
Ian Grissom
7e861f8a9e misc: mods: update from Perforce and MODS KD RIST
* Updates misc/mods from Perforce
 * Adds support for updated ATF RIST SMCs

Change-Id: I84975bb5dee6775ae415167d78799ecd38cb888f
Signed-off-by: Ian Grissom <igrissom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3146201
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Tested-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2024-05-31 10:58:28 -07:00
Srinivas Ramachandran
70999e5756 nvethernet: Enable Rx csum offload only for EQOS
Issue: Rx csum offload can be safely enabled
       for EQOS as there is reliable HW sequence to
       ensure data validity when processing descriptors
       which are SW owned.
Fix:   Enable Rxcsum for eqos.

Bug 4486046

Change-Id: Ic3ef7317cfc9d22c0756afc6dfc9f98ce6743977
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126197
(cherry picked from commit 7e908f2f0bce0650b21c64fddb31401f190c26df)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3146940
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Amlan Kundu <akundu@nvidia.com>
2024-05-31 02:18:48 -07:00
Viswanath L
8862f64e15 nvadsp: Remove __init from probe functions
Sections placed in __init are freed after module load, which
causes kernel panic in certain flows. __init attribute adds no
value for loadable modules and hence removed.

Bug 4165898
Bug 3682950

Change-Id: I43eea5ed4e8a527e7b372c2b29322fe2aa67ea63
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144493
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Tested-by: Ashish Mhetre <amhetre@nvidia.com>
2024-05-30 12:34:25 -07:00
Revanth Kumar Uppala
4c39ed9cb5 ethernet: Add dummy driver for r8126
r8126 driver build is disabled on K6.9 and later. This is
causing the packaging failure where module is not available.

Add dummy driver when real driver is not available to make
packaging success.

Bug 4478230

Change-Id: I1b83fe1c3f30a9f825631650ca2520d720ef07c6
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3144344
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-30 02:48:47 -07:00
Revanth Kumar Uppala
ce70fe6f92 r8126: Enable PTP support
Enable PTP support for r8126 ethernet driver

Bug 4478230

Change-Id: I1aa31abb92bb9c8536854149e12cbb8aadf47112
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145172
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
2024-05-28 18:57:17 -07:00
Mallikarjun Kasoju
3049af901c ufs: Do not use clk_m clock
clk_m clock is only T23x chips.
Kept condition accordingly to use clk_m
clocks in T23x chips only.

Bug 4199271

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I12259bddfec91b54504bb70356e0fc29a72f067d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145425
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-28 10:33:29 -07:00
Mallikarjun Kasoju
d260c69c83 ufs: Do not use mphy_force_ls_mode clock
mphy_force_ls_mode clock is only T23x chips.
Kept condition accordingly to use mphy_force_ls_mode
clocks in T23x chips only.

Bug 4199271

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I9b176ec6b1a9fd0ea0d52e857eb011197ef9234e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145424
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-28 10:33:19 -07:00
Mallikarjun Kasoju
0475230ef4 ufs: Do not use mphy_l0_tx_2x_symb clock
mphy_l0_tx_2x_symb clock is only for T23x chips.
Kept condition accordingly to use mphy_l0_tx_2x_symb
clocks in T23x chips only.

Bug 4199271

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: Ice48db41a45da763cfe4af18cc1440c59fb20b38
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145422
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
2024-05-28 10:33:09 -07:00
Mallikarjun Kasoju
fee74728d3 ufs: Do not use TX_MUX_SYMB_DIV and TX_MUX_SYMB_DIV
TEGRA234_CLK_MPHY_L0_TX_MUX_SYMB_DIV and TEGRA234_CLK_MPHY_L0_RX_MUX_SYMB_DIV clock are
only for T23x chips. Kept condition accordingly to use them in T23x chips only.

Bug 4199271

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I228b9da7c92628e3dfce82f571b5aaf0f73427a5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3143258
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Andy Sobczyk <asobczyk@nvidia.com>
2024-05-23 08:49:05 -07:00
Santosh BS
566858f37f gpu: host1x: multi device support
Update the node names to support multi device config.

Bug 4505161
Jira NVGPU-11046

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: Id5cc345d9ee2eab96e0c999c9e6b510642a398d9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142192
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
2024-05-23 08:48:35 -07:00
Jon Hunter
00cdac08b6 conftest: Add test for PCI_IRQ_INTX
In Linux v6.8, the definition 'PCI_IRQ_LEGACY' was deprecated and
renamed as 'PCI_IRQ_INTX'. Add a test for conftest to detect if
'PCI_IRQ_INTX' is defined so that drivers can migrate to the new
definition.

Bug 4593750

Change-Id: If34c258cfabe407bd15dc7078f2599737368dc58
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3143016
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-22 23:33:27 -07:00
Jon Hunter
044a70ac62 drivers: Fix dummy module license
The correct module license string for drivers is "GPL" and not "GPL
V2". Note that "GPL" in the module license indicates GPLv2 according to
the kernel documentation. Using "GPL V2" causes the following kernel
warns to be printed when the module is loaded ...

 r8168: module license 'GPL V2' taints kernel.
 Disabling lock debugging due to kernel taint
 r8168: module license taints kernel.

Fix this by correcting the license string for dummy drivers.

Bug 4606591
Bug 4471899

Change-Id: Ib785b2d3c90234e279cb1d804bf9a9842e6e5084
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141628
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-22 23:27:27 -07:00
Jon Hunter
e74d45174b tegra_hv: Remove unused dummy driver
Support for building the dummy tegra_hv driver has been removed from the
Makefile and so remove the unused source file as this is no longer being
used.

Bug 4370594
Bug 4346767

Change-Id: I44134df27374338d37ebbb71d9562bcabd0b86e9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141627
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-22 23:27:23 -07:00
Praveen AC
bd232ba9c5 nv_hawk_owl:Fix 3rd Hawk streaming fail.
Enable video pipe line for Hawk3 i.e video pipe 4 & 5.

Bug 4564878

Change-Id: Ib39a5afc332722e5e8476f689a243f7dc71a6a2c
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3099879
(cherry picked from commit e3f09d3989)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3100940
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-05-22 23:10:25 -07:00
Jon Hunter
c73cf3c92a block: virtual-storage: Allow build for Linux v6.10
The function blk_queue_max_hw_sectors() was removed in Linux v6.10 and
so add a test to conftest to see if this function is present or not to
allow the driver to build. The virtual-storage driver is currently
broken for Linux v5.19+ kernel due to other incompatibilities with these
newer kernels, but has been updated so that it still builds. Therefore,
allow the driver to build for Linux v6.10 while the driver is fixed
properly for these newer kernels.

Bug 4311184
Bug 4593750

Change-Id: Ic4054c87acdf3c77f03ff94fbdde513d84fe229b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142216
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-22 09:19:53 -07:00
Jon Hunter
6255ffef44 media: camera: Fix v4l2-subdev for Linux v6.10
In Linux v6.10, the v4l2-subdev callbacks 'g_dv_timings' and
's_dv_timings' were moved from the v4l2_subdev_video_ops structure to
the v4l2_subdev_pad_ops structure. Fix the build for Linux v6.10 by
using conftest to determine which structure is used for these callbacks.

Bug 4593750

Change-Id: Ic54e88da22ed7d1da9b6026a45b9c4307637c7b4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142215
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-22 09:19:43 -07:00
Jon Hunter
1a635bb0ea conftest: Fix tests for Linux v6.10
Some of the conftest tests are no longer working with the mainline
kernel and this is causing various build failures for drivers. Upstream
commit a3b00f10da80 ("objpool: enable inlining objpool_push() and
objpool_pop() operations") inlined some code that causes build error to
occur when the tests are built with 'Werror=address-of-packed-member'.

Upstream commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member'
warning") disables the option 'address-of-packed-member' for the kernel
already and so fix these new build failures by disabling this option
for the conftest tests.

Bug 4593750

Change-Id: I37af97079bb7734fcd5bf10384b1afc071613594
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142214
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-22 09:19:33 -07:00
Jon Hunter
ef52cefdda nv-virtio-poc: Add missing header
In Linux v6.10 the nv-virtio-poc driver fails to build and the following
error is seen ...

 drivers/nv-virtio/nv-virtio-console-poc.c:277:13:
  error: implicit declaration of function 'remap_pfn_range';
  did you mean 'vmap_page_range'? [-Werror=implicit-function-declaration]
  277 |         if (remap_pfn_range(vma, vma->vm_start, ipa_pfn,
      |             ^~~~~~~~~~~~~~~
      |             vmap_page_range

Upstream commit 22bcc915ae91 ("kfifo: don't use "proxy" headers")
updated some kernel headers to only 'include what is used' and exposed
that the nv-virtio-poc driver is not explicitly including 'linux/mm.h'.
The function remap_pfn_range() has been defined in 'linux/mm.h' since
Linux v2.6 and so fix this by always including 'linux/mm.h'.

Bug 4593750

Change-Id: Ic43b22ca51bbc16e2085d146d28e40c21206ae2f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142213
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-22 09:19:28 -07:00
Jon Hunter
cb8b9f5a53 drivers: Fix missing vmalloc.h for Linux v6.10
Upstream commit 690da22dbfa8 ("asm-generic/io.h: kill vmalloc.h
dependency") removed the vmalloc.h header file from io.h and this breaks
building various drivers with the latest -next kernels. Fix this
by ensuring vmalloc.h is included and in most cases slab is not actually
needed and so remove this where possible. Note that it is fine to make
this change for all current supported kernels.

Bug 4593750

Change-Id: I003d1302bda226d356467e6ede99949b2716940a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141984
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-22 09:19:24 -07:00
Revanth Kumar Uppala
e4f3f5b0d5 r8126: Compile r8126 driver till K6.4.0
Include r8126 driver in Makefile for compilation
till K6.4.0

Bug 4478230

Change-Id: Ic519068a26f8871ad9affaed83a9fa484816d5f4
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3139860
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-05-22 09:16:38 -07:00
Revanth Kumar Uppala
a1c548df68 r8126: Change file permissions of source files
Remove executable permissions for source files

Bug 4478230

Change-Id: I2bf56e5abac7da957890ac73b7fd00656c8b7063
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3139856
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-22 09:16:33 -07:00
Revanth Kumar Uppala
33839a5be8 r8126: Add r8126 driver version 10.013.00
Add support for r8126 ethernet driverversion 10.013.00 which supports
till K6.4

Bug 4478230

Change-Id: I1fdac264355ca639d992825fd6e0404d9d075272
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095406
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-22 09:16:23 -07:00
Bharat Nihalani
b62173abe9 tegra_bl_debug: Do not check for bl_debug_data
1. tegra_bl_debug_probe checks if either bl_prof_dataptr, bl_prof_ro_ptr
or bl_debug_data are not passed by kernel command line parameter.

Post this check, it retrieves bl_prof_dataptr and bl_prof_ro_ptr
data from DT and does not retrieve anything for bl_debug_data.

There is no need for checking bl_debug_data as it is not being
queried from DT in the probe function. Hence, remove the check for
bl_debug_data from probe.

2. Add prints in probe function to print bl_prof_dataptr and bl_prof_ro_ptr.

Bug 4454722

Change-Id: Ib8e52407d2ff227cc9605704e467790a9b65a1db
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141122
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
2024-05-21 17:51:12 -07:00
Sameer Pujar
ea7af586a7 ASoC: tegra: cleanup legacy code
Upstream sound card machine driver is used now and legacy machine driver
is not required anymore. Hence following cleanups are made:

  - Remove legacy machine driver 'tegra_machine_driver.c'.

  - With legacy driver removal many of the APIs in tegra_asoc_machine.c
    are not required. So remove all such APIs and update the header file
    as well.

  - The ASoC utils 'tegra_asoc_utils.c' is not needed after removal of
    legacy machine driver. Remove the corresponding header as well.

  - BW manager support needs to be pushed in upstream and it is needed
    for ADMAIF and ADSP ASoC drivers. The downstream BW manager code
    can't be used by the ADMAIF driver. So remove downstream BW manager
    code and put FIXME item in ADSP driver.

Bug 4596865

Change-Id: Iac154b00759571a5593c3d75bbacbae5a68385e2
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110862
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-21 16:36:31 -07:00
lchiu
d095031e8d vse: Update AES IVC enc/dec msg
- Update addr to a single 64 bits variable
- Separate buf size to a new variable

Bug 4229291

Change-Id: If9b865c4a3a27219e5202dc367fbc553647353d8
Signed-off-by: lchiu <lchiu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3140142
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-21 16:34:33 -07:00
Shubham Chandra
6de4acf3fd nvidia-oot: imx318: fix probe failure
V4l2 ctrl values are 0 during init time s_ctrl call
from v4l2. Since framerate val parameter is 0, when
set_framerate_ex is called from set_ctrl_ex during
initialization for probing of imx318 sensor, this
results in invalid error and probe failure for imx318.

Assign framerate 'val' to a value from imx318 sensor
device-tree properties within the given range to avoid
probe failure due to this.

Bug 3692128

Change-Id: Ib5f50e64f99c8443bf604066eda315dc96fbde03
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089350
(cherry picked from commit 17e0946ce0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096300
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-21 16:33:00 -07:00
Praveen AC
ea4dfb33dc media: i2c: ar0234: Fix dual hawk corruption
- Fixes the frame corruption issue encountered
  when simultaneously streaming from two
  hawks via E3653 GMSL2 board
- Route each serializer output to a different
  deserializer output CSI port instead of
  routing video data from both serializers
  to the same deserializer output port
- Route data through two virtual channels for
  each of the two output ports instead of four
  virtual channels all through a single output
  port
- Fix serdes programming comments

Bug 4032165
Bug 3753423
JEC-286

Change-Id: I7b4e929e9f5330cc6eb0aa72646ce429a713df7a
Signed-off-by: Praveen AC <pac@nvidia.com>
(cherry picked from commit e31d73fa20)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3073819
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-21 16:31:20 -07:00
Viswanath L
c9f68ec529 nvadsp: Rely on WFI status if no interrupt
Check WFI status by regsiter query in case WFI
interrupt is not available.

Bug 3916054

Change-Id: Ideb0ac396623ad46e5d5ecf38738b99fd3366091
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3139589
Reviewed-by: Asha T <atalambedu@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-20 08:30:13 -07:00
Mallikarjun Kasoju
099f295391 ufs: Enable prod settings
Enable prod settings for ufs.

Bug 4283554

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: Icb4eaa753060e690e4524779b4bdee670498f468
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3137606
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-20 08:27:12 -07:00
lchiu
81ba6d69ce vse: Update interface for SHA
Bug 4229291
Change-Id: Ifefddf4a4ee0f26c8d1e558572d2e14abf99a825
Signed-off-by: lchiu <lchiu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3139037
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-20 08:04:56 -07:00
Narayan Reddy
381d11969f nvethernet: move err injec code to vltest
issue: HSI error injection logic is enabled by default
and is exposed as an ioctl which is a safety-related concern.

fix: move HSI error injection code only for
VLTEST build

Jira NET-1235
Bug 4449611

Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Change-Id: I4a15a40807466693ce673a3b9b00f51c077f2bd8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3078250
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132841
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-17 00:20:58 -07:00
Laxman Dewangan
316baa6776 ethernet: Add dummy driver for r8168
r8168 driver build is disabled on K6.9 and later. This is
causing the packaging failure where module is not available.

Add dummy driver when real driver is not available to make
packaging success.

bug 4628651

Change-Id: I8ade511488fab856f63e84c1ee51986286b2fa2d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3138401
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-05-16 12:19:09 -07:00
Jon Hunter
8720fe2167 nvmap: Remove legacy configs
The NVMAP configs NVMAP_CONFIG_LOADABLE_MODULE and
NVMAP_CONFIG_UPSTREAM_KERNEL are no longer needed or used because the
NVMAP driver is now always compiled as an out-of-tree driver. Remove
these legacy configs.

Bug 4074863

Change-Id: I4998ab9b2f0ab660a07aab262074c15db913c298
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3136417
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2024-05-16 02:13:02 -07:00
Mohit Ingale
035dd3db37 sipl: W/A to produce precise 30hz signal
With current implementation we only program 2 edge registers.
Because of which for 30Hz freq we are able to produce wave with 29.99hz
freq which is causing drfit which aligning with external time source.

For the workaround we are addding extra periods using edge registers to
precisely produce the 30hz wave form only if the fsync-group contains
generators with 30hz freq.

Bug 4584554

Change-Id: I71e98ca29c8189adbe28511d09cf3e0b75551d22
Signed-off-by: Mohit Ingale <mohiti@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3129503
(cherry picked from commit ac4236cc3e338b5a705e2310efba9593bf672002)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130953
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jagadeesh Kinni <jkinni@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-16 02:12:36 -07:00
Manikanta Maddireddy
120be4313a PCI: edma_test: Enhance edma stop test
Enable all channels in async mode and stop channel 2 to verify edma stop
feature. This stops the dma engine when channels 0, 1 and 2 are in middle
of processing descriptors and stops channel 3 before submitting the
descriptors.

Bug 4620420

Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Change-Id: Iadff763e299437ef8b7b575c0177968681adb15a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133675
(cherry picked from commit 88187c18bf6fe4d64cb9d2964664479492afce5c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133507
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-05-15 14:20:06 -07:00
Narayan Reddy
86cd71d0be nvethernet: remove unused code
osd_msleep is no longer used, so remove it

Bug 4449611
Jira NET-1411

Change-Id: I4a67c957238ffdef9254b267a4650f32886df849
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3122911
(cherry picked from commit c54a55bc9dd4bd24bda01680bc82c00b7c265679)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133371
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
2024-05-15 14:17:33 -07:00
Hareesh
53fafd9cd9 nvethernet: eqos: suppress set speed failed spew
- Suppressed set speed failed print for eqos as print
  is added in ethernet server.

Bug 4382126

Change-Id: Iaf58b6fcb66ba74185d3098a0954fb12cb915fb3
Signed-off-by: Hareesh <hkesireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3086295
(cherry picked from commit 3a48e73a8bb74cadb5f711f62880526101a3f56e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132851
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-15 14:15:24 -07:00
Viswanath L
faf0ae7591 drivers: bus: Add aocluster driver
Add a new driver for AOCLUSTER, under which AON module drivers
(like driver for AON_CPU) may be placed in device tree.

Bug 4165898

Change-Id: I3e6332f06b7d5e4d70293be131dfca38b56c8233
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3133748
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
2024-05-15 14:09:50 -07:00
Revanth Kumar Uppala
dd4ca5aab9 r8168: Replace kernel version checks with conftest
Use conftest instead of version checks for api changes
across the kernels.

Bug 4471899

Change-Id: Ia0750eb8e4d634c0a6ed71b6eb64857cddaf467f
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3134835
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-14 15:45:47 -07:00
Revanth Kumar Uppala
7354d5bf00 nvidia-oot: Modify r8168 path in BUILD.bazel
Modify path of r8168 in BUILD.bazel

Bug 4471899

Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Change-Id: I25f604253c4852e963b5c9c19e1fd5d58ef0ac40
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3124383
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-14 15:45:42 -07:00
Revanth Kumar Uppala
6b62a514a3 r8168: Disable 10M EEE
- This disables 10M EEE for r8168 driver

Bug 4205197

Change-Id: I804b0d53460d19d8ed0b692b7327210634e2a111
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123376
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-14 15:45:38 -07:00
Revanth Kumar Uppala
20dbe0996b r8168: Fix -20C 10mbps failure in Mods test
Issue:
Ethernet mplan stability tests at -20C for 10Mbps fails with rate 15%
Basically the GPHY 10M power saving includes the below parameters,
clock speed down, pll off and reference voltage off.
During debugging it was found that enable/disable pll circuit
frequently when in 10M low data traffic (such as idle mode) may have
a corner case and plays a part in this issue repro.

Fix:
So plloff saving function should be disable (do not have to open it) for nvidia -20C mplan test case.

Bug 3946623

Change-Id: Ifabe9e26e840537520d66acca106b37d3c285722
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123359
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-14 15:45:33 -07:00
Revanth Kumar Uppala
ae13276f5d r8168: Change file permissions of source files
Remove executable permissions for source files

Bug 4471899

Change-Id: I4d259b03014a8853b9baf0d04265ad521fefddb9
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123346
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2024-05-14 15:45:28 -07:00
Revanth Kumar Uppala
7086a36e68 r8168: update driver to 8.053.00
- Update realtek r8168 driver version to 8.053.00
- This update adds support till K6.8

Bug 4471899

Change-Id: I77734753b8ad9ca108afccda609d29ea73c848f5
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123343
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-14 15:45:24 -07:00
Ashish Mhetre
e66ec778b0 video: tegra: nvmap: Add function to get VPR device
Add function to get VPR device which is used by NvGPU instead of
exporting VPR device directly.

Bug 4616754

Change-Id: Ia6ee834a2804cc1693e7b66f4c4385d2b0eed37b
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3131961
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2024-05-14 05:34:20 -07:00
Praveen AC
e4e94d02c1 t23x:tpg:[WAR] Disable gain control to avoid insmod fail.
Disable gain control during tpg probe for t23x to avoid
insmod fail due to "NULL VI channel" when "tpg_gain_ctrl"
is enabled.

Bug 3695458

Change-Id: I15c035eaa2f187b927dc114e88959378f9e52a61
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2828420
(cherry picked from commit 06e543de3c238326bce4e3911129e60ec2be0880)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130692
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-14 05:33:12 -07:00
Nikesh Oswal
c08f277de5 video: tsec: add support to reboot tsec fw with context
Add support to shutdown tsec firmware by saving the context info
first so that same can be used when rebooting the firmware.

Also use the DO_IPC_OVER_GSC_CO flag only to decide if commands and
messages are sent over GSC_CO or EMEM. Larger buffers will still be
allocated in GSC_CO and pointers to it can be embedded in commands
and messages.

https://confluence.nvidia.com/display/PSS/Reboot+HDCP2X+FW+with+Context+Information

Bug 4437491

Change-Id: Ibeebe98a30db04f1b4b1a28c06ba359ff3a8d85d
Signed-off-by: Nikesh Oswal <noswal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3117020
Reviewed-by: Byungkuk Seo <bseo@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-11 04:57:49 -07:00
Praveen AC
77ae24b275 camera:driver: Fix the race condition of setting bypass mode.
Add the check to see if the device is already in use or not,
while calling s_ctrl by multiple user apps on the same video node.

Here ,The "vb2_is_busy" function checks if the queue represented
by the vb2_queue instance is busy by checking if there are any
buffers in the active queue.If there are any buffers in the active queue,
it means that they are currently being processed by the device driver,
and the queue is considered busy.

Bug 3836336

Change-Id: I3d9b215f953c44d55cbbc287fe94c9b793da5955
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2856359
(cherry picked from commit 780fcc55db93c62d5acd3a3866fd1c841c1fdb7c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130746
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
2024-05-10 15:55:00 -07:00
Henry Lin
36d5ddcc8e platform: tegra: add tegra-hv-xhci driver
This commit adds a new driver called tegra-hv-xhci which handles xhci
IVC for virtualization.

Bug 3840188

Change-Id: I1958f8e321b3bc00fee2d103f77cd0b81a5ff3bf
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3118251
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jim Lin <jilin@nvidia.com>
Reviewed-by: EJ Hsu <ejh@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
2024-05-10 15:50:19 -07:00
Bharath H S
14ae21b104 mst: Use different flag for mst vs ofed
Use different conditionals for MLNX_OFED and MLNX_MST as they are
independent sets of drivers.

Change-Id: I6b9ab725a67532ff41c6c5ffeb41a479e79f31b0
Signed-off-by: Bharath H S <bhs@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130000
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Aidan Ha <aha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amlan Kundu <akundu@nvidia.com>
2024-05-10 15:48:07 -07:00
Dara Ramesh
ee8a8e9853 ASoC: tegra: add adsp audio driver
Added ADSP audio driver support for tegra soc and tegra virt alt.

Below are the changes made with respect to Kernel 5.10:

- Removed the ADSP COMPR DAI links due to differences in compress DAI
  link registration in Android (ACK 6.6) which causes build issues.

- Omitted the callback function for dumping ADMA registers, as the
  upstream ADMA driver does not support it.

Bug 3910602
Bug 4635899

Change-Id: I63ea878ef2e9a960d127d02470e8048535878518
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132128
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-10 04:30:57 -07:00
Manikanta Maddireddy
a77ffaf1d0 PCI: EPF: dma-test: Fix BAR and MSI allocations
Fix BAR-1 and BAR-2 allocations for T264. Platform MSI is supported in
T264 only, fix the chip_id comparision check so that MSI is allocated
only for T264.

Bug 4549851

Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Change-Id: I13dad41375e607d78c6a99924ed6fef0c9113208
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3131939
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2024-05-09 19:35:55 -07:00
Viswanath L
71ce55ca52 nvadsp: Change state dump prints to dev_err
Change state dump prints from dev_info to dev_err so that they
are captured in GVS logs upon error.

Bug 3682950

Change-Id: Ief4ffd2c03d4b8409f829271bf78df7150e917b5
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3129979
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2024-05-07 02:22:42 -07:00
Pranjal Singh Mandloi
4d402f01c0 NVVSE: Change Hamming distance to 4
ESSS-1235

Change-Id: I6e1ab4b1db71f67f90399a65bfba65555b7e3811
Signed-off-by: Pranjal Singh Mandloi <pmandloi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3048850
(cherry picked from commit ee4dddcd2785bf6664b18c8085e4fb918f0e7d24)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087029
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2024-05-07 02:16:47 -07:00
Jason Mei
fe07e96ce3 PCI: EPF: Add lpci_epc_map_addr for pre-v5.15 Linux kernels
Build the Tegra PCI vnet driver fails with Linux v5.14 because the
lpci_epc_map_addr() have the incorrect number of arguments.
The arguments to the lpci_epc_map_addr() functions were updated
in Linux v5.12 but the current Tegra PCI EPF driver assumes that they
were updating after Linux v5.14. Update the Tegra PCI EPF driver to
use the correct arguments for v5.12 onwards.

Bug 4456727
Bug 4451567

Change-Id: Ie4ef36854d380e0a896a0f256d846ab8b89ca447
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070170
(cherry picked from commit 5a65235c0d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084983
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-05-07 02:15:17 -07:00
Laxman Dewangan
a1d5f342d5 pcie: endpoint: Add support to build with k6.9
Few of the APIs from msi are deprecated in the
kernel 6.9. These APIs are:
  platform_msi_domain_alloc_irqs
  platform_msi_domain_free_irqs

The change is with commit commit 1a4671ff7a903e87 ("platform-msi: Remove
unused interfaces")

Add support to not use these APIs via conftest.

Bug 4471899

Change-Id: I3b07236eeb69900b06c4e17b7675f6419b8321e4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3131464
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-05 07:50:31 -07:00
Jon Hunter
74c60d6681 net: r8168: Fix build for Linux v6.9
For Linux v6.9, the structure 'ethtool_eee' was replaced by
'ethtool_keee' and this new structure uses bitmaps for the structure
fields 'supported', 'advertised' and 'lp_advertised' as opposed to
'u32' types.

A test has been added to the conftest script to detect the presence of
the ethtool_keee structure and so use the definitions generated by
conftest to compile the r8168 accordingly. Note that because the
'supported', 'advertised' and 'lp_advertised' fields are no longer 'u32'
types use the functions mii_eee_cap1_mod_linkmode_t() and
linkmode_to_mii_eee_cap1_t() for working with the bitmap types.

Bug 4471899

Change-Id: I44053d36499261c2aec855ea396bf5654b207ff6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110495
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-05-05 07:50:26 -07:00
Manikanta Maddireddy
b0c580762b PCI: Add T264 PCIe DMA support in PCIe EPF and client driver
Replace the exisiting T234 DMA APIs with common APIs and also add chip
specific changes like BAR.

Bug 4549851

Change-Id: I021e1e93a4fa4ff1d4429bd9db852e0e707ba879
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116906
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-04 16:43:14 -07:00
Manikanta Maddireddy
82e2f7b2d5 PCI: Add common PCIe DMA header file to support T234 and T264
To use DMA in PCIe EP function driver and client driver support common
PCIe DMA header file. This header supports T234 and T264 SoCs.

Bug 4549851

Change-Id: I08d60d5c8bbd89de37b6749571eaf1b81442df28
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123176
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
2024-05-04 16:43:09 -07:00
Jason Mei
df830d411d PCI: EPF: tvnet: fixed the fence memory issue
1.Make the allocate_fence() thread-safe
2.Update the fence_do_work according to auto
  fix: https://nvbugs/4539983
3.Shouldn't creat fence in callback
4.There was typo which mixed ctrl with data.

Bug 4456727
Bug 4451567

Change-Id: If7676c8d77dc40bd5f77927efa7616e7970da183
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087944
(cherry picked from commit 396db89160)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096906
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-03 14:44:42 -07:00
Brad Griffis
f67a6565fb pci: endpoint: use conftest for pci-epf-tegra-vnet.c
There are several build issues observed in pci-epf-tegra-vnet.c
when building against mainline.

These errors pertain to the following previous commits:

* Use conftest to find if pci_epc_event_ops struct has core_deinit.
* pci: Use conftest to find if probe of pci_epf_driver has ID arg
* misc: nvscic2c-pcie: Drop usage of enum pci_epc_irq_type from Linux 6.8

The pci-epf-tegra-vnet.c is recently added and needs to use those
same new conftest capabilities.

Bug 4346767

Change-Id: I4ea66524513cdc4d62607a061c3f253e2a3cee2b
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128608
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
(cherry picked from commit b0e75c8874)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130622
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-03 14:44:32 -07:00
Brad Griffis
cdbedbf31e drivers: pci: Fix the argument of iommu_map() for Linux v6.3
There is additional argument added in iommu_map() from Linux v6.3.
Pass the proper argument from the driver who are using this
APIs. Using conftest methods for differentiating whether
additional argument is needed or not.

Bug 4374520

Change-Id: I3d6452cf6c71f495e3b6e3b240b2c2d839aa4b0d
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128547
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
(cherry picked from commit 222eebeb31)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3130621
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-03 14:44:22 -07:00
Jason Mei
d99e65db74 PCI: EPF: tvnet: porting the PCIe tvnet driver
Port the PCIe tvnet to 5.15 kernel

Bug 4456727
Bug 4451567

Change-Id: I1b7a68479749145eca33361d6c79d53622c57ce7
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070167
(cherry picked from commit e70b9e4c10)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084980
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-03 14:44:12 -07:00
Jason Mei
217da833a0 net: Use conftest to determime NAPI interface
Add compile time tests to the conftest.sh script
to determine netif_napi interface check at compile
time for the kernel being used. This is beneficial
for working with 3rd party Linux kernels that may
have back-ported upstream changes into the kernel
and so the kernel version checks do not work.

Bug 4456727
Bug 4451567

Change-Id: I7b00c3b491d778a9bf2f0d1069a5e4546b722e2a
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096002
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
(cherry picked from commit 888f248ee2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096946
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-03 14:44:07 -07:00
Jason Mei
0510889913 PCI: EPF: tvnet: porting the PCIe EP tvnet driver
Port the PCIe EP tvnet to 5.15 kernel
switch to host1x sycpt method and others kernel
interfaces

Bug 4456727
Bug 4451567

Change-Id: I78a1ed5e1f80210a03dc83775937ba90c2839a5b
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070173
(cherry picked from commit 3506076764)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084981
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-03 14:42:54 -07:00
Jon Hunter
2ff1c3c6c9 conftest: Add test for pci_epc_bar_desc
The pci_epc_features structure was updated in Linux v6.9 to move various
fields under a new pci_epc_bar_desc structure. Add a test to conftest to
determine if the new pci_epc_bar_desc structure is present.

Bug 4627271

Change-Id: I5c473cb5172ac10e6f36c165be5a03f1fb90ebeb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3129468
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
2024-05-02 19:14:49 -07:00
Jon Hunter
048c7dd793 soc/tegra: Remove bpmp-abi.h
The bpmp-abi.h is upstream and is no longer needed for building the OOT
drivers and so remove this legacy file.

Bug 3866724

Change-Id: I9c9b912daab8b212f7c2a94b86020a2e779f867d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3129461
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-05-02 19:14:44 -07:00
Viswanath L
52d1f0e2c1 nvadsp: Make function ptrs available in virt mode
Some device specific programming was moved from os.c to
dev-t18x.c as function pointers. Move the pointer assignments
so that they are not skipped in virt mode.

Bug 3682950

Change-Id: I8f2d0bde8cd37507d3bdfcd9ac7fb9fe344b891f
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128039
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2024-05-01 20:46:07 -07:00
Viswanath L
8090af66dd nvadsp: Make app completion wait uninterruptible
Change completion wait in wait_for_app_complete_timeout API
to non-interruptible so that it is woken up only at completion
signal and not by any other signal or interrupt. This is
important for predictable execution when multiple ADSPs are
run using parallel kernel threads.

Bug 3682950

Change-Id: Iaed7493686d5e05ac04612a486e64507dc9bb60d
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123567
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Asha T <atalambedu@nvidia.com>
2024-05-01 20:46:02 -07:00
Jon Hunter
46af0c1d24 net: nvethernet: Drop adjfreq support
The 'adjfine' method was first introduced in Linux v4.10 by commit
d8d263541913 ("ptp: Introduce a high resolution frequency adjustment
method.") and the 'adjfreq' method was finally removed in Linux v6.2.
Given that 'adjfine' has been supported since Linux v4.10, drop the
deprecated 'adjfreq' method completely to simplify the nvethernet
driver. This fixes build issues for 3rd party kernels that removed the
'adjfreq' method and are older than Linux v6.2.

Bug 3936429

Change-Id: I897bbd3ba92b11d8132c5762d2618b4e82ad44aa
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128119
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-05-01 03:54:09 -07:00
Jon Hunter
02ccbdfc3a tsec: Fix build with -Werror=old-style-declaration
When the tsec driver is built with the compiler flag
-Werror=old-style-declaration the following error is observed ...

 error: 'static' is not at beginning of declaration
 [-Werror=old-style-declaration]
   393 | const static struct dev_pm_ops tsec_module_pm_ops = {
       | ^~~~~

This is observed with the latest linux-next kernels, but could be
observed with any kernel where this flag is set. Fix this by ensuring
that the 'static' keyword is declared first.

Bug 4593750

Change-Id: Ia635188569d827d361bd36f7be943fbf9f1f0a60
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3126898
(cherry picked from commit ac51641cf1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3127605
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-29 16:44:03 -07:00
Shobek Attupurath
98ed010a0f rtl8822ce: Initialize spinlock before usage
Issue: Kernel warning print observed from rtl8822ce module
    2024-04-23 21:04:14,547: [   42.507680] Call trace:
    2024-04-23 21:04:14,547: [   42.510201]  dump_backtrace+0xe0/0x140
    2024-04-23 21:04:14,547: [   42.514079]  show_stack+0x1c/0x30
    2024-04-23 21:04:14,547: [   42.517502]  dump_stack_lvl+0x64/0x84
    2024-04-23 21:04:14,648: [   42.521290]  dump_stack+0x14/0x34
    2024-04-23 21:04:14,648: [   42.524703]  spin_dump+0x98/0xb0
    2024-04-23 21:04:14,648: [   42.528030]  do_raw_spin_lock+0x110/0x130
    2024-04-23 21:04:14,648: [   42.532165]  _raw_spin_lock_irqsave+0x34/0xb0
    2024-04-23 21:04:14,648: [   42.536666]  rtl8822ce_reset_bd+0x50/0x334 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.542087]  rtw_hal_irp_reset+0x20/0x28 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.547290]  rtw_halmac_rx_agg_switch+0x728/0x9a8 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.553272]  rtw_halmac_dlfw+0x90/0xc0 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.558281]  rtl8822c_fw_dl+0x4c/0x17c [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.563302]  rtw_hal_fw_dl+0x20/0x34 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.568136]  hal_read_mac_hidden_rpt+0x10c/0x32c [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.574063]  rtl8822c_read_efuse+0x86c/0x1438 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.579726]  rtl8822ce_aspm_config_l1off+0x40c/0x998 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.586009]  rtw_hal_read_chip_info+0xc4/0xec [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.591668]  rtw_pci_primary_adapter_init+0x13c/0xd4c0 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.598134]  rtw_pci_primary_adapter_init+0xd30/0xd4c0 [rtl8822ce]
    2024-04-23 21:04:14,648: [   42.604598]  local_pci_probe+0x44/0xd0
    2024-04-23 21:04:14,648: [   42.608500]  pci_device_probe+0xb0/0x270

Fix: Initialize the lock before using it

Bug 3414392

Change-Id: I82b6f00b4a3599665b1a7194b5785a785d11501a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123003
(cherry picked from commit 0313251d13)
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3122995
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-27 09:07:00 -07:00
Revanth Kumar Uppala
f626b1745c rtl8822ce: Compile rtl wifi driver till K6.5.0
Latest rtl wifi driver released by rtl is only compatible till
K6.5.0. So, add a check in Makefile to compile only till K6.5.0.

Bug 3961963

Change-Id: I795f7888d42446ea2cbc230387050d1b0676e0bf
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3121481
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-27 09:06:55 -07:00
Revanth Kumar Uppala
6a5af0059c rtl8822ce: Bypass warnings with compiler flags
Below compiler flags are being enabled to bypass the warnings
that are seen while building rtl8822ce driver for Kernels 6.x.

-Wno-missing-declarations
-Wno-address
-Wno-stringop-overread

These flags will be removed after realtek fixes them in later
versions.

Bug 3961963

Change-Id: Iadcd92b474f3ed299e9e3d3bb87212908e3e862c
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3121458
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
2024-04-27 09:06:50 -07:00
Revanth Kumar Uppala
599efcf7c6 rtl8822ce: Remove pr_debug redefinition
Issue: pr_debug is redfined to printk causing unwanted
       log prints in dmesg

Fix: Remove pr_debug redefintion in rtl8822ce driver

Bug 3844473

Change-Id: I4177f8c3fa245a881cd35c206f8d3caa4b811b32
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3121450
(cherry picked from commit 564ce2a709)
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3121448
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-27 09:06:46 -07:00
Shobek Attupurath
eeeed4d63b rtl8822ce: Add Nvidia changes on v5.14.0.4-217
1. Add custom roam parameters
2. Add path for power file
3. Add source tree path for Makefile
4. Add section in Makefile for TEGRA platform
5. Update permissions from 0755 to 0644 for files
6. Move roaming debug prints to RTW_INFO

Bug 4320751
Bug 4556940
Bug 4568390

Change-Id: I842f150781652b3b54949aef8f982903c8d7991e
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108666
(cherry picked from commit 4e544f3b3a)
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119612
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-27 09:06:41 -07:00
Revanth Kumar Uppala
c72348b019 rtl8822ce: Fix TLP/EAPOL/TXFIFO issues
Issue: Observing the EAPOL packet after a second in 1/10 roams

       Observing TLP Malform packets on SC7

       Observing TXFIFO error when connected to serving AP

       Compilation errors for K6.x

Fix:   Add exact base driver released by realtek with EAPOL/TLP/TXFIFO
       fixes and also resolve some compilation errors.

DRIVERVERSION   v5.14.0.4-217-g7a0377e61.20240410_COEX20240327-2727_beta
BTCOEXVERSION   COEX20240327-2727

Bug 4320751
Bug 4556940
Bug 4568390

Change-Id: Ib02056ea388300dab2364b2bd6ceaf0a2096d3f4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3115032
(cherry picked from commit ed30eb40ff)
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119611
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-27 09:06:36 -07:00
Mikko Perttunen
8d8699b29e drm/tegra: Enable CRC generation on multimedia engines
Enable CRC generation feature on VIC, OFA, and NVENC where
possible. Whether CRC generation can be enabled depends on
whether the engine's SEC register aperture is writable, based
on platform configuration.

The firewall configuration is for now determined in a hacky
way using ioremap, pending design decisions on how to do it
in a cleaner way.

Bug 4273775

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Ia7507f4cce2b49703328d5dfdd74aaac8cff8153
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3120662
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-27 09:00:32 -07:00
Mallikarjun Kasoju
d7611d6efc ufs: RX Calibration change
Fixed RX Calibration sequence.

Bug 4465134

Change-Id: I7f89d58c081511b067134bf86f81720b13af9abc
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3074579
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-26 02:27:35 -07:00
Ashish Mhetre
ac5bcc86bd video: tegra: nvmap: Clean-up tegra_vpr_dev
tegra_vpr_dev is defined at multiple places as extern variable.
Keep it only in nvmap_exports.h as extern and define it in nvmap_init.c.

Bug 4390638

Change-Id: I48f2b44c0f935366ce6319460da7b417918fea2d
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119454
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-25 09:20:46 -07:00
N V S Abhishek
b60fded6ad nvmap: Fix type conversion sparse warning
Fix sparse warning of incompatible type conversion in nvmap_core. Add __force type conversion to void* as a fix.

Bug 4513982

Change-Id: Ia7d86a9751a71decda2f3be3f5204c3cd2fd006e
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3112749
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-04-23 23:31:59 -07:00
Ketan Patil
d1423b817c video: tegra: nvmap: Add numa aware query for system memory
NvRmMemQueryHeapParamsNuma API does not have support to query system
memory per numa node. Add that support by parsing the meminfo file
for the input numa node and obtain total memory, free memory and
reclaimable memory values.

Bug 4231517

Change-Id: I28e70c5163f5fc4fb746e11b087a003a0345bdf5
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119501
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-23 23:29:50 -07:00
Yash Bhatt
20b5e71584 video: tegra: nvmap: Remove deprecated code
Remove dead code from nvmap as it is related to the deprecated ioctls NVMAP_IOC_WRITE_32, NVMAP_IOC_READ_32 and NVMAP_IOC_CACHE_32.

Bug 4479027

Change-Id: I8fb28cfc921cdf19e0c11faddba04e9541803926
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3120420
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-23 07:47:22 -07:00
Omar Nemri
ffdada4689 drivers: pva: change kmalloc for kvmalloc for elf
when loading lf, a local buffer is allocated to process the elf.
switch to using kvmalloc from kmalloc to be able to handle memory
pressure situations better.

Bug 4562933

Change-Id: Ie78d2d2a56f13e09e98bf6888ccc76ffb0ecfb12
Signed-off-by: omar nemri <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3114068
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Colin Tracey <ctracey@nvidia.com>
2024-04-23 07:46:03 -07:00
N V S Abhishek
b46da54721 nvmap: Fix NULL ptr dereference defects
Add fixes for NULL ptr dereferences defects in NvMap.

CID 685146
CID 673727
CID 673726

Bug 4479044

Change-Id: Ifd3e93af9bbf0c1e2763e5a5129fefad263f7e13
Signed-off-by: N V S Abhishek <nabhishek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108232
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-23 07:44:23 -07:00
Jason Mei
25c2414c59 net: ethernet: sync link status before removing
The tegera_tvnet driver usually built as kernel
module, to avoid rmmod/insmod cause kernel crash
sync link status before rmmod

Bug 4456727
Bug 4451567

Change-Id: I2b7227fef36688777b8a468678be9e63a7638c2c
Signed-off-by: Jason Mei <jianjunm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079867
(cherry picked from commit bba1f3a464)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084982
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-22 15:23:56 -07:00
Shobek Attupurath
102cf51d2c rtl8822ce: Add Nvidia change on v5.14.0.4-203
1. Add custom roam parameters
2. Add path for power file
3. Add source tree path for Makefile
4. Add section in Makefile for TEGRA platform
5. Update permissions from 0755 to 0644 for files

Bug 4213654
Bug 3961963

Change-Id: Ib160d11285c093efe04fc5cb932b770585ad6bb3
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079869
(cherry picked from commit 4a31d7ed61)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095804
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-04-21 13:41:37 -07:00
Shobek Attupurath
654ac3597d rtl8822ce: Add driver with roaming support
Issue: RTL8822CE driver doesn't have active roaming
       support and has issues with current roaming
       algorithm

Fix: Add driver with active roaming enabled and fixes
     issue with 5GHz and BT coex

DRIVERVERSION -
"v5.14.0.4-203-g4a9c85a0f.20240219_COEX20240125-2727_beta"
BTCOEXVERSION -
"COEX20240125-2727"

Bug 4213654

Change-Id: Icff3ece063518575fbcca3d8ea5be0b6314a567f
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079863
(cherry picked from commit e3673f6890)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095799
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-21 13:41:32 -07:00
Laxman Dewangan
cfbdbf837b crypto: tegra: Add dummy tegra SE KDS driver
Add dummy tegra SE kds driver to create the KO always
so that packaging file can add this KO unconditionally
in its package.

Bug 4606591

Change-Id: I65c10ab9cc0ba4fda42d5d16d3f6bea07964a55e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119940
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-21 03:50:57 -07:00
Ashish Mhetre
9fc2b0b487 video: tegra: nvmap: Set NUMA ID for device
- Set NUMA ID for carveout devices using set_dev_node()
- Export device for VPR on socket-1

Bug 4390638

Change-Id: I37ade16b690995b70d3c924965596cfc8094447e
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3115088
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-04-19 08:35:33 -07:00
yunzhao
e6d2d62039 csi5:add error config
add the error configuration for v4l2 path, Make the error config
of v4l2 and Argus consistent on the same port.

bug 4499208

Signed-off-by: yunzhao <yunzhao@nvidia.com>
Change-Id: I3dce5b9a30e3f04d2224252b3aff7ca0c9ef5567
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3098174
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Jackie Chen <jackchen@nvidia.com>
2024-04-19 08:31:14 -07:00
Sameer Pujar
33a45472ab ASoC: tegra: Add I2S controls for format/mode
There are test cases in ap_audio, which check for different data
formats and producer/consumer modes for Tegra I2S and external
codec I2S. Add these controls for a full GVS coverage.

Two types of DAI links are handled:

 - Normal/codec2codec DAI links where the DAI mapping is done
   by default between Tegra and external codec I2S. So just
   calling legacy tegra_machine_add_i2s_codec_controls() API
   from override driver is good enough.

 - For DPCM case, the DAIs are not directly mapped and thus
   codec is dummy for Tegra I2S. Hence for this DAPM function
   snd_soc_dapm_dai_get_connected_widgets() is used to find
   the connected codec widget and apply the complementary DAI
   format setting.

Also use this opportunity to cleanup Linux version code check.
It is now recommended to define a macro for the relevant kernel
version and macro name is related to what actually is changing
for a kernel version.

Bug 4451662
Bug 4453772

Change-Id: I881838411af5498e4d7f1dec76b3c11ad05de12b
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097585
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-04-19 00:18:59 -07:00
Mikko Perttunen
26987b5170 gpu: host1x-nvhost: Add MODULE_DEVICE_TABLE
To autoload the host1x-nvhost module based on device tree,
add a MODULE_DEVICE_TABLE declaration.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I8a215163d1cd8473a6fa761d540352bab445bf18
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116026
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 16:12:28 -07:00
Jon Hunter
971680aadb PCI: Fix endpoint DMA test for Linux v6.9
Building the PCI EPF DMA test driver for Linux v6.9 is failing because
the parameters for the pci_epf_alloc_space() function has been updated
to pass the alignment value via the 'pci_epc_features' structure instead
of passing the value directly.

Instead of hard-coding the endpoint alignment in the EPF DMA test driver
use the 'pcie_epc_get_features()' function to retrieve the endpoint
features structure which has the endpoint alignment.

By using the conftest script to detect the parameters for the
pci_epf_alloc_space() function, we can then pass the appropriate
arguments to the pci_epf_alloc_space() function.

Bug 4471899

Change-Id: Id80259a4c90d6f6ae2132cccbec1a96113d22be7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116548
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 01:14:35 -07:00
Jon Hunter
6b355b554a nvmap: Fix build for Linux v6.9
Commit c1fa617caeb0 ("tracing: Rework __assign_str() and __string() to
not duplicate getting the string") update the __assign_str() function
and dropped the trailing semi-colon from the definition. This is causing
the NVMAP driver build to fail because of a missing semi-colon on some
of the __assign_str() declarations in the nvmap.h header. Some already
have a semi-colon and so fix this by populating a semi-colon for the
ones that are missing. Note that there is no harm in having multiple
semi-colons for kernels that define __assign_str() already with a
trailing semi-colon.

Bug 4471899

Change-Id: Ic804ca0ce1480f830ec3f6b5636e099b00734857
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116556
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2024-04-17 08:47:20 -07:00
Jon Hunter
72761b8276 net: nvethernet: Fix build for Linux v6.9
For Linux v6.9, the structure 'ethtool_eee' was replaced by
'ethtool_keee' and this new structure uses bitmaps for the structure
fields 'supported', 'advertised' and 'lp_advertised' as opposed to
'u32' types.

Add a test to conftest to detect the presence of the new 'ethtool_keee'
structure and update the nvethernet driver to use the various
linkmode_xxx helper functions for accessing the bitmap structure fields.

Bug 4471899

Change-Id: I275becfa665a36ed90e8bc227eaa4122825faa6a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110494
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-04-17 08:47:15 -07:00
Yash Bhatt
a22321f358 video: tegra: nvmap: Add release call in nvmap_remove
Add of_reserved_mem_device_release call in nvmap as its corresponding
init call is present in nvmap_init.

Bug 4479027

Change-Id: Ifc55ffb286af5bbe43e62cc02e100f05f20fd63f
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3115521
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2024-04-15 09:12:16 -07:00
Manish Bhardwaj
d2e8382e1d nvidia-oot: fix KWT warning
dev_info and pr_info API are getting the
concurrency issue leading to KWT warning.
Fix by changing dev_info to pr_info

Bug 4595343

Change-Id: Iead2bc18e1eced7bebd816bd30e1eca173e4d474
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3113680
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Kasinadha Dendukuri <kdendukuri@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Kasinadha Dendukuri <kdendukuri@nvidia.com>
2024-04-13 06:31:12 -07:00
Viswanath L
9da3bc6449 nvadsp: Modularize chip specific structures
For easy of extensibility to future chips, below data and
functions applicable to T23x are moved to dev-t18x.c
 - chip data for supported chips
 - set_boot_vec: set up EVP
 - set_boot_freqs: set ADSP freq as per DT property
 - check_wfi_status: check WFI status from AMISC
 - dump_core_state: ADSP core and state dump

Bug 3682950

Change-Id: Iffba56addc9a68ec33de390a379fe725e727cfad
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3107450
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2024-04-11 18:05:27 -07:00
Viswanath L
27e6f14c0e nvadsp: AMC and AMISC changes for multi-instance
- With multiple ADSPs in use, only one of them may configure AMC,
    so use amc_not_avlbl flag to skip reg parsing, if not needed
 - Unify reg enums for ADSP and AON; this means that reg DT prop
    for AON should have a dummy first entry (against AMC)
 - Remove adsp_prid from chip data, as AMISC base in reg DT prop
    will be offset as per the ADSP instance

Bug 3682950
Bug 4165898

Change-Id: Ic6068aeeb7bbb3540cad36371a6715f8b43ee8b6
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3106899
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-11 18:05:23 -07:00
Viswanath L
e2a1904d46 nvadsp: Add multi-instance support
ADSP host driver is enhanced to be multi-instance
capable and reentrant:
 - Trailing unique identifier string in compatible DT property, like
    "adsp", "adsp1" or "aon", is used to identify the driver instances
 - Each probed driver instance is inserted into a global list, from
    which the handle can be fetched using 'nvadsp_get_handle' API
    (passing the above unique identifier as argument)
 - Above unique identifier is also used as name for the DBFS
    directory (containing files like adsp_console, adsp_logger, etc.)
 - 'nvadsp_get_handle' is the only exported API; all other APIs are
    accessible via function pointers within 'struct nvadsp_handle'
 - APIs above maintain one-is-to-one correspondence with all
    legacy APIs, with the addition of a new argument
    'struct nvadsp_handle *' at the beginning
 - Legacy APIs continue to be supported, but they are hardwired to
    work only if the kernel probes just one driver instance
 - All driver files are cleaned up to not use any global state
    variables (necessary for reentrancy)

Bug 3682950

Change-Id: Id5db49e861b2f81716ae8352b36b406654da2bbd
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3092701
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
2024-04-11 18:05:18 -07:00
Jon Hunter
9458d6b97f media: camera: Ensure gpio_device_get_chip is present
In Linux v6.7, both gpio_device_find() and gpio_device_get_chip() were
added. However, don't assume that if one is present then so is the other
and so add a test to check if gpio_device_get_chip() is also present.

Bug 4471899

Change-Id: I0c547a52b0f397aef43884ab76d815573e8ed3f8
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3112133
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-11 12:24:27 -07:00
Jon Hunter
338d28218c ASoC: tegra: Drop 'oot' suffix for upstream drivers
When booting kernels that have both the upstream and out-of-tree audio
drivers for Tegra present the following errors are observed ...

 Error: Driver 'tegra210-ahub' is already registered, aborting...
 Error: Driver 'tegra210-amx' is already registered, aborting...
 Error: Driver 'tegra186-dspk' is already registered, aborting...
 Error: Driver 'tegra210-mvc' is already registered, aborting...
 Error: Driver 'tegra210-adx' is already registered, aborting...
 Error: Driver 'tegra210-ahub' is already registered, aborting...
 Error: Driver 'tegra210_mixer' is already registered, aborting...
 Error: Driver 'tegra186-asrc' is already registered, aborting...
 Error: Driver 'tegra210-dmic' is already registered, aborting...
 Error: Driver 'tegra210-i2s' is already registered, aborting...
 Error: Driver 'tegra210-admaif' is already registered, aborting...

The problem is that the upstream Tegra audio drivers are loaded first
and then the kernel attempts to load the out-of-tree variants because
they have a different name. The out-of-tree are installed under the
'updates' directory in the file-system and by dropping the 'oot' suffix
from the driver name, then depmod will not attempt to load both variants
of the audio drivers and prioritise loading the drivers in the 'updates'
directory.

Bug 4590647

Change-Id: I6c6fe1eb84bc9fdfa4a8f4abf1ce3a75f3bfba8a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110266
(cherry picked from commit fc8c410eb6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3112030
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-11 12:23:35 -07:00
Henry Lin
b527781f64 platform: tegra: add tegra-hv-xhci-debug driver
This commit adds a new driver called tegra-hv-xhci-debug which
provides Tegra XHCI debug information (currently, only firmware
log is available) when Hypervisior is enabled.

Bug 200416215
Bug 3840188

Change-Id: I4cf471fad7079d20d1cd2d8a4e6e275d4fc9180b
Reviewed-on: https://git-master.nvidia.com/r/1534461
Reviewed-on: https://git-master.nvidia.com/r/1741129
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3096315
Reviewed-by: Jim Lin <jilin@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: EJ Hsu <ejh@nvidia.com>
2024-04-11 12:08:25 -07:00
Yash Bhatt
1eb5fc3ad7 video: tegra: nvmap: Remove VPR resize code
Remove VPR resize code from nvmap as VPR resize support is deprecated
from K5.10+.

Bug 4479027

Change-Id: I93daecaa86ebffb2aee09836cd3faa5211e574a0
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3112223
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-04-10 21:37:34 -07:00
Yash Bhatt
6200c05e7d video: tegra: nvmap: Deprecate nvmap_ioctl_get_heap_size
Remove function nvmap_ioctl_get_heap_size from nvmap, as the ioctl NVMAP_IOC_GET_HEAP_SIZE is being deprecated and its functionality is being replaced with NVMAP_IOC_QUERY_HEAP_PARAMS.

Bug 4479027

Change-Id: I8a60810ff8b474f32413c9afe2ba3a0d7336a4d0
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110262
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-08 20:59:42 -07:00
Tonny Liang
c934b1b477 nvidia-oot: tegra-hv-oops-storage: support UFS virtual partition
Bug 4585217

Change-Id: Ieef4dac5b28a9851fdad17993f2b6b87498546e1
Signed-off-by: Tonny Liang <tonnyl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111182
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2024-04-08 15:34:03 -07:00
Yash Bhatt
b451ef3baf video: tegra: nvmap: Deprecate dma_dev_from_handle
Deprecate dma_dev_from_handle from nvmap as it has no caller.

Bug 4479027

Change-Id: Id3b3e400a686e61366929d63ce6a2ef76c251edb
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3109957
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-04-08 07:27:05 -07:00
Omar Nemri
cf7b5803a0 drivers: pva: use kvzalloc instead of kcalloc
for task pool, kmem buffers, use kvzalloc instead of kcalloc
to better handle memory pressure situations.

Bug 4562933

Change-Id: I015ffa936fe77ab2c914d53667c0ec2f323a0676
Signed-off-by: Omar Nemri <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108135
(cherry picked from commit 8e77d444fb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110312
Reviewed-by: Colin Tracey <ctracey@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-05 20:49:03 -07:00
Jon Hunter
4432f3b652 spi: Fix build for Linux v6.9
For Linux v6.9 the compatibility layer that existed for transitioning
SPI drivers from using the legacy 'master' based naming to the
'controller' based naming for functions, structures and variables has
been removed. This is causing the various SPI driver build failures.

The compatibility layer was first introduced in Linux v4.13 by commit
8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"") and given
that the newer "controller" based naming works for kernels from v4.13,
update the various SPI drivers to use the new naming for all current
supported kernels.

Bug 4471899

Change-Id: I5d9fcc429ab4262eb2827b61eb5aec729059f4b5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3109504
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svc-sw-mobile-l4t <svc-sw-mobile-l4t@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-04-05 14:58:00 -07:00
Yash Bhatt
e6610ba08d video: tegra: nvmap: Remove deprecated functions
Remove nvmap_heap_pgalloc, nvmap_heap_pgfree and nvmap_heap_pgalloc_dev
functions from nvmap as they have no caller.

Bug 4479027

Change-Id: I8a64c2ba7b89337961c2a72f03d0b900ba942eed
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108930
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-04-04 16:01:40 -07:00
Yash Bhatt
b9d188d974 video: tegra: nvmap: Deprecate cachelistsync functions
Remove cachelistsync functions from nvmap as they were only relevant for
older chips.

Bug 4479027

Change-Id: I19a1091ed2aafb5c1c74bf85f3f13d92df93bb34
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108894
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
2024-04-04 16:01:35 -07:00
Yash Bhatt
7c166d238c video: tegra: nvmap: Deprecate nvmap_init_t19x.c
Remove file nvmap_init_t19x.c from nvmap as it was only relevant for
older devices.

Bug 4479027

Change-Id: I7b09d25bec299e47efe237720f641328e9f0d6da
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108671
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2024-04-04 16:00:54 -07:00
Jon Hunter
b8b92d5d5f conftest: Fix test for SLAB_MEM_SPREAD
The conftest test for detecting if the definition SLAB_MEM_SPREAD is
present is not working as expected because it is using the 'functions'
type which is intended for only checking if a function is present or
not. Fix this by correcting the type to 'types'.

Bug 4471899

Change-Id: Iba3c9fe70a97793576d9f188d50628acb55f44df
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108683
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-04 06:47:58 -07:00
Jon Hunter
037fa78728 media: camera: Fix build for Linux v6.9
In Linux v6.9 the data argument of the function pointer passed to
gpio_device_find() was updated to be a const type. This breaks building
the CDI and ISC drivers for Linux v6.9. Update the test in conftest that
detects the presence of the gpio_device_find() function to perform a
second test to see if the argument for the function pointer is a const
type. Update the drivers that use the gpio_device_find() function
accordingly to fix the build.

Bug 4471899

Change-Id: I562451a401bcaebcf0acf9a7d563cb0ea1d87807
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104559
Reviewed-by: svc-sw-mobile-l4t <svc-sw-mobile-l4t@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-04 06:47:48 -07:00
Jon Hunter
68e7840dd8 media: camera: Update conftest for gpio_device_find
When adding conftest tests for detecting if specific functions are
present, it is always better to check if the newly added function is
present versus the function that has been removed. The reason being that
is the newly added function is modified in the future then the conftest
tests can be extended to check for updates to the function.

Therefore, instead of checking if the function gpiochip_find() is
present, which was removed in Linux v6.7, check if the function
gpio_device_find() is present, which replaced gpiochip_find in Linux
v6.7.

Bug 4346767
Bug 4471899

Change-Id: I32bf1c3da32abbf3c8d3ef9ea350decf1564e0bc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3108643
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-04 06:47:43 -07:00
Bharath H S
a3466295e1 mst: Add support to mst_pci, mst_pciconf drivers
- Deploy latest supported MLNX MST drivers version-4.26.1-3
https://www.mellanox.com/downloads/MFT/mft-4.26.1-3-arm64-deb.tgz
- Fixes to enable build: fix path used for gcc -I for nnt_driver header
searching but use default path *.c files.
- Use new supported syntax for all objs required to be linked to build
kernel module for each of mst_pci, mst_pciconf & bf3_livefish which
uses <module>-y to set dependent .o objs and ccflags-y to declare the
local cflags.
- Remove makefile-specific targets so that the default kernel-src's
make modules apply to these modules.
- Add symlinks to nnt_driver to each of mst_pci, mst_pciconf this is
required to individually build the nnt_driver objs and use them in
parallel builds because nnt_driver build is disabled.
- This base support CL also  includes the fixes from CLs at topic
https://git-master.nvidia.com/r/q/topic:mst_fix.

bug 4192483
bug 4312056
bug 4538284
bug 4538284
bug 4539757

Change-Id: I6bd72f11cc7a8bf1dd8abba6385ea1d471befa02
Signed-off-by: Bharath H S <bhs@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069978
(cherry picked from commit 73bffe884a1127164b3c0e74b0e4a5b8a6cf4d71)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069973
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-04 06:44:50 -07:00
Yash Bhatt
31c6ad4b01 video: tegra: nvmap: Protect vidmem_carveout code
Function nvmap_register_vidmem_carveout currently has no callers so
protect it under NVMAP_HEAP_CARVEOUT_VIDMEM macro, so that if needed by
an api in future it can be re-used.

Bug 4479027

Change-Id: I0acd67d22f5ea2f1d31926bdd1f0ecffd0dd336e
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104689
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-04-03 08:54:48 -07:00
Yash Bhatt
873561ba29 video: tegra: nvmap: Protect flush heap code
Protect nvmap_flush_heap_block function under flag NVMAP_CONFIG_CACHE_FLUSH_AT_ALLOC because for carveouts if cache flush is done at buffer allocation time then there is no need to do it during release time.

Bug 4479027

Change-Id: I78372b5567d20d6e539cbe2b54a9099bea1780f3
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103835
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-03 08:54:24 -07:00
Bharath H S
bf89e2d98e mft: Initial copy of mft source
Add initial mft source of version-4.26.1-3 from
https://www.mellanox.com/downloads/MFT/mft-4.26.1-3-arm64-deb.tgz

bug 4192483
bug 4312056

Change-Id: I77c0af297c9833c3dcbcdfc89b316042548b9af8
Signed-off-by: Bharath H S <bhs@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069977
(cherry picked from commit d65df2a986469950aab3f323bbee3a3aee0c0308)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069972
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-04-02 23:01:51 -07:00
Paritosh Dixit
f451b88fd7 net: nvethernet: Fix build for Linux v6.9
In Linux v6.9-rc1, the typedef of skb_frag_t is updated to a new struct
skb_frag. Struct skb_frag does not include bv_offset and bv_page
members. Hence, use functions skb_frag_off and skb_frag_page to get
offset and page respectively. Use of functions skb_frag_off and
skb_frag_page is backward compatible with older kernel versions that
we use.

Bug 4471899

Signed-off-by: Paritosh Dixit <paritoshd@nvidia.com>
Change-Id: I5d14c750c5b4cd28a2abeda95d7c11bf975ef1b8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104114
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-04-02 13:19:24 -07:00
Hiteshkumar Patel
e4f9759f61 nvidia-oot: nvpps: Replace dev_info with dev_dbg.
nvpps driver is printing debug info when TSC status is not locked.
Replace that status print for dev_info() to dev_dbg().

Bug 4566570

Change-Id: I6537e08204c35698bf11fd9c3ff4951a6167f8e9
Signed-off-by: Hiteshkumar Patel <hiteshkumarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3101099
(cherry picked from e77e6c5aec)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104089
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-02 08:02:22 -07:00
Hiteshkumar Patel
8b7a66b2cb Documentation: update nvpps device tree bindings.
- Add details of register mapping. If we do not pass these details in
  devicetree then it is giving error "TSC memory resource not defined"
  and not able to probe the driver. It is mandatory field for Tegra234.
- Remove hardcoding of ethernet interface name.
- Add to pass DT node for primary and secondary emac node instead of
  interface name.
- Update GPIO details as per refactoring of HTE driver.
- Update example as per update driver and DT node.

Bug 4489344
Bug 3826818

Change-Id: I5edbbe762543289cc2a6225111c5e6250bbabb99
Signed-off-by: Hiteshkumar Patel <hiteshkumarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3076493
(cherry picked from commit 755f4a8456)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097856
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-02 08:02:03 -07:00
Hiteshkumar Patel
f4720eda1d nvpps: Add support for AGX Orin.
Enable nvpps driver so it can be tested.

- Removed passing of ethernet interface name in DT.
- Require to pass Tegra ethernet controller DT phandle, where PTP server
  will run.

Bug 4489344
Bug 3826818

Change-Id: I943ddf4071a55fb409d589473fde0075ac9f7150
Signed-off-by: Hiteshkumar Patel <hiteshkumarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3076494
(cherry pick from commit 90c8229157)
Signed-off-by: Hiteshkumar Patel <hiteshkumarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097855
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-02 08:01:58 -07:00
Jon Hunter
7acb255112 video: tegra: virt: Fix build for Linux v6.9
The definition SLAB_MEM_SPREAD was removed in Linux v6.9 and this breaks
the compilation of the Tegra Graphics Virtualization Comms driver. Add a
test to conftest to detect if SLAB_MEM_SPREAD is defined and update the
driver accordingly to fix the build.

Bug 4471899

Change-Id: Ibcac2dbc6538bcda92e818b333a9db6b8234f1d7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104558
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-03-28 17:56:28 -07:00
Jon Hunter
9c180ac0c8 soc/tegra: bpmp: Fix build for Linux v6.9
In Linux v6.9-rc1, the typedef genpd_xlate_t was updated to make
'of_phandle_args' argument const. Add a test to the conftest script to
test if this argument is const and update the BPMP powergate driver
accordingly.

Bug 4471899

Change-Id: I85ddb3689ccf5dc769cd208575db69a2cf7b0a11
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103819
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
2024-03-27 07:08:44 -07:00
Jon Hunter
3b9f5783b2 block: virtual-storage: Fix build for Linux v6.9
In Linux v6.9-rc1, the function blk_mq_init_queue() was renamed
blk_mq_alloc_queue() and the arguments passed to the function were
updated. Add a test to conftest to detect if the function
blk_mq_alloc_queue() is present and update the virtual-storage driver
accordingly.

Bug 4471899

Change-Id: I7dc937eaad27445b1c140c57aafd36f4a4b769ba
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095926
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
2024-03-27 07:08:40 -07:00
Yash Bhatt
7acc8a556a video: tegra: nvmap: Protect dma memory code
nvmap_dma_mark_declared_memory_occupied/unoccupied functions are only getting called when CONFIG_TEGRA_VIRTUALIZATION is defined. So protect the functions under the respective flag.

Bug 4479027

Change-Id: If4c00084fde5079778f47fc09c91dccde36fe4d4
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103557
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-03-26 00:30:33 -07:00
Mikko Perttunen
4f69d815e6 drm/tegra: ofa: Only enable safety RAM if specified
Fix OFA boot sequence to only enable safety RAM if the configuration
specifies doing so.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Id427dee5cfcda036b3f71b89e5d11a4a842964f1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103404
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
2024-03-26 00:30:19 -07:00
Yash Bhatt
f9c1b6728e video: tegra: nvmap: Remove deprecated functions
Remove page coloring related functions from nvmap as they were only relevant for t194.

Bug 4479027

Change-Id: Ib1ea11eb782308d574e3d62ce885da53debeaed3
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3098540
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2024-03-26 00:21:43 -07:00
Mikko Perttunen
d1fe820393 gpu: host1x: fence: Disable timeout on pre-silicon
Timing can be wonky on pre-silicon platforms, so disable fence timeouts
on pre-silicon platforms.

Bug 4458477

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I16221bbb568fe685cff7b3f7edddc7936325c86f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3098558
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-03-22 12:14:28 -07:00
rajangam
9b56ed79c0 t23x: psc: Add support to use other PSC instances
1.Updates the existing way of naming the debugfs nodes.
    2.HPSE and SB does not have SMMU ready would need to write
      all the data into the mailboxes, instead of using buffer

    JIRA: TMT-355

Change-Id: Ica5ad8a5efcc49bcdbe79eb3f3245e67458e507d
Signed-off-by: rajangam <rajangam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084904
Reviewed-by: Liang Cheng (SW) <licheng@nvidia.com>
Reviewed-by: David Pu <dpu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-20 13:12:42 -07:00
Jian-Min Liu
1dc806cb91 Kleaf: add kernel modules in nvidia-oot
1. Add BUILD.bazel file.
2. Add build target of kernel module and required include folder
   srctree.* in Makefile to fix the build issue
3. The tr (a build tool defined by kleaf in the sandbox) which
   supported by toybox will cause the conversion of header files
   to file_define to fail. Fixed it by separating with two tr
   commands.

Bug 4344670

Change-Id: I56dcc148960f3b7703335943281589f42caa9af7
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3066225
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-19 06:50:10 -07:00
Mikko Perttunen
6025535763 drm/tegra: Enable job timestamping for NVJPG
NVJPG firmware now supports timestamping, so enable use of it.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I5a21f51e29ac19a95d36bb435dc884a440095ac2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070327
Reviewed-by: Satvik Raj Gupta <satvikrajg@nvidia.com>
Tested-by: Satvik Raj Gupta <satvikrajg@nvidia.com>
2024-03-18 23:36:31 -07:00
Krish Agarwal
01ab1b46c3 drivers: pva: fix last desc not getting mapped bug
Last desc was not getting copied as loop
variable was getting incremented incorrectly.
PVAAS-14766

Signed-off-by: Krish Agarwal <krisha@nvidia.com>
Change-Id: Iabf101d0013197e7a207a500c2a4ae246e847968
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091374
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
2024-03-18 21:31:22 -07:00
Jon Hunter
16df0a48d5 pva: Remove unused legacy nvhost functions
The functions nvhost_debug_dump_device() and
nvhost_module_remove_client() are a no-op and were initially
added to ensure that the PVA driver worked with both the legacy nvhost
driver and upstream host1x driver. Now the legacy nvhost driver is
deprecated remove these functions.

Bug 4475969

Change-Id: I1c1444b7b6578117f42200259174e2f60a464db3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3092468
Reviewed-by: Pekka Jylha Ollila <pjylhaollila@nvidia.com>
Tested-by: Pekka Jylha Ollila <pjylhaollila@nvidia.com>
2024-03-18 04:43:55 -07:00
Aniruddha Paul
615ba15a30 nvethernet: Create pool per Rx DMA channel
Existing implementation uses a single page_pool
for all Rx DMA channels. As by default all irqs
are on CPU 0, this does not cause any issue.
Routing an irq to some other CPU causes race
conditon for page allocation from page_pool which
leads to random memory corruption.

[  158.416637] Call trace:
[  158.416644]  arm_lpae_map_pages+0xb4/0x1e0
[  158.416649]  arm_smmu_map_pages+0x8c/0x160
[  158.416661]  __iommu_map+0xf8/0x2b0
[  158.416677]  iommu_map_atomic+0x58/0xb0
[  158.416683]  __iommu_dma_map+0xac/0x150
[  158.416687]  iommu_dma_map_page+0xf4/0x220
[  158.416690]  dma_map_page_attrs+0x1e8/0x260
[  158.416727]  page_pool_dma_map+0x48/0xd0
[  158.416750]  __page_pool_alloc_pages_slow+0xc4/0x390
[  158.416757]  page_pool_alloc_pages+0x64/0x90
[  158.416762]  ether_padctrl_mii_rx_pins+0x164/0x9d0 [nvethernet]
[  158.416807]  ether_padctrl_mii_rx_pins+0x478/0x9d0 [nvethernet]
[  158.416822]  osi_process_rx_completions+0x284/0x4d0 [nvethernet]
[  158.416832]  0xffffa26218b8f71c
[  158.416855]  __napi_poll+0x48/0x230
[  158.416871]  net_rx_action+0xf4/0x290
[  158.416875]  __do_softirq+0x130/0x3e8
[  158.416889]  __irq_exit_rcu+0xe8/0x110

This change creates a page_pool per Rx DMA channel.
This ensures there is no race conditon for page
alloc/dealloc from each DMA napi context.

Bug 4541158

Change-Id: I12668ee7d824fd30d54a874bbbdf190d02943478
Signed-off-by: Aniruddha Paul <anpaul@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091494
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
2024-03-17 09:33:32 -07:00
Mikko Perttunen
c2d209f066 drm/tegra: gem: Don't attach dma-bufs when not needed
The dma-buf import code currently attaches and maps all imported
dma-bufs to the drm device to get their sgt for mapping to the
directly managed IOMMU domain.

In many cases, like for newer chips (Tegra186+), the directly
managed IOMMU domain is, however, not used. Mapping to the drm
device can also cause issues e.g. with swiotlb since it is not
a real device.

To improve the situation, only attach and map imported dma-bufs
when required.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: If73cc4e9419a2eebf67269eadb34050986f73077
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3090413
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-15 13:05:54 -07:00
Mikko Perttunen
a050b8203b drm/tegra: gem: Open code drm_prime_gem_destroy
Since we aren't using drm_gem_prime_import(_dev), for clarity don't
use the corresponding destroy function either.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I024a78a6378d0fa6f0134958904122b8d201d99c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3090412
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
2024-03-15 13:05:49 -07:00
Vishwaroop A
3584ef129e drivers: spi: remove spi_master_put() in probe
Currently the spi_master is allocated by devm_spi_alloc_master()
in the spi slave. so there is no need to call spi_master
put again this fixes the probe failure seen in spi slave
driver

Bug 4537830

Signed-off-by: Vishwaroop A <va@nvidia.com>
Change-Id: Ie0ea17c308caade7c0a1f298c7ac4f3b86a38541
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095347
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-03-14 11:35:17 -07:00
Jon Hunter
e020b2d931 bmi088: Add build dependency on HTE
The BMI088 driver is dependent upon the HTE driver and so only build the
BMI088 driver if HTE is enabled.

Bug 3961133

Change-Id: I1338d44f4814fb23636206081019ea9cb1390fcc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3093706
(cherry picked from commit 003bd8ed9b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3094428
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Gautham Srinivasan <gauthams@nvidia.com>
2024-03-13 20:54:03 -07:00
omar
637dd81935 drivers: pva: check cb_size against memory size
verify that circular buffer size is within the allocated buffer
when checking address range for bot source and destination.

Bug 4432254

Change-Id: I265f2c4b9f46cf24db8bd86cf5abf3f9b2e67994
Signed-off-by: omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3046464
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-13 05:14:00 -07:00
Jon Hunter
a6d28bc2c8 gpu: host1x-nvhost: Remove unused functions
The functions nvhost_job_put() and nvhost_syncpt_set_minval() are no
longer used so remove these functions.

The flag CONFIG_TEGRA_HOST1X is always true for out-of-tree drivers and
so remove the legacy code for when this flag is not defined.

Bug 4475969

Change-Id: I88c89d30bfc9be4b8628f115ea96835cb5f6f295
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091653
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-03-12 13:32:13 -07:00
Gautham Srinivasan
45c87920e5 nvidia-oot: remove gte driver
HTE driver will be used instead of GTE. Remove GTE sources.

Bug 3961133

Change-Id: I379198da9c1896aa44043195a8c30b377b08c7c4
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067352
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091089
2024-03-11 08:07:11 -07:00
Gautham Srinivasan
fdac8e7016 nvidia-oot: nvpps: Use HTE driver
Refactor NVPPS driver to use HTE APIs instead of GTE

Bug 3961133

Change-Id: I0a38fb6fd42217515410a610d1900cb036086cf5
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067331
Reviewed-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3091088
2024-03-11 08:07:06 -07:00
Gautham Srinivasan
2f5df7306b nvidia-oot: bmi088: Use HTE driver
Refactor BMI088 driver to use HTE APIs instead of GTE

Bug 3961133

Change-Id: Idc87574399b5e9d2f907e37b2615ea3d540ceba7
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062386
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Dipen Patel <dipenp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062322
2024-03-11 08:07:01 -07:00
Sameer Pujar
0332fd555e ASoC: tegra: fix sound card dependency
There is GVS intermittency where few audio tests fail because there is
no APE sound card available. The card registration itself does not
happen because there is kernel data abort and following dump is seen:

 [   36.163223] Unable to handle kernel paging request at virtual address ffffffffffffffc0
 [   36.171180] Mem abort info:
 [   36.171182]   ESR = 0x0000000096000004
 [   36.171183]   EC = 0x25: DABT (current EL), IL = 32 bits
 [   36.171186]   SET = 0, FnV = 0
 [   36.174218]   EA = 0, S1PTW = 0
 [   36.174219]   FSC = 0x04: level 0 translation fault
 [   36.174221] Data abort info:
 [   36.174222]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
 [   36.174223]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
 [   36.174224]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
 [   36.174226] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000813b67000
 [   36.174228] [ffffffffffffffc0] pgd=0000000000000000, p4d=0000000000000000
 [   36.174234] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP

This seems to happen because mixer control override driver has the
dependency over the sound card and this dependency check is incorrect.
The attempt is made to register override controls before the sound card
is fully ready.

One option is to use 'card->instantiated' flag to add the dependency.
However this flag update is protected by card mutext and client_mutex
which is local to the core. So this flag check does not appear fully
reliable.

As a safer option, the override device is made child of sound device.
This way the probe order is ensured and override probe happens only
after a successful sound probe. This requires a change in machine driver
to allow probe() happen for child devices. This may be a concern during
usage of upstream machine driver which does not have provision for child
device probing. For now unblock the upstream AHUB usage by using this
safe option and investigate the best option to make the override driver
independent.

Bug 4508166
Bug 4451662
TAS-2251

Change-Id: Ib13f0a3a0ac272a0f2325b9d74efbc31128f0991
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083180
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:19 -08:00
Sameer Pujar
72ed0ddf9d Revert "Revert "ASoC: tegra: Remove legacy AHUB OOT drivers""
This reverts commit 00c10d965b.
This is done to restore original commit of removing legacy AHUB OOT
drivers as the GVS intermittency issue is now root caused.

Bug 4508166

Change-Id: I0f0f9d34b0c408aa4fec20bc6df25ea23eac1189
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083108
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:14 -08:00
Sameer Pujar
b0b6f09a6d Revert "Revert "ASoC: tegra: use upstreamed AHUB drivers""
This reverts commit 1d0f4c4ffc.
This is done to restore original commit of using upstreamed AHUB
drivers as the GVS intermittency issue is now root caused.

Bug 4508166

Change-Id: Iae064f8dae4cf79c639f060c3e24bda43a82b201
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083109
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:09 -08:00
Ketan Patil
07a8392942 video: tegra: nvmap: Move check at correct place
Check the return value from nvmap_duplicate_handle and decide code flow
based upon that return value.

Bug 4506926
Bug 4404709

Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Change-Id: I7f4a4d5e768f2c5eae2fd6abdb91a753f12bff39
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089780
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 16:01:26 -08:00
Akhil R
75ea3b11d0 i2c: tegra-slave: Add I2C Tegra slave driver
Add back the removed i2c-tegra-slave-byte driver and add support
for it in kernel v6.1

Though not enabled in device tree by default, I2C slave driver is
used by customers and developers for various debug and application
use cases.

Bug 4288065
Bug 4061232

Change-Id: Idd012303f51456492a8392e51aee1edc8dcb487c
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3048842
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 15:56:47 -08:00
Sandipan Patra
04406c221a device-tree: generic: Pickup DTB makefile from hardware/nvidia/t264
The path for the t264 DTS repo are hardware/nvidia/t264

Pickup the Makefiles from this new path for building
DTB.

Bug 4459750

Change-Id: I4d799241ab6479c7999a4dd77523d842ac6550f4
Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089965
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 06:14:28 -08:00
Ketan Patil
2841339c6f mc-utils: Add support for t239
t239 was using mc-utils driver from kernel-nvidia folder as it was using
kernel k5.10; t239 is moving to kernel k6.1, hence update the mc-utils
driver from nvidia-oot to support t239.

Bug 4436559

Change-Id: I880a2fce377d65951983dea8876ca2954e9ddbc8
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083702
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-06 23:29:21 -08:00
Ankur Pawar
0018354fcf media:i2c: fix imx477 partial frame output
Fix imx477 partial frame issue and wrong frame-length
/exposure time calculations.
Uses hardcoded sensor internal clock frequency
instead of clock values from sensor device tree.

Adding clock frequency to device tree also require
deskew_initial_enable = "true". Setting deskew in
device tree is causing kernel panic in function
nvcsi_deskew_setup(). For unblocking the IMX477
use case, set hardcoded clock in driver for now.

Bug 4384649

Change-Id: Iedb02673c6f4da140aee22adc991805b6aa1eb7e
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3086503
cherry-picked from <4d4e68569911d4424073a3b39f5b2642346a077a>
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087470
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-06 04:26:38 -08:00
Jon Hunter
e8beb761bb nvdla: kmd: Return error on ICC failure
Currently, the DLA driver does not return an error if the ICC write
handle is not found and so it is possible that ICC failures will go
undetected. By using dev_err_probe(), error messages are only printed if
the error is not -EPROBE_DEFER. If an -EPROBE_DEFER error is returned
from the ICC, then no error message is printed because probe is being
deferred and we will try to probe the driver again later. This ensures
that the DLA driver will wait for the ICC to be ready and if any other
error occurs, then an error message will be displayed and the proper
error code returned.

Bug 4496044

Change-Id: I88632d7c6f7f1b83e0a69e4b132404a77fc090ec
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084821
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-06 04:23:20 -08:00
Laxman Dewangan
ec36761633 device-tree: Add OS_LINUX as the DTC flag
Add device tree compiler flag as OS_LINUX for building the
DT for linux.

Bug 3081230

Change-Id: I7b5efc8840988f7afb9bcd2ee7c1c0997d4f8c3a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3089477
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-05 16:31:48 -08:00
Jon Hunter
c534c789b3 net: nvethernet: Prevent VM interrupts being balanced
If the userspace service 'irqbalance' is installed then the nvethernet
driver crashes when there is network activity. To avoid this crash set
the IRQF_NOBALANCING flash for the VM interrupts. No performance
degradation is observed when running iperf3 with a 1Gbps link.

Long-term the nvethernet driver still needs to be fixed to allow IRQ
balancing.

Bug 4293378
Bug 4541158

Change-Id: I0aa4ee28e36c7d273f14ff043544e72d3e988bd3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087525
(cherry picked from commit f9ed570c2b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3088936
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-05 16:31:43 -08:00
Bharat Nihalani
ed0204e0ae tegra_bootloader_debug: Register resume callbacks
1. Register resume_noirq handler for profiling the time when early
driver resume sequence is started. Since this driver is loaded after
boot, this should get called very early in the resume sequence.

2. Register PM notifier to know when resume is complete. This helps
in profiling the time when entire resume sequence is complete.

These 2 timestamps should approximately indicate the time it takes
for Linux to resume.

Adding this code in this driver removes dependency of providing this
information from some other driver.

Bug 4454722

Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Change-Id: I214eb4ff2808ecb87b828cb4556a2a00cc2d4545
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3047836
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062030
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-04 15:39:15 -08:00
Arihant Jejani
6a2c18b943 misc: nvscic2c-pcie: fix leak/lock in deinit
- Fix missing leak for epc_ctx when probe() fails nvscic2c-pcie-epc
 - Fix mutex lock/unlock for syncpoint fence operations.

Bug 4539983

Change-Id: I18272f991d6d9821ff1a7e13e9b4807cef20d92f
Signed-off-by: Arihant Jejani <ajejani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3087303
Reviewed-by: Deepak Kumar Badgaiyan <dbadgaiyan@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-02 09:10:48 -08:00
Mallikarjun Kasoju
3c36bb896e ufs: Add support for VSP
Added support for VSP

Bug 3977186

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: If59dc2e0512b08f40a8b6dd3eef02c1bcf2004cb
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3078740
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-01 12:42:25 -08:00
Jon Hunter
f0538cd58d camera: Handle probe deferral
Probing a driver can be deferred if a resource is not ready and this is
accomplished by returning -EPROBE_DEFER from the .probe function. This
tells to kernel to probe the driver again some time later. When probing
a driver is deferred it is not necessary to print an error message
because this is an expected error case. To avoid printing an error
message on probe deferral, the dev_err_probe() function can be used
which will only print an error if the error code is not -EPROBE_DEFER.
Therefore, update the camera drivers to use dev_err_probe() to avoid
printing an error message when -EPROBE_DEFER if returned from ICC.

This change will also cause the probing of the rtcpu-debug driver to
be deferred if -EPROBE_DEFER is returned and prevent the rtcpu-debug
driver from being probed at all if an real error is encountered.

Bug 4496044

Change-Id: I8a5313750e11b4bd661191c0c544c39e43478089
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3084829
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-29 15:40:34 -08:00
Anubhav rai
e5075835ab vi5_fops: fix mem leak
release capture requests and embedded data
buffers before closing and exiting the stream

bug 4336756

Change-Id: Iba856eea9757a8226bc949ae1d72a87adf2d55eb
Signed-off-by: Anubhav rai <arai@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3068424
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-29 04:18:58 -08:00
Bhadram Varka
bec1d86778 nvethernet: fix build issues with safety
Bug 4506095

Change-Id: Ia24590ab716d7f879ca5394b7a5512db072c4fdd
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083506
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-28 11:20:45 -08:00
Sanath Kumar Gampa
725b8aacf1 linux:nvidia: macsec sysfs nodes only if enabled
Issue: Accessing the macsec sysfs nodes is leading to crash when macsec
is disabled in DT

Fix: Do not create sysfs nodes if macsec is not enabled in DT. Also
update the instance_id reading as part of ether_probe which will be
executed even when macsec is disabled

Bug 4431523
Bug 4449611

Change-Id: I354ac142b9d49852a0d5c7557a7368e1c36b0f63
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3043570
(cherry picked from commit 43136118f6a5e3cbdb09b7366f6a44ca5e52f21c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3075216
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3081231
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-28 11:20:40 -08:00
Narayan Reddy
85cf3fb4b3 nvethernet: remove calling of osi_update_stats_counter
remove osi_update_stats_counter and add logic in
nvethernet itself to take care of incrementing the
value

Bug 4284096
Bug 4449611

Change-Id: I0b7e6f03651b0d092d136baf0efd1caffc762205
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053871
(cherry picked from commit bdb1fedec9f3781a3100bd2838271551df31984f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3074753
(cherry picked from commit d31b03a583adf52a7978ef14a9cc0c7d3005ccb0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3081228
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-28 11:20:35 -08:00
Narayan Reddy
050caf414d nvethernet: update nvethernet Makefile
as a part of SWITS cleaned up the code which is
no longer valid

Bug 4284096
Bug 4449611

Change-Id: I4ee2300240746b3bbea93a43828b8d5d2089e822
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053432
(cherry picked from commit 6619fafb34c6ee7a98a831a7a6157da4363f57d5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3074749
(cherry picked from commit f971119d99926394b2b7d87ef8cb5910894a23dd)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3081225
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-28 11:20:30 -08:00
Hareesh
5c21e5aafb nvethernet: fix 5.7 misra issues
- Fixed 5.7 misra issues

Bug 3697619
Bug 4449611

Change-Id: I18c3a974ecf01e6981e4f12cbfab040ef7cfa4ca
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com>
(cherry picked from commit a39b7769b1392d3948160fdcb31ed8765e680882)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3074671
(cherry picked from commit c37e93314db10145238bd5784dfbfca10b60012f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3081222
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
2024-02-28 11:20:25 -08:00
Ankur Pawar
1c517ab4d5 camera: fix the kernel freeze after driver unbind
Kernel freeze is occurring due to incorrect cleanup
in vi5.c.

Fix for kernel freeze:
1 Don't call vi_channel_drv_unregister() and
  tegra_vi_media_controller_cleanup() in vi5_remove.
2 capture_vi_probe() is calling vi_channel_drv_register() and
  tegra_capture_vi_media_controller_init(), so capture_vi_remove()
  should call vi_channel_drv_unregister() and
  tegra_vi_media_controller_cleanup()
3 Use correct dev pointer in vi_channel_drv_unregister().

Code cleanup:
1 Remove use_legacy_path variable that was used for T186.
2 Removed unused t194_vi5_file_private struct.

Bug 4415340

Change-Id: I7a75d90e1d2a1fb78a6a5b083a66836b1723156c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077660
cherry-picked from <29e88ed17e757c0129a54a3fb44990cec4a33983>
Signed-off-by: Ankur Pawar<ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2936745
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-27 20:30:14 -08:00
Ankur Pawar
41762524a3 media:i2c: fix ar1335 control command
When ar1335_common.c was ported to K5.15 it was refactored
based on the review comments. During that process index
in mcu_send_ctrl_cmd() was set to 0xFFFF which was causing
issue in setting sensor format. Pass the index from the
caller of mcu_send_ctrl_cmd().

Bug 4389285

Change-Id: Ic84a8de58051fe947f0f4d6597d1a55bc29ef9e6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3024535
cherry-picked fom <7096cb09a537bb6385489bc93148b80ff5e8fdd9>
Signed-off-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2848593
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-27 20:30:09 -08:00
Brad Griffis
aaee95a8eb nvidia-oot: Update OOT driver path
The installation path for the OOT drivers has been updated from 'extra'
to 'updates'.

Bug 4410785

Change-Id: I54c8ce97cb1b159095b9dc3450ef0af711eb7f9b
Signed-off-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069039
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-24 05:24:07 -08:00
Jon Hunter
eee13a1edb drivers: Drop '-next' from driver names
The OOT variants of the host1x and tegra-drm drivers originally had
a '-next' suffix in the name to differentiate these from the upstream
versions. Now that the OOT drivers are installed under the 'updates'
directory, the '-next' suffix can be dropped because 'kmod' will
prioritise loading the variant in 'updates' over those built from the
kernel tree.

Bug 4410785

Change-Id: I29287ddb935b681a5ee8a3326428eba82715da76
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065465
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-24 05:24:02 -08:00
Preetham Chandru Ramchandra
4008be04b4 cpuidle: tegra: Explicitly call pm_system_wakeup
During SC7 resume sometime wakekey interrupt is not generated even
if wake key is pressed.
So explicitly call pm_system_wakeup() which causes the system
to resume from SC7.

Bug 4449600

Change-Id: I8582ef22fb456f7b26b13515bce5e4874191b713
Signed-off-by: Preetham Chandru Ramchandra <pchandru@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079822
Reviewed-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bhavesh Parekh <bparekh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-23 14:54:54 -08:00
Sameer Pujar
1d0f4c4ffc Revert "ASoC: tegra: use upstreamed AHUB drivers"
This reverts commit 363a679975.
This is done to unblock gvs intermittency of audio test and
kernel warning test failure.

Bug 4508166

Change-Id: I99e2b879c7ba1c7987d859b4ae9fce0ea317e41e
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3082636
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Shubham Chandra <shubhamc@nvidia.com>
2024-02-23 08:27:14 -08:00
Sameer Pujar
00c10d965b Revert "ASoC: tegra: Remove legacy AHUB OOT drivers"
This reverts commit 289095dfc6.
This is done to unblock gvs intermittency of audio test and
kernel warning test failure.

Bug 4508166

Change-Id: I989c0467fb5f2d962fb980085a1652df892128f6
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3082635
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
2024-02-23 08:27:03 -08:00
Ashish Mhetre
ed7a856cf7 video: tegra: nvmap: Take refcount on device during map
When a dma_buf is getting mapped, take refcount on that device which
will is released when dma_buf is unmapped.
The device should be alive till all its buffers are unmapped.

Bug 4402923

Change-Id: I3ad257f5bdd7e705ac94bea6e81fef0fda46fbd2
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079901
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-22 15:46:16 -08:00
Krish Agarwal
2664f7f2b7 pva: drivers: prevent program of scr regs for gen3
Since power management is not supported on pre-
silicon platforms on GEN3 avoid programming
registers with lock bit enabled.
Bug 4500579

Signed-off-by: Krish Agarwal <krisha@nvidia.com>
Change-Id: Id4c2352d32a38e3e3408e54e38df3d5f723a4d20
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077879
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-22 15:44:47 -08:00
Kartik
5676a53a5b soc/tegra: fuse-helper: Add __tegra_get_chip_id()
Various OOT drivers require Tegra chipid to identify the SoC they are
running on.

Add helper function __tegra_get_chip_id() which use soc_device_match()
to identify the SoC chipid on which the kernel is currently running.
Loadable drivers/modules can use this to read the chipid.

Bug 4416828

Change-Id: I6bdb95ed579b3ade9314468abb0ccc749af7bb89
Signed-off-by: Kartik <kkartik@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3078383
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Tested-by: Viswanath L <viswanathl@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 18:53:49 -08:00
Viswanath L
19c895951f nvadsp: Use helper function __tegra_get_chip_id
tegra_get_chip_id() API is not exported from core kernel,
so use __tegra_get_chip_id() from fuse-helper.h instead.

Bug 4416828
Bug 4164138
Bug 3682950

Change-Id: Ieb6fde256c9fd7b5dfbd6975a030536834042cc5
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3078396
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 18:53:43 -08:00
Sameer Pujar
289095dfc6 ASoC: tegra: Remove legacy AHUB OOT drivers
Most of the AHUB module drivers are already upstreamed and there are
alternate ways to have the same feature parity with the legacy OOT
drivers. Thus there is no need to maintain the legacy OOT drivers
going forward. This commit removes all AHUB drivers which are already
in upstream and the same have been enabled as a default choice for
Terga234 and later chips.

Removal of OOT versions of upstreamed drivers resulted in following
build errors:

  - AFC, IQC and machine driver include "tegra210_ahub.h". Due to
    the removal of AHUB driver, the header is not found. It is found
    that there is no actual dependency for these drivers on the AHUB
    header.

    Fix this by just removing the header inclusion.

  - ARAD driver has dependency on ASRC driver for few helper functions.
    Upstream ASRC driver does not expose these helpers yet, because
    these are only required by ARAD module and all of these should go
    together for upstream.

    Fix this build error by guarding the header 'tegra186_asrc.h'
    under macro 'CONFIG_SND_SOC_TEGRA186_ASRC_WAR'. The helper function
    calls in ARAD driver are guarded under the same macro and this macro
    is not enabled. This may leave ARAD broken with upstream ASRC driver
    which is fine since there is no ARAD productization yet and this
    will be taken care in bug 4432184.

Bug 4451662
Bug 4432184
TAS-2251

Change-Id: I5aa9ee1ae5ce58f3db8910f7e940dd2980da163a
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3074654
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-by: Aditya Bavanari <abavanari@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 18:40:09 -08:00
Sameer Pujar
363a679975 ASoC: tegra: use upstreamed AHUB drivers
There is plan to use OOT machine driver with upstream AHUB drivers
as a first step in alignment with upstream drivers. The machine driver
will be taken up after this.

To allow usage of upstream AHUB drivers, make following changes:

  - Update OOT PCM override driver to work with codec2codec links
    as well. Note that PCM override controls in the module drivers
    were rejected in upstream and it is one of the major differences
    between upstream and OOT AHUB drivers.

  - Register dummy DAI to use with I/O DAP DAI link. Exposure of
    dummy DAIs was not encouraged in upstream from the I/O module
    drivers. The codec2codec I/O links require a codec to be present.
    Hence expose dummy DAI from machine driver and use the same in
    I/O DAI links.

Bug 4451662
TAS-2251

Change-Id: If6904073eca29167620bf5d273cdcd306196f6ba
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059819
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 18:40:04 -08:00
Yash Bhatt
2101eb3050 tegra: nvmap: Clean-up OOT NvMap
Remove macro-protected dead code. NVMAP_LOADABLE_MODULE enables NvMap as
an OOT module, while NVMAP_UPSTREAM_KERNEL is a config for kstable/OOT
kernel. For Kernel 5.10+ both are always defined, So the related macro
protected code can be safely removed.

Bug 4479135

Change-Id: If3d32533f26f5928bd3ef7066bddba1505b77614
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079649
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 05:31:57 -08:00
Yash Bhatt
67dec54ef3 tegra: nvmap: Clean-up OOT NvMap
Remove macro-protected dead code. NVMAP_LOADABLE_MODULE enables NvMap as
an OOT module, while NVMAP_UPSTREAM_KERNEL is a config for kstable/OOT
kernel. For Kernel 5.10+ both are always defined, So the related macro
protected code can be safely removed.

Bug 4479135

Change-Id: I8e1bf930b15dfc8411d833383fb3eae2778edfe3
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079522
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 05:31:16 -08:00
Yash Bhatt
25bc2a3b96 tegra: nvmap: Clean-up OOT NvMap
Remove macro-protected dead code. NVMAP_LOADABLE_MODULE enables NvMap as
an OOT module, while NVMAP_UPSTREAM_KERNEL is a config for kstable/OOT
kernel. For Kernel 5.10+ both are always defined, So the related macro
protected code can be safely removed.

Bug 4479135

Change-Id: I792f1cb2c54fd21bcf0e73ffc52e46e4efd47862
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3079420
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 05:31:05 -08:00
Yash Bhatt
7393789444 tegra: nvmap: Clean-up OOT NvMap
Remove macro protected deadcode which is not applicable now

Bug 4479135

Change-Id: I11939a9d549158952dee3c37de4189ada9e8a9b8
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077715
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-17 15:54:32 -08:00
Yash Bhatt
0f3210ddb5 tegra: nvmap: Clean-up OOT NvMap
Remove macro protected deadcode which is not applicable now

Bug 4479135

Change-Id: I8c9740943fdda7b841ef56d72cb6550b76cdaacd
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077561
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-17 15:54:27 -08:00
Yash Bhatt
89fc0fe787 tegra: nvmap: Clean-up OOT NvMap
Remove macro protected deadcode which is not applicable now

Bug 4479135

Change-Id: Id15fec351a7c43064b48ba608640b3ede86035be
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077485
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-17 15:54:17 -08:00
Yash Bhatt
27feea2ec8 tegra: nvmap: Clean-up OOT NvMap
Remove macro protected deadcode which is not applicable now

Bug 4479135

Change-Id: I2643406a3daaadf047e6793d4a6cc353c9729f69
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077463
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-17 15:54:12 -08:00
Yash Bhatt
37e4db0ddb tegra: nvmap: Clean-up OOT NvMap
Remove macro protected deadcode which is not applicable now

Bug 4479135

Change-Id: Ibcf155e19b0a9eb5a2d06fa7486e93e1a51769e6
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077338
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-17 15:54:06 -08:00
Yash Bhatt
3516ab0f77 tegra: nvmap: Clean-up OOT NvMap
Remove macro protected deadcode which is not applicable now

Bug 4479135

Change-Id: I51408f04171e5dc2c34a47755c853aa705cc4cd8
Signed-off-by: Yash Bhatt <ybhatt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3077840
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-16 10:28:33 -08:00
Mikko Perttunen
e062e9d49c gpu: host1x: Memory context stealing
Currently, each process holding an open TegraDRM channel reserves
for itself one of the limited number of hardware memory contexts.
Attempting to allocate a channel when all contexts are in use
results in failure.

While we cannot have more contexts than the hardware supports in
active use, idle channels don't necessarily need to have a backing
memory context. As such, in this patch, we add another layer
to allow hardware memory contexts to be "stolen away" by channels
that are in active use, from idle processes.

The way this is implemented, is by keeping track of memory
mappings on each abstracted memory context. If we need to
steal that memory context's backing hardware context, we unmap
everything from it and give it away. When that abstracted
memory context is needed again (re-activated), we attempt
to allocate or steal another hardware context and re-map
the previously unmapped buffers.

Unfortunately, this means additional overhead and unpredictability
at submit time. Submit can fail if we cannot re-allocate a
backing memory context. Future work includes a provision for
un-stealable backing hardware memory contexts for processes
requiring more determinism, as well as optimization and cosmetic
improvements.

Bug 4403250
Bug 4399310

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I3d13e3476f1bff3c4757152254496cddaaafd76a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3058905
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-16 03:04:44 -08:00
Jon Hunter
7e85d429e7 drm/tegra: Don't print error on probe defer
The following error messages are sometimes observed on boot ...

 tegra-nvjpg 15380000.nvjpg: failed to get icc write handle
 tegra-nvdec 15480000.nvdec: failed to get icc write handle
 tegra-nvjpg 15540000.nvjpg: failed to get icc write handle
 tegra-nvenc 154c0000.nvenc: failed to get icc write handle
 tegra-vic 15340000.vic: failed to get icc write handle
 tegra-nvjpg 15380000.nvjpg: failed to get icc write handle

The above messages are harmless because the ICC core is returning
-EPROBE_DEFER to indicate that the ICC provider is not available. When
-EPROBE_DEFER is returned the kernel will attempt to probe the device
again and so print an error on -EPROBE_DEFER can be misleading. Fix the
above by using the function dev_err_probe() to print error messages
because this function will only print an error message if the error code
is not -EPROBE_DEFER.

Bug 3436156
Bug 4496044

Change-Id: I47b77e5a0f2bdb817a832daa305246c8803f456b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3075237
(cherry picked from commit 61319aef4d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3075849
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-13 20:11:45 -08:00
Stefan Kristiansson
76261f8ace bpmp: ABI headers update
abi@f6a0c4b

Change-Id: I556badc159c867d4e80cf9214ee4837574d0692b
Signed-off-by: Stefan Kristiansson <stefank@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3071497
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
2024-02-09 04:32:49 -08:00
Ahmad Chaudhry
6b403012fb drivers: only build rtk bt driver for non-ack
Realtek bluetooth driver is not used in ack and
causes build issues in ack builds.
Subsequently, only build realtek blutooth
driver conditionally if build is not ack

Bug 4476460

Signed-off-by: Ahmad Chaudhry <ahmadc@nvidia.com>
Change-Id: I2d26cc04f466ce51179dff51f14ee1ce73084990
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3069246
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-09 04:32:28 -08:00
Karthik SM
b5a59cfff2 kmd: Program 4 SCR from KMD in L4T case
- MB2 cannot program SCR values because PVA is poweredoff
- In L4T, KMD programs some of these SCR registers

Bug 4450663

Change-Id: I8a6fb7cf9c61ad30e9182f520e0122ea8ad49acc
Signed-off-by: Karthik SM <kmaheshwarap@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3068906
Reviewed-by: Arvind Prasad <arvindp@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-09 04:32:23 -08:00
Karthik SM
23b905c159 pva kmd: Program SCR GR registers from PVA KMD
This change programs PVA_PROC_SCR_PROC_0 and
PVA_SEC_SCR_SECEXT_INTR_EVENT_0
to its PROD values from PVA KMD.

Bug 4450663

Change-Id: I8960a3c228cc67a7d8925d14bf2440aa8629b1d6
Signed-off-by: Karthik SM <kmaheshwarap@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059388
Reviewed-by: Reshma Prabhu <rprabhu@nvidia.com>
Reviewed-by: Bhushan Patil <bhushanp@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
(cherry picked from commit f809201c7d57b714bc341ce435d39071ff3503e1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3068126
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-07 17:43:43 -08:00
Karthik SM
d4443f6037 kmd: Update PVA SCR values in standard build
- MB2 cannot program SCR values becuase PVA is poweredoff
- KMD cannot access these registers because they are not mapped for VM
access
- Hypervisor programs these registers but KMD needs to trap for PVA
reset usecase

Bug 4450663

Change-Id: I9e6bfdfbc09650a2b7fea0e7a10702a971bc38f4
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059459
Reviewed-by: Bhushan Patil <bhushanp@nvidia.com>
Reviewed-by: Karthik Srirangapatna Maheshwarappa <kmaheshwarap@nvidia.com>
Reviewed-by: Mohnish Jain <mohnishj@nvidia.com>
Tested-by: Karthik Srirangapatna Maheshwarappa <kmaheshwarap@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
(cherry picked from commit 2880d777f303602f72b7a7d1a6348d8272aa8238)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059488
Reviewed-by: Sai Vishal Pothula <spothula@nvidia.com>
2024-02-07 17:42:34 -08:00
Viswanath L
5713bc51b0 nvadsp: Use dynamically allocated shared mem
Upstream kernel does not export IOMMU APIs, so use dynamic
memory allocation for shared memory in non-secure boot mode.

Move stale code that uses IOMMU APIs under macro
CONFIG_IOMMU_API_EXPORTED. As remapping allocated IOVA to a fixed
address is no longer possible, IOVA cannot be used for OS memory;
reserved physical memory may be used in its place.

Dynamic memory allocation for shared memory will be selected if
ACSR_ADDR in "nvidia,adsp_mem" DT property is set to 0.

Bug 4416828
Bug 4164138
Bug 3682950

Change-Id: I9ea5626a14457818f2adff69610562e824f7fdda
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067154
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-02-07 17:39:04 -08:00
Viswanath L
f0f463b06b nvadsp: Move dynamic app support under macro
Move all code for dynamic app support under macro
CONFIG_ADSP_DYNAMIC_APP.

Also use devm_kzalloc in place of kzalloc to avoid
compiler warnings.

Bug 4416828
Bug 4164138
Bug 3682950

Change-Id: Ia0528f983b81d205caedb993bd72b03bcd8ba39d
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3046858
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-07 17:38:35 -08:00
koenz
77f9756fb4 driver:misc:mods: Increase max mods SMMU devices to 32
- More tested IPs require alloc memory through SMMU

Bug 4467535

Signed-off-by: Koen Zhao <koenz@nvidia.com>
Change-Id: I41ac88d01ecbe640082ba4c70607cb701ad4f3f5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067676
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-06 09:26:05 -08:00
Prathamesh Shete
8b4674420e BT: deprecate support for of_gpio calls
deprecate support for of_gpio calls
use devm_gpiod calls instead

Bug 4387902

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Change-Id: Ic81b5cf11a32f014f02290e2a7c84c50a3e26d6c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3043616
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Jian-Min Liu <jianminl@nvidia.com>
2024-02-06 09:22:49 -08:00
Johnny Liu
a662c74302 video: tegra: remove icc request in system resume
When dla resumes back from system sleep, it should not send any
bandwidth request through ICC framework since it is in idle state.

In the job submit path for dla, nvhost will try to wakeup the device
through nvhost_module_busy, and the associated runtime resume callback
is called in the dla driver. This is the time dla driver should send
bandwidth request to BPMP for bandwidth allocation through ICC
framework.

Bug 4478515

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ie4b5cfad6593bd058860ee3be467d6a2384f1b5d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067369
(cherry picked from commit 246e62b38e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067689
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-03 02:24:23 -08:00
Manikanta Maddireddy
fc47fbceba PCI: Fix PCIe Endpoint device IDs
PCIe device ids 0x229a and 0x229c belongs to Root port, so this driver
is binding instead of pcieport. Tegra PCIe Endpoint production device ids
are 0x1ad4 and 0x1ad5, correct the device ids accordingly.

Bug 4477934

Change-Id: Ia86c4dcc6b4527e984a473c941713ef58dd6f74d
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3067109
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-02 04:21:13 -08:00
Asha Talambedu
2337fafd34 nvadsp: Extend to support AON DSP
- Added num_irqs to chip data structure and modified enum to
  suit the driver to both AON and ADSP
- Added num_regs to chip data and modified reg bank enum
  to suit both AON and ADSP
- Added chipdata variable to indicate if amc is not available or
  relevant
- Modified aram_exit to execute only if aram size is not null
- Avoid passing fw name for registration as it currently passing "APE"
- WFI status check logic is dsp specific. Hence separated out into
  new API
- Mapping mbx interrupts is specific to AON. Hence added platform device
  specific API to map the shared interrupts
- Avoided empty interrupt spamming for level triggered interrupts.
  This fix does no harm even for edge triggered interrupts

Bug 4165898

Change-Id: I99cf03c06ed5d290e067b4fd3569febadbda607a
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3035268
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-01 13:48:18 -08:00
Jon Hunter
5d2c7b6e3a nvhost: Remove legacy NVHOST support
Remove the legacy NVHOST support from the nvhost.h file that is no
longer needed. Eventually we will remove this file completely, but it is
currently still needed as it provides a shim layer for working with the
upstream host1x driver.

Bug 4475969

Change-Id: Id4d97b41de2590800e321e4eeb9c03b434e00dc5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065976
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-31 21:27:07 -08:00
Jon Hunter
4c229ee929 video: tegra: Remove nvhost and host1x headers
The nvhost.h header in the ISP and VI drivers is a copy of the nvhost.h
header in the main top-level include directory. Remove these and use the
version in the top-level include directory.

Finally, remove the host1x.h header file that is not used at all.

Bug 4475969

Change-Id: I78133231203ee7eb2dc41eee7b8895ba9ce50e02
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065975
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-31 21:27:02 -08:00
Jon Hunter
73a4985dbd video: tegra: Don't use nvhost_get_private_data
The function nvhost_get_private_data() is a wrapper around the Linux
platform_get_drvdata() function. To remove all the legacy nvhost code
that is no longer supported or needed, update the camera drivers to use
platform_get_drvdata() directly. Note that there are places in these
drivers that already use platform_get_drvdata() and so this change makes
these drivers more consistent.

Bug 4475969

Change-Id: Ie474c46c438f69c2141f41d0702bf57525597ab5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3065974
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-31 21:26:51 -08:00
Jon Hunter
072a881099 media: camera: Remove of_pwm_n_cells usage
The 'of_pwm_n_cells' has been removed from the pwm_chip structure in the
latest linux-next development branch that will eventually become Linux
v6.9. This parameter was used in function 'of_pwm_xlate_with_flags'.
The camera CDI and ISC drivers don't use the kernel's
of_pwm_xlate_with_flags xlate function and instead implement their own
xlate function. Therefore, it is safe to simply drop the usage of the
'of_pwm_n_cells' parameter completely in these drivers.

Bug 4471899

Change-Id: Id4cf4b7ac182d0654080e536457bab1a7128ad1d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063806
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-31 21:25:42 -08:00
Krish Agarwal
85a51ae063 pva: drivers: include gen3 apps in sys allowlist
Jira PVAAS-14477

Signed-off-by: Krish Agarwal <krisha@nvidia.com>
Change-Id: I40b8de4e875b33fda1fb3b8226867fefe1a293ec
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3061864
Reviewed-by: Amruta Sai Anusha Bhamidipati <abhamidipati@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-31 05:10:39 -08:00
Ian Grissom
426eaddac9 misc: mods: update from Perforce
Change-Id: I12e626024579fa86ab2f79068bb57e9f41746e8a
Signed-off-by: Ian Grissom <igrissom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989905
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-27 18:25:07 -08:00
Laxman Dewangan
288de33b62 tegra_hv: Fix missing headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: I19a0d9003aa655d12c8ae50131f15a6ee4cc59f8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3063634
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-27 03:12:34 -08:00
Ketan Patil
d5207547eb video: tegra: nvmap: Take lock before reading dmabuf's refcount
As mentioned in previous gerrit patch 3021442, it is necessary to take a
lock before reading dmabuf's refcount and also check for both dmabuf and
dmabuf->file. This was not done in trace related code, update the code
to take care of this.
Also, add a function remove_handle_ref for removing the handle ref from
client's handle_ref rb tree.

Bug 4404709

Change-Id: Ic93536015f17a265c3dccbea8ce45c6b45af2fc2
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3046839
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-26 00:21:00 -08:00
Laxman Dewangan
932f9757ab misc: nvscic2c-pcie: Drop usage of enum pci_epc_irq_type from Linux 6.8
The enum pci_epc_irq_type is dropped from Linux 6.8 with
commit 74955cb8ccc385 ("PCI: endpoint: Drop PCI_EPC_IRQ_XXX definitions")
Use alternative definition from mainline.

Bug 4448428

Change-Id: Ic248ee2522f171c311ac1086c2792bcf3ad6ed64
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062520
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-25 17:26:42 -08:00
Laxman Dewangan
6533bf9268 misc: nvscic2c-pcie: Fix missing headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: Ic40e43c99ff1a7f5c4b7a7c3ab525e6e046c452b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062519
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-25 17:26:37 -08:00
Viswanath L
dfc42d66a1 nvadsp: Add field in chip data to send boot config
Introduce a new field 'adsp_boot_config_hwmbox' in chip data
for passing boot config to ADSP, replacing the existing
method of writing chip_id into hwmbox1.

The new field presently encodes adsp_os_secload flag. This
may be useful for firmware to do specific settings based on
boot mode, e.g. do AST settings if boot is in non-secure mode.

Bug 3682950

Change-Id: I51e5e0c8f15a8160247a7febb50998defec13d42
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3052180
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-25 17:03:55 -08:00
Jon Hunter
ab65399274 drivers: Fix missing headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: Ia40ab13f865d5631c96855ecc49145848f99c996
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032442
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-01-25 09:11:21 -08:00
Jon Hunter
0899829704 misc: mods: Fix headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: Ifb484189524a3ec86aa252e71b4489f4dba5aacd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059458
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-01-25 09:11:16 -08:00
Jon Hunter
ecf383265b drivers: Don't use strlcpy()
For Linux v6.8, the function strlcpy() has been removed. The function
strscpy() was added in Linux v4.3 and has been preferred over strlcpy().
See upstream Linux commit 30035e45753b ("string: provide strscpy()") for
more details. The Linux checkpatch.pl script warns against using
strlcpy().

The function strscpy() takes the same arguments as strlcpy(), but
returns a type of ssize_t instead of size_t. Update the drivers to use
strscpy() instead of strlcpy().

Bug 4448428

Change-Id: Id6f196f0e81decf1545f9aa4f74f5c63a7f72a48
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059457
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-01-25 09:11:11 -08:00
Jon Hunter
85692c2c64 scsi: ufs: Use conftest for Tegra264
The chip ID for Tegra264 was added in Linux v6.5 and not Linux v6.1 as
indicated in the Tegra UFS driver. Hence, the Tegra UFS driver does not
build against any generic Linux v6.1 to v6.4 kernel. Fix this by using
conftest to determine if the chip ID definition is present in the
kernel.

Bug 4221847

Change-Id: If2ca1202b2a69bf7de36fc327406f1579d2f4969
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3054870
(cherry picked from commit abeacc3534)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3054827
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-20 19:34:18 -08:00
Manish Bhardwaj
9b29abef53 vse: protect concurrent access of ivc queue
Bug 4421197

Change-Id: I9514deac25a6ad725ca12a57b2a304f64c5f0d3a
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050469
Reviewed-by: Zuyi Hu <zuyih@nvidia.com>
Reviewed-by: Zuyu Liao <zuyul@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Tested-by: Zuyi Hu <zuyih@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-20 19:26:24 -08:00
Jon Hunter
0bd71e49bd misc: mods: Fix build when OPTEE is a module
If the Linux kernel driver OPTEE is built as a module (CONFIG_OPTEE=m)
then building the MODS driver for Tegra fails with the following error
...

 drivers/misc/mods/mods_optee.c:22:5:
 error: no previous prototype for 'esc_mods_invoke_optee_ta'
 [-Werror=missing-prototypes]
   22 | int esc_mods_invoke_optee_ta(struct mods_client *client,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~

The problem is in the mods_internal.h file that wraps the prototype for
the above function with '#ifdef CONFIG_OPTEE'. This works fine for when
CONFIG_OPTEE=y but not if CONFIG_OPTEE=m. To ensure that this prototype
is present when the OPTEE driver is built into the kernel or a module,
we need to use '#if IS_ENABLED(CONFIG_OPTEE)'. Update the MODS driver
accordingly to fix this.

Bug 4429280

Change-Id: I48054f60cf26c04d2cacff8d8affc46254020aff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038965
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-20 19:15:47 -08:00
Jon Hunter
c87f90c7b8 misc: mods: Drop DMAENGINE slave_id support
Only Tegra234+ devices are currently supported and for these devices the
only DMA drivers that are supported for Linux are the Tegra210 ADMA and
Tegra186 GPCDMA drivers. Neither of these drivers ever supported the
'slave_id' parameter for configuring the DMA request ID for a given
channel. These drivers have always used device-tree to retrieve this
information. Only the Tegra20 APBDMA controller supported the 'slave_id'
field and this was dropped in Linux v5.17. The Tegra20 APBDMA driver was
supported in Tegra devices up until Tegra210, but starting with Tegra186
it is no longer supported.

Given that this is a legacy feature only supported for legacy Tegra
devices and drivers, drop the 'slave_id' support completely.

Bug 4425688

Change-Id: Id9bb6440805826dfb0cf0d862d6b15fd856e61ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038964
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-20 19:15:41 -08:00
Jon Hunter
293c8e7b85 tty: wch: Fix build for Linux v6.8
In Linux v6.8, the argument for the struct tty_operations::send_xchar
function was updated from char to u8 and this breaks the build for the
'wch' driver. Add a test to the conftest script to detect the argument
type for this function and use the definition generated to fix the build
for the 'wch' driver.

Bug 4448428

Change-Id: I051861cf76e56cacb4b33053d4e6644265552df7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3057714
(cherry picked from commit 3f5ba8f70b)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032444
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-20 19:15:00 -08:00
Jon Hunter
93360eb080 conftest: Fix 'type' compile tests
The Conftest Makefile was incorrectly updated changing variable
NV_CONFTEST_TYPE_COMPILE_TESTS to NV_CONFTEST_TYPES_COMPILE_TESTS. Fix
this by correcting the name.

Bug 4346767

Change-Id: Ia34c076526a1ee6870301382e01bfdcc8cd550d3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053809
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 08:09:54 -08:00
Krish Agarwal
c983d3dd36 drivers: pva: enable app auth for GEN3
Enable vpu authentication by default for gen3

Jira PVAAS-14403

Signed-off-by: Krish Agarwal <krisha@nvidia.com>
Change-Id: I72e7f1641c213fb9274c8b46203f48117de18296
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3051297
Reviewed-by: Sreehari Mohan <sreeharim@nvidia.com>
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 08:02:11 -08:00
Jon Hunter
ce916e3f13 ufs: Remove UFSHCD_QUIRK_ENABLE_STREAM_ID
Remove the legacy downstream quirk 'UFSHCD_QUIRK_ENABLE_STREAM_ID' and
always use the supported upstream quirk from now on. The legacy quirk
will never be upstreamed and so to support 3rd Party Linux distributions
that will not have this quirk, we should only support the official
upstream quirk.

Bug 4346767
Bug 4450187

Change-Id: Iabec6beb63b99ada7e8893cfa2acc0ed5e7ee92f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3045039
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svc-bootloader-acv <svc-bootloader-acv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 21:20:54 -08:00
Jon Hunter
a1f59dfc30 media: camera: Fix build for Linux v6.8
In Linux v6.8, the 'g_frame_interval' function pointer was removed from
the 'v4l2_subdev_video_ops' structure and replaced by
'get_frame_interval' that was added to the 'v4l2_subdev_pad_ops'
structure. Add a test to conftest to detect if 'get_frame_interval' is
supported and update the camera CSI driver accordingly to populate the
appropriate function pointer.

Note that the new 'get_frame_interval' function pointer has an
additional 'state' argument but is otherwise the same as the previous
'g_frame_interval' function pointer.

Bug 4448428

Change-Id: Iff049c3bffda11c677ac879b2b91e10deb78060c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053901
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 15:23:25 -08:00
Jon Hunter
0356a563b3 net: nvethernet: Fix build for Linux v6.8
The ethtool_ops function pointers get_rxfh and set_rxfh were updated for
Linux v6.8 to pass arguments via a new 'ethtool_rxfh_param' structure.
Add a new test for conftest to detect if the get_rxfh and set_rxfh
functions support the 'ethtool_rxfh_param' structure and update the
nvethernet driver accordingly for Linux v6.8.

Bug 4448428

Change-Id: Ia1c49d88c4ac73539454b010af92c261e14be4bf
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037949
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 15:23:19 -08:00
Jon Hunter
10fd025187 drivers: pwm: Fix build for Linux v6.8
Commit 54c86dd20bba ("pwm: Replace PWM chip unique base by unique ID")
removed the 'base' field of the 'pwm_chip' structure replacing it with
an 'id' field. The new 'id' is initialised by the PWM driver core and
does not need to be configured by the PWM drivers.

Add a test for conftest to detect if the 'pwm_chip' structure has the
'base' field and update the various PWM driver to only set this field if
present.

Bug 4448428

Change-Id: I7cf466eddba4aedb57db84534e3cbf99be64151e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027486
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 15:23:14 -08:00
Jon Hunter
8d5286c379 gpu/drm: tegra: Fix build for Linux v6.8
Building the Tegra DRM driver with Linux v6.8 fails with the following
error ...

 drivers/gpu/drm/tegra/hdmi.c:623:25: error: implicit declaration of
 function ‘drm_eld_size’; did you mean ‘mm_cid_size’?
 [-Werror=implicit-function-declaration]
  623 |    size_t length = drm_eld_size(hdmi->output.connector.eld), i;
      |                    ^~~~~~~~~~~~

Commit ("8eb80946ab0c drm/edid: split out drm_eld.h from drm_edid.h")
added the header file 'drm/drm_eld.h' which now needs to be included to
build the Tegra DRM driver. Fix the build issue by using conftest to
detect the presence of the header 'drm/drm_eld.h' and include this
header if present.

Bug 4448428

Change-Id: Ifb17648d1dc721e1f0de3f864f4cc76450eea394
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027485
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-16 15:23:09 -08:00
Sameer Pujar
2a68fff8b8 ASoC: tegra: Add driver for DAI PCM overrides
Tegra audio uses multiple ASoC components in an audio path. In doing
so, each component may require a separate set of DAI PCM configurations.
Presently this is facilitated by exposing mixer control overrides from
each of the component drivers to override sample rate, channels or bits.

Above satisfies our needs. However this type of solution is rejected by
upstream maintainers. The suggestion is to not bypass the configurations
passed by ASoC framework via hw_params() calls.

With kernel OOT model gaining momentum in downstream, we are stuck with
partially upstreamed drivers where above mentioned feature is an
important missing item.

This commit adds a new driver to override DAI PCM parameters. Idea is to
use this as an OOT driver and insmod it for our downstream applications
or for testing.This comes with few limitations, mentioned below, which
is fine looking at the overall requirements.

  - Client overrides are not possible for AHUB internal modules. This is
    because DAI hw_param() call can carry one configuration and thus
    both XBAR and client setting overrides are not possible.

  - No overrides are provided for ADMAIF. The client configuration is
    passed by aplay/arecord applications and DAI hw_param() call carries
    the same.

  - The DAI overrides need to be set every time before any use case and
    these are not persistent. This is because when an use case ends ASoC
    core clears DAI runtime settings. If necessary, it can be improved
    later by storing all DAI settings in the driver.

This driver is intended to be used on both DPCM/DAPM solutions.

Bug 3583581

Change-Id: Ia05316a10eb9c298f2a56d2ef3ccaa37c5985ddd
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3043569
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-15 09:01:45 -08:00
Laxman Dewangan
d09293e954 media: {cdi,is}_gpio: Initialize parent dev for gpio chip
Set the parent node of the gc to the gpio device so that
core will get the of_node of device from parent node.

Bug 4387902

Change-Id: I795e612c11bdf72067b85d23ce5914abdcc3c139
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3052126
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-13 00:35:03 -08:00
Jon Hunter
9de3e799ae camera: Fix build when CONFIG_MEDIA_SUPPORT is not enabled
Some camera drivers are dependent upon CONFIG_MEDIA_SUPPORT being
enabled in the kernel and if it is not enabled, building these drivers
fail. Fix this by only building the camera drivers dependent upon
CONFIG_MEDIA_SUPPORT when this option is actually enabled.

Bug 4449072

Change-Id: I3637b5763667fbc9965bbeaf126115010e711c7e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050559
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-12 14:46:15 -08:00
Ashish Mhetre
6557f98a1c video: tegra: nvmap: Add VPR support on socket1
Add VPR support on socket1 of multi-socket SOCs.

Bug 4390638

Change-Id: I909a8690f928a64f73380eb86755f0cac5421bc7
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037539
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-12 05:16:26 -08:00
Jon Hunter
8b3ebff940 media: i2c: Fix build for GCC 6/7
Building nv_ar0234 and nv_hawk_owl sensor drivers with GCC 6/7 fails
with the following errors ...

 drivers/media/i2c/nv_ar0234.c:797:66: error: initialiser element is not
 constant
 .compound_ctrl_size = {sizeof(struct NvCamSyncSensorCalibData),
                        alternating_exposure_cfg_size},
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 drivers/media/i2c/nv_hawk_owl.c:883:59: error: initialiser element is
 not constant
 .compound_ctrl_size = {sizeof(NvCamSyncSensorCalibData),
                        alternating_exposure_cfg_size},
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These older versions of GCC are not able to reconcile the size from the
variable 'alternating_exposure_cfg_size' even though it is defined as
const. Given that the variable 'alternating_exposure_cfg_size' is only
used here, fix this by removing this variable and directly defining the
size in the declaration of the 'compound_ctrl_size' parameter.

Note that the minimum GCC compiler currently supported by the Linux
kernel is v5.1.

Bug 4448563

Change-Id: I4d3ac6eeb961a944901e73a1d92e753cae44220c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050272
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-11 17:22:22 -08:00
Jon Hunter
9e2f7ecdf7 spi: Fix build for Linux v6.8
For Linux v6.8, support for SPI controllers with multiple chip-selects
was added to the SPI core and this updated the 'chip_select' member of
the 'spi_device' structure to be an array. This breaks building the
Tegra124 SPI Slave driver and Tegra210 QUAD SPI driver.

A helper function, spi_get_chipselect(), was added for Linux v6.3 to
retrieve the chip-select for a SPI device and can be used for retrieving
the chip-select for all Linux v6.3+ kernels.

Add a conftest rule to detecting if spi_get_chipselect() is present and
if so use this for getting the chip-select. This fixes the build issues
for Linux v6.8.

Bug 4448428

Change-Id: Ia4f95ed96b9a18cc7da7a4a52305fc64bc31905c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050146
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-11 04:32:12 -08:00
Advaya Andhare
df68c65bab vse: crypto: Remove AES-ECB support
Jira ESSS-1185

Change-Id: I9f0c9d8bb6e2816da2a826d3678dbbfc8bec2b2c
Signed-off-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037693
(cherry picked from commit 035056a3e785251d03590f07fa30fae077a99cf0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3047736
Reviewed-by: Leo Chiu <lchiu@nvidia.com>
Reviewed-by: Nagaraj P N <nagarajp@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-10 05:45:02 -08:00
Nagarjuna Kristam
e94216eeb9 pci: tegra-edma: add check for irq sync
Issue:
When AER error received during PCIe driver(c2C) probe, it results in
EDMA driver de-initing and AER handling happening at same time. PCIe
driver probe happens inside device lock and so is AER handling.
synchronize_irq() done by EDMA driver causes dead lock with AER device
lock.

Trace at RP hot-plug:
[  605.149061] INFO: task irq/344-tegra_p:394 blocked for more than 120 seconds.
<3>[  605.149066]       Not tainted 5.10.120-rt70-tegra #1
<3>[  605.149068] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
<6>[  605.149070] task:irq/344-tegra_p state:D
<6>[  605.149071] sched_debug_info: last_run_cpu 0 wake_cpu 0
<6>[  605.149073]  on_cpu 0 on_rq 0 migrate_dis 0
<4>[  605.149074]  stack:    0 pid:  394 ppid:     2 flags:0x00000028
<6>[  605.149077] Call trace:
<6>[  605.149078]  __switch_to+0xc8/0x120
<6>[  605.149090]  __schedule+0x334/0x930
<6>[  605.149095]  schedule+0x64/0x120
<6>[  605.149097]  synchronize_irq+0x8c/0xc0
<6>[  605.149101]  edma_stop+0x1ac/0x320
<6>[  605.149105]  tegra_pcie_edma_deinit+0x60/0x170
<6>[  605.149106]  nvscic2c_pcie_epc_probe+0x3ec/0x4a0 [nvscic2c_pcie_epc]
<6>[  605.149120]  pci_device_probe+0xe8/0x1a0
<6>[  605.149123]  really_probe+0xf8/0x3d0
<6>[  605.149126]  driver_probe_device+0x60/0xc0
<6>[  605.149128]  __device_attach_driver+0x8c/0xd0
<6>[  605.149130]  bus_for_each_drv+0x8c/0xe0
<6>[  605.149133]  __device_attach+0xf8/0x160
<6>[  605.149135]  device_attach+0x28/0x40
<6>[  605.149137]  pci_bus_add_device+0x5c/0xc0
<6>[  605.149141]  pci_bus_add_devices+0x40/0x90
<6>[  605.149142]  pci_bus_add_devices+0x6c/0x90
<6>[  605.149143]  pci_host_probe+0x50/0xd0
<6>[  605.149145]  dw_pcie_host_init+0x1c0/0x420
<6>[  605.149148]  tegra_pcie_config_rp+0x78/0x250
<6>[  605.149151]  tegra_pcie_prsnt_irq+0xb0/0x120

Trace at AER ISR at the same time:
<6>[  605.149335] Call trace:
<6>[  605.149336]  __switch_to+0xc8/0x120
<6>[  605.149339]  __schedule+0x334/0x930
<6>[  605.149342]  schedule+0x64/0x120
<6>[  605.149344]  __rt_mutex_slowlock+0xc4/0x150
<6>[  605.149346]  rt_mutex_slowlock_locked+0xb0/0x230
<6>[  605.149348]  rt_mutex_slowlock+0x88/0xf0
<6>[  605.149350]  __rt_mutex_lock_state+0x64/0xa0
<6>[  605.149352]  _mutex_lock_blk_flush+0x58/0x80
<6>[  605.149356]  _mutex_lock+0x28/0x40
<6>[  605.149358]  report_error_detected+0x34/0x120
<6>[  605.149361]  report_frozen_detected+0x30/0x40
<6>[  605.149363]  pci_walk_bus+0x68/0xc0
<6>[  605.149366]  pcie_do_recovery+0x154/0x1d0
<6>[  605.149368]  aer_process_err_devices+0xec/0x110
<6>[  605.149372]  aer_isr+0x154/0x1d0
<6>[  605.149374]  irq_thread_fn+0x34/0xa0
<6>[  605.149376]  irq_thread+0x188/0x280
<6>[  605.149379]  kthread+0x16c/0x1a0
<6>[  605.149381]  ret_from_fork+0x10/0x18

Fix:
Perform synchronize_irq() in EDMA de-init, only if there are any
descriptors pending processing. This acts as a WAR to avoid dead
lock during probe and any other shared interrupt handling in device
lock scope.

Bug 4414241

Change-Id: Ie389ebc3b32d6a1121c154ab60d08aa6c3c53e36
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3042451
(cherry picked from commit 2453fa2e09eafd23570f25091c5c1f9d92ed2aa4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3047403
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-09 18:14:40 -08:00
Mikko Perttunen
0be6f60c9e gpu: host1x: Handle CDMA wraparound when debug printing
During channel debug information dump, when printing CDMA
opcodes, the circular nature of the CDMA pushbuffer wasn't being
taken into account, sometimes accessing past the end. Change
the printing to take this into account.

Bug 4398831
Bug 4386806

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I3a24da2c310e9414882f7cabbbda5158b6da00a2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3034409
Reviewed-by: Rongrong Zhou <rongrongz@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-09 02:54:43 -08:00
Mahesh Kumar
8103bafdc3 dce: handle DCE_ADMIN_CMD_VERSION failure
Fail on DCE_ADMIN_CMD_VERSION command failure.
Also print dce-kmd admin version for comparison.

Bug 4264719

Change-Id: Ifde58147fd0ed3c311e0d342d664ab446a7eda78
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3046184
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-08 19:54:30 -08:00
Jian-Min Liu
a067801e61 nvidia-oot: Clean-up check ACK by NV_BUILD_KERNEL_OPTIONS
Control ACK feature only by CONFIG_TEGRA_SYSTEM_TYPE_ACK from
kernel-build. This can make build nv-oot clearer.

Bug 4405208

Change-Id: Ia3f036f9a59b829d762ced15b01f4342720f291d
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027994
Reviewed-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-08 06:47:23 -08:00
Laxman Dewangan
7d931ef33d camera: vi: Use proper APIs from v4l2 for Linux6.6
The earlier porting of the driver for Linux 6.6 is not
matching with the previous kernel implementation.

Few V4L2 APIs have been deprecated from Linux 6.6. and
added the new APIs.

Use the correct API available from Linux6.6 for the
replacement as the previous supported kernel APIs.

For reference, the changes in core kernels are:
  The device argument is added in the API v4l2_async_nf_init() with
  commit b8ec754ae4c5 ("media: v4l: async: Set v4l2_device and subdev
  in async notifier init") in Linux 6.6.

  The API is removed with commit bda8953e8c3e ("media: v4l: async: Drop
  v4l2_async_nf_parse_fwnode_endpoints()") in Linux 6.6

Bug 4346767

Change-Id: I94877a8fe6a6764fc3c913fea7ecdbfdc7c793d6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3042993
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-31 06:00:28 -08:00
Laxman Dewangan
8df8cfc8e6 v4l2: Add conftest for v4l2 API changes in Linux 6.6
Add conftest to determine the API changes/deprecation
for V4L2 in Linux6.6. The changes are:
  The device argument is added in the API v4l2_async_nf_init() with
  commit b8ec754ae4c5 ("media: v4l: async: Set v4l2_device and subdev
  in async notifier init") in Linux 6.6.

  The API is removed with commit bda8953e8c3e ("media: v4l: async: Drop
  v4l2_async_nf_parse_fwnode_endpoints()") in Linux 6.6

Bug 4346767

Change-Id: Ia225be8b4fb17003ec2899e872573dc05e9fde87
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3042900
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-30 08:53:39 -08:00
Laxman Dewangan
0679fc19d6 rtcpu: Port IVC bus driver to use iosys-map utils
The IVC driver in core kernel has been changed to accept
VADDR via iosys_map structure. Use the proper iosys map
utils to pass address when doing the tegra_ivc_init().

Bug 4346767

Change-Id: I416f6fbbea7605da9ae729e2076d10fb6360525d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039534
Tested-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-24 22:48:05 -08:00
Laxman Dewangan
1729ced2bf camera: channel: Make sure csi channels are initailized before access
There is case where CSI channels are initialized later before
accessing it. In this case, it can cause NULL pointer access.

Add checks before accessing it in the function
tegra_channel_find_linked_csi_subdev().

Bug 4346767

Change-Id: I752898af4b2164540cbd2e071ee36af4cd5f6fde
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039709
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-24 11:51:56 -08:00
Laxman Dewangan
b2dcbdbc93 ufs: Use UFS headers directly if it is public header in core kernel
The UFS headers are moved to include as public headers from
Linux 5.19. Use the headers directly from the core kernel
instead of making the copy in drivers-private for nvidia-oot.

Keep copy of only those drivers which are still in the
drivers folder in core kernel.

This will help to align all definition which driver needs to
sync with core driver available in the core kernel.

Bug 4346767

Change-Id: I1e59e32bee0f89591e50fff2f61e35d468f4207c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039312
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-24 11:51:51 -08:00
Laxman Dewangan
4a9d0efd2c tegra-ivc: Limit usage of drivers to aon only
The legacy tegra IVC driver is used only in AON driver.
Rest of client are already moved to the IVC drier from
core kernel.

Move the driver to AON folder and limit the usage of
driver to AON driver only.

Bug 4430467

Change-Id: Id0e9aeaf3415d33812556b82bfb0adc4941b2f41
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039674
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-24 05:59:11 -08:00
Laxman Dewangan
eefd72e5be nvmap: Get rid of inclusion of tegra-ivc header
IVC calls are moved to core kernel and hence it
is no required to include tegra-ivc headers.

Bug 4430467

Change-Id: Icc87f2899fb469e18587873c65eeca60b4547ea7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039673
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-24 05:59:06 -08:00
Laxman Dewangan
de1d1eee4a pva: Get rid of inclusion of tegra-ivc header
IVC calls are moved to core kernel and hence it
is no required to include tegra-ivc headers.

Bug 4430467

Change-Id: Icc6b145682e1b24a51c172044fd7baee3921511f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3039672
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-24 05:59:01 -08:00
Laxman Dewangan
dfff2311c3 ufs: Port UFS driver to use headers from core kernel for Linux 6.7
Some of the drivers-private headers are now available in public
header path in core kernel. Use such headers directly from the
core kernel for Linux 6.7 and later instead of copying it in the
nvidia-oot/include/driver-private.

Also match the quirks definition with core kernel for Linux 6.0 and
later.

Bug 4346767

Change-Id: If994466a3cabc6df8eeb0e97018f48d48a8306dc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038489
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Tested-by: Vishwaroop A <va@nvidia.com>
2023-12-20 16:41:16 -08:00
Laxman Dewangan
b282d21004 UFS: Port driver-private headers for the Linux 6.7
The headers of UFS got changed for Linux 6.7 over Linux 6.1.
Make the copy the of the headers and modify according to
Linux 6.7 core kernel headers.

Note: These headers will be removed and use directly from
core kernel in follow on cleanups.

Bug 4346767

Change-Id: I12cb4eac187bb3414efcc5bfb6246a322e917094
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037996
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
2023-12-19 19:39:52 -08:00
Laxman Dewangan
1a45e366db pwm: Use conftest to find if pwm_ops has config
Use conftest to determine if pwm_ops struct has config
callback or not. This call back is deprecated from
commit 0829c35dc534 ("pwm: Drop support for legacy drivers")
in Linux 6.0.

Bug 4387902

Change-Id: I83e0ad5edcb44ad9f84e7573287c338bd1137176
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037919
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 19:39:12 -08:00
Laxman Dewangan
702def895c camera: Use conftest to find if v4l2_async_notifier_* present
use conftest to determine if APIs v4l2_async_notifier_*()
present or not.
These APIs have been renamed in
commit 3c8c15391481 ("media: v4l: async: Rename async
nf functions, clean up long lines") in Linux 5.16

Bug 4387902

Change-Id: Id2023543f487c3867ef4e140662141803ac63f04
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037918
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 19:39:07 -08:00
Laxman Dewangan
b40e45535e camera: Use conftest to find if media_entity_remote_pad() present
Use conftest to determine if media_entity_remote_pad()
function is present or not

This function is removed by commit b2e44430b634 ("media:
mc-entity: Rename media_entity_remote_pad to media_pad_remote_pad_first")
in Linux 6.0

Bug 4387902

Change-Id: I816016731ac44a3c093438310f8e60bd166f2fd7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037917
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 19:39:02 -08:00
Laxman Dewangan
90e2ac6ac7 media: nv_hawk_owl: Use conftest instead of linux version
use conftest to determine if function i2c_new_device() present
or not instead of the Linux version.
This function is removed with commit 390fd0475af5
("i2c: remove deprecated i2c_new_device API")

Bug 4387902

Change-Id: Ie69a06b486745416ec104fea8359403e589a5cc7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037916
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 19:38:57 -08:00
Laxman Dewangan
e49269929e media: ar1335: Use conftest to determine remove return type
Use conftest to determine the return type of .remove() of
struct i2c_driver is int or void type instead of kernel version.

The return type got changed with commit ed5c2f5fd10d ("i2c:
Make remove callback return void")

Bug 4387902

Change-Id: Iceb50b0c9cd78fefb35aef0831b1ea7e8f74d619
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037915
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 19:38:51 -08:00
Laxman Dewangan
32516f4878 serial: Use conftest to find if uart_ops has set_termios has const arg
Use conftest to determine if set_termios of struct uart_ops
has const type argument or not. The argument type is changed
from commit bec5b814d46c ("serial: Make ->set_termios() old
ktermios const") in Linux 6.1

Bug 4387902

Change-Id: I175aac51ac2c2b99b9eedc69260ccb6b0c38571e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037040
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 04:03:48 -08:00
Laxman Dewangan
b7cbe748e1 pwm: Use conftest to find if pwm_ops has config
Use conftest to determine if pwm_ops struct has config
callback or not. This call back is deprecated from
commit 0829c35dc534 ("pwm: Drop support for legacy drivers")
in Linux 6.0.

Bug 4387902

Change-Id: Ic56d5955e5cfd15acb664fc11b549b9b91277182
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037039
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 04:03:13 -08:00
Laxman Dewangan
9974fda1d2 spi: Use conftest to find return type of .remove of spi_driver struct
Use conftest to determine the return type of .remove() of
struct spi_driver is int or void type instead of kernel version.

The return type got changed with commit a0386bba7093
("spi: make remove callback a void function") in Linux 5.18

Bug 4387902

Change-Id: I644fe0610a76fbc4cea547c3295670599ae919bc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037038
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 04:03:08 -08:00
Laxman Dewangan
49988960d1 gpio: Use conftest to find if struct gpio_chip has of_node
Use conftest to determine if struct gpio_chip has
the of_node member or not.

The of_node from struct gpio_chip is removed from commit 70d0fc4288da
("gpiolib: Get rid of not used of_node member") in Linux 6.2

Bug 4425688

Change-Id: Ie69000a1677b9af3ccfdf6c43140a75dad33d8cc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037037
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-19 04:03:03 -08:00
Laxman Dewangan
1eab65044c i2c: Use conftest to find return type of .remove of i2c_driver struct
Use conftest to determine the return type of .remove() of
struct i2c_driver is int or void type instead of kernel version.

The return type got changed with commmit ed5c2f5fd10d ("i2c:
Make remove callback return void")

Bug 4387902

Change-Id: Id64466613156e0efaf6cce7492d70cab1c1d1af7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3036799
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-18 22:09:58 -08:00
Jon Hunter
2ce1e851bb misc: bluedroid: Use conftest for pde_data
Conftest has a test for checking if the 'pde_data' function is lower
or upper case. Update the bluedroid driver to use conftest for this.

Bug 4346767

Change-Id: I1f54b9b560b171a6b2ccf5304e13f5e76fbbfacb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3035747
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-17 08:00:49 -08:00
Laxman Dewangan
6627276f82 {isc,cdi}_mgr: Use gpiod_count() for getting number of GPIO
The API gpiod_count() returns the number of the GPIO in given
property. This API is supported from long and continue to
support.

Use this API instead of of_gpio_named_count() which is deprecated
from Linux 6.2.

Bug 4387902

Change-Id: I2b647b8645e0dd8ff743515ac999fe035e636dc5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3035503
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-15 15:06:09 -08:00
Jon Hunter
75c908beb6 media: camera: Remove devm_fwnode_get_gpiod_from_child
The function devm_fwnode_get_gpiod_from_child() was removed in Linux
v6.2. This function has always called devm_fwnode_gpiod_get_index() and
this was first introduced in Linux v5.5. Therefore, remove
devm_fwnode_get_gpiod_from_child() and always use
devm_fwnode_gpiod_get_index().

Bug 4346767

Change-Id: Ie94a20ffda67569962fa48d7104c8ff706be079d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3034777
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-15 14:54:12 -08:00
Jon Hunter
891d093a76 media: camera: Use conftest for devnode
Use confest in the camera CDI and ISC drivers to determine if the
'devnode' function pointer under the class structure to take a const
device struct.

Also fix the commit in conftest that introduced the change to the
'devnode' function pointer.

Bug 4346767

Change-Id: I66de39e079c13219e0ff3e7154c0e7ceb609a29d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3034763
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-15 14:54:00 -08:00
Mahesh Kumar
b0a2e7383c platform: dce: Make dce suspend a late suspend
Once DCE suspend is called it disables the DCE controller
later DCE controller can be brought out of reset only by MB2RF,
But if after dce suspend due to any reason system suspend fails, mb2rf
will not be called. And the display will not work.

This patch makes DCE suspend a late suspend. So, it reduces the race
condition window.

Bug 3826630

Change-Id: I7a75996d820addf4e8d694efbb3cf05d00185fea
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3021775
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-15 06:20:19 -08:00
Narayan Reddy
a6f14311c9 nvethernet: Disable NETIF_F_HW_VLAN_CTAG_TX for EQOS
When TSO is enabled with NETIF_F_HW_VLAN_CTAG_TX then VLAN performance
is compromised in the case of EQOS. This is because the hardware fails
to insert a VLAN tag for every segment. To address this issue,
NETIF_F_HW_VLAN_CTAG_TX is temporarily disabled, allowing Network Stack
to handle the insertion of VLAN tags during transmission.

Bug 4290860

Change-Id: Iee24898b5b32d91e19b4eae12c7e076e014d6674
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008932
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Tonny Liang <tonnyl@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-15 06:15:44 -08:00
Paritosh Dixit
816c428c79 device-tree: generic: Fix issue in use of objtree
Fix issue in building the DTBs when KERNEL_OUTPUT and KERNEL_HEADERS
are specified as different directories in the OOT modules' Makefile.
In that case, srctree is set to KERNEL_HEADERS and objtree is set to
KERNEL_OUTPUT, and device-tree Makefile should be able to handle the
case when srctree and objtree are specified as different directories.

Bug 4295120

Change-Id: I164288e957f791d8e8072926743d0a80e23da9cb
Signed-off-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033099
(cherry picked from commit 75363cdd58)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033928
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-14 10:26:09 -08:00
Laxman Dewangan
a5ffb3104d firmware: bpmp: Remove unused dummy driver
Tegra bpmp dummy driver was added as placeholder
to generate the module KO while the main driver
was disabled due to build error.

The build issue with main driver is now fixed and dummy
driver is no more used. Remove the dummy implementation
of BPMP IVC driver.

Bug 4346767

Change-Id: I5b3553738e709f05784cafdba6d22d8710353034
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033439
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-14 02:33:56 -08:00
Laxman Dewangan
e290576b47 Makefile: Remove CONFIG_TEGRA_GPIO_LEGACY_DISABLE
Remove config CONFIG_TEGRA_GPIO_LEGACY_DISABLE which
was added to avoid the build of few modules due to
API changes in core kernel from Linux 6.2.

ALl modules drivers are updated to support the Linux 6.2
and above.

Bug 4346767

Change-Id: I81c56eda77bfb42f56f01216c721f410dac39d77
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031555
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-14 02:19:53 -08:00
Laxman Dewangan
f777618023 bludroid_pm: Enable build of driver with Linux6.2
The build of driver is disabled from Linux 6.2 due to
changes in core kernel where API of_get_named_gpio_flags()
has been removed.

This APIS is removed in commit 40fc56ee608cdb ("gpiolib:
of: remove of_get_gpio[_flags]() and of_get_named_gpio_flags()")
in Linux 6.2.

Add support to use the new APIs for Linux 6.2 onwards.

Bug 4346767

Change-Id: I573c13398945db93d2a3a3db81bfd53f1be159f6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031550
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-14 02:19:38 -08:00
Jon Hunter
d5391a25ab drivers: Enable -Wmissing-prototypes
The compiler option -Wmissing-prototypes is being enabled globally in
the upstream Linux kernel and this causes build failures for various
drivers. The build failures occur because either the driver is missing
an include file which has the prototype or because the function is not
declared statically when it should be (ie. there are no external users).

Fix the various build failures and enable -Wmissing-prototypes to
prevent any new instances from occurring. Note that the only driver that
is not fixed at the moment is rtl8822ce due to large number of failures
and so build this with '-Wno-missing-prototypes' for now, which is not
different to how it was being compiled prior to this change.

Bug 4404965

Change-Id: Ie5572d23659e0346fa035d645d9043b0a6da5fdc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027488
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-14 02:07:24 -08:00
Johnny Liu
07c7a27765 platform: tegra: camera: skip clock scaling
If clock scaling operation is not permitted or provided, we just skip
it and consider the operation as successful.

Bug 4406840

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ibde850ec451dbe79a02a78a31e6befd5ec527ca6
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032000
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Alexander Allen <arallen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-13 21:54:04 -08:00
Johnny Liu
70cacb897d Revert "video: tegra: support clock set rate for vi5"
This reverts commit 53ebc773be.

Reason for revert: vi_tpg_capture failure

Bug 4406840

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I4db8be2ad9787b1b43f5bb184ef487eb83d19a48
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030708
Reviewed-by: Alexander Allen <arallen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-13 21:54:00 -08:00
Laxman Dewangan
2179242ba9 nvidia-oot: Remove unused CONFIG_TEGRA_IVC_LEGACY_DISABLE
The export of config CONFIG_TEGRA_IVC_LEGACY_DISABLE is
no more required as all drivers which was disabled from
build due to IVC API changes are ported to handle the
new APIs from core kernel.

Remove unused config CONFIG_TEGRA_IVC_LEGACY_DISABLE.

Bug 4346767

Change-Id: I7830f962735b293f9c78cd03acfa1413f9eb4cff
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033025
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-13 05:40:06 -08:00
Laxman Dewangan
bf1cfb5fb4 rtcpu: capture-ivc: Enable build for Linux 6.2
The driver of rtcpu/capture-ivc is modified to support
the new APIs of the IVC from core kernel using conftest.

Enable build of this driver.

Bug 4346767

Change-Id: I427bb8b7d5dad02e805d0707fb67e45772fead31
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033024
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-13 05:40:01 -08:00
Laxman Dewangan
00f3315faf misc: Enable build of mods module
Build of mods module disabled due to not supporting legacy IVC
from Linux 6.2.
Enable build of mods.

Bug 4346767

Change-Id: I4eccc831dba2820467f5d455bb5cba387f879b23
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3033023
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-13 05:39:56 -08:00
Mikko Perttunen
281f74c323 gpu: host1x: Increase pushbuffer slots to 1023
To avoid CDMA waiting when many jobs are queued, double
pushbuffer size.

Bug 4386806

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I80841fdec96ba3c203c070bcc1f5c7fd1c3a7cbc
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032829
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-12 16:35:15 -08:00
Laxman Dewangan
c3e3d472a3 clk-bpmp: Use conftest to determine clk_hw_determine_rate_no_reparent()
The clock ops needs the determine_rate() callback in clock ops if
set_parent() is needed by commit 33b70fbc4f815f("clk: Introduce
clk_hw_determine_rate_no_reparent()") and commit 326cc42f9fdc3
("clk: Forbid to register a mux without determine_rate")
from Linux 6.4.

Add conftest method to determine if clk_hw_determine_rate_no_reparent()
present.

Bug 4346767

Change-Id: I8e4573e1a045fc76b7741aaa88b571574f14377e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032325
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-12 09:29:15 -08:00
Laxman Dewangan
1fc6fc17f2 firmware: bpmp-tegra186-hv: Enable build for Linux 6.2
The build of bpmp-tegra186-hv was disabled due to change
in core kernel to move the Tegra BPMP IVC to IOSYS-MAP
framework by commit 4c1e0a97351a5e ("firmware: tegra:
bpmp: Use iosys-map helpers") in Linux 6.1.

Bug 4346767

Change-Id: I704ef454192613ade8e97f708e997fa74a186b7b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031778
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Tested-by: Akhil R <akhilrajeev@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-12 09:20:11 -08:00
Laxman Dewangan
103ebd91bc isc_gpio: Enable build of isc_gpio for Linux 6.2
The build of isc_gpio driver was disabled for Linux 6.2
as there is change in API in core kernel.

Enable build of isc_gpio driver with appropriate
modification in driver for Linux 6.2.

Bug 4346767

Change-Id: Id520231dcfb2daa8efeb9eeb8db8d7d18c7ecb74
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031554
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-12 09:16:16 -08:00
Laxman Dewangan
c94946a0bb isc_mgr: Enable build of isc_mgr for Linux 6.2
The build of isc_mgr driver was disabled for Linux 6.2
as there is change in API in core kernel.

Enable build of isc_mgr driver with appropriate modification
in driver for Linux 6.2.

Bug 4346767

Change-Id: Ieb7d55d6068d1d893fcc8bfac7aa71c2ba1dece9
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031553
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-12 09:16:09 -08:00
Laxman Dewangan
6fcf226b96 cdi_gpio: Enable build of cdi_gpio for Linux 6.2
The build of cdi_gpio driver was disabled for Linux 6.2
as there is change in API in core kernel.

Enable build of cdi_gpio driver with appropriate
modification in driver for Linux 6.2.

Bug 4346767

Change-Id: If2d67a87a37bb868b217346d0dbfb5d56e4617e1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031552
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-12 09:16:00 -08:00
Laxman Dewangan
9174561352 cdi_mgr: Enable build of cdi_mgr for Linux 6.2
The build of cdi_mgr driver was disabled for Linux 6.2
as there is change in API in core kernel.

Enable build of cdi_mgr driver with appropriate modification
in driver for Linux 6.2.

Bug 4346767

Change-Id: I6315482b593926e1382a0ffc9ca8aa9a27740d11
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031551
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-12 09:15:52 -08:00
Laxman Dewangan
3e87d0a8ea conftest: Add test to find if gpiochip_add() present
Add conftest  Determine if function gpiochip_find()
present or not.

The function gpiochip_find() is removed from
commit 2654521d774f9 ("gpiolib: remove
gpiochip_find()") in Linux 6.7

Bug 4346767

Change-Id: I5b7c4b87c327ac69c8ff735940d086352665de2f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031549
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-11 11:07:18 -08:00
Laxman Dewangan
05cf355367 conftest: Add test to find if struct gpio_chip has of_node
Determine if struct gpio_chip has the of_node member or not.

The of_node from struct gpio_chip is removed from
commit 70d0fc4288dab ("gpiolib: Get rid of not
used of_node member") in Linux 6.2

Bug 4346767

Change-Id: I5ebc86beb7ce527f2e38693dd59907cdd3a8fcf9
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031548
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-11 11:07:08 -08:00
Laxman Dewangan
5f188c61f5 conftest: Add test to find of_gpio_named_count()
Add conftest to find if of_gpio_named_count()
function is present.

This APIS is removed in commit c7835652a85df ("gpiolib: of: stop
exporting of_gpio_named_count()") in Linux 6.2.

Bug 4346767

Change-Id: Ia8339a4f0c7bfcbeed922c7045330ae2ba83f96c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031547
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-11 11:06:57 -08:00
Laxman Dewangan
f78f96de71 conftest: Add test to find of_get_named_gpio_flags()
Add test to find out if of_get_named_gpio_flags() present
or not.

This APIS is removed in commit 40fc56ee608cdb ("gpiolib:
of: remove of_get_gpio[_flags]() and of_get_named_gpio_flags()")
in Linux 6.2.

Bug 4346767

Change-Id: I522097bdeb5fbd5a545b981a1a9b3f6f7ecb2806
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031546
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-11 11:06:47 -08:00
Bruce Xu
05c4920731 nvmap: fix black screen issue
when support for numa aware heaps, see change
https://git-master.nvidia.com/r/c/linux-nv-oot/+/3003219,
the heap allocation will return error if the first allocation
failed, but in fact, it should allocate memory in next carveout
heap. This caused the black screen.
continue to allocate when allocation failed.

Bug 4385243

Change-Id: I828e8db54d187ae79e1e2fb9ecdf9b0a89051cef
Signed-off-by: Bruce Xu <brucex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031367
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Tuomas Kulve <tkulve@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-11 11:05:10 -08:00
Bitan Biswas
b185ee48be nvidia-oot: enable noble crypto
Enable crypto build with noble

Change-Id: Ib4ab440fdd75a3663c717992c3c80eae1fe77f88
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3011180
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-11 10:48:03 -08:00
Bitan Biswas
2a9ce8d0e2 crypto: conftest struct crypto_engine_ctx support
struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Change-Id: I23e8f054719f399877b11f42d355f940d8e07186
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026513
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-11 10:47:58 -08:00
Bitan Biswas
48e59e9d42 crypto: fix crypto_engine_ctx build error
struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Change-Id: I2c00f99251e90f0dd3641703ba24a2a8ac23e927
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994021
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-11 10:47:47 -08:00
Jon Hunter
f748f0ef72 scsi: ufs: Use conftest for suspend differences
In Linux v5.19, the arguments to the 'suspend' function pointer defined
in the structure 'ufs_hba_variant_ops' was updated to add a 'status'
argument. Add a new test to the conftest script that checks if the
'suspend' function has a 'status' argument and use the definition
created by conftest to select which structure member is used.

This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.

Bug 4221847

Change-Id: I05011a4a1aff7c54cd258147d6519b696904a2de
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996214
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-11 01:17:26 -08:00
Jon Hunter
54e01347ea scsi: ufs: Clean-up headers
Clean-up the UFS headers by adding a new top-level header for ufshcd.h,
ufshci.h and unipro.h that will include the appropriate header
depending on kernel version. This saves replicating the kernel version
check for every source file that includes these headers.

Note that the ufshcd-pltfrm.h header is identical between v5.15, v5.16
and 6.1 kernels and so remove the duplicated versions of this header and
just use a common header for all kernel versions.

Bug 4221847

Change-Id: I0e0ba2f4389af7e34ab62e3131141405d87aeeb1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996211
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-11 01:17:15 -08:00
Jon Hunter
19a85c968c spi: tegra124-slave: Fix callback prototype
The Tegra124 SPI slave driver declares a prototype for the function
tegra_spi_slave_register_callback() that does not exist. The correct
function name is tegra124_spi_slave_register_callback() and so fix the
prototype accordingly. Move the prototype to an actual header because
this is the correct place for defining prototypes for other drivers to
reference. This was caught by enabling the compiler flag
-Wmissing-prototype.

Bug 4404965

Change-Id: I765723d0a5ed6369784e5f6c480a6f03500659f3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027487
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-09 04:43:12 -08:00
Laxman Dewangan
2884c4b380 i2c: Use conftest to find if i2c driver probe has i2c_device_i2d arg
Determine if probe of struct i2c_driver has i2c_device_id argument
or not.

This argument get removed from commit 03c835f498b5 ("i2c: Switch
.probe() to not take an id parameter") form Linux 6.3.

Bug 4346767

Change-Id: Ife73b29946246fce5bfcedcabe15992432d86348
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030809
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-08 18:37:09 -08:00
Laxman Dewangan
de4295cfa6 tegra_hv: Use conftest to find if class_attribute function has const type arg
Determine if struct class_attribute function has const type
"struct class_attribute" argument or not.

Modified the argument by change
commit 75a2d4226b5371 ("driver core: class: mark the struct class
for sysfs callbacks as constant") for Linux 6.3

Bug 4346767

Change-Id: I2a36025b23af80761faf1da406481731289eedd2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030734
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-08 18:36:58 -08:00
Laxman Dewangan
1ae406004f drm/tegra: Use conftest for drm_debugfs_remove_files()
The function drm_debugfs_remove_file() has extra argument in
Linux 6.7 with change commit 8e455145d8f16 ("drm/debugfs: rework
drm_debugfs_create_files implementation v2")

Use conftest to findout this new argument presence.

Bug 4346767

Change-Id: I77346a85c8841f915f4a8f3f471af1e03240fa62
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028576
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-08 18:28:23 -08:00
Manish Bhardwaj
54e431bcc9 ivc: fix ivc driver issue for noble kernel
Bug 4377196

Change-Id: I4acc2d4e419f0ee95be760910f27da592369875c
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026287
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Akhil R <akhilrajeev@nvidia.com>
2023-12-08 18:18:55 -08:00
Manish Bhardwaj
912dda68d1 hv: port tegra hypervisor driver on noble kernel
Bug 4377196

Change-Id: Idecaac1915c444fe04c40f0e848e36bd3f90b78f
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3018492
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Akhil R <akhilrajeev@nvidia.com>
2023-12-08 18:18:50 -08:00
Jon Hunter
739b5f1c7b net: hv-net: Remove driver source
The Tegra HV Net driver has been deprecated and so remove the source for
the driver.

Bug 3832837

Change-Id: I7eae6e92bf0c95e96ed4eca08b857105325f2238
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2867180
Reviewed-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-08 18:09:32 -08:00
Laxman Dewangan
0ed8b4e22a pci: Use conftest to find if probe of pci_epf_driver has ID arg
Use conftest to determine if the struct pci_epf_driver probe
API has ID argument or not

The additional argument as ID is added in probe() of the
struct pci_epf_driver with commit 081c715dfd5054 ("PCI:
endpoint: Pass EPF device ID to the probe function")
in Linux 6.4.

Bug 4346767

Change-Id: I004d1d3a8df922c0534c5631baa26f82f6992e4d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030052
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:21:31 -08:00
Laxman Dewangan
3839cecd1c media: Use conftest to find if v4l2_async_subdev_nf_init() present
Use conftest to find if function v4l2_async_subdev_nf_init() is present
or not.

In Linux 6.5, with change commit bda8953e8c3e7e ("media: v4l: async:
Drop v4l2_async_nf_parse_fwnode_endpoints()"), added the function
v4l2_async_subdev_nf_init() and dropped v4l2_async_nf_init().

Bug 4346767

Change-Id: I345db2acf0a07d05722611d9eacc7134aff0c35a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028766
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:21:26 -08:00
Laxman Dewangan
5f77d6d51a media: Use conftest to find if enum v4l2_async_match_type present
Use conftest to determine if the 'enum v4l2_async_match_type'
has the "TYPE" in its name.

In Linux 6.5, with change commit 7a2259fc5182b ("media: v4l: async:
Rename V4L2_ASYNC_MATCH_ macros, add TYPE_"), the enum names has "TYPE" also.

Bug 4346767

Change-Id: I863da8496337d4003188b654673c67cdb3eef155
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028745
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:21:21 -08:00
Laxman Dewangan
234ba9c75f media: Use conftest to find if struct v4l2_async_connection present
Use conftest to find if struct v4l2_async_connection present
or not. The struct v4l2_async_subdev is renamed to struct
v4l2_async_connection with change commit adb2dcd5f2d49d3
("media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection")
in Linux 6.5

Bug 4346767

Change-Id: Id15c8ce747a8642b7831b79f45e15f26e95744b2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028744
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:21:16 -08:00
Laxman Dewangan
350a86106e sound: Use conftest to find if snd_soc_dai_ops has probe callback
Use conftest to find if struct snd_soc_dai_ops have the probe()
callback or not. In Linux 6.5, commit 516ee7009ff20 ("ASoC:
tegra: merge DAI call back functions into ops") added probe()
callback into the struct snd_soc_dai_ops.

Bug 4346767

Change-Id: If292f10d6e52a2cf80c7700ff7aba5805041531f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028743
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:21:11 -08:00
Laxman Dewangan
bf46060d1e pci: Use conftest to find if pci_enable_pcie_error_reporting() present
Use conftest to find if API pci_enable_pcie_error_reporting()
is present. This API is dropped from Linux 6.5 with change
commit 7ec4b34be42345 ("PCI/AER: Unexport
pci_enable_pcie_error_reporting()")

Bug 4346767

Change-Id: Ib0037544b4480b37c0ed6ac8b9ef9aef6ae82619
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028742
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:21:06 -08:00
Laxman Dewangan
f9f8b37e74 pci: Use conftest to find if pci_disable_pcie_error_reporting() present
Use conftest to find if API pci_disable_pcie_error_reporting()
is present. This API is dropped from Linux 6.5 with change
commit 69b264df8a41282 ("PCI/AER: Drop unused
pci_disable_pcie_error_reporting()")

Bug 4346767

Change-Id: Idcaf36e4215a874c70f7457a46fd875f1349b121
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028741
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:21:01 -08:00
Laxman Dewangan
1e9fc00bc2 pci: Use conftest to find if pci_epc_event_ops struct has core_deinit
Use the conftest to find if the struct pci_epc_event_ops has
core_deinit as callback function. This callback is added
by Nvidia in core kernel.

Bug 4346767

Change-Id: I399197917ac7746ca367f55b9dc4e3a5bd79f073
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028740
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:20:56 -08:00
Laxman Dewangan
a757343f2e tty: Use conftest to find if tty_operations::write() has argument u8 ptr
Use conftest to find if the function write() of tty_operations
struct has the argument as U8 pointer data type. This datatype
is changed from Linux 6.5 with commit 69851e4ab8feeb ("tty:
propagate u8 data to tty_operations::write()")

Bug 4346767

Change-Id: I49f9ef844da0dee8e209e597989f1d179a2a804b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028632
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-07 18:19:27 -08:00
Laxman Dewangan
537a307ffd i2c: Use conftest to find if i2c_driver struct has new_probe
Use conftest method to find if i2c_driver struct has the
member as new_probe. This is dropped from Linux 6.6 with
commit 5eb1e6e459cf ("i2c: Drop legacy callback .probe_new()")

Bug 4346767

Change-Id: I10b539dfa1bb363ad6cf5fc28a9ebd0ca4e88b48
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028631
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-07 18:19:16 -08:00
Joshua Cha
21a661c58f nvsciipc: fix mixed license
Bug 4405013

Change-Id: I4c37c89b7dcc4c25e0b4e568b8d68d1a73c424f7
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028570
Reviewed-by: Kurt Yi <kyi@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 08:13:27 -08:00
Jon Hunter
086fc6d3da drm/tegra: Avoid kernel version checks
Instead of using kernel version checks in the Tegra DRM driver for the
tegra_fb_ops structure, just check if the appropriate definition is
defined and if so use it. This fixes building the Tegra DRM driver
against some 3rd party kernels that include backports from upstream.

Note that this also aligns the driver closer to the upstream code by
using the same definitions that the upstream driver uses.

Bug 4346767

Change-Id: I8cb40899d0bf7cdc233e5f4cee7b6afb6f12d015
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027832
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-07 08:10:01 -08:00
Mallikarjun Kasoju
88e674112a ufs: Fix issues seen ufs sc7
Asynchronous errors are seen during
SC7 suspend. These are caused by
mphy clock programming which is not present
on FPGA.

Bug 4373698
Bug 4373689

Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Change-Id: I0a56e77cc99f5e2015904fa69ba1cac52753f8f5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027611
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 08:09:40 -08:00
Mohan Kumar
a9562a1c27 ASoC: tegra: avoid enabling aud_mclk during init
Enabling the aud_mclk clock during initialization of drivers
was done for T30 chip due to some external dependencies, now
it is not required for latest version of chips and also due
to this aud_mclk is kept always ON. Add check to avoid enabling
aud_mclk clock other than T30

Bug 4373898

Change-Id: If341b1b73051c5572c5551bf6d4659fab7a116d2
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015891
(cherry picked from commit 7ffd0c9cfa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019489
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 07:53:53 -08:00
Ankit patel
af229f6fbf tty: wch: Fix C-CERT coverity issues
C-CERT coverity issues fix for wch tty serial driver

CID:679040
CID:678956
CID:678957
CID:679059
CID:678985
CID:679029
CID:679037
CID:679049

Bug 3959323

Change-Id: If34f5490b80d19162df60235fc74f0427a0caf07
Signed-off-by: Ankit patel <anpatel@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2992040
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2023-12-07 07:39:42 -08:00
Laxman Dewangan
3013b107c1 sound: soc: Use conftest to find if asoc_simple_xxx renamed
In Linux v6.7, commit b5a95c5bf6d69 ("ASoC: simple_card_utils.h: convert
not to use asoc_xxx()") add new APIs to convert asoc_simple_xxx() to
simple_util_xxx().

Use the conftest to find if soc_snd_util_xxx() present.

Bug 4346767

Change-Id: I3b282eb08d51c997760cc0b9752438c94e3caae5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028578
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 22:43:00 -08:00
Laxman Dewangan
e225408ff7 sound: Use conftest to find if snd_soc_xxx() present
In Linux 6.7, with change
commit 1d5a2b5dd0a8d2b2 ("ASoC: soc.h: convert asoc_xxx() to snd_soc_xxx()")
asoc_xxx() calls are replaced by snd_soc_xxx() calls.

Use conftest to findout this change.

Bug 4346767

Change-Id: I8cd5ac5a5befa83c139dbf8f6253840a97c1d4be
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028577
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 22:42:49 -08:00
Laxman Dewangan
ed5ae591c9 nvmap: Use conftest to find get_rcu_file() argument type
The argument of get_rcu_file() get changed to pointer
type of file handle form Linux 6.7 with
commit 0ede61d8589cc ("file: convert to SLAB_TYPESAFE_BY_RCU").

Use conftest to findout this new argument type.

Bug 4346767

Change-Id: I18943421dd4c2ed4f409ce071b182e68d3d393e6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028575
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 22:42:39 -08:00
Laxman Dewangan
3b457a1293 nvmap: Use conftest to finding shrinker_alloc() presence
Use conftest to find whether shrinker_alloc() is present
or not.
In Linux v6.7, commit c42d50aefd17 ("mm: shrinker: add infrastructure for
dynamically allocating shrinker") added this API.

Bug 4346767

Change-Id: Ida724bb31d3c4db650b3a5742c5972f984cb9152
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028574
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 22:41:07 -08:00
Laxman Dewangan
b0bfc4b801 pwm: Use conftest to findout if pwm_ops has owner
Use conftest method to find out the pwm_ops has
owner member or not. The owner member from pwm_ops
struct has been removed from Linux 6.7 with
commit 384461abcab6 ("pwm: Manage owner assignment
implicitly for drivers").

Bug 4346767

Change-Id: I7b98463b16d400a656a79db3a0c7aa645f20085d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028573
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 22:40:57 -08:00
Jon Hunter
91c367006c drm/tegra: Drop version check
The version check in the Tegra DRM GEM code is not necessary because
this is a fix to the code and so remove the version check.

Bug 3820317

Change-Id: Ib7f5bd2bdb61af50e17399079aa2439bf8d352b1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026925
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-06 16:36:37 -08:00
Jon Hunter
d0e427c6e1 drivers: Use conftest for vm_flags
The conftest script has a test for checking if the vm_area struct has a
const vm_flags member. So enable this test and use the definition
generated in the appropriate drivers.

Bug 4374520

Change-Id: I0e7bd105fe8a821b0af23c0a5553b8d4468fa8c4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026924
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 16:36:32 -08:00
Jon Hunter
732a0db90e conftest: Add devm_tegra_core_dev_init_opp_table_common
Add a test to the conftest script to check if the function
devm_tegra_core_dev_init_opp_table_common() is present in the kernel and
use the definition generated in the host1x driver.

Bug 3820317

Change-Id: Id04da12c8ced7129141036aaa26375113c544374
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026923
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 16:36:21 -08:00
Jon Hunter
591949a2f1 drm/tegra: Always use devm_pm_runtime_enable
The function devm_pm_runtime_enable() has been supported since Linux
v5.15 and so always use this function.

Bug 3820317

Change-Id: I805f3c681822b4bfc825b671c54a7dea2199f351
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026922
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-06 16:36:11 -08:00
Jon Hunter
e7020ca405 arm64: Remove Tegra194 device-tree
Tegra194 is no longer supported and all testing has now been disabled,
so remove the Tegra194 device-tree.

Bug 4047365

Change-Id: Id6b65f6761652785e04cc850fd4b4ef6ed8cc20e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3017348
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-06 16:22:12 -08:00
Akhil R
999c622729 conftest: Add tegra-prod.h to header file list
Add tegra-prod.h to the list of headers which will set the required
macro. The macros can be used inside the drivers to identify the
presence of these header files.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Change-Id: Idc14b5aa5a1b1045243512799639f46b07559768
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028293
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-06 08:42:02 -08:00
Ketan Patil
a1b11bd735 video: tegra: nvmap: Use pfn_is_map_memory instead of pfn_valid
CONFIG_HAVE_ARCH_PFN_VALID has been removed by following upstream patch:
https://lkml.kernel.org/linux-mm/20210527174913.GJ8661@arm.com/T/
Hence kernel k5.15 onwards uses pfn_valid definition from mmzone.h,
while k5.10 uses pfn_valid definition from init.c
pfn_valid definition for k5.10 has last call to memblock_is_map_memory
which is missing in current definition of pfn_valid. Hence bad pte fault
is seen for carveout buffers. Use pfn_is_map_memory instead of pfn_valid
as it ultimately calls memblock_is_map_memory.

Bug 4343935

Change-Id: I27d1057ed566220e2d8b9a4482022f5318df65ff
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027601
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-05 14:40:44 -08:00
Laxman Dewangan
a433b16870 nvadsp: Build driver for noble kernel
Build adsp driver for noble kernel.

Bug 4374520

Change-Id: I8363e59c6b4469b2d5039b5aa4c97c1c28fabc5f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026352
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-05 04:50:54 -08:00
Laxman Dewangan
c8262cbee1 nvadsp: os: Fix the argument of iommu_map() for Linux 6.3
There is additional argument added in iommu_map() from Linux6.3.
Pass the proper argument from the drier who are using this
APIs. Using conftest methods for differentiating whether
additional argument is needed or not.

Bug 4374520

Change-Id: I0844beb3338a2d5237832867547d05da91a41a5f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026351
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-05 04:50:46 -08:00
Jon Hunter
cd4dce2c20 net: nvethernet: Use conftest for Linux v6.6
In Linux v6.6, the header net/page_pool.h was split into two headers;
net/page_pool/helper.h and net/page_pool/types.h. Use the conftest
script to detect which of these headers are present and generate compile
time definitions for including the appropriate headers.

Bug 4346767

Change-Id: I389ce5b867a1efd867b8392bb21383784c1b4af6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026553
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-04 20:00:23 -08:00
Shobek Attupurath
8ce7eeacda rtl8822ce: Remove pr_debug redefinition
Issue: pr_debug is redfined to printk causing unwanted
       log prints in dmesg

Fix: Remove pr_debug redefintion in rtl8822ce driver

Bug 3844473
Bug 4392253

Change-Id: I3aed85b8d61a764a74c59c2eef5f1f3dd60dd14a
Signed-off-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2813193
(cherry picked from commit 83a4b1f131209e357f80015fba386286f2888423)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2827187
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3024490
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
(cherry picked from commit ee4493d7bf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026069
2023-12-04 19:58:40 -08:00
Ketan Patil
34b155546f video: tegra: nvmap: Take lock before dmabuf's refcount
When a buffer is allocated using NvRmMemHandleAllocAttr, the refcount
will be as followed
- Handle's ref count: 2
- Ref's dup count: 1
- Dmabuf's ref count: 1
When this buffer is freed, which calls nvmap_free_handle_from_fd and
then it calls nvmap_free_handle. In nvmap_free_handle, we decrement
ref's dup count, so the ref's dup count become 0. As dup count is 0,
we decrement dmabuf's ref count as well, so dmabuf's refcount become 0,
which would call nvmap_dmabuf_release, which would set dmabuf to NULL.
But that action is not immediate sometimes, hence we can lead to null
pointer dereference. dmabuf is set to NULL in dmabuf release by taking
handle's lock, so use the same one while reading dmabuf's refcount.

Bug 4229654

Change-Id: I23c34f70f6ae21b5bbae3512800197727c7dcbf4
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3021442
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-04 19:56:25 -08:00
Mika Liljeberg
32d04368c4 firmware-api: fix typos in the documentation
Fix a few typos in the HSP-VM mailbox message documentation.

Jira CAMERASW-14056

Change-Id: I02018f48740555b35f4a089c0d055f343b1623ea
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/3010011
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015131
(cherry picked from commit 13d815a11a3f9715aed8d9f1ab8f6e0208e630e0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3018634
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-02 05:52:06 -08:00
Nitin Kumbhar
7791c1b400 nv-virtio-poc: add android vm loopback support
Loop back data received by BE console driver to Android VM.

Bug 4206871

Change-Id: I06b9523c9898a205cecae1eb35c04c458a3ddc1d
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3021893
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-30 12:54:26 -08:00
Praveen AC
1828a377ac drivers:media: Fix imx390 & imx185 probe issue.
Due to "mingain - 1" & "minexp - 1" during probe time observing
out of range whenever gain or exp is set "0" as min in DT.
Instead doing "maxgain + 1" & "maxexp + 1" to fix the probe.

Bug 4142996
Bug 4189361
Bug 4386912

Change-Id: I103e87b293079dadcd16b91f8e329ec9f938208c
Signed-off-by: Praveen AC <pac@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020375
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-30 00:03:33 -08:00
Jeremy Alves
cab50fa964 Lan743/6.6 vanilla driver of Lan7431 from upstream
Adding 6.6.1 unmodified Lan7431 driver to nvidia-oot

This is the unmodified driver from
  K6.6.1
without our NVIDIA specific changes

Bug 4370581

Signed-off-by: Jeremy Alves <jalves@nvidia.com>
Change-Id: If3b71feb2e758432953d4f10d8c70f0c23da0c45
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3016139
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-29 16:45:03 -08:00
Jon Hunter
243e54b69e net: nvethernet: Use conftest for Linux v6.3
Add tests to conftest for detecting if the mii_bus structure has the
read_c45 and write_c45 function pointers and use the definitions
generated by conftest in the nvethernet driver.

This fixes support for nvethernet in 3rd party Linux kernels that have
backported the mii_bus structure changes to their kernel that have a
kernel version prior to Linux v6.3.

Bug 4014315

Change-Id: I5ae98fc5077337286921da6e9347df9781565a70
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3018212
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-11-29 05:19:41 -08:00
Rakesh Goyal
8ca3fa5c51 nvethernet: Skip PHC update if no config change
Issue: Restarting of PTP daemon updates
the current system time in MAC registers.

Fix: Configure PTP registers only if PTP daemon
sends updated configuration. If the configuration
is same continue with earlier registers update.
System time will be set in the MAC registers at
the time of ptp_early_init and the 1st ptp
daemon ioctl to set HW configuration.

Bug 4259584

Change-Id: Ied0eec498cfd4283b71797abf3b272d19998064f
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994409
(cherry picked from commit e774e69777d92a7136ec6c61571e677bfbde6ebf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010369
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-29 05:11:45 -08:00
sreeharim
99fa3ab6b2 PVA : Fix Symbol Parsing
- Fix symbol parsing when only instance
  symbol is requested without any other
  symbols

Jira PVAAS-12256

Change-Id: I62ef666cb3bd58446368647fe076a35681eb4f3e
Signed-off-by: sreeharim <sreeharim@nvidia.com>
(cherry picked from commit 90da2ee6d1b982a44861b9851b1abaa8d3026285)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2964780
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3021539
Reviewed-by: Omar Nemri <onemri@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Krish Agarwal <krisha@nvidia.com>
2023-11-28 01:53:14 -08:00
Jon Hunter
45cee87fa7 gpu/host1x: Use conftest for Linux v6.3
Use conftest to determine if the uevent() function pointer in the
bus_type structure has a const dev argument. This fixes the build for
Linux kernels prior to Linux v6.3 that include the upstream change that
changed the arguments to this function.

Bug 4014315

Change-Id: I1553e08c951be9dd27141c273bf91be38dd954a6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019964
(cherry picked from commit 5fe2e2aacc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020430
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-11-28 01:52:18 -08:00
Johnny Liu
aae5cf4cb7 video: tegra: support clock set rate for nvcsi
Dynamic frequency scaling based on the current workload is implemented
in the tegra_camera_platform driver. Registering the clock set rate
callback to allow the tegra_camera_platform driver to set the device
clock rate.

Bug 4374126

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iae8fb7952a2ad3b07c1506bfd12b709a252ec2f2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020547
Reviewed-by: svcacv <svcacv@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-11-27 18:26:33 -08:00
Johnny Liu
d25c39fa00 video: tegra: support clock set rate for isp5
Dynamic frequency scaling based on the current workload is implemented
in the tegra_camera_platform driver. Registering the clock set rate
callback to allow the tegra_camera_platform driver to set the device
clock rate.

Bug 4374126

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Ic4e65428c25a2b95b975e88d3865d995549e8ca7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020545
Reviewed-by: svcacv <svcacv@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-11-27 18:26:21 -08:00
Johnny Liu
53ebc773be video: tegra: support clock set rate for vi5
Dynamic frequency scaling based on the current workload is implemented
in the tegra_camera_platform driver. Registering the clock set rate
callback to allow the tegra_camera_platform driver to set the device
clock rate.

Bug 4374126

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I6c594155a15f8f7b3e4377c0340c287155a77aee
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020537
Reviewed-by: svcacv <svcacv@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-11-27 18:26:12 -08:00
Johnny Liu
57a82628aa platform: tegra: camera: add operation callback
The Nvhost-related APIs have been deprecated and are no longer
supported since our migration from K510 to K515. Therefore, the camera
platform driver should refrain from using "nvhost_*" functions to set
the clock rate.

Integrate the common operation callback interface into the
tegra_camera_dev_info structure. This modification allows individual
drivers to achieve clock set rate operations by registering the
callback and completing the implementation.

Bug 4374126

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: Iebed7cc974f5dbdabddded3c84d0925de3a6c4f9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020535
Reviewed-by: svcacv <svcacv@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-11-27 18:26:01 -08:00
Sagar Tyagi
dabc1e4945 MAX96751: Bridge Driver
Minor change for error correction and coverity issue
in HDMI serializer driver.

Change-Id: I15166a82605a367d91d269c877518bc70cf6c8a8
Signed-off-by: Sagar Tyagi <satyagi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020409
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-27 18:25:32 -08:00
Yi-Wei Wang
1c865fdba3 thermal: add thermal trip event cooling device
This change adds a cooling device driver to notify the user space of the
thermal trip event. To avoid having user space process poll the
cooling state, a sysfs node is exposed that supports blocking reads.
The driver also supports a timeout (in milliseconds) for blocking reads
which can be done by writing the value to thermal_trip_event_block node
before reading. The blocked user space process will be woken up when the
cooling device becomes active or times out.

Bug 4261645
Bug 1688327

Signed-off-by: Yi-Wei Wang <yiweiw@nvidia.com>
Change-Id: Ic89406ba2713e5bc8f3806d6cfeb462601c73a7d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015652
(cherry picked from commit 856471d64f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019439
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-24 15:40:20 -08:00
Jon Hunter
5615d9f984 drm/tegra: Add conftest for fd/handle conversions
Add tests to the conftest script to check if the functions
drm_gem_prime_fd_to_handle() and drm_gem_prime_handle_to_fd() are
exported in the Linux kernel and use the definition generated by
conftest for compiling the Tegra DRM driver.

Bug 4346767

Change-Id: I56b76617bf4644a5851484dd7d4eecd3888f3b5b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015723
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-11-24 15:24:38 -08:00
Laxman Dewangan
fc748158cc nvmap: dynamically allocate nvmap page pool shrinker
Dynamically allocate the nvmpa pagepool shrinker as
shrinker register and unregister get removed from
Linux 6.7.

Based on change:
***
commit 86298d8b8ceacc17d0192cd6412d2773ff51b27f
Author: Qi Zheng <zhengqi.arch@bytedance.com>

    md/raid5: dynamically allocate the md-raid5 shrinker
***

Bug 4346767

Change-Id: Idbe40753f79481d85e5899d2905039860d39dc5e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020001
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:43 -08:00
Laxman Dewangan
4ef0a332e8 nvmap: Pass proper argument for get_file_rcu() for Linux 6.7
The function get_file_rcu() has modification in its
argument to take the pointer to pointer of file from
Linux 6.7 from below change
***
commit 0ede61d8589cc2d93aa78230d74ac58b5b8d0244
Author: Christian Brauner <brauner@kernel.org>

    file: convert to SLAB_TYPESAFE_BY_RCU
***

Add support for Linux 6.7.

Bug 4346767

Change-Id: I1e2e005900c7d2c57ac487b5f6ac5e1fcbfbafe7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3020000
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:38 -08:00
Laxman Dewangan
9de2a9da7f pwm: Drop owner from pwm_ops for Linux 6.7
The member "owner" is removed from the pwm_ops from
Linux 6.7 onwards with below change.
***
commit 384461abcab6602abc06c2dfb8fb99beeeaa12b0
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

    pwm: Manage owner assignment implicitly for drivers
***

Remove this member.

Bug 4346767

Change-Id: I7893c29641d15ac7ef56d29625a2df696872c659
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019999
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:33 -08:00
Laxman Dewangan
b17be80108 gpu: drm: Add root argument on drm_debugfs_remove_files() for Linux 6.7
Add root argument in the call drm_debugfs_remove_files() for Linux 6.7
as per below change from mainline:

***
commit 8e455145d8f163aefa6b9cc29478e0a9f82276e6
Author: Christian König <ckoenig.leichtzumerken@gmail.com>

    drm/debugfs: rework drm_debugfs_create_files implementation v2
***

Bug 4346767

Change-Id: Iadc878d66b093fd72b4524052dee9dbb24e82c1d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019998
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:27 -08:00
Laxman Dewangan
36d1775879 sound: soc: Avoid uses of asoc_xxx()
From Linux 6.7, the asoc_xxx() is replaced by the various
function. Use the appropriate functions.

***
commit 1d5a2b5dd0a8d2b2b535b5266699429dbd48e62f
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

    ASoC: soc.h: convert asoc_xxx() to snd_soc_xxx()

Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

    ASoC: simple_card_utils.h: convert not to use asoc_xxx()

***

Bug 4346767

Change-Id: Ie3945f3997d745df8223fd31c1386a3db44e6ceb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019997
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:22 -08:00
Laxman Dewangan
1d4285fa30 dce: Use kstrtobool instead of strtobool
The function strtobool() is implemented inline with
using kstrtobool(). The function strtobool() is removed
from mainline Linux 6.7 with below change.

**
commit 9bf2850c9170b52a6ab052085feced55effa78ef
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

    kstrtox: remove strtobool()
**

Use the kstrtobool() now.

Bug 4346767

Change-Id: I3b63684bcfc5621a3833b62061ea1cfdf44b3865
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019996
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:18 -08:00
Laxman Dewangan
83d4b9f0bb Makefile: yocto: Add header_install rule for Yocto
Yocto makefile needs the installation of all public
headers. Add Makefile and rule to achieve this.

Bug 4365981

Change-Id: I9a7c718d8e581be9e55066fb51689e7f949e517e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3016409
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Mayank Pandey <maypandey@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
2023-11-15 15:37:14 -08:00
Ketan Patil
343f9e764f video: tegra: nvmap: Add NUMA aware query heap API
Add a new API to query the heap params for an input heap present on the
given input numa node. e.g. User may specify to query heap information
of GPU carveout on numa node 0 or numa node 1 etc.

Bug 4231517

Change-Id: I9622828b6a28984564b4c7f17b88b4d38bbd4684
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010795
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-15 09:34:12 -08:00
Ketan Patil
3d11a320cc video: tegra: nvmap: Add support for numa aware heaps
Add support for numa aware nvmap heaps:
- Add carveout node for gpu1 which is gpu carveout on numa node 1.
- Add numa_node_id property in nvmap_heap and nvmap platform carveout
structures to hold numa id info i.e. numa node on which this heap is
created.
- gpu0 and gpu1 would have same heap bit but different numa node ids.
- Update buffer allocation function: If user specify the allocate from
a particular numa node instance of the heap, then allocate from that
particular instance. By default input to numa node id is NUMA_NO_NODE,
so in this case, iterate over heaps on all numa nodes to satisfy the
allocation request e.g. if user specify to allocate from gpu carveout
without specifying any particular numa node, then iterate over all gpu
carveouts on all numa nodes, whichever has sufficient free memory,
allocate from thatheap instance.
- Update debugfs functions to pass heap type and numa id, so that
debugfs info is fetched from correct heap instance.

Bug 4231517

Change-Id: I77ba4b626546003ea3c40d09351d832100596d9a
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3003219
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-15 09:34:07 -08:00
Mikko Perttunen
6a8e488b48 drm/tegra: virt: Add WAR for retrieving clock rate
Normal clock APIs are not necessarily accessible from guest,
so as a workaround, use the BPMP debugfs interface to determine
engine rate when calculating usage.

Bug 4090576

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: Ibbffb5700162aec18317c43e9b7e03e3b8227be2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2988957
(cherry picked from commit c8dc95c94b6c1077a6ff3e51cacef4913387828f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2991018
Reviewed-by: Johnny Liu <johnliu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-15 04:12:11 -08:00
Laxman Dewangan
64b442b57d pci-epf: probe has additional APIs for Linux 6.6
The probe callback of driver "pci_epf_driver" has additonal
APIs as pci_epf_device_id for Linux 6.6 and above.

Add this new argument for Linux 6.6 and above.

Bug 4374520

Change-Id: Ie744a98947b895fce83f1a9df598ddbee2c3d138
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014991
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-13 06:44:46 -08:00
Laxman Dewangan
9ce6a359f7 nvscic2c-pcie: Use vm_flags_set() APIs for Linux 6.3 and later
The VM flag is set via the API vm_flags_set() provided from core kernel
from Linux 6.3 and above. Use this API to set the flag.

Bug 4374520

Change-Id: If09eea1d03de8ac05aac692879a52f0f74eca251
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014990
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-13 06:44:41 -08:00
Laxman Dewangan
dc69c0b58a pcie: Enable core_deinit only when core has implemented it
The core_deinit callback is the Nvidia internal feature
which is not upstreamed yet. Enable the call back from
OOT modules only when core have implemented this callback.

Bug 4374520

Change-Id: Iee2b92b7d70326ea3ce99ce6f6600d27f1e2896b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014989
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-13 06:44:36 -08:00
Laxman Dewangan
a1cc281c17 nvscic2c-pcie: epc: Drop calling of error reporting for Linux 6.6
The API pci_disable_pcie_error_reporting() is dropped from
Linux 6.6. Remove the calling of this APIs for Linux 6.6
and later.

Bug 4374520

Change-Id: Iabb66dda70e6fe3a70be5ff14199b32b9c0ca3fa
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014988
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-13 06:44:31 -08:00
Laxman Dewangan
091c57a1d8 nvscic2c-pcie: Use proper enum for drv_mode
Use the proper enum name for returning the value from
pci_client_get_drv_mode().

Instead of returning NVCPU_MAXIMU, return DRV_MODE_MAXIMUM
which is more appropriate return value.

Bug 4374520

Change-Id: I172fe7bdc926fcacbde6428db59c17bec57f7443
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014987
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-13 06:44:26 -08:00
Laxman Dewangan
b91f49ff74 nvscic2c-pcie: Fix the argument of iommu_map() for Linux 6.3
There is additional argument added in iommu_map() from Linux6.3.
Pass the proper argument from the drier who are using this
APIs. Using conftest methods for differentiating whether
additional argument is needed or not.

Bug 4374520

Change-Id: Ica06363802d31be317675a50194f34670521e023
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014986
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-13 06:44:22 -08:00
Mika Liljeberg
3c1c8cb672 firmware-api: document HSP-VM mailbox commands
Updated the documentation for HSP-VM mailbox messages and the
related definitions and data structures.

Jira CAMERASW-14056

Change-Id: I734c921647fe0408b89adbfce82d4bc471a2c315
Reviewed-on: https://git-master.nvidia.com/r/c/tegra/camera/firmware-api/+/3007234
Signed-off-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3009887
(cherry picked from commit 9662cc3124f3a9ed6bdc9b4aca46480c7f43f162)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3011732
Reviewed-by: Matti Ryttylainen <mryttylainen@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-11 02:42:32 -08:00
Johnny Liu
21c6a3b3e8 drm/tegra: Send ICC requests with peak_bw
When BPMP BWMGR receives ICC avg_bw requests from different memory
clients, it will sum up all avg_bw values together and use it to
determine the final EMC frequency.

Transitioning to ICC peak_bw requests will cause BPMP to evaluate
the bandwidth requirements of each memory client individually,
selecting the maximum bandwidth request from among all the clients
to determine the final EMC frequency.

This modification prevents excessive memory bandwidth allocation
when multiple host1x clients collaborate for data processing.
Currently, host1x clients request the full theoretical 100% data
bandwidth, even though the system typically doesn't fully utilize
that amount during runtime.

To address the issue of insufficient memory bandwidth when multiple
host1x clients are used together, we can reduce the boost_up_threshold
value of cactmon DFS. This adjustment ensures that when actual memory
bandwidth utilization surpasses the specified boost-up bandwidth
threshold, EMC frequency will be further scaled by one step further
to alleviate the problem.

Bug 4328471

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I826a374666f38718652c5cae449c0aadeabfbdb5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996561
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-11 02:28:29 -08:00
Laxman Dewangan
af936f3b1e tegra_hv: Enable driver for Linux 6.2 and above
The driver tegra_hv was disabled for the Linux 6.2 and above
due to build failure. All build issue is fixed and re-enabling
driver for all kernel.

Bug 4370594

Change-Id: I9edef01a4f204b138204d583d9f7f61dc6112a25
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3014191
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-10 14:14:12 -08:00
Manish Bhardwaj
57f8639acb nvidia: hv_pm: send resume req to userspace
Using this patch instead of sending suspend req
in resume path, sending resume req.

Bug 4212516

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I7eb29cf4ad24952f4efe4c56fd58006f6ebf1071
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2771827
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3012461
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
2023-11-10 14:09:39 -08:00
Laxman Dewangan
1dd2ef3473 prod: Add support for legacy and next-gen prod via config
Instead of using the Linux kernel version, use the
configs coming from core kernel to find out whether
legacy or next-gen prod configuration method is used.

This will help on porting changes on any kernel and
configuring via core kernel configs.

Bug 3389584

Change-Id: I19c242c573dd63c7dbecbf87d4ba807857dcf4fb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3013911
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-10 08:33:42 -08:00
Laxman Dewangan
3d64e97531 prod: rename config TEGRA_PROD_ENABLE to TEGRA_PROD_LEGACY
To support the new method of the prod implementation,
rename the older config TEGRA_PROD_ENABLE to
TEGRA_PROD_LEGACY for differentating with new implementation.

Bug 3389584

Change-Id: I3ae0f3f32b4fdfa05ce352963cb0dcdbea489ec2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3013910
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-10 08:33:37 -08:00
Nikhil Jagdale
936d6f0db3 virtio: Modify the offset of Android RAM IPA
We have switched over to swiotlb based reserved memory that is currently
using a IPA region starting at 3GB offset. Use this new offset when
determing the shift when accessing Android virtio memory.

Jira HYP-15395

Change-Id: I79d87d3b6ef33168ff14a136dfbbcf59eb1d0dfb
Signed-off-by: Nikhil Jagdale <njagdale@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3006921
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-10 08:08:52 -08:00
Laxman Dewangan
9647ab8386 tegra_hv: Update driver to support Linux 6.2 and above
The IO sys map helpers are used for the IVC communication
on Linux 6.2 and above. Update drivers to have compatible
with IVC APIs of Linux 6.2 and above.

Bug 4370594

Change-Id: I0528248efa9edc3d4962f7b62d8ebfe2ac0a027e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3013108
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-09 10:19:12 -08:00
Laxman Dewangan
c8a83b5692 tegra_hv: Use const in class attributes APIs for Linux 6.4 and above
The callback APIs of class attribute are updated on
Linux6.4 and above to have the constant type pointer
argument.

Update the driver compatible with the updated APIs
for Linux 6.4 and above.

Bug 4370594

Change-Id: Ic06cb0d752797bb272f110aa0bb35bdd3afa1e6a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3013107
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-09 10:15:03 -08:00
Shubhi Garg
515f73fcd6 rtc: update VRS RTC IRQ to system hwclock
Update RTC IRQ occurred to system hwclock by adding
rtc_update_irq in irq handler.

Bug 3740696

Change-Id: I1ad9c05f759b5b11f8f212eb91a709f1b3625336
Signed-off-by: Shubhi Garg <shgarg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2764942
(cherry picked from commit 1926f478143bb1962da8748b6cbc9c094c37a7a4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2999458
(cherry picked from commit 608ed39528a9735ad229067c8f9c6853d9a33a6e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3007049
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-08 09:23:52 -08:00
Laxman Dewangan
4c575fd98c firmware: Add dummy tegra BPMP driver for Linux 6.6
Tegra BPMP driver is not supported with Linux 6.6. However,
the packaging of the embedded-linux required this driver.
Add dummy driver to complete the packaging till packaging
files have solution to complete with and without this
driver.

Bug 4346767

Change-Id: I113019d6ef25860511683b326f9c90d6ff1e99a3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3012092
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-08 03:30:57 -08:00
Laxman Dewangan
b6dcd3d9ce virt: Add tegra_hv dummy driver for Linux 6.6
Tegra HV driver is not getting build with the
Linux 6.6. While it is being fixed, add dummy
variant for this driver to make the packaging
success.

Bug 4346767

Change-Id: I58e9817fc6ebc8bf61a932ed7f1917225ac6a54e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3012091
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-08 03:30:52 -08:00
Anubhav Rai
c3ddb23392 camera: lt6911uxc update with Shadow EDID
Update the Lontium driver to flash shadow EDID
to lt6911uxc chip. This will ensure that the requested
resolution through the application is flashed to the
chip and the source is forced to select the
requested resolution only.

bug 4266018
bug 4301203
bug 4168489
Signed-off-by: Anubhav Rai <arai@nvidia.com>

Change-Id: I945a9658b52c82956535f3710312d317c0098be7
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3007702
Reviewed-by: Praveen AC <pac@nvidia.com>
Reviewed-by: Anubhav Rai <arai@nvidia.com>
Reviewed-by: Ankur Pawar <ankurp@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Anubhav Rai <arai@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-08 03:27:10 -08:00
Gautham Srinivasan
66c26d1ac3 drivers: aon: Add AON Echo driver
Add AON echo driver. This driver creates data_channel file in sysfs
which is used to communicate between CCPLEX and AON.

Bug 4296173

Change-Id: Id790fc4076205e16509611f7fa07ffc073491227
Signed-off-by: Gautham Srinivasan <gauthams@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2954202
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-07 22:41:27 -08:00
Manish Bhardwaj
a64e56d31d nvidia: port vsc driver's device-tree binding files
Bug 4231381

Change-Id: Ib26c24ce8fea89444d1d2d5313eec04f1505bb93
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3011283
Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-07 09:57:51 -08:00
Laxman Dewangan
9b0b059027 crypto: Enable few of crypto driver for Linux6.6
Enable crypto drivers which are getting build properly
with Linux 6.6 and keep disabling the compilation of
build failed drivers.

Bug 4346767

Change-Id: Ia5c67759b6c839a874ea9e38d601c722596e0008
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010492
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-06 12:05:00 -08:00
Manish Bhardwaj
ef1bc16ac8 nvidia: fix memory leak issue in vse driver
fixing memory leak driver by using krealloc API
to reutilize the previously allocated memory

Bug 4334915

Change-Id: I4ad88f32152da7527033679b1eed414574cad4e5
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010174
Reviewed-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-06 11:58:25 -08:00
Manish Bhardwaj
d6745fa37c nvidia: handle zero size sha buffer gracefully
Using this patch we are fixing below issue on debug build
where sg_init_one API is getting failed when zero sha buffer
size is passed leading to below crash.
[  144.941668] kernel BUG at include/linux/scatterlist.h:163!
[  144.941673] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT_RT SMP
[  144.941766] CPU: 7 PID: 6178 Comm: nvvse_test Tainted: G        W  O       6.1.9-rt7-debug-rt-tegra #1
[  144.941769] Hardware name: p3710-0010 (DT)
[  144.941770] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  144.941773] pc : sg_init_one+0x3c/0xb0
[  144.941782] lr : 0xffff800001515e30
[  144.941788] sp : ffff800022723cd0
[  144.941788] x29: ffff800022723cd0 x28: 0000aaaabfca6300 x27: ffff0000af767850
[  144.941791] x26: ffff0000af766900 x25: ffff800001518460 x24: ffff0000afd8f700
[  144.941792] x23: ffff0000af767a00 x22: ffff0000afe81d80 x21: 0000000000000010
[  144.941794] x20: 0001000000000010 x19: ffff800022723d88 x18: 0000000000000000
[  144.941796] x17: 0000000000000000 x16: ffff800001515410 x15: 0000aaaabfca6300
[  144.941798] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[  144.941800] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
[  144.941802] x8 : ffff0000afd8f780 x7 : 0000000000000000 x6 : 0000000000000010
[  144.941804] x5 : 0000000000000010 x4 : ffff0000afe81d80 x3 : 0000000000000000
[  144.941806] x2 : 0000000000000000 x1 : 00007fffffffffff x0 : 0001000000000000
[  144.941808] Call trace:
[  144.941810]  sg_init_one+0x3c/0xb0
[  144.941813]  0xffff800001515e30
[  144.941815]  __arm64_sys_ioctl+0xa8/0x100
[  144.941820]  invoke_syscall+0x40/0x120
[  144.941825]  el0_svc_common.constprop.0+0x40/0xf0
[  144.941828]  do_el0_svc+0x28/0xd0
[  144.941830]  el0_svc+0x28/0x90
[  144.941835]  el0t_64_sync_handler+0xc0/0xd0
[  144.941837]  el0t_64_sync+0x164/0x168
[  144.941841] Code: b240bbe1 eb01029f f9000e7f 54000049 (d4210000)

Bug 4355159

Change-Id: I1855c418ee41725f93b3c8d27bb0becbfcbfbcad
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010170
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2023-11-06 11:58:20 -08:00
Manish Bhardwaj
558dc30461 nvvse: handle failure case gracefully
Observing the crash in failure path when already
freed memory is being used. handling the failure
scenario gracefully with this patch.

Bug 4355159

Change-Id: Ie39dab2572067eab0c139323ed86bae9490a8878
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008896
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
2023-11-06 11:58:15 -08:00
Manish Bhardwaj
84443ed555 crypto: increase buffer support for SHA operation
Using this patches we are making below changes:-
1. increase buffer support for SHA operation from 1MB to 2MB
2. get the IVC DB during init call.
3. remove scatter gather implementation and allocate memory
   in single call.

Bug 4141706

Change-Id: I6fc7f9bc564da31e458cf18230dedd3f21a284fa
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2984692
Reviewed-by: Advaya Andhare <aandhare@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008976
2023-11-06 11:58:10 -08:00
1391 changed files with 211674 additions and 90068 deletions

25
.gitignore vendored Normal file
View File

@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: GPL-2.0
#
# Use command 'git ls-files -i --exclude-standard' to ensure that no
# tracked files are ignored.
#
*.o
*.o.*
*.a
*.s
*.ko
*.so
*.so.dbg
*.mod.c
*.i
*.symtypes
*.order
*.patch
modules.builtin
Module.symvers
*.dwo
*.mod
*.cmd
*mods.dtb*

125
.nspect-allowlist.toml Normal file
View File

@@ -0,0 +1,125 @@
#SPDX-License-Identifier: GPL-2.0-only
#Copyright (c) 2024, NVIDIA Corporation. All rights reserved.
version = "1.0.0"
#Filter out all packages for NSPECT-2SC5-5SJZ program ONLY
[[oss.excluded.directories]]
paths = ['drivers/block/',
'drivers/bus/',
'drivers/clk/',
'drivers/devfreq/',
'drivers/gpu/',
'drivers/mfd/',
'drivers/net/',
'drivers/nvpps/',
'drivers/pinctrl/',
'drivers/pwm/',
'drivers/reset/',
'drivers/soc/',
'drivers/tty/',
'drivers/virt/',
'drivers/bluetooth/',
'drivers/c2c/',
'drivers/cpuidle/',
'drivers/firmware/',
'drivers/hwmon/',
'drivers/media/',
'drivers/misc/',
'drivers/nv-p2p/',
'drivers/nv-virtio/',
'drivers/platform/',
'drivers/ras/',
'drivers/rtc/',
'drivers/spi/',
'drivers/usb/',
'drivers/watchdog/',
'drivers/bmi088/',
'drivers/clink/',
'drivers/crypto/',
'drivers/gpio/',
'drivers/i2c/',
'drivers/memory/',
'drivers/mtd/',
'drivers/nvpmodel/',
'drivers/pci/',
'drivers/power/',
'drivers/regulator/',
'drivers/scsi/',
'drivers/thermal/',
'drivers/video/tegra/camera/',
'drivers/video/tegra/dc/',
'drivers/video/tegra/host/capture/',
'drivers/video/tegra/host/isp/',
'drivers/video/tegra/host/nvcsi/',
'drivers/video/tegra/host/nvdla/',
'drivers/video/tegra/host/vi/',
'drivers/video/tegra/nvmap/',
'drivers/video/tegra/tsec/',
'drivers/video/tegra/virt/',
'Documentation/',
'include/',
'configs/',
'scripts/',
'sound/',
'tools/']
comment = 'Not used by PVA or not used by PVA in Production'
nspect_ids = ['NSPECT-2SC5-5SJZ']
#Filter out all packages for NSPECT-86XH-KQRC program ONLY
[[oss.excluded.directories]]
paths = ['drivers/block/',
'drivers/bus/',
'drivers/clk/',
'drivers/devfreq/',
'drivers/gpu/',
'drivers/mfd/',
'drivers/net/',
'drivers/nvpps/',
'drivers/pinctrl/',
'drivers/pwm/',
'drivers/reset/',
'drivers/soc/',
'drivers/tty/',
'drivers/virt/',
'drivers/bluetooth/',
'drivers/c2c/',
'drivers/cpuidle/',
'drivers/firmware/',
'drivers/hwmon/',
'drivers/media/',
'drivers/misc/',
'drivers/nv-p2p/',
'drivers/nv-virtio/',
'drivers/platform/',
'drivers/ras/',
'drivers/rtc/',
'drivers/spi/',
'drivers/usb/',
'drivers/watchdog/',
'drivers/bmi088/',
'drivers/clink/',
'drivers/crypto/',
'drivers/gpio/',
'drivers/i2c/',
'drivers/memory/',
'drivers/mtd/',
'drivers/nvpmodel/',
'drivers/pci/',
'drivers/power/',
'drivers/regulator/',
'drivers/scsi/',
'drivers/thermal/',
'drivers/video/tegra/camera/',
'drivers/video/tegra/host/',
'drivers/video/tegra/nvmap/',
'drivers/video/tegra/tsec/',
'drivers/video/tegra/virt/',
'Documentation/',
'include/',
'configs/',
'scripts/',
'sound/',
'tools/']
comment = 'Unused packages in Display Serdes'
nspect_ids = ['NSPECT-86XH-KQRC']

196
BUILD.bazel Normal file
View File

@@ -0,0 +1,196 @@
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
load("//build/kernel/kleaf:kernel.bzl", "kernel_module")
package(
default_visibility = [
"//visibility:public",
],
)
filegroup(
name = "oot.includes",
srcs = glob([
"include/**/*.h",
]),
)
filegroup(
name = "host1x.includes",
srcs = glob([
"drivers/gpu/host1x/include/**/*.h",
"drivers/gpu/host1x-fence/include/**/*.h",
]),
)
filegroup(
name = "nvmap.includes",
srcs = glob([
"drivers/video/tegra/nvmap/include/**/*.h",
]),
)
filegroup(
name = "pci.includes",
srcs = glob([
"drivers/pci/endpoint/functions/*.h",
]),
)
kernel_module(
name = "nvoot",
srcs = glob(
["**"],
exclude = [
".*",
".*/**",
"*.bazel",
"**/*.bzl",
],
) + [
"//hwpm:hwpm_headers",
"//nvidia-oot/scripts/conftest:conftest_headers",
],
outs = [
# keep sorted
"drivers/block/tegra_oops_virt_storage/tegra_hv_vblk_oops.ko",
"drivers/block/tegra_virt_storage/tegra_vblk.ko",
"drivers/bluetooth/realtek/rtk_btusb.ko",
"drivers/bus/tegra-aocluster.ko",
"drivers/cpuidle/cpuidle-debugfs.ko",
"drivers/cpuidle/cpuidle-tegra-auto.ko",
"drivers/crypto/tegra-hv-vse-safety.ko",
"drivers/crypto/tegra-nvvse-cryptodev.ko",
"drivers/crypto/tegra-se-nvrng.ko",
"drivers/crypto/tegra/tegra-se-kds.ko",
"drivers/crypto/tegra/tegra-se.ko",
"drivers/devfreq/governor_pod_scaling.ko",
"drivers/devfreq/tegra_wmark.ko",
"drivers/firmware/tegra/ivc_ext.ko",
"drivers/firmware/tegra/tegra_bpmp.ko",
"drivers/gpio/gpio-max77851.ko",
"drivers/gpu/drm/tegra/tegra-drm.ko",
"drivers/gpu/host1x-emu/host1x-emu.ko",
"drivers/gpu/host1x-fence/host1x-fence.ko",
"drivers/gpu/host1x/host1x.ko",
"drivers/gpu/host1x-nvhost/host1x-nvhost.ko",
"drivers/hwmon/f75308.ko",
"drivers/hwmon/ina232.ko",
"drivers/i2c/busses/i2c-nvvrs11.ko",
"drivers/i2c/busses/i2c-tegra-slave-byte.ko",
"drivers/media/i2c/max9295.ko",
"drivers/media/i2c/max9296.ko",
"drivers/media/platform/tegra/cam_fsync/cam_fsync.ko",
"drivers/media/platform/tegra/cdi/cdi_dev.ko",
"drivers/media/platform/tegra/cdi/cdi_gpio.ko",
"drivers/media/platform/tegra/cdi/cdi_mgr.ko",
"drivers/media/platform/tegra/cdi/cdi_pwm.ko",
"drivers/media/platform/tegra/isc/isc_dev.ko",
"drivers/media/platform/tegra/isc/isc_gpio.ko",
"drivers/media/platform/tegra/isc/isc_mgr.ko",
"drivers/media/platform/tegra/isc/isc_pwm.ko",
"drivers/media/platform/tegra/v4l2loopback/v4l2loopback.ko",
"drivers/memory/tegra/mc-t26x.ko",
"drivers/memory/tegra/mem-qual.ko",
"drivers/memory/tegra/smmu-hwpm.ko",
"drivers/memory/tegra/tegra264-mc-hwpm.ko",
"drivers/mfd/max77851.ko",
"drivers/mfd/nvidia-vrs-pseq.ko",
"drivers/misc/bluedroid_pm.ko",
"drivers/misc/ioctl_example.ko",
"drivers/misc/nvscic2c-pcie/nvscic2c-pcie-epc.ko",
"drivers/misc/nvscic2c-pcie/nvscic2c-pcie-epf.ko",
"drivers/misc/nvsciipc/nvsciipc.ko",
"drivers/misc/tegra-cec/tegra_cec.ko",
"drivers/misc/tegra-pcie-dma-test.ko",
"drivers/mtd/devices/tegra_hv_mtd.ko",
"drivers/net/can/mttcan/mttcan.ko",
"drivers/net/ethernet/marvell/oak/oak_pci.ko",
"drivers/net/ethernet/microchip/lan743x.ko",
"drivers/net/ethernet/nvidia/nvethernet/nvethernet.ko",
"drivers/net/ethernet/nvidia/pcie/tegra_vnet.ko",
"drivers/net/ethernet/realtek/r8125/r8125.ko",
"drivers/net/ethernet/realtek/r8126/r8126.ko",
"drivers/net/ethernet/realtek/r8168/r8168.ko",
"drivers/nv-p2p/nvidia-p2p.ko",
"drivers/nvpmodel/nvpmodel-clk-cap.ko",
"drivers/nvpps/nvpps.ko",
"drivers/nvtzvault/nvtzvault.ko",
"drivers/nv-virtio/nv-virtio-console-poc.ko",
"drivers/pci/controller/pcie-tegra-vf.ko",
"drivers/pci/controller/pcie-tegra264.ko",
"drivers/pci/controller/pcie-tegra264-ep.ko",
"drivers/pci/controller/tegra-pcie-dma-lib.ko",
"drivers/pci/controller/tegra-pcie-edma.ko",
"drivers/pci/endpoint/functions/pci-epf-dma-test.ko",
"drivers/pci/endpoint/functions/pci-epf-tegra-vnet.ko",
"drivers/pinctrl/pinctrl-max77851.ko",
"drivers/pinctrl/pinctrl-tegra194-pexclk-padctrl.ko",
"drivers/pinctrl/pinctrl-tegra234-dpaux.ko",
"drivers/platform/tegra/aon/tegra234-aon.ko",
"drivers/platform/tegra/aon/tegra-aon-ivc-echo.ko",
"drivers/platform/tegra/dce/tegra-dce.ko",
"drivers/platform/tegra/mce/tegra-mce.ko",
"drivers/platform/tegra/mc-hwpm.ko",
"drivers/platform/tegra/mc-utils/mc-utils.ko",
"drivers/platform/tegra/nvadsp/nvadsp.ko",
"drivers/platform/tegra/psc/tegra23x_psc.ko",
"drivers/platform/tegra/tegra-bootloader-debug.ko",
"drivers/platform/tegra/tegra-cactmon-mc-all.ko",
"drivers/platform/tegra/tegra-fsicom.ko",
"drivers/platform/tegra/tegra-hv-xhci.ko",
"drivers/platform/tegra/tegra-hv-xhci-debug.ko",
"drivers/platform/tegra/tegra-uss-io-proxy.ko",
"drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.ko",
"drivers/power/reset/max77851-poweroff.ko",
"drivers/pwm/pwm-tegra-tachometer.ko",
"drivers/ras/arm64-ras.ko",
"drivers/regulator/max77851-regulator.ko",
"drivers/rtc/nvvrs-pseq-rtc.ko",
"drivers/rtc/rtc-max77851.ko",
"drivers/scsi/ufs/ufs-tegra.ko",
"drivers/soc/tegra/fuse/kfuse.ko",
"drivers/spi/spi-aurix-tegra.ko",
"drivers/spi/spi-tegra124-slave.ko",
"drivers/spi/spi-tegra210-quad.ko",
"drivers/thermal/max77851_thermal.ko",
"drivers/tty/serial/wch_35x/wch.ko",
"drivers/tty/serial/tegra_hv_comm.ko",
"drivers/usb/typec/fusb301.ko",
"drivers/video/tegra/camera/tegra_camera_platform.ko",
"drivers/video/tegra/dc/bridge/maxim_gmsl_dp_serializer.ko",
"drivers/video/tegra/dc/bridge/maxim_gmsl_hdmi_serializer.ko",
"drivers/video/tegra/dc/bridge/nvdisp_serdes.ko",
"drivers/video/tegra/dc/bridge/ti_fpdlink_dp_serializer.ko",
"drivers/video/tegra/host/capture/nvhost-capture.ko",
"drivers/video/tegra/host/nvcsi/nvhost-nvcsi.ko",
"drivers/video/tegra/host/nvdla/nvhost-nvdla.ko",
"drivers/video/tegra/nvmap/nvmap.ko",
"drivers/video/tegra/tsec/tsecriscv.ko",
"drivers/video/tegra/virt/tegra_gr_comm.ko",
"drivers/virt/tegra/hvc_sysfs.ko",
"drivers/virt/tegra/ivc-cdev.ko",
"drivers/virt/tegra/tegra_hv.ko",
"drivers/virt/tegra/tegra_hv_pm_ctl.ko",
"drivers/virt/tegra/tegra_hv_vcpu_yield.ko",
"drivers/virt/tegra/userspace_ivc_mempool.ko",
"drivers/watchdog/max77851_wdt.ko",
"drivers/watchdog/softdog-platform.ko",
"drivers/watchdog/watchdog-tegra-t18x.ko",
"sound/soc/tegra/snd-soc-tegra186-arad.ko",
"sound/soc/tegra/snd-soc-tegra210-adsp.ko",
"sound/soc/tegra/snd-soc-tegra210-afc.ko",
"sound/soc/tegra/snd-soc-tegra210-iqc.ko",
"sound/soc/tegra/snd-soc-tegra-controls.ko",
"sound/soc/tegra/snd-soc-tegra-utils.ko",
"sound/soc/tegra-virt-alt/snd-soc-tegra210-virt-alt-admaif.ko",
"sound/soc/tegra-virt-alt/snd-soc-tegra210-virt-alt-adsp.ko",
"sound/soc/tegra-virt-alt/snd-soc-tegra-virt-t210ref-pcm.ko",
"sound/tegra-safety-audio/safety-i2s.ko",
],
kernel_build = "//nvidia-build/kleaf:tegra_android",
deps = [
"//hwpm/drivers/tegra/hwpm:hwpm",
],
)

View File

@@ -0,0 +1,95 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra_virt_storage88/nvidia,tegra-hv-oops-storage.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtual OOPS storage device over Tegra Hypervisor IVC channel
maintainers:
- Sreenivas Velpula
description: |
the compatability = nvidia,tegra-hv-oops-storage is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/block/tegra_oops_virt_storage/tegra_hv_vblk_oops.c
The following nodes use this compatibility
- /tegra_virt_storage88
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-hv-oops-storage
required:
- compatible
properties:
pstore_max_reason:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
pstore_kmsg_size:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
instance:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1f
maximum: 0x1f
ivc:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xf
maximum: 0x45
mempool:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1d
maximum: 0x1d
partition-name:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- gos0-crashlogs
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
required:
- compatible
- iommus
examples:
- |
tegra_virt_storage88 {
};

View File

@@ -0,0 +1,27 @@
Tegra Virtual Storage driver for OOPS partition
Virtual Storage Driver is the front end driver that interfaces with
- the Storage Virtualization System for Tegra SOC OOPS partition and
- the pstore system for storing OOPS/panic logs
Required Properties:
- compatible: should be "nvidia,tegra-hv-oops-storage"
- instance: to identify a specific instance of the device
- ivc: ivc channel to used for communication with Virtualization System
- mempool: mempool used for data transfers with Virtualization System
- pstore_max_reason: one of KMSG_DUMP_* values from kmsg_dump.h. Driver only
supports KMSG_DUMP_OOPS (value = 2) which allows PANIC and OOPS logs
to be stored. KMSG logs above this reason level will be ignored.
- pstore_kmsg_size: record size (should be block size aligned) for KMSG logs.
Default is 64KB.
Example:
tegra_virt_storage31 {
compatible = "nvidia,tegra-hv-oops-storage";
status = "okay";
pstore_max_reason = <2>;
pstore_kmsg_size = <0x10000>;
instance = <31>;
ivc = <&tegra_hv 230>;
mempool = <69>;
};

View File

@@ -0,0 +1,104 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra_virt_storage79/nvidia,tegra-hv-storage.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtual storage device over Tegra Hypervisor IVC channel
maintainers:
- Sreenivas Velpula
description: |
the compatability = nvidia,tegra-hv-storage is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c
The following nodes use this compatibility
- /tegra_virt_storage79
- /tegra_virt_storage80
- /tegra_virt_storage81
- /tegra_virt_storage82
- /tegra_virt_storage84
- /tegra_virt_storage85
- /tegra_virt_storage86
- /tegra_virt_storage87
- /tegra_virt_storage89
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-hv-storage
required:
- compatible
properties:
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
instance:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x3c
ivc:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xf
maximum: 0x46
mempool:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x13
maximum: 0x1e
partition-name:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- gos0-shared-pers
- gos0-ufs
- gos0_nvlog
- pers-ota
- ist-runtimeinfo
- ist-resultdata
- gos0-fs
- gos0-rw-overlay
- custom
read-only:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- iommus
examples:
- |
tegra_virt_storage79 {
};

View File

@@ -0,0 +1,59 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/hyp/nvidia,tegra-hv.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra Hypervisor Driver Module
maintainers:
- Sreenivas Velpula
- Manish Bhardwaj
description: |
the compatability = nvidia,tegra-hv is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c
- <TOP>/kernel/nvidia-oot/drivers/block/tegra_oops_virt_storage/tegra_hv_vblk_oops.c
- <TOP>/kernel/nvidia-oot/drivers/virt/tegra/tegra_hv_vcpu_yield.c
- <TOP>/kernel/nvidia-oot/drivers/virt/tegra/tegra_hv.c
- <TOP>/kernel/nvidia-oot/drivers/virt/tegra/tegra_hv_pm_ctl.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/tegra-hv-xhci-debug.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/tegra-hv-xhci.c
The following nodes use this compatibility
- /hyp
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-hv
required:
- compatible
properties:
required:
- compatible
examples:
- |
hyp {
compatible = "nvidia,tegra-hv";
status = "okay";
phandle = <0x10>;
};

View File

@@ -0,0 +1,21 @@
Tegra Virtual Storage driver
Virtual Storage Driver is the front end driver that interfaces with the
Storage Virtualization System for Tegra SOC and provides a block device
interface
Required Properties:
- compatible: should be "nvidia,tegra-hv-storage"
- instance: to identify a specific instance of the device
- ivc: ivc channel to used for communication with Virtualization System
- mempool: mempool used for data transfers with Virtualization System
Example:
tegra_virt_storage0 {
compatible = "nvidia,tegra-hv-storage";
instance = <0>;
ivc = <&tegra_hv 63>;
mempool = <10>;
status = "okay";
};

View File

@@ -0,0 +1,64 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/aocluster@c000000/nvidia,tegra264-aocluster.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra AOCLUSTER Bus Driver
maintainers:
- Akhilesh Khumbum
description: |
the compatability = nvidia,tegra264-aocluster is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/bus/tegra-aocluster.c
The following nodes use this compatibility
- /bus@0/aocluster@c000000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-aocluster
required:
- compatible
properties:
'#address-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
'#size-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
required:
- compatible
examples:
- |
aocluster@c000000 {
compatible = "nvidia,tegra264-aocluster";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0xc000000 0x0 0xc000000 0x0 0x1000000>;
status = "disabled";
};

View File

@@ -0,0 +1,86 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/timer/arm,armv8-timer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ARM Architecture Timer
maintainers:
- Suresh Mangipudi
description: |
the compatability = arm,armv8-timer is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/clocksource/arm_arch_timer.c
The following nodes use this compatibility
- /timer
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- arm,armv8-timer
required:
- compatible
properties:
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xa
maximum: 0xe
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
interrupt-parent:
$ref: "/schemas/types.yaml#/definitions/uint32"
always-on:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- interrupts
examples:
- |
timer {
compatible = "arm,armv8-timer";
status = "disabled";
interrupts = <GIC_PPI 13 8>,
<GIC_PPI 14 8>,
<GIC_PPI 11 8>,
<GIC_PPI 10 8>,
<GIC_PPI 12 8>;
interrupt-parent = <&gic>;
always-on;
};

View File

@@ -0,0 +1,103 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/timer@8000000/nvidia,tegra234-timer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra Timers Module
maintainers:
- Thierry Reding
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra234-timer is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/clocksource/timer-tegra186.c
The following nodes use this compatibility
- /bus@0/timer@8000000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra234-timer
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8000000
maximum: 0x8000000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x140000
maximum: 0x140000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x305
maximum: 0x308
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
required:
- compatible
- reg
- interrupts
examples:
- |
timer@8000000 {
compatible = "nvidia,tegra234-timer";
reg = <0x0 0x08000000 0x0 0x00140000>;
interrupts = <GIC_SPI 773 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 774 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 775 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 776 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};

View File

@@ -0,0 +1,82 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/ccplex@8120000000/nvidia,tegra264-ccplex-cluster.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra T264 cpufreq driver
maintainers:
- Sumit Gupta
- Mikko Perttunen
- Rich Wiley
description: |
the compatability = nvidia,tegra264-ccplex-cluster is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/cpufreq/tegra194-cpufreq.c
The following nodes use this compatibility
- /bus@0/ccplex@8120000000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-ccplex-cluster
required:
- compatible
properties:
nvidia,bpmp:
$ref: "/schemas/types.yaml#/definitions/uint32"
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x30000000
maximum: 0x30000000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xcf0000
maximum: 0xcf0000
required:
- compatible
- reg
examples:
- |
ccplex@8120000000 {
compatible = "nvidia,tegra264-ccplex-cluster";
status = "disabled";
nvidia,bpmp = <&bpmp>;
reg = <0x81 0x30000000 0x0 0xcf0000>;
};

View File

@@ -0,0 +1,86 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/cc7/arm,idle-state.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ARM/ARM64 generic CPU idle driver
maintainers:
- Rich Wiley
description: |
the compatability = arm,idle-state is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/cpuidle/cpuidle-psci.c
- <TOP>/kernel/kernel-oot/drivers/cpuidle/cpuidle-big_little.c
- <TOP>/kernel/kernel-oot/drivers/cpuidle/cpuidle-arm.c
The following nodes use this compatibility
- /cpus/idle-states/cc7
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- arm,idle-state
required:
- compatible
properties:
state-name:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- Cluster Powergate
entry-latency-us:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1388
maximum: 0x1388
exit-latency-us:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1388
maximum: 0x1388
min-residency-us:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x61a8
maximum: 0x61a8
arm,psci-suspend-param:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40000007
maximum: 0x40000007
required:
- compatible
examples:
- |
cc7 {
compatible = "arm,idle-state";
state-name = "Cluster Powergate";
entry-latency-us = <5000>;
exit-latency-us = <5000>;
min-residency-us = <25000>;
arm,psci-suspend-param = <0x40000007>;
status = "disabled";
};

View File

@@ -0,0 +1,60 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/psci/arm,psci-1.0.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Power State Coordination Interface (PSCI) standard interface for power management
maintainers:
- Sanjay Chandrashekara
description: |
the compatability = arm,psci-1.0 is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/cpuidle/cpuidle-psci-domain.c
- <TOP>/kernel/kernel-oot/drivers/firmware/psci/psci.c
The following nodes use this compatibility
- /psci
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- arm,psci-1.0
required:
- compatible
properties:
method:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- smc
required:
- compatible
examples:
- |
psci {
compatible = "arm,psci-1.0";
status = "disabled";
method = "smc";
};

View File

@@ -0,0 +1,51 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/cpuidle/nvidia,cpuidle-tegra-auto.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra Automotive cpuidle Driver
maintainers:
- Manish Bhardwaj
description: |
the compatability = nvidia,cpuidle-tegra-auto is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/cpuidle/cpuidle-tegra-auto.c
The following nodes use this compatibility
- /cpuidle
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,cpuidle-tegra-auto
required:
- compatible
properties:
required:
- compatible
examples:
- |
cpuidle {
compatible = "nvidia,cpuidle-tegra-auto";
status = "okay";
};

View File

@@ -0,0 +1,93 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/vse@C0110000/nvidia,tegra-se-5.1-hv-vse-safety.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtual Security Engine driver over Tegra Hypervisor IVC channel
maintainers:
- Mallikarjun Kasoju
- Ashutosh Patel
description: |
the compatability = nvidia,tegra-se-5.1-hv-vse-safety is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/crypto/tegra-hv-vse-safety.c
The following nodes use this compatibility
- /vse@C0110000
- /vse@C0120000
- /vse@C0140000
- /vse@C2430000
- /vse@C2440000
- /vse@C2460000
- /vse@C24A0000
- /vse@C24B0000
- /vse@C24D0000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-se-5.1-hv-vse-safety
required:
- compatible
properties:
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
se-engine-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xc
nvidia,ivccfg_cnt:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,ivccfg:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xffffff
required:
- compatible
- iommus
examples:
- |
vse@C0120000 {
compatible = "nvidia,tegra-se-5.1-hv-vse-safety";
iommus = <0x5 0x1809>;
status = "okay";
se-engine-id = <0x1>;
nvidia,ivccfg_cnt = <0x1>;
nvidia,ivccfg = <0x12e 0x1 0x0 0x0 0xffffff 0x8ea 0x1809 0x1 0x0 0x0 0x0>;
};

View File

@@ -0,0 +1,102 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto@8189880000/nvidia,tegra264-kds.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra Key Distribution System Driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-kds is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/crypto/tegra/tegra-se-kds.c
The following nodes use this compatibility
- /bus@0/host1x@8181200000/crypto@8189880000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-kds
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x89880000
maximum: 0x89880000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x25
maximum: 0x25
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- se
required:
- compatible
- reg
- clocks
- clock-names
examples:
- |
crypto@8189880000 {
compatible = "nvidia,tegra264-kds";
reg = <0x81 0x89880000 0x0 0x10000>;
clocks = <&bpmp TEGRA264_CLK_SE>;
clock-names = "se";
status = "disabled";
};

View File

@@ -0,0 +1,123 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto@8188120000/nvidia,tegra264-se-aes.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra Security Engine Driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-se-aes is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/crypto/tegra/tegra-se-main.c
The following nodes use this compatibility
- /bus@0/host1x@8181200000/crypto@8188120000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-se-aes
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x88120000
maximum: 0x88120000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x25
maximum: 0x25
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- se
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1802
maximum: 0x1802
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- reg
- clocks
- clock-names
- iommus
examples:
- |
crypto@8188120000 {
compatible = "nvidia,tegra264-se-aes";
reg = <0x81 0x88120000 0x0 0x10000>;
clocks = <&bpmp TEGRA264_CLK_SE>;
clock-names = "se";
iommus = <&smmu1_mmu TEGRA_SID_SE_SE2>;
dma-coherent;
status = "disabled";
};

View File

@@ -0,0 +1,123 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto@8188140000/nvidia,tegra264-se-hash.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Crypto driver for NVIDIA Security Engine in Tegra Chips
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-se-hash is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/crypto/tegra/tegra-se-main.c
The following nodes use this compatibility
- /bus@0/host1x@8181200000/crypto@8188140000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-se-hash
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x88140000
maximum: 0x88140000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x25
maximum: 0x25
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- se
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1804
maximum: 0x1804
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- reg
- clocks
- clock-names
- iommus
examples:
- |
crypto@8188140000 {
compatible = "nvidia,tegra264-se-hash";
reg = <0x81 0x88140000 0x0 0x10000>;
clocks = <&bpmp TEGRA264_CLK_SE>;
clock-names = "se";
iommus = <&smmu1_mmu TEGRA_SID_SE_SE4>;
dma-coherent;
status = "disabled";
};

View File

@@ -0,0 +1,123 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto@8188110000/nvidia,tegra264-se-sm4.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Crypto Module for NVIDIA Security Engine in Tegra Chips
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-se-sm4 is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/crypto/tegra/tegra-se-main.c
The following nodes use this compatibility
- /bus@0/host1x@8181200000/crypto@8188110000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-se-sm4
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x88110000
maximum: 0x88110000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x25
maximum: 0x25
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- se
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1801
maximum: 0x1801
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- reg
- clocks
- clock-names
- iommus
examples:
- |
crypto@8188110000 {
compatible = "nvidia,tegra264-se-sm4";
reg = <0x81 0x88110000 0x0 0x10000>;
clocks = <&bpmp TEGRA264_CLK_SE>;
clock-names = "se";
iommus = <&smmu1_mmu TEGRA_SID_SE_SE1>;
dma-coherent;
status = "disabled";
};

View File

@@ -0,0 +1,210 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/dma-controller@9440000/nvidia,tegra264-adma.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra ADMA driver
maintainers:
- Mohan Kumar
description: |
the compatability = nvidia,tegra264-adma is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/dma/tegra210-adma.c
The following nodes use this compatibility
- /bus@0/aconnect@9000000/dma-controller@9440000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-adma
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x9450000
maximum: 0x9450000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
interrupt-parent:
$ref: "/schemas/types.yaml#/definitions/uint32"
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x90
maximum: 0xbf
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
'#dma-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xa3
maximum: 0xa3
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- d_audio
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- vm
dma-channel-mask:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xffff
maximum: 0xffffffff
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
examples:
- |
dma-controller@9440000 {
compatible = "nvidia,tegra264-adma";
reg = <0x0 0x9440000 0x0 0xb0000>;
interrupt-parent = <&agic_page0>;
interrupts = <GIC_SPI 0x90 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x91 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x92 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x93 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x94 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x95 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x96 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x97 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x98 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x99 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x9a IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x9b IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x9c IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x9d IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x9e IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x9f IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa0 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa1 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa2 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa3 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa4 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa5 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa6 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa7 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa8 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xa9 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xaa IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xab IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xac IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xad IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xae IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xaf IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb0 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb1 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb2 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb3 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb4 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb5 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb6 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb7 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb8 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xb9 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xba IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xbb IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xbc IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xbd IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xbe IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xbf IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc0 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc1 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc2 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc3 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc4 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc5 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc6 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc7 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc8 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xc9 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xca IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xcb IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xcc IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xcd IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xce IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0xcf IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
clocks = <&bpmp TEGRA264_CLK_AHUB>;
clock-names = "d_audio";
status = "disabled";
};

View File

@@ -0,0 +1,163 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/dma-controller@8400000/nvidia,tegra264-gpcdma.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra GPC DMA Controller driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-gpcdma is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/dma/tegra186-gpc-dma.c
The following nodes use this compatibility
- /bus@0/dma-controller@8400000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-gpcdma
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8400000
maximum: 0x8400000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x210000
maximum: 0x210000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x248
maximum: 0x267
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
'#dma-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x800
maximum: 0x800
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
dma-channel-mask:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xf70dc3fe
maximum: 0xf70dc3fe
required:
- compatible
- reg
- interrupts
- iommus
examples:
- |
dma-controller@8400000 {
compatible = "nvidia,tegra264-gpcdma";
status = "disabled";
reg = <0x0 0x08400000 0x0 0x210000>;
interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 588 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 589 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 590 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 591 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 592 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 593 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 594 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 595 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 596 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 597 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 598 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 599 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 600 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 606 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 607 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 609 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 610 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 611 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 612 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 613 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 614 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 615 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <3>;
iommus = <&smmu1_mmu 0x00000800>;
dma-coherent;
dma-channel-mask = <0xfffffffe>;
};

View File

@@ -0,0 +1,104 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/bpmp/nvidia,tegra194-safe-bpmp-hv.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtual BPMP Driver
maintainers:
- Sharif Shaik
description: |
the compatability = nvidia,tegra194-safe-bpmp-hv is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/firmware/tegra/bpmp-tegra186-hv.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/virt.c
The following nodes use this compatibility
- /bpmp
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra194-safe-bpmp-hv
required:
- compatible
properties:
mboxes:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 3
maxItems: 3
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x13
maximum: 0x13
'#clock-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#reset-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#power-domain-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
numa-node-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
ivc_queue:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xf
mempool:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
required:
- compatible
examples:
- |
bpmp {
compatible = "nvidia,tegra264-bpmp",
"nvidia,tegra234-bpmp",
"nvidia,tegra186-bpmp";
status = "disabled";
mboxes = <&top_hsp0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_BPMP>;
memory-region = <&dram_cpu_bpmp_mail>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
numa-node-id = <0>;
};

View File

@@ -0,0 +1,132 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio@cf00000/nvidia,tegra264-gpio-aon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra GPIO Controller Driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-gpio-aon is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/gpio/gpio-tegra186.c
The following nodes use this compatibility
- /bus@0/gpio@cf00000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-gpio-aon
required:
- compatible
properties:
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- security
- gpio
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xcf00000
maximum: 0xcf10000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x10000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x21a
maximum: 0x21d
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
gpio-controller:
$ref: "/schemas/types.yaml#/definitions/flag"
'#gpio-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
interrupt-controller:
$ref: "/schemas/types.yaml#/definitions/flag"
'#interrupt-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
required:
- compatible
- reg
- interrupts
examples:
- |
gpio@cf00000 {
reg-names = "security, gpio";
compatible = "nvidia,tegra264-gpio-aon";
status = "disabled";
reg = <0x0 0x0cf00000 0x0 0x10000>,
<0x0 0x0cf10000 0x0 0x1000>;
interrupts = <GIC_SPI 538 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 539 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 540 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 541 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};

View File

@@ -0,0 +1,160 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio@810c300000/nvidia,tegra264-gpio-main.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra GPIO controller driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-gpio-main is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/gpio/gpio-tegra186.c
The following nodes use this compatibility
- /bus@0/gpio@810c300000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-gpio-main
required:
- compatible
properties:
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- security
- gpio
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc300000
maximum: 0xc310000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4000
maximum: 0x4000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5b
maximum: 0x7a
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
gpio-controller:
$ref: "/schemas/types.yaml#/definitions/flag"
'#gpio-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
interrupt-controller:
$ref: "/schemas/types.yaml#/definitions/flag"
'#interrupt-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
required:
- compatible
- reg
- interrupts
examples:
- |
gpio@810c300000 {
reg-names = "security, gpio";
compatible = "nvidia,tegra264-gpio-main";
status = "disabled";
reg = <0x81 0x0c300000 0x0 0x4000>,
<0x81 0x0c310000 0x0 0x4000>;
interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};

View File

@@ -0,0 +1,148 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio@a808300000/nvidia,tegra264-gpio-uphy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra GPIO controller driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-gpio-uphy is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/gpio/gpio-tegra186.c
The following nodes use this compatibility
- /bus@0/gpio@a808300000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-gpio-uphy
required:
- compatible
properties:
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- security
- gpio
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xa8
maximum: 0xa8
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8300000
maximum: 0x8310000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2000
maximum: 0x2000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x34b
maximum: 0x35a
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
gpio-controller:
$ref: "/schemas/types.yaml#/definitions/flag"
'#gpio-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
interrupt-controller:
$ref: "/schemas/types.yaml#/definitions/flag"
'#interrupt-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
pinctrl-node:
$ref: "/schemas/types.yaml#/definitions/uint32"
required:
- compatible
- reg
- interrupts
examples:
- |
gpio@a808300000 {
reg-names = "security, gpio";
compatible = "nvidia,tegra264-gpio-uphy";
status = "disabled";
reg = <0xa8 0x08300000 0x0 0x2000>,
<0xa8 0x08310000 0x0 0x2000>;
interrupts = <GIC_SPI 843 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 844 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 845 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 846 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 847 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 848 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 849 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 850 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 851 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 852 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 853 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 854 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 855 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 856 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 857 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
pinctrl-node = <&padctl_uphy>;
};

View File

@@ -0,0 +1,78 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinmux@810c281000/nvidia,tegra264-pinmux-main.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra PINMUX driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-pinmux-main is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/gpio/gpio-tegra186.c
- <TOP>/kernel/kernel-oot/drivers/pinctrl/tegra/pinctrl-tegra264-generic.c
- <TOP>/kernel/kernel-oot/drivers/pinctrl/tegra/pinctrl-tegra264.c
The following nodes use this compatibility
- /bus@0/pinmux@810c281000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-pinmux-main
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc281000
maximum: 0xc281000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc000
maximum: 0xc000
required:
- compatible
- reg
examples:
- |
pinmux@810c281000 {
compatible = "nvidia,tegra264-pinmux-main";
status = "disabled";
reg = <0x81 0x0c281000 0x0 0xc000>;
};

View File

@@ -0,0 +1,77 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinmux@a8082e0000/nvidia,tegra264-pinmux-uphy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra PINMUX driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-pinmux-uphy is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/gpio/gpio-tegra186.c
- <TOP>/kernel/kernel-oot/drivers/pinctrl/tegra/pinctrl-tegra264-generic.c
The following nodes use this compatibility
- /bus@0/pinmux@a8082e0000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-pinmux-uphy
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xa8
maximum: 0xa8
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x82e0000
maximum: 0x82e0000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4000
maximum: 0x4000
required:
- compatible
- reg
examples:
- |
pinmux@a8082e0000 {
compatible = "nvidia,tegra264-pinmux-uphy";
status = "disabled";
reg = <0xa8 0x082e0000 0x0 0x4000>;
};

View File

@@ -0,0 +1,117 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/vi0@8188400000/nvidia,tegra234-vi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra Video Interface Module
maintainers:
- Chinniah Poosapadi
description: |
the compatability = nvidia,tegra234-vi is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/drm.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/vic.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/host/capture/capture-support.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/host/vi/vi5.c
The following nodes use this compatibility
- /bus@0/host1x@8181200000/vi0@8188400000
- /bus@0/host1x@8181200000/vi1@8188c00000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra234-vi
required:
- compatible
properties:
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2e
maximum: 0x2f
reset-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- vi
- vi2
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x39
maximum: 0x39
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- vi
nvidia,vi-falcon-device:
$ref: "/schemas/types.yaml#/definitions/uint32"
non-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- resets
- reset-names
- clocks
- clock-names
examples:
- |
vi0@8188400000 {
compatible = "nvidia,tegra234-vi";
resets = <&bpmp TEGRA264_RESET_VI>;
reset-names = "vi";
clocks = <&bpmp TEGRA264_CLK_VI>;
clock-names = "vi";
nvidia,vi-falcon-device = <&vi0_thi>;
iommus = <&smmu0_mmu TEGRA_SID_VI_VM1>;
non-coherent;
status = "disabled";
};

View File

@@ -0,0 +1,135 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/vic@8188050000/nvidia,tegra264-host1x-virtual-engine.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Host1x Virtualization Driver for Tegra Hypervisor
maintainers:
- Santosh B S
description: |
the compatability = nvidia,tegra264-host1x-virtual-engine is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/virt.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/drm.c
The following nodes use this compatibility
- /bus@0/host1x@8181200000/vic@8188050000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-host1x-virtual-engine
required:
- compatible
properties:
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3b
maximum: 0x3b
interconnects:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 3
maxItems: 3
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6c
maximum: 0x6d
- $ref: "/schemas/types.yaml#/definitions/uint32"
interconnect-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- dma-mem
- write
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3000
maximum: 0x3000
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
numa-node-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,class:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5d
maximum: 0x5d
nvidia,module-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
required:
- compatible
- clocks
- iommus
examples:
- |
vic@8188050000 {
compatible = "nvidia,tegra264-vic";
reg = <0x81 0x88050000 0x00 0x40000>;
interrupts = <GIC_SPI 0x1d4 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&bpmp TEGRA264_POWER_DOMAIN_VIC>;
resets = <&bpmp TEGRA264_RESET_VIC>;
reset-names = "vic";
clocks = <&bpmp TEGRA264_CLK_VIC>;
clock-names = "vic";
interconnects = <&mc TEGRA264_MEMORY_CLIENT_VICR &emc>,
<&mc TEGRA264_MEMORY_CLIENT_VICW &emc>;
interconnect-names = "dma-mem, write";
iommus = <&smmu1_mmu TEGRA_SID_VIC>;
dma-coherent;
numa-node-id = <0x0>;
status = "disabled";
};

View File

@@ -0,0 +1,289 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/host1x@8181200000/nvidia,tegra264-host1x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Host1x driver for Tegra products
maintainers:
- Santosh B S
description: |
the compatability = nvidia,tegra264-host1x is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/virt.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/drm.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x-nvhost/nvhost.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x-fence/dev.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x/dev.c
- <TOP>/kernel/nvidia-oot/drivers/crypto/tegra-hv-vse-safety.c
The following nodes use this compatibility
- /bus@0/host1x@8181200000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-host1x
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81240000
maximum: 0x81320000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x20000
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- vm
- actmon
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x145
maximum: 0x14e
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
interrupt-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- syncpt0
- syncpt1
- syncpt2
- syncpt3
- syncpt4
- syncpt5
- syncpt6
- syncpt7
- host1x
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0xe
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- host1x
- actmon
interconnects:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 3
maxItems: 3
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x16
maximum: 0x16
- $ref: "/schemas/types.yaml#/definitions/uint32"
interconnect-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- dma-mem
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xb01
maximum: 0xb01
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
'#address-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
'#size-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
iommu-map:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x7
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3001
maximum: 0x3008
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
numa-node-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,channels:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x1d
nvidia,syncpoints:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x240
nvidia,server-ivc:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xf
maximum: 0x2a
required:
- compatible
- reg
- interrupts
- interrupt-names
- clocks
- clock-names
- iommus
examples:
- |
host1x@8181200000 {
compatible = "nvidia,tegra264-host1x";
reg = <0x81 0x81200000 0x0 0x10000>,
<0x81 0x81210000 0x0 0x10000>,
<0x81 0x81240000 0x0 0x10000>,
<0x81 0x81320000 0x0 0x20000>;
reg-names = "common, hypervisor, vm, actmon";
interrupts = <GIC_SPI 0x147 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x148 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x149 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x14a IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x14b IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x14c IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x14d IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x14e IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 0x145 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "syncpt0",
"syncpt1",
"syncpt2",
"syncpt3",
"syncpt4",
"syncpt5",
"syncpt6",
"syncpt7",
"host1x";
clocks = <&bpmp TEGRA264_CLK_HOST1X>,
<&bpmp TEGRA264_CLK_OSC>;
clock-names = "host1x, actmon";
interconnects = <&mc TEGRA264_MEMORY_CLIENT_HOST1XR &emc>;
interconnect-names = "dma-mem";
iommus = <&smmu1_mmu TEGRA_SID_HOST1X>;
dma-coherent;
#address-cells = <0x2>;
#size-cells = <0x2>;
iommu-map = <0x0 &smmu1_mmu (TEGRA_SID_VIC+0x1) 0x1>,
<0x1 &smmu1_mmu (TEGRA_SID_VIC+0x2) 0x1>,
<0x2 &smmu1_mmu (TEGRA_SID_VIC+0x3) 0x1>,
<0x3 &smmu1_mmu (TEGRA_SID_VIC+0x4) 0x1>,
<0x4 &smmu1_mmu (TEGRA_SID_VIC+0x5) 0x1>,
<0x5 &smmu1_mmu (TEGRA_SID_VIC+0x6) 0x1>,
<0x6 &smmu1_mmu (TEGRA_SID_VIC+0x7) 0x1>,
<0x7 &smmu1_mmu (TEGRA_SID_VIC+0x8) 0x1>;
ranges = <0x81 0x81200000 0x81 0x81200000 0x00 0x10000>,
<0x81 0x81210000 0x81 0x81210000 0x00 0x10000>,
<0x81 0x81240000 0x81 0x81240000 0x00 0x10000>,
<0x81 0x88150000 0x81 0x88150000 0x00 0x40000>,
<0x81 0x88050000 0x81 0x88050000 0x00 0x40000>,
<0x81 0x8c000000 0x81 0x8c000000 0x00 0x900000>,
<0x00 0x10700000 0x00 0x10700000 0x00 0x100000>,
<0x81 0x88140000 0x81 0x88140000 0x00 0x10000>,
<0x81 0x88120000 0x81 0x88120000 0x00 0x10000>,
<0x81 0x88110000 0x81 0x88110000 0x00 0x10000>,
<0x81 0x89880000 0x81 0x89880000 0x00 0x10000>,
<0x81 0x88800000 0x81 0x88800000 0x00 0x300000>;
numa-node-id = <0x0>;
status = "disabled";
};

View File

@@ -0,0 +1,115 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/hardware-timestamp@c2b0000/nvidia,tegra264-gte-aon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra HTE (Hardware Timestamping Engine) Driver
maintainers:
- Dipen Patel
description: |
the compatability = nvidia,tegra264-gte-aon is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/hte/hte-tegra194.c
The following nodes use this compatibility
- /bus@0/hardware-timestamp@c2b0000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-gte-aon
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc2b0000
maximum: 0xc2b0000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x226
maximum: 0x226
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
nvidia,int-threshold:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#timestamp-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,gpio-controller:
$ref: "/schemas/types.yaml#/definitions/uint32"
required:
- compatible
- reg
- interrupts
examples:
- |
hardware-timestamp@c2b0000 {
compatible = "nvidia,tegra264-gte-aon";
reg = <0x0 0x0c2b0000 0x0 0x10000>;
interrupts = <GIC_SPI 0x00000226 IRQ_TYPE_LEVEL_HIGH>;
nvidia,int-threshold = <1>;
#timestamp-cells = <1>;
nvidia,gpio-controller = <&gpio_aon>;
status = "disabled";
};

View File

@@ -0,0 +1,111 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/hardware-timestamp@8380000/nvidia,tegra264-gte-lic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra HTE (Hardware Timestamping Engine) Driver
maintainers:
- Dipen Patel
description: |
the compatability = nvidia,tegra264-gte-lic is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/hte/hte-tegra194.c
The following nodes use this compatibility
- /bus@0/hardware-timestamp@8380000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-gte-lic
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8380000
maximum: 0x8380000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x268
maximum: 0x268
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
nvidia,int-threshold:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#timestamp-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
required:
- compatible
- reg
- interrupts
examples:
- |
hardware-timestamp@8380000 {
compatible = "nvidia,tegra264-gte-lic";
reg = <0x0 0x08380000 0x0 0x10000>;
interrupts = <GIC_SPI 0x00000268 IRQ_TYPE_LEVEL_HIGH>;
nvidia,int-threshold = <1>;
#timestamp-cells = <1>;
status = "disabled";
};

View File

@@ -0,0 +1,107 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/temp-sensor@4c/ti,tmp451.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LM90/ADM1032 driver
maintainers:
- Yi-Wei Wang
description: |
the compatability = ti,tmp451 is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/hwmon/lm90.c
The following nodes use this compatibility
- /bpmp/i2c/temp-sensor@4c
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- ti,tmp451
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4c
maximum: 0x4c
sensor-name:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- tmp451-ext-soc
'#thermal-sensor-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
interrupt-parent:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4e
maximum: 0x4e
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x9
temp-alert-gpio:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x4e
offset:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xfffff060
maximum: 0xfffff060
required:
- compatible
- reg
- interrupts
examples:
- |
temp-sensor@4c {
};

View File

@@ -0,0 +1,244 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c@c600000/nvidia,tegra264-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra I2C Bus Controller driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-i2c is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/i2c/busses/i2c-tegra.c
The following nodes use this compatibility
- /bus@0/i2c@c600000
- /bus@0/i2c@c610000
- /bus@0/i2c@810c410000
- /bus@0/i2c@810c420000
- /bus@0/i2c@810c430000
- /bus@0/i2c@810c630000
- /bus@0/i2c@810c640000
- /bus@0/i2c@810c650000
- /bus@0/i2c@810c670000
- /bus@0/i2c@810c680000
- /bus@0/i2c@810c690000
- /bus@0/i2c@810c6a0000
- /bus@0/i2c@810c6b0000
- /bus@0/i2c@810c6c0000
- /bus@0/i2c@810c6d0000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-i2c
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc410000
maximum: 0xc6d0000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7e
maximum: 0x215
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
clock-frequency:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x61a80
maximum: 0x61a80
dmas:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x14
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1f
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x801
maximum: 0x81f
dma-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- tx
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x801
maximum: 0x81f
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xd
maximum: 0xa0
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- div-clk
- parent
assigned-clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xd
maximum: 0x2f
assigned-clock-parents:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x16
maximum: 0xa0
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xb
maximum: 0x3c
reset-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- i2c
required:
- compatible
- reg
- interrupts
- iommus
- clocks
- clock-names
- resets
- reset-names
examples:
- |
i2c@c600000 {
compatible = "nvidia,tegra264-i2c";
status = "disabled";
reg = <0x0 0x0c600000 0x0 0x10000>;
interrupts = <GIC_SPI 532 IRQ_TYPE_LEVEL_HIGH>;
clock-frequency = <400000>;
dmas = <&gpcdma 3 3 TEGRA264_GPCDMA_SID_I2C2>;
dma-names = "tx";
iommus = <&smmu1_mmu TEGRA264_GPCDMA_SID_I2C2>;
dma-coherent;
clocks = <&bpmp TEGRA264_CLK_AON_I2C>,
<&bpmp TEGRA264_CLK_PLLAON>;
clock-names = "div-clk, parent";
assigned-clocks = <&bpmp TEGRA264_CLK_AON_I2C>;
assigned-clock-parents = <&bpmp TEGRA264_CLK_PLLAON>;
resets = <&bpmp TEGRA264_RESET_I2C2>;
reset-names = "i2c";
};

View File

@@ -0,0 +1,60 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/gpio-keys/gpio-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Keyboard driver for GPIOs
maintainers:
- Suresh Mangipudi
description: |
the compatability = gpio-keys is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/input/keyboard/gpio_keys.c
- <TOP>/kernel/kernel-oot/drivers/input/keyboard/gpio_keys_polled.c
- <TOP>/kernel/kernel-oot/drivers/input/misc/soc_button_array.c
- <TOP>/kernel/kernel-oot/drivers/mfd/ucb1x00-assabet.c
- <TOP>/kernel/kernel-oot/drivers/mfd/rohm-bd71828.c
- <TOP>/kernel/kernel-oot/drivers/mfd/rohm-bd718x7.c
- <TOP>/kernel/kernel-oot/drivers/platform/x86/barco-p50-gpio.c
- <TOP>/kernel/kernel-oot/drivers/platform/x86/meraki-mx100.c
- <TOP>/kernel/kernel-oot/drivers/platform/x86/pcengines-apuv2.c
- <TOP>/kernel/kernel-oot/drivers/platform/x86/x86-android-tablets.c
The following nodes use this compatibility
- /gpio-keys
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- gpio-keys
required:
- compatible
properties:
required:
- compatible
examples:
- |
gpio-keys {
compatible = "gpio-keys";
status = "okay";
};

View File

@@ -0,0 +1,141 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra-hsp@8800000/nvidia,tegra264-hsp-hv.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Hypervisor Hardware Syncronization Primatives (HSP) Driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-hsp-hv is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/mailbox/tegra-hsp.c
The following nodes use this compatibility
- /bus@0/tegra-hsp@8800000
- /bus@0/tegra-hsp@8c00000
- /bus@0/tegra-hsp@8d00000
- /bus@0/tegra-hsp@8189100000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-hsp-hv
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8800000
maximum: 0x89100000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc0000
maximum: 0xd0000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x19f
maximum: 0x2a5
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
interrupt-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- doorbell
- shared0
- shared1
- shared2
- shared3
- shared4
- shared5
- shared6
- shared7
'#mbox-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
nvidia,mbox-ie:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- reg
- interrupts
- interrupt-names
examples:
- |
tegra-hsp@8800000 {
compatible = "nvidia,tegra264-hsp",
"nvidia,tegra234-hsp",
"nvidia,tegra186-hsp";
status = "disabled";
reg = <0x0 0x08800000 0x0 0xd0000>;
interrupts = <GIC_SPI 620 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 622 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 623 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 624 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 625 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 626 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 627 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 628 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 629 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "doorbell, shared0, shared1, shared2",
"shared3",
"shared4, shared5, shared6, shared7";
#mbox-cells = <2>;
nvidia,mbox-ie;
};

View File

@@ -0,0 +1,142 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra-hsp@818c160000/nvidia,tegra264-hsp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Hypervisor Hardware Syncronization Primatives (HSP) Driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-hsp is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/mailbox/tegra-hsp.c
The following nodes use this compatibility
- /bus@0/tegra-hsp@818c160000
- /bus@0/tegra-hsp@8189200000
select:
properties:
compatible:
minItems: 3
maxItems: 3
items:
enum:
- nvidia,tegra264-hsp
- nvidia,tegra234-hsp
- nvidia,tegra186-hsp
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x89200000
maximum: 0x8c160000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x90000
maximum: 0xc0000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x190
maximum: 0x1a6
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
interrupt-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- shared0
- shared1
- shared2
- shared3
- shared4
nvidia,num-SM:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
nvidia,num-SS:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
nvidia,num-SI:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5
maximum: 0x5
nvidia,mbox-ie:
$ref: "/schemas/types.yaml#/definitions/flag"
'#mbox-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
required:
- compatible
- reg
- interrupts
- interrupt-names
examples:
- |
tegra-hsp@818c160000 {
compatible = "nvidia,tegra264-hsp";
reg = <0x81 0x8c160000 0x0 0x00090000>;
interrupts = <0 400 0x04>;
interrupt-names = "shared0";
nvidia,num-SM = <0x8>;
nvidia,num-SS = <0x4>;
nvidia,num-SI = <0x5>;
nvidia,mbox-ie;
status = "disabled";
};

View File

@@ -0,0 +1,89 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tsc_sig_gen@c230000/nvidia,tegra264-cdi-tsc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cam Fsync Driver
maintainers:
- Mohit Ingale
description: |
the compatability = nvidia,tegra264-cdi-tsc is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/cam_fsync/cam_fsync.c
The following nodes use this compatibility
- /tsc_sig_gen@c230000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-cdi-tsc
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc230000
maximum: 0xc230000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x18
maximum: 0x18
'#address-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#size-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
required:
- compatible
- reg
examples:
- |
tsc_sig_gen@c230000 {
compatible = "nvidia,tegra264-cam-cdi-tsc";
ranges = <0x0 0x0 0xc230000 0x10000>;
reg = <0x0 0xc230000 0x0 0x18>;
#address-cells = <1>;
#size-cells = <1>;
status = "disabled";
};

View File

@@ -0,0 +1,67 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra-capture-isp/nvidia,tegra-camrtc-capture-isp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra Capture-ISP driver
maintainers:
- Evgeny Kornev
description: |
the compatability = nvidia,tegra-camrtc-capture-isp is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c
The following nodes use this compatibility
- /tegra-capture-isp
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-camrtc-capture-isp
required:
- compatible
properties:
nvidia,isp-devices:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
nvidia,isp-max-channels:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x20
maximum: 0x20
required:
- compatible
examples:
- |
tegra-capture-isp {
compatible = "nvidia,tegra-camrtc-capture-isp";
nvidia,isp-devices = <&isp &isp1>;
nvidia,isp-max-channels = <32>;
status = "disabled";
};

View File

@@ -0,0 +1,101 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra-capture-vi/nvidia,tegra-camrtc-capture-vi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra Capture-ISP driver
maintainers:
- Evgeny Kornev
description: |
the compatability = nvidia,tegra-camrtc-capture-vi is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c
The following nodes use this compatibility
- /tegra-capture-vi
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-camrtc-capture-vi
required:
- compatible
properties:
nvidia,vi-devices:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
nvidia,vi-mapping-size:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6
maximum: 0x6
nvidia,vi-mapping:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x5
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x1
nvidia,vi-mapping-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- csi-stream-id
- vi-unit-id
nvidia,vi-max-channels:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x48
maximum: 0x48
required:
- compatible
examples:
- |
tegra-capture-vi {
compatible = "nvidia,tegra-camrtc-capture-vi";
nvidia,vi-devices = <&vi0 &vi1>;
nvidia,vi-mapping-size = <6>;
nvidia,vi-mapping = <0 0>,
<1 0>,
<2 1>,
<3 1>,
<4 0>,
<5 1>;
nvidia,vi-mapping-names = "csi-stream-id, vi-unit-id";
nvidia,vi-max-channels = <72>;
status = "disabled";
};

View File

@@ -0,0 +1,61 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/sipl_devblk_7/nvidia,cdi-mgr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra Automotive CDI Manager Driver
maintainers:
- Frank Chen
description: |
the compatability = nvidia,cdi-mgr is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/cdi/cdi_mgr.c
The following nodes use this compatibility
- /sipl_devblk_7
- /sipl_devblk_9
- /sipl_devblk_0
- /sipl_devblk_12
- /sipl_devblk_1
- /sipl_devblk_3
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,cdi-mgr
required:
- compatible
properties:
pwdn-gpios:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x5a
required:
- compatible
examples:
- |
sipl_devblk_7 {
compatible = "nvidia,cdi-mgr";
status = "okay";
};

View File

@@ -0,0 +1,64 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/cim_ver/nvidia,cim_ver.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra Automotive CDI Manager Driver
maintainers:
- Frank Chen
description: |
the compatability = nvidia,cim_ver is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/cdi/cdi_mgr.c
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/cdi/cdi_dev.c
The following nodes use this compatibility
- /cim_ver
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,cim_ver
required:
- compatible
properties:
cim_ver:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- cim_ver_a02
cim_frsync_src:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
required:
- compatible
examples:
- |
cim_ver {
compatible = "nvidia,cim_ver";
status = "okay";
};

View File

@@ -0,0 +1,98 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/isc-mgr.0/nvidia,isc-mgr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra Autotive ISC Manager Driver
maintainers:
- Frank Chen
description: |
the compatability = nvidia,isc-mgr is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/isc/isc_mgr.c
The following nodes use this compatibility
- /isc-mgr.0
- /isc-mgr.1
- /isc-mgr.2
- /isc-mgr.3
- /isc-mgr.4
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,isc-mgr
required:
- compatible
properties:
i2c-bus:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xc
csi-port:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x6
cphy-map-trio0:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- A_B_C
cphy-map-trio1:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- C_A_B
cphy-map-trio2:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- A_B_C
cphy-map-trio3:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- C_A_B
required:
- compatible
examples:
- |
isc-mgr.0 {
compatible = "nvidia,isc-mgr"; 7095 » » i2c-bus = <0x7>;
csi-port = <0x0>;
cphy-map-trio0 = "A_B_C";
cphy-map-trio1 = "C_A_B";
cphy-map-trio2 = "A_B_C";
cphy-map-trio3 = "C_A_B";
status = "okay";
};

View File

@@ -0,0 +1,73 @@
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
%YAML 1.2
---
$id: http://devicetree.org/schemas/smmu-hwpm@810aa30000/nvidia,t264-smmu-hwpm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra264 SMMU-HWPM driver
maintainers:
- Pritesh Raithatha
- Ketan Patil
description: |
the compatability = nvidia,t264-smmu-hwpm is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/memory/tegra/smmu-hwpm.c
The following nodes use this compatibility
- /bus@0/smmu-hwpm@810aa30000
- /bus@0/smmu-hwpm@8105a30000
- /bus@0/smmu-hwpm@8106a30000
- /bus@0/smmu-hwpm@8806a30000
- /bus@0/smmu-hwpm@810ba30000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,t264-smmu-hwpm
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x88
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5a30000
maximum: 0xba30000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
required:
- compatible
- reg
examples:
- |
smmu-hwpm@810aa30000 {
compatible = "nvidia,t264-smmu-hwpm";
reg = <0x81 0x0aa30000 0x0 0x10000>;
status = "disabled";
};

View File

@@ -0,0 +1,85 @@
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
%YAML 1.2
---
$id: http://devicetree.org/schemas/memory-controller-hwpm@8108020000/nvidia,tegra-t264-mc-hwpm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra264 MC-HWPM driver
maintainers:
- Pritesh Raithatha
- Ketan Patil
description: |
the compatability = nvidia,tegra-t264-mc-hwpm is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/memory/tegra/tegra264-mc-hwpm.c
The following nodes use this compatibility
- /bus@0/memory-controller-hwpm@8108020000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-t264-mc-hwpm
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8020000
maximum: 0x8220000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x20000
maximum: 0x20000
required:
- compatible
- reg
examples:
- |
memory-controller-hwpm@8108020000 {
compatible = "nvidia,tegra-t264-mc-hwpm";
reg = <0x81 0x8020000 0x0 0x20000>,
<0x81 0x8040000 0x0 0x20000>,
<0x81 0x8060000 0x0 0x20000>,
<0x81 0x8080000 0x0 0x20000>,
<0x81 0x80a0000 0x0 0x20000>,
<0x81 0x80c0000 0x0 0x20000>,
<0x81 0x80e0000 0x0 0x20000>,
<0x81 0x8100000 0x0 0x20000>,
<0x81 0x8120000 0x0 0x20000>,
<0x81 0x8140000 0x0 0x20000>,
<0x81 0x8160000 0x0 0x20000>,
<0x81 0x8180000 0x0 0x20000>,
<0x81 0x81a0000 0x0 0x20000>,
<0x81 0x81c0000 0x0 0x20000>,
<0x81 0x81e0000 0x0 0x20000>,
<0x81 0x8200000 0x0 0x20000>,
<0x81 0x8220000 0x0 0x20000>;
status = "disabled";
};

View File

@@ -0,0 +1,94 @@
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
%YAML 1.2
---
$id: http://devicetree.org/schemas/memqual@f020000/nvidia,tegra-t264-mem-qual.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mem Qual IOVA Mapping Provider
maintainers:
- Ketan Patil
description: |
the compatability = nvidia,tegra-t264-mem-qual is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/memory/tegra/mem-qual.c
The following nodes use this compatibility
- /bus@0/memqual@f020000
- /bus@0/memqual@a808730000
- /bus@0/memqual@818d020000
- /bus@0/memqual@a808750000
- /bus@0/memqual@818d030000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-t264-mem-qual
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xa8
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8730000
maximum: 0x8d030000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x3f00
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- reg
- iommus
examples:
- |
memqual@f020000 {
compatible = "nvidia,tegra-t264-mem-qual";
status = "disabled";
reg = <0x0 0x0f020000 0x0 0x10000>;
iommus = <&smmu1_mmu TEGRA_SID_MIU0>,
<&smmu1_mmu TEGRA_SID_MIU1>;
dma-coherent;
};

View File

@@ -0,0 +1,68 @@
# SPDX-License-Identifier: GPL-2.0-only
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
%YAML 1.2
---
$id: http://devicetree.org/schemas/mc_carveout@8108020000/nvidia,tegra-t26x-mc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra Memory Controller driver
maintainers:
- Ashish Mhetre
description: |
the compatability = nvidia,tegra-t26x-mc is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/memory/tegra/mc-t26x.c
The following nodes use this compatibility
- /bus@0/mc_carveout@8108020000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-t26x-mc
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8020000
maximum: 0x8020000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x20000
maximum: 0x20000
required:
- compatible
- reg
examples:
- |
mc_carveout@8108020000 {
compatible = "nvidia,tegra-t26x-mc";
reg = <0x81 0x08020000 0x0 0x20000>;
status = "disabled";
};

View File

@@ -0,0 +1,144 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/external-memory-controller@8108800000/nvidia,tegra264-emc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra External Memory Controller driver
maintainers:
- Sachin Nikam
description: |
the compatability = nvidia,tegra264-emc is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/memory/tegra/tegra186-emc.c
The following nodes use this compatibility
- /bus@0/memory-controller@8108020000/external-memory-controller@8108800000
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- nvidia,tegra264-emc
- nvidia,tegra234-emc
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8800000
maximum: 0x8890000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x20000
maximum: 0x20000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8d
maximum: 0x8d
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x122
maximum: 0x122
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- emc
'#interconnect-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,bpmp:
$ref: "/schemas/types.yaml#/definitions/uint32"
numa-node-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
examples:
- |
external-memory-controller@8108800000 {
compatible = "nvidia,tegra264-emc",
"nvidia,tegra234-emc";
status = "disabled";
reg = <0x81 0x08800000 0x0 0x20000>,
<0x81 0x08890000 0x0 0x20000>;
interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&bpmp TEGRA264_CLK_EMC>;
clock-names = "emc";
#interconnect-cells = <0>;
nvidia,bpmp = <&bpmp>;
numa-node-id = <0x0>;
};

View File

@@ -0,0 +1,260 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/l2-cache-0/cache.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cache Storage Driver
maintainers:
- Rich Wiley
description: |
the compatability = cache is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/mfd/nvidia-vrs-pseq.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_xmit_shortcut.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_ap.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_fsm_wnm.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_mlme_ext.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_sec_cam.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_xmit.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_sta_mgt.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_wow.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_recv_shortcut.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_wnm.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_recv.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/rtw_mlme.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/core/mesh/rtw_mesh.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/rtw_xmit_shortcut.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/rtw_recv.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/drv_types.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/ieee80211.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/rtw_mlme_ext.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/rtw_wnm.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/rtw_mlme.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/rtw_sec_cam.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/rtw_xmit.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/include/sta_info.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_rx_agg.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/pltfm_ops_windows.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_types.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_trx_def.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_tx.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_config.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/pltfm_ops_linux.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_rx.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/pltfm_ops_none.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/pltfm_ops_macos.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_api_drv.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/pltfm_ops_uefi.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_init.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/phl_def.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/hci/phl_trx_def_pcie.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/hci/phl_trx_pcie.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/test/trx_test.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/test/trx_test.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/hal_g6/rtl8852c/hal_trx_8852c.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/hal_g6/rtl8852c/pci/hal_trx_8852ce.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/hal_g6/mac/mac_def.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/hal_g6/mac/mac_exp_def.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/phl/hal_g6/mac/mac_ax/wowlan.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/rtw_cfg.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/ioctl_cfg80211.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/rtw_proc.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/rtw_cfgvendor.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/rhashtable.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/os_dep/linux/pci_intf.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/platform/platform_mips_98d_pci.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/platform/platform_ops.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8852ce/platform/platform_linux_pc_pci.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_wlan_util.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_ap.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme_ext.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_pwrctrl.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_sta_mgt.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_debug.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_wnm.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_recv.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/rtw_mlme.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/core/mesh/rtw_mesh.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/hal_com_h2c.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/rtw_recv.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/drv_types.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/hal_com.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/ieee80211.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/rtw_debug.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/rtw_mlme_ext.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/rtw_wnm.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/rtw_mlme.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/rtw_pwrctrl.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/include/rtw_xmit.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/rtw_proc.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/rtw_cfgvendor.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/rhashtable.h
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/pci_intf.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/os_dep/linux/os_intfs.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/hal/hal_com.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/hal/hal_halmac.c
- <TOP>/kernel/nvidia-oot/drivers/net/wireless/realtek/rtl8822ce/hal/rtl8822c/pci/rtl8822ce_xmit.c
- <TOP>/kernel/nvidia-oot/drivers/net/ethernet/mft/mst_backward_compatibility/mst_pci/mst_pci_bc.c
- <TOP>/kernel/nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_vblk.c
- <TOP>/kernel/nvidia-oot/drivers/block/tegra_virt_storage/tegra_hv_scsi.c
- <TOP>/kernel/nvidia-oot/drivers/firmware/tegra/ivc_ext.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_imx274.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/lt6911uxc.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_imx390_archived.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_imx318.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_imx185.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/pca9570.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_hawk_owl.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/max9295.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_ar0234.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_imx477.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/max929x.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_imx390.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/max9296.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/max96712.c
- <TOP>/kernel/nvidia-oot/drivers/media/i2c/nv_imx219.c
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/camera/fusa-capture/capture-isp.c
- <TOP>/kernel/nvidia-oot/drivers/media/platform/tegra/camera/fusa-capture/capture-common.c
- <TOP>/kernel/nvidia-oot/drivers/i2c/busses/i2c-nvvrs11.c
- <TOP>/kernel/nvidia-oot/drivers/bluetooth/realtek/rtk_misc.c
- <TOP>/kernel/nvidia-oot/drivers/bluetooth/realtek/rtk_bt.c
- <TOP>/kernel/nvidia-oot/drivers/bluetooth/realtek/rtk_coex.c
- <TOP>/kernel/nvidia-oot/drivers/rtc/rtc-max77851.c
- <TOP>/kernel/nvidia-oot/drivers/virt/tegra/tegra_hv.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/plane.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/nvjpg.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/nvdec.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/nvenc.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/gem.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/drm.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/vic.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/drm/tegra/include/uapi/drm/tegra_drm_next.h
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x/syncpt.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x/cdma.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x/bus.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x/dev.h
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x/dev.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x/include/linux/host1x-next.h
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x/hw/syncpt_hw.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x-emu/syncpt.c
- <TOP>/kernel/nvidia-oot/drivers/gpu/host1x-emu/hw/syncpt_hw.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/host/nvdla/dla_os_interface.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/host/pva/pva_vpu_exe.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/host/pva/fw_include/pva-task.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/host/pva/fw_include/pva-ucode-header.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_fault.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_alloc.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_alloc.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_dev_int.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_cache.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_ioctl.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_heap.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_handle.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_pp.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_dmabuf.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_alloc_int.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/nvmap/nvmap_dev.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/tsec/tsec_boot.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/tsec/tsec_linux.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/tsec/tsec_cmds.h
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/tsec/tsec_comms/tsec_comms.c
- <TOP>/kernel/nvidia-oot/drivers/video/tegra/virt/tegra_gr_comm.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/dce/dce-debug-perf.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/dce/include/interface/dce-admin-perf-stats.h
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/dce/include/interface/dce-interface.h
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/aon/tegra-ivc.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/aon/tegra-aon-mail.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/mce/mce.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/mce/tegra23x-mce.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/rtcpu/tegra-rtcpu-trace.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/rtcpu/camchar.c
- <TOP>/kernel/nvidia-oot/drivers/platform/tegra/nvadsp/dev-t18x.c
- <TOP>/kernel/nvidia-oot/drivers/misc/nvscic2c-pcie/stream-extensions.c
- <TOP>/kernel/nvidia-oot/drivers/misc/nvscic2c-pcie/iova-alloc.h
- <TOP>/kernel/nvidia-oot/drivers/misc/nvscic2c-pcie/pci-client.c
- <TOP>/kernel/nvidia-oot/drivers/misc/nvscic2c-pcie/iova-alloc.c
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_clock.c
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_krnl.c
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_internal.h
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_mem.c
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_pci.c
The following nodes use this compatibility
- /cpus/l2-cache-0
- /cpus/l2-cache-1
- /cpus/l2-cache-2
- /cpus/l2-cache-3
- /cpus/l2-cache-4
- /cpus/l2-cache-5
- /cpus/l2-cache-6
- /cpus/l2-cache-7
- /cpus/l2-cache-8
- /cpus/l2-cache-9
- /cpus/l2-cache-10
- /cpus/l2-cache-11
- /cpus/l2-cache-12
- /cpus/l2-cache-13
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- cache
required:
- compatible
properties:
cache-level:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
cache-size:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x100000
maximum: 0x100000
cache-line-size:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40
maximum: 0x40
cache-sets:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x800
maximum: 0x800
cache-unified:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
examples:
- |
l2-cache-0 {
compatible = "cache";
cache-level = <2>;
cache-size = <1048576>;
cache-line-size = <64>;
cache-sets = <2048>;
cache-unified;
};

View File

@@ -0,0 +1,101 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/vrs@3c/nvidia,vrs-pseq.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Voltage Regulator Spec Power Sequencer Multi Function Device Core Driver
maintainers:
- Subhi Garg
description: |
the compatability = nvidia,vrs-pseq is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/mfd/nvidia-vrs-pseq.c
The following nodes use this compatibility
- /bpmp/i2c/vrs@3c
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,vrs-pseq
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3c
maximum: 0x3c
interrupt-parent:
$ref: "/schemas/types.yaml#/definitions/uint32"
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
interrupt-controller:
$ref: "/schemas/types.yaml#/definitions/flag"
'#interrupt-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
required:
- compatible
- reg
- interrupts
examples:
- |
vrs@3c {
compatible = "nvidia,vrs-pseq";
reg = <0x3c>;
interrupt-parent = <&pmc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells = <2>;
status = "disabled";
};

View File

@@ -0,0 +1,71 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/pmu/arm,armv8-pmuv3.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra Power Management Unit Module
maintainers:
- Besar Wicaksono
description: |
The following nodes use this compatibility
- /pmu
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- arm,armv8-pmuv3
required:
- compatible
properties:
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
required:
- compatible
- interrupts
examples:
- |
pmu {
compatible = "arm,armv8-pmuv3";
status = "disabled";
interrupts = <GIC_PPI 7 8>;
};

View File

@@ -0,0 +1,101 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/funnel_major@10080000/arm,coresight-dynamic-funnel.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Coresight Dynamic Funnel Driver
maintainers:
- Rich Wiley
description: |
The following nodes use this compatibility
- /funnel_major@10080000
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- arm,coresight-dynamic-funnel
- arm,primecell
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10080000
maximum: 0x10080000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x1000
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xcb
maximum: 0xcb
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- apb_pclk
required:
- compatible
- reg
- clocks
- clock-names
examples:
- |
funnel_major@10080000 {
compatible = "arm,coresight-dynamic-funnel, arm,primecell";
status = "disabled";
reg = <0x0 0x10080000 0x0 0x1000>;
clocks = <&bpmp TEGRA264_CLK_HCSITE>;
clock-names = "apb_pclk";
};

View File

@@ -0,0 +1,100 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/replicator_soc@10060000/arm,coresight-dynamic-replicator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Coresight Dynamic Replicator Driver
maintainers:
- Rich Wiley
description: |
The following nodes use this compatibility
- /replicator_soc@10060000
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- arm,coresight-dynamic-replicator
- arm,primecell
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10060000
maximum: 0x10060000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x1000
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xcb
maximum: 0xcb
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- apb_pclk
required:
- compatible
- reg
- clocks
- clock-names
examples:
- |
replicator_soc@10060000 {
compatible = "arm,coresight-dynamic-replicator, arm,primecell";
status = "disabled";
reg = <0x0 0x10060000 0x0 0x1000>;
clocks = <&bpmp TEGRA264_CLK_HCSITE>;
clock-names = "apb_pclk";
};

View File

@@ -0,0 +1,110 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/stm@10070000/arm,coresight-stm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Coresight STM Driver
maintainers:
- Rich Wiley
description: |
The following nodes use this compatibility
- /stm@10070000
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- arm,coresight-stm
- arm,primecell
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10070000
maximum: 0x11000000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x1000000
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- stm-base
- stm-stimulus-base
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xca
maximum: 0xca
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- apb_pclk
required:
- compatible
- reg
- clocks
- clock-names
examples:
- |
stm@10070000 {
compatible = "arm,coresight-stm, arm,primecell";
status = "disabled";
reg = <0x0 0x10070000 0x0 0x1000>,
<0x0 0x11000000 0x0 0x1000000>;
reg-names = "stm-base, stm-stimulus-base";
clocks = <&bpmp TEGRA264_CLK_CSITE>;
clock-names = "apb_pclk";
};

View File

@@ -0,0 +1,121 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/etf_soc@10040000/arm,coresight-tmc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Coresight TMC Driver
maintainers:
- Rich Wiley
description: |
The following nodes use this compatibility
- /etf_soc@10040000
- /etr_soc@10050000
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- arm,coresight-tmc
- arm,primecell
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10040000
maximum: 0x10050000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x1000
coresight-default-sink:
$ref: "/schemas/types.yaml#/definitions/flag"
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xcb
maximum: 0xcb
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- apb_pclk
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x300
maximum: 0x300
required:
- compatible
- reg
- clocks
- clock-names
- iommus
examples:
- |
etf_soc@10040000 {
compatible = "arm,coresight-tmc, arm,primecell";
status = "disabled";
reg = <0x0 0x10040000 0x0 0x1000>;
coresight-default-sink;
clocks = <&bpmp TEGRA264_CLK_HCSITE>;
clock-names = "apb_pclk";
};

View File

@@ -0,0 +1,187 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/mods_pcie0/nvidia,mods_smmu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MOD's SMMU Driver
maintainers:
- Kiran Kasamsetty
description: |
the compatability = nvidia,mods_smmu is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_smmu_drv.c
The following nodes use this compatibility
- /mods_pcie0
- /mods_pcie1
- /mods_pcie2
- /mods_pcie3
- /mods_pcie4
- /mods_pcie5
- /mods_isp0
- /mods_isp2
- /mods_i2c0
- /mods_i2c1
- /mods_i2c2
- /mods_i2c3
- /mods_i2c7
- /mods_i2c9
- /mods_i2c11
- /mods_i2c12
- /mods_i2c14
- /mods_i2c15
- /mods_i2c16
- /mods_spi1
- /mods_spi2
- /mods_spi3
- /mods_spi4
- /mods_spi5
- /mods_uart4
- /mods_uart5
- /mods_uart9
- /mods_uart10
- /mods_vi0
- /mods_vi1
- /mods_sdmmc1
- /mods_ufs
- /mods_xhci
- /mods_xusb
- /mods_dma
- /mods_se
- /mods_seu1
- /mods_seu2
- /mods_seu3
- /mods_qspi0_dma
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,mods_smmu
required:
- compatible
properties:
iommu-map:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x50000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
dev-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- mods_pcie0
- mods_pcie1
- mods_pcie2
- mods_pcie3
- mods_pcie4
- mods_pcie5
- mods_isp0
- mods_isp2
- mods_i2c0
- mods_i2c1
- mods_i2c2
- mods_i2c3
- mods_i2c7
- mods_i2c9
- mods_i2c11
- mods_i2c12
- mods_i2c14
- mods_i2c15
- mods_i2c16
- mods_spi1
- mods_spi2
- mods_spi3
- mods_spi4
- mods_spi5
- mods_uart4
- mods_uart5
- mods_uart9
- mods_uart10
- mods_vi0
- mods_vi1
- mods_sdmmc1
- mods_ufs
- mods_xhci
- mods_xusb
- mods_dma
- mods_se
- mods_seu1
- mods_seu2
- mods_seu3
- mods_qspi0_dma
nvidia,bpmp:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x5
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x800
maximum: 0x50000
required:
- compatible
- iommus
examples:
- |
mods_pcie0 {
compatible = "nvidia,mods_smmu";
iommu-map = <0x0 &smmu2_mmu 0x10000 0x10000>;
dma-coherent;
dev-names = "mods_pcie0";
status = "disabled";
nvidia,bpmp = <&bpmp 0x0>;
};

View File

@@ -0,0 +1,133 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/mods_tegra_dma/nvidia,mods_tegra_dma.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MOD's DMA Driver
maintainers:
- Kiran Kasamsetty
description: |
the compatability = nvidia,mods_tegra_dma is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_dma.c
The following nodes use this compatibility
- /mods_tegra_dma
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,mods_tegra_dma
required:
- compatible
properties:
dmas:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x14
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1f
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x801
maximum: 0x81f
dma-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- i2c0_tx
- i2c1_tx
- i2c2_tx
- i2c3_tx
- i2c7_tx
- i2c9_tx
- i2c11_tx
- i2c12_tx
- i2c14_tx
- i2c15_tx
- i2c16_tx
- spi1_rx
- spi1_tx
- spi2_rx
- spi2_tx
- spi3_rx
- spi3_tx
- spi4_rx
- spi4_tx
- spi5_rx
- spi5_tx
- uart4_rx
- uart4_tx
- uart5_rx
- uart5_tx
- uart9_rx
- uart9_tx
- uart10_rx
- uart10_tx
required:
- compatible
examples:
- |
mods_tegra_dma {
compatible = "nvidia,mods_tegra_dma";
dmas = <&gpcdma 0 31 TEGRA264_GPCDMA_SID_I2C0>,
< &gpcdma 7 7 TEGRA264_GPCDMA_SID_I2C1>,
< &gpcdma 3 3 TEGRA264_GPCDMA_SID_I2C2>,
< &gpcdma 4 4 TEGRA264_GPCDMA_SID_I2C3>,
< &gpcdma 6 6 TEGRA264_GPCDMA_SID_I2C7>,
< &gpcdma 2 2 TEGRA264_GPCDMA_SID_I2C9>,
< &gpcdma 1 1 TEGRA264_GPCDMA_SID_I2C11>,
< &gpcdma 5 5 TEGRA264_GPCDMA_SID_I2C12>,
< &gpcdma 18 28 TEGRA264_GPCDMA_SID_I2C14>,
< &gpcdma 19 29 TEGRA264_GPCDMA_SID_I2C15>,
< &gpcdma 20 30 TEGRA264_GPCDMA_SID_I2C16>,
< &gpcdma 9 9 TEGRA264_GPCDMA_SID_SPI1>,
< &gpcdma 9 19 TEGRA264_GPCDMA_SID_SPI1>,
< &gpcdma 8 8 TEGRA264_GPCDMA_SID_SPI2>,
< &gpcdma 8 18 TEGRA264_GPCDMA_SID_SPI2>,
< &gpcdma 14 14 TEGRA264_GPCDMA_SID_SPI3>,
< &gpcdma 14 24 TEGRA264_GPCDMA_SID_SPI3>,
< &gpcdma 15 15 TEGRA264_GPCDMA_SID_SPI4>,
< &gpcdma 15 25 TEGRA264_GPCDMA_SID_SPI4>,
< &gpcdma 16 16 TEGRA264_GPCDMA_SID_SPI5>,
< &gpcdma 16 26 TEGRA264_GPCDMA_SID_SPI5>,
< &gpcdma 13 23 TEGRA264_GPCDMA_SID_UART4>,
< &gpcdma 13 13 TEGRA264_GPCDMA_SID_UART4>,
< &gpcdma 11 11 TEGRA264_GPCDMA_SID_UART5>,
< &gpcdma 11 21 TEGRA264_GPCDMA_SID_UART5>,
< &gpcdma 10 10 TEGRA264_GPCDMA_SID_UART9>,
< &gpcdma 10 20 TEGRA264_GPCDMA_SID_UART9>,
< &gpcdma 12 12 TEGRA264_GPCDMA_SID_UART10>,
< &gpcdma 12 22 TEGRA264_GPCDMA_SID_UART10>;
dma-names = "i2c0_tx, i2c1_tx, i2c2_tx, i2c3_tx, i2c7_tx, i2c9_tx, i2c11_tx, i2c12_tx, i2c14_tx, i2c15_tx, i2c16_tx, spi1_rx, spi1_tx, spi2_rx, spi2_tx, spi3_rx, spi3_tx, spi4_rx, spi4_tx, spi5_rx, spi5_tx, uart4_rx, uart4_tx, uart5_rx, uart5_tx, uart9_rx, uart9_tx, uart10_rx, uart10_tx";
status = "disabled";
};

View File

@@ -0,0 +1,51 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/mods_test/nvidia,mods_test.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MOD's Test Driver
maintainers:
- Kiran Kasamsetty
description: |
the compatability = nvidia,mods_test is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_dmabuf.c
The following nodes use this compatibility
- /mods_test
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,mods_test
required:
- compatible
properties:
required:
- compatible
examples:
- |
mods_test {
compatible = "nvidia,mods_test";
status = "disabled";
};

View File

@@ -0,0 +1,72 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/bus@0/simple-bus.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mods Simple Bus Driver
maintainers:
- Chris Dragan
- Kiran Kasamsetty
description: |
the compatability = simple-bus is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/misc/mods/mods_clock.c
The following nodes use this compatibility
- /bus@0
- /mods-simple-bus
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- simple-bus
required:
- compatible
properties:
'#address-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x2
'#size-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x2
device_type:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- mods-simple-bus
required:
- compatible
examples:
- |
bus@0 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x0 0x0 0x0 0x100 0x0>;
};

View File

@@ -0,0 +1,67 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra-isp-map/nvidia,csi-isp-map-config.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra CSI-ISP Map Config
maintainers:
- Chinniah Poosapadi
description: |
The following nodes use this compatibility
- /tegra-isp-map
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,csi-isp-map-config
required:
- compatible
properties:
nvidia,isp-mapping:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x5
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x1
required:
- compatible
examples:
- |
tegra-isp-map {
compatible = "nvidia,csi-isp-map-config";
nvidia,isp-mapping = <0 0>,
<1 0>,
<2 1>,
<3 1>,
<4 0>,
<5 1>;
status = "disabled";
};

View File

@@ -0,0 +1,123 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/bootmgr/nvidia,dulink-connection.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Drive Update Connection Driver
maintainers:
- Johnny Fan
description: |
The following nodes use this compatibility
- /chosen/driveupdate/bootmgr
- /chosen/driveupdate/bhc
- /chosen/driveupdate/decomp
- /chosen/driveupdate/du-client
- /chosen/driveupdate/content
- /chosen/driveupdate/master
- /chosen/driveupdate/tii
- /chosen/driveupdate/ctx_store
- /chosen/driveupdate/auth
- /chosen/driveupdate/dushell
- /chosen/driveupdate/plugin
- /chosen/driveupdate/ddu
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,dulink-connection
required:
- compatible
properties:
remote-path:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- /bootmgr
- /bhc
- /decomp
- /du-client
- /content
- /master
- /tii
- /ctx_store
- /auth
- /dushell
- /plugin
- /ddu
type:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- DOWNLINK
tr-type:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- NVSCI
- TCP
tr-params:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- nvdu_gos_ipc_a_0
- nvdu_gos_ipc_a_1
- nvdu_gos_ipc_b_0
- nvdu_gos_ipc_b_1
- nvdu_gos_ipc_c_0
- nvdu_gos_ipc_c_1
- nvdu_gos_ipc_d_0
- nvdu_gos_ipc_d_1
- nvdu_gos_ipc_e_0
- nvdu_gos_ipc_e_1
- nvdu_gos_ipc_l_0
- nvdu_gos_ipc_l_1
- nvdu_gos_ipc_j_0
- nvdu_gos_ipc_j_1
- nvdu_gos_ipc_k_0
- nvdu_gos_ipc_k_1
- nvdu_gos_ipc_m_0
- nvdu_gos_ipc_m_1
- nvdu_gos_ipc_f_0
- nvdu_gos_ipc_f_1
- nvdu_gos_ipc_g_0
- nvdu_gos_ipc_g_1
- TCP_SERVER
- 0.0.0.0
- 4455
- 0
required:
- compatible
examples:
- |
bootmgr {
};

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/smmu_test/nvidia,smmu_test.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia SMMU Test
maintainers:
- Sachin Nikam
description: |
The following nodes use this compatibility
- /smmu_test
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,smmu_test
required:
- compatible
properties:
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
required:
- compatible
- iommus
examples:
- |
smmu_test {
compatible = "nvidia,smmu_test";
iommus = <&smmu4_mmu 0x00000000>;
status = "disabled";
};

View File

@@ -0,0 +1,226 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra_soc_hwpm@1604000/nvidia,t264-soc-hwpm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra SOC-HWPM
maintainers:
- Besar Wicaksono
- Vasuki Shankar
description: |
The following nodes use this compatibility
- /bus@0/tegra_soc_hwpm@1604000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,t264-soc-hwpm
required:
- compatible
properties:
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xa8
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1600000
maximum: 0x8160f000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x2000
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc
maximum: 0xcd
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- la
- parent
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xa
maximum: 0x14
reset-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- la
- hwpm
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xe00
maximum: 0xe00
required:
- compatible
- reg
- clocks
- clock-names
- resets
- reset-names
- iommus
examples:
- |
tegra_soc_hwpm@1604000 {
compatible = "nvidia,t264-soc-hwpm";
dma-coherent;
reg = <0x00 0x01600000 0x0 0x1000>,
<0x00 0x01604000 0x0 0x1000>,
<0x00 0x14100000 0x0 0x1000>,
<0x00 0x14110000 0x0 0x1000>,
<0x00 0x14120000 0x0 0x1000>,
<0x00 0x14130000 0x0 0x1000>,
<0x00 0x14140000 0x0 0x1000>,
<0x00 0x14150000 0x0 0x1000>,
<0x00 0x14160000 0x0 0x1000>,
<0x00 0x14170000 0x0 0x1000>,
<0x00 0x14180000 0x0 0x1000>,
<0x00 0x14190000 0x0 0x1000>,
<0x00 0x141a0000 0x0 0x1000>,
<0x00 0x141b0000 0x0 0x1000>,
<0x00 0x141c0000 0x0 0x1000>,
<0x00 0x141d0000 0x0 0x1000>,
<0x81 0x01600000 0x0 0x1000>,
<0x81 0x01601000 0x0 0x1000>,
<0x81 0x01602000 0x0 0x1000>,
<0x81 0x01603000 0x0 0x1000>,
<0x81 0x01604000 0x0 0x1000>,
<0x81 0x01605000 0x0 0x1000>,
<0x81 0x01606000 0x0 0x1000>,
<0x81 0x01607000 0x0 0x1000>,
<0x81 0x01608000 0x0 0x1000>,
<0x81 0x01609000 0x0 0x1000>,
<0x81 0x0160a000 0x0 0x1000>,
<0x81 0x0160b000 0x0 0x1000>,
<0x81 0x0160c000 0x0 0x1000>,
<0x81 0x0160d000 0x0 0x1000>,
<0x81 0x0160e000 0x0 0x1000>,
<0x81 0x0160f000 0x0 0x1000>,
<0x81 0x01621000 0x0 0x1000>,
<0x81 0x01622000 0x0 0x1000>,
<0x81 0x01623000 0x0 0x1000>,
<0x81 0x01624000 0x0 0x1000>,
<0x81 0x01625000 0x0 0x1000>,
<0x81 0x01626000 0x0 0x1000>,
<0x81 0x01627000 0x0 0x1000>,
<0x81 0x01628000 0x0 0x1000>,
<0x81 0x01629000 0x0 0x1000>,
<0x81 0x0162a000 0x0 0x1000>,
<0x81 0x0162b000 0x0 0x1000>,
<0x81 0x0162c000 0x0 0x1000>,
<0x81 0x0162d000 0x0 0x1000>,
<0x81 0x0162e000 0x0 0x1000>,
<0x81 0x0162f000 0x0 0x1000>,
<0x81 0x01630000 0x0 0x1000>,
<0x81 0x01631000 0x0 0x1000>,
<0x81 0x01632000 0x0 0x1000>,
<0x81 0x0163e000 0x0 0x1000>,
<0x81 0x0163f000 0x0 0x1000>,
<0x81 0x01642000 0x0 0x1000>,
<0x81 0x01643000 0x0 0x1000>,
<0x81 0x01644000 0x0 0x1000>,
<0x81 0x01645000 0x0 0x1000>,
<0x81 0x01646000 0x0 0x1000>,
<0x81 0x01647000 0x0 0x1000>,
<0x81 0x0164b000 0x0 0x1000>,
<0x81 0x0164f000 0x0 0x1000>,
<0x81 0x01653000 0x0 0x1000>,
<0x81 0x81604000 0x0 0x1000>,
<0x81 0x81605000 0x0 0x1000>,
<0x81 0x81606000 0x0 0x1000>,
<0x81 0x81607000 0x0 0x1000>,
<0x81 0x8160b000 0x0 0x1000>,
<0x81 0x8160c000 0x0 0x1000>,
<0x81 0x8160e000 0x0 0x1000>,
<0x81 0x8160f000 0x0 0x1000>,
<0x88 0x01601000 0x0 0x1000>,
<0x88 0x01602000 0x0 0x1000>,
<0xa8 0x01604000 0x0 0x1000>,
<0xa8 0x01628000 0x0 0x1000>,
<0xa8 0x01629000 0x0 0x1000>,
<0x00 0x01610000 0x0 0x2000>,
<0x00 0x01612000 0x0 0x1000>;
clocks = <&bpmp TEGRA264_CLK_LA>,
<&bpmp TEGRA264_CLK_SPLL_OUT7>;
clock-names = "la, parent";
resets = <&bpmp TEGRA264_RESET_LA>,
<&bpmp TEGRA264_RESET_HWPM>;
reset-names = "la, hwpm";
iommus = <&smmu1_mmu TEGRA_SID_PMA0>;
status = "disabled";
};

View File

@@ -0,0 +1,76 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/SS_ErrorReportingConfig/nvidia,tegra-SafetyServiceConfig.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Safety Service Configuration
maintainers:
- Rahul Bedarkar
description: |
The following nodes use this compatibility
- /SS_ErrorReportingConfig
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-SafetyServiceConfig
required:
- compatible
properties:
Sw_Errors_count:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
Sw_Errors:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x30
maximum: 0x8120
TSC_MON_Enable:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
TSC_MON_Drift_Threshold:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x64
maximum: 0x64
TSC_MON_Debounce_Delay:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1388
maximum: 0x1388
TSC_MON_Sync_Timeout:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2710
maximum: 0x2710
required:
- compatible
examples:
- |
SS_ErrorReportingConfig {
};

View File

@@ -0,0 +1,61 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/bpmp-dummy/nvidia,tegra-bpmp-dummy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia BPMP Dummy Node
maintainers:
- Venkat Reddy Talla
description: |
The following nodes use this compatibility
- /bpmp-dummy
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-bpmp-dummy
required:
- compatible
properties:
'#clock-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#reset-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#power-domain-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
required:
- compatible
examples:
- |
bpmp-dummy {
};

View File

@@ -0,0 +1,51 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/FsiComAppChConfCcplexApp/nvidia,tegra-fsicom-CcplexApp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: FSI Communication Application Configuration
maintainers:
- Rahul Bedarkar
description: |
The following nodes use this compatibility
- /FsiComAppChConfCcplexApp
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-fsicom-CcplexApp
required:
- compatible
properties:
channelid_list:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x2
required:
- compatible
examples:
- |
FsiComAppChConfCcplexApp {
};

View File

@@ -0,0 +1,54 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/FsiComClientChConfigEpd/nvidia,tegra-fsicom-EPD.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: FSU Communication Client Configuration
maintainers:
- Rahul Bedarkar
description: |
The following nodes use this compatibility
- /FsiComClientChConfigEpd
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-fsicom-EPD
required:
- compatible
properties:
channelid_list:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
required:
- compatible
examples:
- |
FsiComClientChConfigEpd {
compatible = "nvidia,tegra-fsicom-EPD";
status = "disabled";
channelid_list = <0>;
};

View File

@@ -0,0 +1,72 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/FsiComIvc/nvidia,tegra-fsicom-channels.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: FSI Communication IVC Node
maintainers:
- Rahul Bedarkar
description: |
The following nodes use this compatibility
- /FsiComIvc
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-fsicom-channels
required:
- compatible
properties:
nChannel:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x9
maximum: 0x9
nvsciipc_endpoint:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- nvfsicom_EPD
- nvfsicom_CcplexApp
- nvfsicom_CcplexApp_state_change
- nvfsicom_app1
- nvfsicom_app2
- nvfsicom_appGR
required:
- compatible
examples:
- |
FsiComIvc {
compatible = "nvidia,tegra-fsicom-channels";
status = "disabled";
nChannel = <9>;
nvsciipc_endpoint = "nvfsicom_EPD",
"nvfsicom_CcplexApp",
"nvfsicom_CcplexApp_state_change",
"nvfsicom_app1",
"nvfsicom_app2",
"nvfsicom_appGR";
};

View File

@@ -0,0 +1,53 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/FsiComAppChConfApp1/nvidia,tegra-fsicom-sampleApp1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: FSI Application IVC Channel Configuration
maintainers:
- Rahul Bedarkar
description: |
The following nodes use this compatibility
- /FsiComAppChConfApp1
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-fsicom-sampleApp1
required:
- compatible
properties:
channelid_list:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
required:
- compatible
examples:
- |
FsiComAppChConfApp1 {
compatible = "nvidia,tegra-fsicom-sampleApp1";
status = "okay";
};

View File

@@ -0,0 +1,51 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/FsiComQnxAppChConfAppGR/nvidia,tegra-fsicom-sampleAppGR.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: QNX FSI Communication Application Configuration
maintainers:
- Rahul Bedarkar
description: |
The following nodes use this compatibility
- /FsiComQnxAppChConfAppGR
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-fsicom-sampleAppGR
required:
- compatible
properties:
channelid_list:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5
maximum: 0x5
required:
- compatible
examples:
- |
FsiComQnxAppChConfAppGR {
};

View File

@@ -0,0 +1,82 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/hsp-mbox/nvidia,tegra186-hsp-mailbox.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Hypervisor Hardware Syncronization Primatives (HSP) Driver
maintainers:
- Suresh Mangipudi
description: |
The following nodes use this compatibility
- /bus@0/host1x@8181200000/pva0@818c000000/hsp/hsp-mbox
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra186-hsp-mailbox
required:
- compatible
properties:
nvidia,hsp-shared-mailbox:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x7
nvidia,hsp-shared-mailbox-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- command
- addr
- len
- args
- sidechannel-wr
- aisr
- sidechannel-rd
- isr
required:
- compatible
examples:
- |
hsp-mbox {
compatible = "nvidia,tegra186-hsp-mailbox";
nvidia,hsp-shared-mailbox = <&hsp_pva0 0x0>,
<&hsp_pva0 0x1>,
<&hsp_pva0 0x2>,
<&hsp_pva0 0x3>,
<&hsp_pva0 0x4>,
<&hsp_pva0 0x5>,
<&hsp_pva0 0x6>,
<&hsp_pva0 0x7>;
nvidia,hsp-shared-mailbox-names = "command, addr, len, args, sidechannel-wr, aisr, sidechannel-rd, isr";
status = "disabled";
};

View File

@@ -0,0 +1,47 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/hsp/nvidia,tegra194-pva0-hsp.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Progrmable Vision Accelerator (PVA) Hypervisor Hardware Syncronization Primatives (HSP)
maintainers:
- Omar Nemri
description: |
The following nodes use this compatibility
- /bus@0/host1x@8181200000/pva0@818c000000/hsp
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra194-pva0-hsp
required:
- compatible
properties:
required:
- compatible
examples:
- |
hsp {
compatible = "nvidia,tegra194-pva0-hsp";
};

View File

@@ -0,0 +1,92 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/aconnect@9000000/nvidia,tegra264-aconnect.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Always Connected Driver
maintainers:
- Mohan Kumar
description: |
The following nodes use this compatibility
- /bus@0/aconnect@9000000
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- nvidia,tegra264-aconnect
- nvidia,tegra210-aconnect
required:
- compatible
properties:
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x9c
maximum: 0xa4
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- ape
- apb2ape
'#address-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
'#size-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
required:
- compatible
- clocks
- clock-names
examples:
- |
aconnect@9000000 {
compatible = "nvidia,tegra264-aconnect",
"nvidia,tegra210-aconnect";
clocks = <&bpmp TEGRA264_CLK_APE>,
<&bpmp TEGRA264_CLK_ADSP>;
clock-names = "ape, apb2ape";
power-domains = <&bpmp TEGRA264_POWER_DOMAIN_AUD>;
status = "disabled";
#address-cells = <2>;
#size-cells = <2>;
ranges = <0x0 0x9000000 0x0 0x9000000 0x0 0x2000000>;
};

View File

@@ -0,0 +1,71 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/adsp_audio/nvidia,tegra264-adsp-audio-hv.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Hypervisor Audio Driver
maintainers:
- Mohan Kumar
description: |
The following nodes use this compatibility
- /bus@0/aconnect@9000000/adsp_audio
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-adsp-audio-hv
required:
- compatible
properties:
nvidia,adma_ch_page:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
nvidia,adma_ch_start:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x31
maximum: 0x31
nvidia,adma_ch_cnt:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
compr-ops:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
num-plugin:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
required:
- compatible
examples:
- |
adsp_audio {
};

View File

@@ -0,0 +1,137 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/interrupt-controller@9960000/nvidia,tegra264-agic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia T264 Interrupt Controller
maintainers:
- Mohan Kumar
description: |
The following nodes use this compatibility
- /bus@0/aconnect@9000000/interrupt-controller@9960000
- /bus@0/aconnect@9000000/interrupt-controller@9970000
- /bus@0/aconnect@9000000/interrupt-controller@9980000
- /bus@0/aconnect@9000000/interrupt-controller@9990000
- /bus@0/aconnect@9000000/interrupt-controller@99a0000
- /bus@0/aconnect@9000000/interrupt-controller@99b0000
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- nvidia,tegra264-agic
- nvidia,tegra210-agic
required:
- compatible
properties:
'#interrupt-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
interrupt-controller:
$ref: "/schemas/types.yaml#/definitions/flag"
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x9961000
maximum: 0x99b2000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x1000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xf04
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xf04
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x9c
maximum: 0x9c
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- clk
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
examples:
- |
interrupt-controller@9960000 {
compatible = "nvidia,tegra264-agic",
"nvidia,tegra210-agic";
#interrupt-cells = <3>;
interrupt-controller;
reg = <0x0 0x9961000 0x0 0x1000>,
<0x0 0x9962000 0x0 0x1000>;
interrupts = <GIC_SPI 0x230(GIC_CPU_MASK_SIMPLE(4)|IRQ_TYPE_LEVEL_HIGH)>;
clocks = <&bpmp TEGRA264_CLK_ADSP>;
clock-names = "clk";
status = "disabled";
};

View File

@@ -0,0 +1,102 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra264-audio-graph-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia T264 Audio Graph Card Driver
maintainers:
- Mohan Kumar
description: |
The following nodes use this compatibility
- /sound
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-audio-graph-card
required:
- compatible
properties:
nvidia,ahub-c2c-links:
$ref: "/schemas/types.yaml#/definitions/flag"
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x9e
maximum: 0x9f
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- pll_a
- plla_out0
assigned-clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x9e
maximum: 0x115
assigned-clock-parents:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x9f
required:
- compatible
- clocks
- clock-names
examples:
- |
sound {
nvidia,ahub-c2c-links;
compatible = "nvidia,tegra264-audio-graph-card";
clocks = <&bpmp TEGRA264_CLK_PLLA1>,
<&bpmp TEGRA264_CLK_PLLA1_OUT1>;
clock-names = "pll_a, plla_out0";
assigned-clocks = <&bpmp TEGRA264_CLK_PLLA1>,
<&bpmp TEGRA264_CLK_PLLA1_OUT1>,
<&bpmp TEGRA264_CLK_AUD_MCLK>;
assigned-clock-parents = <0>,
<&bpmp TEGRA264_CLK_PLLA1>,
<&bpmp TEGRA264_CLK_PLLA1_OUT1>;
status = "disabled";
};

View File

@@ -0,0 +1,73 @@
# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/nvidia,tegra264-bpmp-i2c.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra T264 BPMP I2C Driver
maintainers:
- Suresh Mangipudi
description: |
The following nodes use this compatibility
- /bpmp/i2c
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- nvidia,tegra264-bpmp-i2c
- nvidia,tegra186-bpmp-i2c
required:
- compatible
properties:
nvidia,bpmp-bus-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5
maximum: 0x5
multi-master:
$ref: "/schemas/types.yaml#/definitions/flag"
description: Enables retries if arbitration is lost. Currently, the
functionality is supported only by the Tegra264 BPMP firmware.
'#address-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#size-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
required:
- compatible
examples:
- |
i2c {
compatible = "nvidia,tegra264-bpmp-i2c",
"nvidia,tegra186-bpmp-i2c";
status = "disabled";
nvidia,bpmp-bus-id = <5>;
#address-cells = <1>;
#size-cells = <0>;
};

View File

@@ -0,0 +1,79 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/bpmp-shmem@0/nvidia,tegra264-bpmp-shmem.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra T264 BPMP Shared Memory Driver
maintainers:
- Sandipan Patra
description: |
The following nodes use this compatibility
- /reserved-memory/bpmp-shmem@0
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- nvidia,tegra264-bpmp-shmem
- nvidia,tegra234-bpmp-shmem
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x86070000
maximum: 0x86070000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2000
maximum: 0x2000
no-map:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- reg
examples:
- |
bpmp-shmem@0 {
compatible = "nvidia,tegra264-bpmp-shmem",
"nvidia,tegra234-bpmp-shmem";
status = "disabled";
reg = <0x0 0x86070000 0x0 0x2000>;
no-map;
};

View File

@@ -0,0 +1,73 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvdisplay-niso/nvidia,tegra264-display-niso.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra Display Driver
maintainers:
- Mihir Pradeep Garude
description: |
The compatibility = nvidia,tegra264-display-niso is mentioned in the following drivers
- For DisplayServer <TOP>/display/drivers/drivers/
- For OpenRM <TOP>/gpu/drv/
The following nodes use this compatibility
- /display@8808c00000/nvdisplay-niso
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-display-niso
required:
- compatible
properties:
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x901
maximum: 0x901
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- iommus
examples:
- |
nvdisplay-niso {
compatible = "nvidia,tegra264-display-niso";
iommus = <&smmu3_mmu 0x901>;
dma-coherent;
status = "disabled";
};

View File

@@ -0,0 +1,543 @@
# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/display@8808c00000/nvidia,tegra264-display.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra Display Driver
maintainers:
- Mihir Pradeep Garude
description: |
The compatibility = nvidia,tegra264-display is mentioned in the following drivers
- For DisplayServer <TOP>/display/drivers/drivers/
- For OpenRM <TOP>/gpu/drv/
The following nodes use this compatibility
- /display@8808c00000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-display
required:
- compatible
properties:
power-domains:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,num-dpaux-instance:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
nvidia,bpmp:
$ref: "/schemas/types.yaml#/definitions/uint32"
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- nvdisplay
- dpaux0
- hdacodec
- mipical
- vdisp
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x88
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8c00000
maximum: 0x89840000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xfff
maximum: 0x1fffff
interrupt-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- nvdisplay
- dpaux0
- dpaux1
- dpaux2
- dpaux3
- hdacodec
- vdisp
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xf7
maximum: 0x101
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1d3
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- nvdisplayhub_clk
- nvdisplay_disp_clk
- nvdisplay_p0_clk
- nvdisplay_p1_clk
- nvdisplay_p2_clk
- nvdisplay_p3_clk
- nvdisplay_p4_clk
- nvdisplay_p5_clk
- nvdisplay_p6_clk
- nvdisplay_p7_clk
- fuse_clk
- sppll0_clkouta_clk
- sppll0_clkoutb_clk
- sppll0_clkoutpn_clk
- sppll1_clkoutpn_clk
- sppll0_div27_clk
- sppll1_div27_clk
- vpll0_clk
- vpll1_clk
- vpll2_clk
- vpll3_clk
- vpll4_clk
- vpll5_clk
- vpll6_clk
- vpll7_clk
- rg0_clk
- rg1_clk
- rg2_clk
- rg3_clk
- rg4_clk
- rg5_clk
- rg6_clk
- rg7_clk
- disppll_clk
- pre_sor0_clk
- pre_sor1_clk
- pre_sor2_clk
- pre_sor3_clk
- dp_link_ref_clk
- dp_linkb_ref_clk
- dp_linkc_ref_clk
- dp_linkd_ref_clk
- sor_linka_input_clk
- sor_linkb_input_clk
- sor_linkc_input_clk
- sor_linkd_input_clk
- sor_linka_afifo_clk
- sor_linkb_afifo_clk
- sor_linkc_afifo_clk
- sor_linkd_afifo_clk
- sor0_clk
- sor1_clk
- sor2_clk
- sor3_clk
- sor_pad_input_clk
- sor_padb_input_clk
- sor_padc_input_clk
- sor_padd_input_clk
- sor0_pad_clk
- sor1_pad_clk
- sor2_pad_clk
- sor3_pad_clk
- sf0_clk
- sf1_clk
- sf2_clk
- sf3_clk
- sf4_clk
- sf5_clk
- sf6_clk
- sf7_clk
- sor0_ref_pll_clk
- sor1_ref_pll_clk
- sor2_ref_pll_clk
- sor3_ref_pll_clk
- sor0_ref_clk
- sor1_ref_clk
- sor2_ref_clk
- sor3_ref_clk
- osc_clk
- dsc_clk
- maud_clk
- aza_2xbit_clk
- disp_root
- vpllx_sor0_muxed_clk
- vpllx_sor1_muxed_clk
- vpllx_sor2_muxed_clk
- vpllx_sor3_muxed_clk
- sf0_sor_clk
- sf1_sor_clk
- sf2_sor_clk
- sf3_sor_clk
- sf4_sor_clk
- sf5_sor_clk
- sf6_sor_clk
- sf7_sor_clk
- dpaux0_clk
- emc_clk
nvidia,disp-sw-soc-chip-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2650
maximum: 0x2650
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x1f
reset-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- dpaux0_reset
- hdacodec_reset
interconnects:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 3
maxItems: 3
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x182
maximum: 0x182
- $ref: "/schemas/types.yaml#/definitions/uint32"
interconnect-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- read-1
non-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
iso_sid:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x900
maximum: 0x900
niso_sid:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x901
maximum: 0x901
required:
- compatible
- reg
- interrupt-names
- interrupts
- clocks
- clock-names
- resets
- reset-names
- iommus
examples:
- |
display@8808c00000 {
compatible = "nvidia,tegra264-display";
power-domains = <&bpmp TEGRA264_POWER_DOMAIN_DISP>;
nvidia,num-dpaux-instance = <0x00000004>;
nvidia,bpmp = <&bpmp>;
reg-names = "nvdisplay, dpaux0, hdacodec, mipical, vdisp";
reg = <0x88 0x8c00000 0x00 0x1fffff>,
<0x88 0x9680000 0x00 0x7ffff>,
<0x88 0x9101000 0x00 0xfff>,
<0x81 0x89840000 0x00 0xffff>,
<0x88 0x8d00000 0x00 0x00010000>;
interrupt-names = "nvdisplay, dpaux0, dpaux1, dpaux2, dpaux3, hdacodec, vdisp";
interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&bpmp TEGRA264_CLK_HUB>,
<&bpmp TEGRA264_CLK_DISP>,
<&bpmp TEGRA264_CLK_RG0_DIV>,
<&bpmp TEGRA264_CLK_RG1_DIV>,
<&bpmp TEGRA264_CLK_RG2_DIV>,
<&bpmp TEGRA264_CLK_RG3_DIV>,
<&bpmp TEGRA264_CLK_RG4_DIV>,
<&bpmp TEGRA264_CLK_RG5_DIV>,
<&bpmp TEGRA264_CLK_RG6_DIV>,
<&bpmp TEGRA264_CLK_RG7_DIV>,
<&bpmp TEGRA264_CLK_FUSE>,
<&bpmp TEGRA264_CLK_SPPLL0_CLKOUT1A>,
<&bpmp TEGRA264_CLK_SPPLL0_CLKOUT2A>,
<&bpmp TEGRA264_CLK_SPPLL0_CLKOUT270>,
<&bpmp TEGRA264_CLK_SPPLL1_CLKOUT270>,
<&bpmp TEGRA264_CLK_SPPLL0_CLKOUT100>,
<&bpmp TEGRA264_CLK_SPPLL1_CLKOUT100>,
<&bpmp TEGRA264_CLK_VPLL0>,
<&bpmp TEGRA264_CLK_VPLL1>,
<&bpmp TEGRA264_CLK_VPLL2>,
<&bpmp TEGRA264_CLK_VPLL3>,
<&bpmp TEGRA264_CLK_VPLL4>,
<&bpmp TEGRA264_CLK_VPLL5>,
<&bpmp TEGRA264_CLK_VPLL6>,
<&bpmp TEGRA264_CLK_VPLL7>,
<&bpmp TEGRA264_CLK_RG0>,
<&bpmp TEGRA264_CLK_RG1>,
<&bpmp TEGRA264_CLK_RG2>,
<&bpmp TEGRA264_CLK_RG3>,
<&bpmp TEGRA264_CLK_RG4>,
<&bpmp TEGRA264_CLK_RG5>,
<&bpmp TEGRA264_CLK_RG6>,
<&bpmp TEGRA264_CLK_RG7>,
<&bpmp TEGRA264_CLK_DISPPLL>,
<&bpmp TEGRA264_CLK_PRE_SOR0>,
<&bpmp TEGRA264_CLK_PRE_SOR1>,
<&bpmp TEGRA264_CLK_PRE_SOR2>,
<&bpmp TEGRA264_CLK_PRE_SOR3>,
<&bpmp TEGRA264_CLK_DP_LINKA_REF>,
<&bpmp TEGRA264_CLK_DP_LINKB_REF>,
<&bpmp TEGRA264_CLK_DP_LINKC_REF>,
<&bpmp TEGRA264_CLK_DP_LINKD_REF>,
<&bpmp TEGRA264_CLK_SOR_LINKA_INPUT>,
<&bpmp TEGRA264_CLK_SOR_LINKB_INPUT>,
<&bpmp TEGRA264_CLK_SOR_LINKC_INPUT>,
<&bpmp TEGRA264_CLK_SOR_LINKD_INPUT>,
<&bpmp TEGRA264_CLK_SOR_LINKA_AFIFO>,
<&bpmp TEGRA264_CLK_SOR_LINKB_AFIFO>,
<&bpmp TEGRA264_CLK_SOR_LINKC_AFIFO>,
<&bpmp TEGRA264_CLK_SOR_LINKD_AFIFO>,
<&bpmp TEGRA264_CLK_SOR0>,
<&bpmp TEGRA264_CLK_SOR1>,
<&bpmp TEGRA264_CLK_SOR2>,
<&bpmp TEGRA264_CLK_SOR3>,
<&bpmp TEGRA264_CLK_LINKA_SYM>,
<&bpmp TEGRA264_CLK_LINKB_SYM>,
<&bpmp TEGRA264_CLK_LINKC_SYM>,
<&bpmp TEGRA264_CLK_LINKD_SYM>,
<&bpmp TEGRA264_CLK_SOR0_PAD>,
<&bpmp TEGRA264_CLK_SOR1_PAD>,
<&bpmp TEGRA264_CLK_SOR2_PAD>,
<&bpmp TEGRA264_CLK_SOR3_PAD>,
<&bpmp TEGRA264_CLK_SF0>,
<&bpmp TEGRA264_CLK_SF1>,
<&bpmp TEGRA264_CLK_SF2>,
<&bpmp TEGRA264_CLK_SF3>,
<&bpmp TEGRA264_CLK_SF4>,
<&bpmp TEGRA264_CLK_SF5>,
<&bpmp TEGRA264_CLK_SF6>,
<&bpmp TEGRA264_CLK_SF7>,
<&bpmp TEGRA264_CLK_SOR0_PLL_REF>,
<&bpmp TEGRA264_CLK_SOR1_PLL_REF>,
<&bpmp TEGRA264_CLK_SOR2_PLL_REF>,
<&bpmp TEGRA264_CLK_SOR3_PLL_REF>,
<&bpmp TEGRA264_CLK_SOR0_REF>,
<&bpmp TEGRA264_CLK_SOR1_REF>,
<&bpmp TEGRA264_CLK_SOR2_REF>,
<&bpmp TEGRA264_CLK_SOR3_REF>,
<&bpmp TEGRA264_CLK_OSC>,
<&bpmp TEGRA264_CLK_DSC>,
<&bpmp TEGRA264_CLK_MAUD>,
<&bpmp TEGRA264_CLK_AZA_2XBIT>,
<&bpmp TEGRA264_CLK_DISP_ROOT>,
<&bpmp TEGRA264_CLK_VPLLX_SOR0_MUXED>,
<&bpmp TEGRA264_CLK_VPLLX_SOR1_MUXED>,
<&bpmp TEGRA264_CLK_VPLLX_SOR2_MUXED>,
<&bpmp TEGRA264_CLK_VPLLX_SOR3_MUXED>,
<&bpmp TEGRA264_CLK_SF0_SOR>,
<&bpmp TEGRA264_CLK_SF1_SOR>,
<&bpmp TEGRA264_CLK_SF2_SOR>,
<&bpmp TEGRA264_CLK_SF3_SOR>,
<&bpmp TEGRA264_CLK_SF4_SOR>,
<&bpmp TEGRA264_CLK_SF5_SOR>,
<&bpmp TEGRA264_CLK_SF6_SOR>,
<&bpmp TEGRA264_CLK_SF7_SOR>,
<&bpmp TEGRA264_CLK_DPAUX>,
<&bpmp TEGRA264_CLK_EMC>;
clock-names = "nvdisplayhub_clk",
"nvdisplay_disp_clk",
"nvdisplay_p0_clk",
"nvdisplay_p1_clk",
"nvdisplay_p2_clk",
"nvdisplay_p3_clk",
"nvdisplay_p4_clk",
"nvdisplay_p5_clk",
"nvdisplay_p6_clk",
"nvdisplay_p7_clk",
"fuse_clk",
"sppll0_clkouta_clk",
"sppll0_clkoutb_clk",
"sppll0_clkoutpn_clk",
"sppll1_clkoutpn_clk",
"sppll0_div27_clk",
"sppll1_div27_clk",
"vpll0_clk",
"vpll1_clk",
"vpll2_clk",
"vpll3_clk",
"vpll4_clk",
"vpll5_clk",
"vpll6_clk",
"vpll7_clk",
"rg0_clk",
"rg1_clk",
"rg2_clk",
"rg3_clk",
"rg4_clk",
"rg5_clk",
"rg6_clk",
"rg7_clk",
"disppll_clk",
"pre_sor0_clk",
"pre_sor1_clk",
"pre_sor2_clk",
"pre_sor3_clk",
"dp_link_ref_clk",
"dp_linkb_ref_clk",
"dp_linkc_ref_clk",
"dp_linkd_ref_clk",
"sor_linka_input_clk",
"sor_linkb_input_clk",
"sor_linkc_input_clk",
"sor_linkd_input_clk",
"sor_linka_afifo_clk",
"sor_linkb_afifo_clk",
"sor_linkc_afifo_clk",
"sor_linkd_afifo_clk",
"sor0_clk",
"sor1_clk",
"sor2_clk",
"sor3_clk",
"sor_pad_input_clk",
"sor_padb_input_clk",
"sor_padc_input_clk",
"sor_padd_input_clk",
"sor0_pad_clk",
"sor1_pad_clk",
"sor2_pad_clk",
"sor3_pad_clk",
"sf0_clk",
"sf1_clk",
"sf2_clk",
"sf3_clk",
"sf4_clk",
"sf5_clk",
"sf6_clk",
"sf7_clk",
"sor0_ref_pll_clk",
"sor1_ref_pll_clk",
"sor2_ref_pll_clk",
"sor3_ref_pll_clk",
"sor0_ref_clk",
"sor1_ref_clk",
"sor2_ref_clk",
"sor3_ref_clk",
"osc_clk",
"dsc_clk",
"maud_clk",
"aza_2xbit_clk",
"disp_root",
"vpllx_sor0_muxed_clk",
"vpllx_sor1_muxed_clk",
"vpllx_sor2_muxed_clk",
"vpllx_sor3_muxed_clk",
"sf0_sor_clk",
"sf1_sor_clk",
"sf2_sor_clk",
"sf3_sor_clk",
"sf4_sor_clk",
"sf5_sor_clk",
"sf6_sor_clk",
"sf7_sor_clk",
"dpaux0_clk",
"emc_clk";
nvidia,disp-sw-soc-chip-id = <0x2650>;
resets = <&bpmp TEGRA264_RESET_DPAUX>,
<&bpmp TEGRA264_RESET_HDACODEC>;
reset-names = "dpaux0_reset, hdacodec_reset";
interconnects = <&mc TEGRA264_MEMORY_CLIENT_DISPR &emc>;
interconnect-names = "read-1";
status = "disabled";
iommus = <&smmu3_mmu 0x900>;
non-coherent;
};

View File

@@ -0,0 +1,162 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/hda@88090b0000/nvidia,tegra264-hda.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra T264 HDA Driver
maintainers:
- Mohan Kumar
description: |
The following nodes use this compatibility
- /bus@0/hda@88090b0000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-hda
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x88
maximum: 0x88
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x90b0000
maximum: 0x90b0000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xfb
maximum: 0xfb
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8f
maximum: 0x8f
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- hda
interconnects:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 3
maxItems: 3
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x17c
maximum: 0x17d
- $ref: "/schemas/types.yaml#/definitions/uint32"
interconnect-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- dma-mem
- write
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xa00
maximum: 0xa00
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- iommus
examples:
- |
hda@88090b0000 {
compatible = "nvidia,tegra264-hda";
reg = <0x88 0x90b0000 0x0 0x10000>;
interrupts = <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&bpmp TEGRA264_CLK_AZA_2XBIT>;
clock-names = "hda";
interconnects = <&mc TEGRA264_MEMORY_CLIENT_HDAR &emc>,
<&mc TEGRA264_MEMORY_CLIENT_HDAW &emc>;
interconnect-names = "dma-mem, write";
iommus = <&smmu3_mmu TEGRA_SID_HDA>;
status = "disabled";
};

View File

@@ -0,0 +1,78 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/isp-thi@8188b00000/nvidia,tegra264-isp-thi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra t264 ISP-THI
maintainers:
- Chinniah Poosapadi
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-isp-thi
required:
- compatible
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-isp-thi
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x37
maximum: 0x37
reset-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- isp_thi
- isp1_thi
required:
- compatible
- resets
- reset-names
examples:
- |
isp-thi@8188b00000 {
compatible = "nvidia,tegra264-isp-thi";
resets = <&bpmp TEGRA264_RESET_ISP1>;
reset-names = "isp_thi";
status = "disabled";
};

View File

@@ -0,0 +1,49 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/mixer-controls/nvidia,tegra264-mixer-control.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra t264 Audio Mixer
maintainers:
- Mohan Kumar
description: |
The following nodes use this compatibility
- /sound/mixer-controls
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- nvidia,tegra264-mixer-control
- nvidia,tegra234-mixer-control
required:
- compatible
properties:
required:
- compatible
examples:
- |
mixer-controls {
compatible = "nvidia,tegra264-mixer-control",
"nvidia,tegra234-mixer-control";
};

View File

@@ -0,0 +1,290 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtcpu@81893d0000/nvidia,tegra264-rce.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra T264 RCE Driver
maintainers:
- Evgeny Kornev
description: |
The following nodes use this compatibility
- /rtcpu@81893d0000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-rce
required:
- compatible
properties:
nvidia,cpu-name:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- rce
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x893d0000
maximum: 0x893d0000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- rce-pm
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x23
maximum: 0x24
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- rce-nic
- rce-cpu
nvidia,clock-rates:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6ddd000
maximum: 0x6ddd000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1bc69880
maximum: 0x1bc69880
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
reset-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- rce-all
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x19e
maximum: 0x19e
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
interrupt-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- wdt-remote
nvidia,camera-devices:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 5
maxItems: 5
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
nvidia,camera-device-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- isp
- vi0
- vi1
- nvcsi
- isp1
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2b01
maximum: 0x2b01
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
nvidia,test-bw:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x249f00
maximum: 0x249f00
nvidia,trace:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x70100000
maximum: 0x70100000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x100000
maximum: 0x100000
nvidia,ivc-channels:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x90000000
maximum: 0x90000000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
nvidia,autosuspend-delay-ms:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1388
maximum: 0x1388
nvidia,cmd-timeout:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7d0
maximum: 0x7d0
required:
- compatible
- reg
- clocks
- clock-names
- resets
- reset-names
- interrupts
- interrupt-names
- iommus
examples:
- |
rtcpu@81893d0000 {
compatible = "nvidia,tegra264-rce";
nvidia,cpu-name = "rce";
reg = <0x81 0x893d0000 0x0 0x10000>;
reg-names = "rce-pm";
clocks = <&bpmp TEGRA264_CLK_RCE_NIC>,
<&bpmp TEGRA264_CLK_RCE_CPU>;
clock-names = "rce-nic, rce-cpu";
nvidia,clock-rates = <115200000 466000000>,
<115200000 466000000>;
resets = <&bpmp TEGRA264_RESET_RCE_ALL>;
reset-names = "rce-all";
interrupts = <GIC_SPI 414 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "wdt-remote";
nvidia,camera-devices = <&isp &vi0 &vi1 &nvcsi &isp1>;
nvidia,camera-device-names = "isp, vi0, vi1, nvcsi, isp1";
iommus = <&smmu4_mmu TEGRA_SID_RCE_VM1>;
memory-region = <&rce_resv>;
dma-coherent;
nvidia,test-bw = <2400000>;
nvidia,trace = <&tegra_rtcpu_trace 4 0x70100000 0x100000>;
nvidia,ivc-channels = <&camera_ivc_channels 2 0x90000000 0x10000>;
nvidia,autosuspend-delay-ms = <5000>;
status = "disabled";
};

View File

@@ -0,0 +1,125 @@
# Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/rtc@c2c0000/nvidia,tegra264-rtc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra T264 RTC Driver
maintainers:
- Suresh Mangipudi
description: |
The following nodes use this compatibility
- /bus@0/rtc@c2c0000
select:
properties:
compatible:
minItems: 3
maxItems: 3
items:
enum:
- nvidia,tegra264-rtc
- nvidia,tegra234-rtc
- nvidia,tegra20-rtc
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc2c0000
maximum: 0xc2c0000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
interrupt-parent:
$ref: "/schemas/types.yaml#/definitions/uint32"
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 2 values with interrupt-parent phandle:
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x41
maximum: 0x41
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- rtc
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
examples:
- |
rtc@c2c0000 {
compatible = "nvidia,tegra264-rtc",
"nvidia,tegra234-rtc",
"nvidia,tegra20-rtc";
status = "disabled";
reg = <0x0 0x0c2c0000 0x0 0x10000>;
interrupt-parent = <&pmc>;
interrupts = <65 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&bpmp TEGRA264_CLK_CLK_S>;
clock-names = "rtc";
};

View File

@@ -0,0 +1,164 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tsec@8188150000/nvidia,tegra264-tsec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra t264 Host1X TSEC
maintainers:
- Nikesh Oswal
description: |
The following nodes use this compatibility
- /bus@0/host1x@8181200000/tsec@8188150000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-tsec
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x88150000
maximum: 0x88150000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40000
maximum: 0x40000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1bf
maximum: 0x1bf
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2d
maximum: 0x2d
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x30
maximum: 0xc8
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- tsec
- efuse
- tsec_pka
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2900
maximum: 0x2900
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
required:
- compatible
- reg
- interrupts
- resets
- clocks
- clock-names
- iommus
examples:
- |
tsec@8188150000 {
compatible = "nvidia,tegra264-tsec";
reg = <0x81 0x88150000 0x00 0x40000>;
interrupts = <GIC_SPI 0x1bF IRQ_TYPE_LEVEL_HIGH>;
resets = <&bpmp TEGRA264_RESET_TSEC>;
clocks = <&bpmp TEGRA264_CLK_TSEC>,
<&bpmp TEGRA264_CLK_FUSE>,
<&bpmp TEGRA264_CLK_TSEC_PKA>;
clock-names = "tsec, efuse, tsec_pka";
iommus = <&smmu4_mmu TEGRA_SID_TSEC>;
dma-coherent;
status = "disabled";
};

View File

@@ -0,0 +1,141 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/virt-alt-pcm-oot/nvidia,tegra264-virt-pcm-oot.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtual Pulse Code Modulator
maintainers:
- Mohan Kumar
description: |
The following nodes use this compatibility
- /virt-alt-pcm-oot
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-virt-pcm-oot
required:
- compatible
properties:
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
cardname:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- tegra-virt-pcm-vm1
dmas:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x82
dma-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- rx1
- tx1
- rx2
- tx2
- rx3
- tx3
- rx4
- tx4
- rx5
- tx5
- rx6
- tx6
- rx7
- tx7
- rx8
- tx8
- rx9
- tx9
- rx10
- tx10
- rx11
- tx11
- rx12
- tx12
- rx13
- tx13
- rx14
- tx14
- rx15
- tx15
- rx16
- tx16
- rx17
- tx17
- rx18
- tx18
- rx19
- tx19
- rx20
- tx20
- rx21
- tx21
- rx22
- tx22
- rx23
- tx23
- rx24
- tx24
ivc_queue:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xf
maximum: 0xa2
admaif_ch_num:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x18
maximum: 0x18
admaif_ch_list:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x18
required:
- compatible
- iommus
examples:
- |
virt-alt-pcm-oot {
};

View File

@@ -0,0 +1,97 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvscic2c-pcie-s0-c5-epc/nvidia,tegra-nvscic2c-pcie-epc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Chip-to-Chip transfer module for PCIeRP
maintainers:
- Manikanta Maddireddy
description: |
the compatability = nvidia,tegra-nvscic2c-pcie-epc is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/misc/nvscic2c-pcie/dt.c
The following nodes use this compatibility
- /nvscic2c-pcie-s0-c5-epc
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-nvscic2c-pcie-epc
required:
- compatible
properties:
nvidia,host1x:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x19
maximum: 0x19
nvidia,pcie-edma:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7b
maximum: 0x7b
nvidia,pci-dev-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x22cc
maximum: 0x22cc
nvidia,board-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,soc-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,cntrlr-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x5
nvidia,endpoint-db:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- nvscic2c_pcie_s0_c5_1, 16, 00032768, 67108864, 26001
- nvscic2c_pcie_s0_c5_2, 16, 00032768, 67108864, 26002
- nvscic2c_pcie_s0_c5_3, 16, 00032768, 67108864, 26003
- nvscic2c_pcie_s0_c5_4, 16, 00032768, 67108864, 26004
- nvscic2c_pcie_s0_c5_5, 16, 00032768, 67108864, 26005
- nvscic2c_pcie_s0_c5_6, 16, 00032768, 67108864, 26006
- nvscic2c_pcie_s0_c5_7, 16, 00032768, 67108864, 26007
- nvscic2c_pcie_s0_c5_8, 16, 00032768, 67108864, 26008
- nvscic2c_pcie_s0_c5_9, 16, 00032768, 67108864, 26009
- nvscic2c_pcie_s0_c5_10, 16, 00032768, 67108864, 26010
- nvscic2c_pcie_s0_c5_11, 16, 00032768, 67108864, 26011
- nvscic2c_pcie_s0_c5_12, 16, 00000064, 0, 26012
required:
- compatible
examples:
- |
nvscic2c-pcie-s0-c5-epc {
};

View File

@@ -0,0 +1,102 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvscic2c-pcie-s0-c4-epf/nvidia,tegra-nvscic2c-pcie-epf.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Chip-to-Chip transfer module for PCIeEP
maintainers:
- Manikanta Maddireddy
description: |
the compatability = nvidia,tegra-nvscic2c-pcie-epf is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/misc/nvscic2c-pcie/dt.c
The following nodes use this compatibility
- /nvscic2c-pcie-s0-c4-epf
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-nvscic2c-pcie-epf
required:
- compatible
properties:
nvidia,host1x:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x19
maximum: 0x19
nvidia,pcie-edma:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7c
maximum: 0x7c
nvidia,pci-dev-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x22cc
maximum: 0x22cc
nvidia,board-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,soc-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,cntrlr-id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x5
nvidia,bar-win-size:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40000000
maximum: 0x40000000
nvidia,endpoint-db:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- nvscic2c_pcie_s0_c4_1, 16, 00032768, 67108864, 26101
- nvscic2c_pcie_s0_c4_2, 16, 00032768, 67108864, 26102
- nvscic2c_pcie_s0_c4_3, 16, 00032768, 67108864, 26103
- nvscic2c_pcie_s0_c4_4, 16, 00032768, 67108864, 26104
- nvscic2c_pcie_s0_c4_5, 16, 00032768, 67108864, 26105
- nvscic2c_pcie_s0_c4_6, 16, 00032768, 67108864, 26106
- nvscic2c_pcie_s0_c4_7, 16, 00032768, 67108864, 26107
- nvscic2c_pcie_s0_c4_8, 16, 00032768, 67108864, 26108
- nvscic2c_pcie_s0_c4_9, 16, 00032768, 67108864, 26109
- nvscic2c_pcie_s0_c4_10, 16, 00032768, 67108864, 26110
- nvscic2c_pcie_s0_c4_11, 16, 00032768, 67108864, 26111
- nvscic2c_pcie_s0_c4_12, 16, 00000064, 0, 26112
required:
- compatible
examples:
- |
nvscic2c-pcie-s0-c4-epf {
};

View File

@@ -0,0 +1,49 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/sha-carveout/sha-carveout.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SHA Carveout Configuration
maintainers:
- Mahesh Kumar
- Srijan Kumar Sharma
description: |
The following nodes use this compatibility
- /dce@8808000000/sha-carveout
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- sha-carveout
required:
- compatible
properties:
required:
- compatible
examples:
- |
sha-carveout {
compatible = "sha-carveout";
status = "disabled";
};

View File

@@ -0,0 +1,309 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/sdhci@810c570000/nvidia,tegra264-sdhci.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SDHCI driver for Tegra
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-sdhci is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/mmc/host/sdhci-tegra.c
The following nodes use this compatibility
- /bus@0/sdhci@810c570000
select:
properties:
compatible:
minItems: 2
maxItems: 2
items:
enum:
- nvidia,tegra264-sdhci
- nvidia,tegra194-sdhci
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc570000
maximum: 0xc570000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10000
maximum: 0x10000
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xa2
maximum: 0xa2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
sd-uhs-sdr104:
$ref: "/schemas/types.yaml#/definitions/flag"
sd-uhs-sdr50:
$ref: "/schemas/types.yaml#/definitions/flag"
sd-uhs-sdr25:
$ref: "/schemas/types.yaml#/definitions/flag"
sd-uhs-sdr12:
$ref: "/schemas/types.yaml#/definitions/flag"
mmc-hs200-1_8v:
$ref: "/schemas/types.yaml#/definitions/flag"
iommus:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
iommus are given by a tuple of 2 values:
- Phandle to the device
- Device ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1200
maximum: 0x1200
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
nvidia,pad-autocal-pull-up-offset-3v3-timeout:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
nvidia,pad-autocal-pull-down-offset-3v3-timeout:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
nvidia,pad-autocal-pull-up-offset-1v8-timeout:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6
maximum: 0x6
nvidia,pad-autocal-pull-down-offset-1v8-timeout:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
nvidia,pad-autocal-pull-up-offset-sdr104:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,pad-autocal-pull-down-offset-sdr104:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
interconnects:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 3
maxItems: 3
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1c2
maximum: 0x1c3
- $ref: "/schemas/types.yaml#/definitions/uint32"
interconnect-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- dma-mem
- write
pinctrl-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- sdmmc-3v3
- sdmmc-1v8
pinctrl-0:
$ref: "/schemas/types.yaml#/definitions/uint32"
pinctrl-1:
$ref: "/schemas/types.yaml#/definitions/uint32"
nvidia,default-tap:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6
maximum: 0x6
nvidia,default-trim:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
assigned-clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x95
maximum: 0x96
assigned-clock-parents:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x93
maximum: 0x95
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x22
maximum: 0x22
reset-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- sdhci
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x96
maximum: 0x97
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- sdhci
- tmclk
required:
- compatible
- reg
- interrupts
- iommus
- resets
- reset-names
- clocks
- clock-names
examples:
- |
sdhci@810c570000 {
compatible = "nvidia,tegra264-sdhci, nvidia,tegra194-sdhci";
status = "disabled";
reg = <0x81 0xc570000 0x00 0x10000>;
interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
sd-uhs-sdr104;
sd-uhs-sdr50;
sd-uhs-sdr25;
sd-uhs-sdr12;
mmc-hs200-1_8v;
iommus = <&smmu2_mmu TEGRA_SID_SDMMC0>;
dma-coherent;
nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x07>;
nvidia,pad-autocal-pull-down-offset-3v3-timeout = <0x07>;
nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x06>;
nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x07>;
nvidia,pad-autocal-pull-up-offset-sdr104 = <0x00>;
nvidia,pad-autocal-pull-down-offset-sdr104 = <0x00>;
interconnects = <&mc TEGRA264_MEMORY_CLIENT_SDMMC0R &emc>,
<&mc TEGRA264_MEMORY_CLIENT_SDMMC0W &emc>;
interconnect-names = "dma-mem, write";
pinctrl-names = "sdmmc-3v3, sdmmc-1v8";
pinctrl-0 = <&sdmmc1_3v3>;
pinctrl-1 = <&sdmmc1_1v8>;
nvidia,default-tap = <6>;
nvidia,default-trim = <0>;
assigned-clocks = <&bpmp TEGRA264_CLK_SDMMC1>,
<&bpmp TEGRA264_CLK_PLLC4_MUXED>;
assigned-clock-parents = <&bpmp TEGRA264_CLK_PLLC4_MUXED>,
<&bpmp TEGRA264_CLK_PLLC4_OUT0>;
resets = <&bpmp TEGRA264_RESET_SDMMC1>;
reset-names = "sdhci";
clocks = <&bpmp TEGRA264_CLK_SDMMC1>,
<&bpmp TEGRA264_CLK_SDMMC_LEGACY_TM>;
clock-names = "sdhci, tmclk";
};

View File

@@ -0,0 +1,86 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/tegra_virt_storage83/nvidia,tegra-virt-mtd-storage.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra t264 Hypervisor MTD Driver
maintainers:
- Sreenivas Velpula
description: |
the compatability = nvidia,tegra-virt-mtd-storage is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/mtd/devices/tegra_hv_mtd.c
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-virt-mtd-storage
required:
- compatible
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra-virt-mtd-storage
instance:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
ivc:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xf
maximum: 0x3f
read-only:
$ref: "/schemas/types.yaml#/definitions/flag"
mempool:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x17
maximum: 0x17
partition-name:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- board-info
required:
- compatible
examples:
- |
tegra_virt_storage83 {
compatible = "nvidia,tegra-virt-mtd-storage";
status = "okay";
instance = <0x00000000>;
ivc = <0x0000000f>,
<0x0000003f>;
read-only;
mempool = <0x00000017>;
partition-name = "board-info";
};

View File

@@ -0,0 +1,80 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/flash@0/jedec,spi-nor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Framework for SPI NOR
maintainers:
- Suresh Mangipudi
description: |
the compatability = jedec,spi-nor is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/mtd/spi-nor/core.c
- <TOP>/kernel/kernel-oot/drivers/memory/renesas-rpc-if.c
The following nodes use this compatibility
- /bus@0/spi@810c5b0000/flash@0
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- jedec,spi-nor
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
spi-max-frequency:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6146580
maximum: 0x6146580
spi-rx-bus-width:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
spi-tx-bus-width:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
required:
- compatible
- reg
examples:
- |
flash@0 {
};

View File

@@ -0,0 +1,186 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/mttcan@81102f0000/nvidia,tegra264-mttcan.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Platform CAN bus driver for Bosch M_TTCAN controller
maintainers:
- Shubhi Garg
description: |
the compatability = nvidia,tegra264-mttcan is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/net/can/mttcan/native/m_ttcan_linux.c
The following nodes use this compatibility
- /bus@0/mttcan@81102f0000
- /bus@0/mttcan@8110300000
- /bus@0/mttcan@8110330000
- /bus@0/mttcan@8110340000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-mttcan
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x81
maximum: 0x81
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x102f0000
maximum: 0x10342000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x32
maximum: 0x1000
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- can-regs
- glue-regs
- msg-ram
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x44
maximum: 0x4a
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
mram-params:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 9
maxItems: 9
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x10
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x10
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x20
maximum: 0x20
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x10
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x10
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x10
tx-config:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x10
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40
maximum: 0x40
rx-config:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 3
maxItems: 3
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40
maximum: 0x40
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40
maximum: 0x40
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40
maximum: 0x40
required:
- compatible
- reg
- interrupts
examples:
- |
mttcan@81102f0000 {
compatible = "nvidia,tegra264-mttcan";
reg = <0x81 0x102f0000 0x00 0x144>,
<0x81 0x102f1000 0x00 0x32>,
<0x81 0x102f2000 0x00 0x1000>;
reg-names = "can-regs, glue-regs, msg-ram";
interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
mram-params = <0 16 16 32 0 0 16 16 16>;
tx-config = <0 16 0 64>;
rx-config = <64 64 64>;
status = "disabled";
};

View File

@@ -0,0 +1,661 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/ethernet@a808a10000/nvidia,tegra264-mgbe.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Ethernet Driver
maintainers:
- Narayan Reddy
description: |
the compatability = nvidia,tegra264-mgbe is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c
The following nodes use this compatibility
- /bus@0/ethernet@a808a10000
- /bus@0/ethernet@a808b10000
- /bus@0/ethernet@a808d10000
- /bus@0/ethernet@a808e10000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-mgbe
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xa8
maximum: 0xa8
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8a10000
maximum: 0x8ed0000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2000
maximum: 0x10000
reg-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- mac
- dma_base
- macsec-base
interrupts:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Interrupts are give by a tuple of 3 values:
- interrupt specifier (GIC_SPI = 0, GIC_PPI = 1)
definitions in dt-bindings/interrupt-controller/arm-gic.h
- interrupt number
- trigger type (rising edge, falling edge, both, etc)
definitions in dt-bindings/interrupt-controller/irq.h
items:
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x366
maximum: 0x385
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
interrupt-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- common
- vm0
- vm1
- vm2
- vm3
- vm4
- macsec-ns-irq
- macsec-s-irq
resets:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Resets are given by a tuple of 2 values:
- Phandle to the device
- Reset ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3e
maximum: 0x49
reset-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- mac
- pcs
- macsec_ns_rst
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xd5
maximum: 0x1d2
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- mac
- tx
- mgbe
- macsec
- tx-pcs
- ptp-ref
- rx-input
- rx-pcs-input
- tx-m
- rx-input-m
- rx-pcs-m
- utmi_pll1_clk
- pll_bpmpcam
- tx_ser
- rx_ser
nvidia,num-dma-chans:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
nvidia,dma-chans:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 8
maxItems: 8
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5
maximum: 0x5
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6
maximum: 0x6
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
nvidia,num-mtl-queues:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
nvidia,mtl-queues:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 10
maxItems: 10
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5
maximum: 0x5
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6
maximum: 0x6
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x9
maximum: 0x9
nvidia,tc-mapping:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 10
maxItems: 10
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5
maximum: 0x5
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6
maximum: 0x6
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,residual-queue:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,rxq_enable_ctrl:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 10
maxItems: 10
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
nvidia,vm-irq-config:
$ref: "/schemas/types.yaml#/definitions/uint32"
nvidia,vm-vdma-config:
$ref: "/schemas/types.yaml#/definitions/uint32"
nvidia,tx-queue-prio:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 10
maxItems: 10
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x5
maximum: 0x5
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x6
maximum: 0x6
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7
maximum: 0x7
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,rx-queue-prio:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 10
maxItems: 10
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2
maximum: 0x2
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x4
maximum: 0x4
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x10
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x20
maximum: 0x20
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40
maximum: 0x40
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x80
maximum: 0x80
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,dcs-enable:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,macsec-enable:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,mgbe-riit-config:
$ref: "/schemas/types.yaml#/definitions/uint32"
nvidia,rx_riwt:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x200
maximum: 0x200
nvidia,rx_frames:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x40
maximum: 0x40
nvidia,tx_usecs:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x100
maximum: 0x100
nvidia,tx_frames:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x10
nvidia,phy-iface-mode:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,promisc_mode:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,slot_num_check:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 8
maxItems: 8
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
nvidia,slot_intvl_vals:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
items:
minItems: 8
maxItems: 8
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7d
maximum: 0x7d
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7d
maximum: 0x7d
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7d
maximum: 0x7d
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7d
maximum: 0x7d
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7d
maximum: 0x7d
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7d
maximum: 0x7d
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x7d
maximum: 0x7d
nvidia,ptp_ref_clock_speed:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x12a05f20
maximum: 0x12a05f20
nvidia,instance_id:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x3
nvidia,ptp-rx-queue:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x3
maximum: 0x3
nvidia,dma_rx_ring_sz:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x1000
nvidia,dma_tx_ring_sz:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000
maximum: 0x1000
dma-coherent:
$ref: "/schemas/types.yaml#/definitions/flag"
nvidia,mac-addr-idx:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x4
nvidia,uphy-gbe-mode:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
nvidia,max-platform-mtu:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x2328
maximum: 0x2328
nvidia,if-name:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- mgbe0_0
- mgbe1_0
- mgbe2_0
- mgbe3_0
ivc:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x10
maximum: 0x1af
nvidia,ptp_m2m_role:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x2
nvidia,pps_op_ctrl:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x8
maximum: 0x8
nvidia,mdc-cr:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xF
required:
- compatible
- reg
- interrupts
- interrupt-names
- resets
- reset-names
- clocks
- clock-names
examples:
- |
ethernet@a808a10000 {
compatible = "nvidia,tegra264-mgbe";
status = "disabled";
reg = <0xa8 0x8a10000 0x00 0x10000>,
<0xa8 0x8aa0000 0x00 0x10000>,
<0xa8 0x8ad0000 0x00 0x10000>,
<0xa8 0x8a00000 0x00 0x10000>;
reg-names = "mac, xpcs, macsec-base, hypervisor";
interrupts = <0 870 4>,
<0 873 4>,
<0 874 4>,
<0 875 4>,
<0 876 4>,
<0 877 4>,
<0 872 4>,
<0 871 4>;
interrupt-names = "common, vm0, vm1, vm2, vm3, vm4",
"macsec-ns-irq, macsec-s-irq";
resets = <&bpmp TEGRA264_RESET_MGBE0_MAC>,
<&bpmp TEGRA264_RESET_MGBE0_PCS>,
<&bpmp TEGRA264_RESET_MGBE0_MACSEC>;
reset-names = "mac, pcs, macsec_ns_rst";
clocks = <&bpmp TEGRA264_CLK_MGBE0_MAC>,
<&bpmp TEGRA264_CLK_MGBE0_TX>,
<&bpmp TEGRA264_CLK_MGBE0_APP>,
<&bpmp TEGRA264_CLK_MGBE0_MACSEC>,
<&bpmp TEGRA264_CLK_MGBE0_TX_PCS>,
<&bpmp TEGRA264_CLK_MGBES_PTP_REF>,
<&bpmp TEGRA264_CLK_MGBE0_RX_IN>,
<&bpmp TEGRA264_CLK_MGBE0_RX_PCS_IN>,
<&bpmp TEGRA264_CLK_MGBE0_TX_M>,
<&bpmp TEGRA264_CLK_MGBE0_RX_M>,
<&bpmp TEGRA264_CLK_MGBE0_RX_PCS_M>,
<&bpmp TEGRA264_CLK_UTMI_PLL1_CLKOUT480>,
<&bpmp TEGRA264_CLK_PLLBPMPCAM>,
<&bpmp TEGRA264_CLK_MGBE0_TX_SER>,
<&bpmp TEGRA264_CLK_MGBE0_RX_SER>;
clock-names = "mac, tx, mgbe, macsec, tx-pcs, ptp-ref",
"rx-input, rx-pcs-input, tx-m, rx-input-m",
"rx-pcs-m, utmi_pll1_clk, pll_bpmpcam, tx_ser, rx_ser";
nvidia,num-dma-chans = <8>;
nvidia,dma-chans = <0 1 2 3 4 5 6 7>;
iommus = <&smmu0_mmu TEGRA_SID_MGBE0_VF0>;
nvidia,num-mtl-queues = <10>;
nvidia,mtl-queues = <0 1 2 3 4 5 6 7 8 9>;
nvidia,tc-mapping = <0 1 2 3 4 5 6 7 0 1>;
nvidia,residual-queue = <1>;
nvidia,rxq_enable_ctrl = <2 2 2 2 2 2 2 2 2 2>;
nvidia,vm-irq-config = <&mgbe_vm_irq_config>;
nvidia,vm-vdma-config = <&mgbe_vm_vdma_config>;
nvidia,tx-queue-prio = <0 1 2 3 4 5 6 7 0 0>;
nvidia,rx-queue-prio = <0x1 0x2 0x4 0x8 0x10 0x20 0x40 0x80 0x0 0x0>;
nvidia,dcs-enable = <0x1>;
nvidia,macsec-enable = <0x1>;
nvidia,mgbe-riit-config = <&mgbe_riit_config>;
nvidia,rx_riwt = <512>;
nvidia,rx_frames = <64>;
nvidia,tx_usecs = <256>;
nvidia,tx_frames = <16>;
nvidia,phy-iface-mode = <2>;
nvidia,promisc_mode = <1>;
nvidia,slot_num_check = <0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0>;
nvidia,slot_intvl_vals = <0x0 0x7D 0x7D 0x7D 0x7D 0x7D 0x7D 0x7D>;
nvidia,ptp_ref_clock_speed = <312500000>;
nvidia,instance_id = <0>;
nvidia,ptp-rx-queue = <3>;
nvidia,dma_rx_ring_sz = <4096>;
nvidia,dma_tx_ring_sz = <4096>;
dma-coherent;
};

View File

@@ -0,0 +1,103 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/efuse@1000000/nvidia,tegra264-efuse.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nvidia Tegra t264 efuse Driver
maintainers:
- Suresh Mangipudi
description: |
the compatability = nvidia,tegra264-efuse is mentioned in the following drivers
- <TOP>/kernel/kernel-oot/drivers/nvmem/tegra-efuse.c
The following nodes use this compatibility
- /bus@0/efuse@1000000
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-efuse
required:
- compatible
properties:
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1000000
maximum: 0x1000000
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0x0
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x20000
maximum: 0x20000
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0xc8
maximum: 0xc8
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- fuse
required:
- compatible
- reg
- clocks
- clock-names
examples:
- |
efuse@1000000 {
compatible = "nvidia,tegra264-efuse",
"nvidia,tegra234-efuse";
status = "disabled";
reg = <0x0 0x01000000 0x0 0x20000>;
clocks = <&bpmp TEGRA264_CLK_FUSE>;
clock-names = "fuse";
};

View File

@@ -0,0 +1,81 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvpmodel/nvidia,nvpmodel.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA nvpmodel clock cap driver
maintainers:
- Yi-Wei Wang
description: |
the compatability = nvidia,nvpmodel is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/nvpmodel/nvpmodel-clk-cap.c
The following nodes use this compatibility
- /nvpmodel
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,nvpmodel
required:
- compatible
properties:
nvidia,bpmp:
$ref: "/schemas/types.yaml#/definitions/uint32"
clocks:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Clocks are given by a tuple of 2 values:
- Phandle to the device
- Clock ID
items:
minItems: 2
maxItems: 2
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x122
maximum: 0x122
clock-names:
$ref: "/schemas/types.yaml#/definitions/string-array"
items:
enum:
- emc
required:
- compatible
- clocks
- clock-names
examples:
- |
nvpmodel {
compatible = "nvidia,nvpmodel";
status = "disabled";
nvidia,bpmp = <&bpmp>;
clocks = <&bpmp TEGRA264_CLK_EMC>;
clock-names = "emc";
};

View File

@@ -0,0 +1,83 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvpps/nvidia,tegra264-nvpps.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVidia Tegra PPS Driver
maintainers:
- Vijay Mishra
description: |
the compatability = nvidia,tegra264-nvpps is mentioned in the following drivers
- <TOP>/kernel/nvidia-oot/drivers/nvpps/nvpps_main.c
The following nodes use this compatibility
- /nvpps
select:
properties:
compatible:
minItems: 1
maxItems: 1
items:
enum:
- nvidia,tegra264-nvpps
required:
- compatible
properties:
'#address-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
'#size-cells':
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x1
maximum: 0x1
reg:
$ref: "/schemas/types.yaml#/definitions/uint32-matrix"
description: |
Registers are given by a tuple of two values:
- register address:
- register block size.
items:
minItems: 4
maxItems: 4
items:
- $ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x0
maximum: 0xc230000
primary-emac:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x83
maximum: 0x83
sec-emac:
$ref: "/schemas/types.yaml#/definitions/uint32"
minimum: 0x84
maximum: 0x84
required:
- compatible
- reg
examples:
- |
nvpps {
};

Some files were not shown because too many files have changed in this diff Show More