32 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Jon Hunter
325bd67f86 drivers: prod: Fix kernel version checks
The new Tegra Prod APIs are to be used for NVIDIA Linux kernels v5.16+.
Building the MTTCAN and QUAD SPI driver currently fail for upstream
Linux v5.16 because the various version definitions are not correct.

Some definitions have greater than v5.16.0 instead of greater than OR
equal to v5.16.0. This means that the new APIs will only be used
starting with v5.16.1+ and not v5.16.0 as inteaded.

Other definitions have less than or equal to v5.16.0 instead of just
less than v5.16.0. This means that we will still use the legacy APIs for
v5.16.0.

Fix this by correcting the definition that the drivers can be built for
upstream Linux v5.16.

Bug 4097475

Change-Id: I7d8dd04911a7d6426c67e82396c8a6f1b372875d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3006521
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-01 08:58:34 -07:00
Laxman Dewangan
1e8bd7b606 qspi: tegra: Add new prod setting support
Add new prod setting support which is the
property based on device tree. The prod
setting of each register field are new property
in DT and prod configurations are configured
via these new properties.

Bug 4097475

Change-Id: Iac61ddd20ceb5b1ea588519ab031275a926f5c41
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996302
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-14 05:54:31 -07:00
Jon Hunter
f6e070f87e spi: aurix: Use conftest
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.

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: I159cd7d5feca050c8a8014d9c2a3b43e8974fdfd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993807
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-12 20:29:04 -07:00
Jon Hunter
4b3511a749 spi: tegra124-slave: Drop legacy GPIO support
Since Linux v6.3, legacy GPIO support has been dropped from the Linux
kernel and the gpiod_xxx functions have been supported for a long time
going back to Linux v3.x kernels. Therefore, drop support for the legacy
GPIO functions.

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 4119327

Change-Id: Ib84e70b27645032108b2c25ce5d4ea3977f6cae1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993098
Reviewed-by: Vishwaroop A <va@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-10-09 15:30:33 -07:00
Vishwaroop A
a47fbd17b7 drivers: spi: enable autosupsend delay
Add runtime auto suspend support and provide
a dt option to set this delay for each bus.

Perf drop is seen due to clock switching during
write operation. QSPI flash device write page size
is 256 KB so clock switching was being done for every
256KB due to pm_runtime_put(&pdev->dev) call.

pm_runtime_put() function is called, the Linux kernel
will begin to power down the device. This may involve
disabling clocks, powering down voltage regulators, and
releasing other resources etc.

pm_runtime_set_autosuspend_delay function sets the
autosuspend delay for a device. The autosuspend delay
is the amount of time that the device will remain active
after it has been idle before it is automatically suspended.
The pm_runtime_set_autosuspend_delay() function can be used to
reduce power consumption by automatically suspending devices
when they are not in use.

Bug 4229700

Change-Id: Ib49b02c78ad25957c80d22f5cc316afa55aa24dd
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2985140
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-09-27 08:21:40 -07:00
Jon Hunter
bc6f405401 spi: tegra124-slave: Fix support for Linux v6.3
Linux v6.3 updated the GPIO APIs to use GPIO descriptors instead of
indices. This broke the Tegra SPI slave driver and when compiling the
driver for Linux v6.3 various warnings are observed. Update the Tegra
SPI slave driver as necessary to fix support for Linux v6.3.

Bug 4014315
Bug 4190165

Change-Id: Idfa29f729351d2971a649ddbcf1c3e9bf658d160
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938376
Reviewed-by: Vishwaroop A <va@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-19 08:47:08 -07:00
Vishwaroop A
41b335e6a1 spi: tegra-quad: add support for prod framework
Write production settings through prod framework

Bug 4165918

Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2924617
(cherry picked from commit c7cf9886e781e46385212ba1b821900488e39132)

Change-Id: I514f19ffdf1749c2e6935714bba68d0bf049954a
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929348
Reviewed-by: Vishwaroop A <va@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Vishwaroop A <va@nvidia.com>
2023-07-02 10:02:21 -07:00
Vishwaroop A
f7fd6ebb95 nv-oot: spi: fix kernel compilation issues
fix compilation issue when building spi slave driver
with 6.3-rc1 upstream kernel.

Bug 4014315

Change-Id: I4f8d83a5fdbc8957333034a4b8894e8e34d29ecc
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2900975
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-05-10 13:54:15 -07:00
Vishwaroop A
a557199c74 spi: tegra124-slave: tegra124 spi slave driver
Tegra spi slave driver for T124 and later chips.

Fix build error as
"'fpclk_name' may be used uninitialized".

Check and avoid divide by zero where clock rate
can be zero while selecting best clock.

SPI slave controller clock should be between 1.5 times to 4 times
of interface clock. Currently it is set to 4 times.
Change it to 3 times to avoid border cases where actual clock is not
same as what is requested.
Ex: master is set to .99MHz when 1MHz is requested and
slave is set to 4MHz as requested. Here above rule is violated.

SPI slave controller clock should be 1.5x of interface clock.
Change it to 2x to avoid border cases where actual clock set
is not same as what is requested.
Ex: master is set to 1MHz and slave is set to 1.48MHz instead
of 1.5MHz as requested. Here above rule is violated.

Set max buffer size to dma buffer size if dma init is
successful

Change based on below commits from linux-5.10
9de18723 spi: handle dma_slave_config error.
3a33b5fb spi: fix mem leak in spi slave driver
4b9b15ae drivers: Fix compile errors seen while merging 'v5.10-rc2'

Change based on below commits from linux-4.9
76a47a65 spi: tegra124-slave: tegra124 spi slave driver
2c341aa0 drivers: spi: fix -werror
b511c6f4 spi: tegra: Avoid divide by zero error
fdd18c3f spi: slave: Fix controller clock multiplier
829c57d6 spi: slave: Fix controller clock multiplier
85f8f7c2 spi: tegra: fix max buffer size

Bug 200021334
Bug 1899778
bug 1745660
Bug 200304626
Bug 200106113
Bug 200112595
bug 200054134
bug 1585361
Bug 200157229
bug 200116059
Bug 200063654
Bug 200045563
Bug 200084260
Bug 200141432
bug 200194538
bug 200129610
Bug 200319741
Coverity ID: 29578
Bug 200319815
Bug 200379969

Change-Id: Ibfadb40469f30b21350ed0fb7ee5daf96047197d
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2888151
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 08:01:45 -07:00
Vishwaroop A
9d101a46bb spi: use non combined seq for split xfers
Add check to switch to non combined sequence for
transfers if transfer length is greater than
DMA buffer size. Combined sequence cannot handle
split transfers so anything above dma_buf_size fails.
In case the transfers are beyond 64KB add a mechanism to
switch to non combined sequence of transfers.

Bug 3754288

Change-Id: I4d4eda56dcefdd9e35c19cdaf770783b99650c2c
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2886311
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-27 08:01:15 -07:00
Laxman Dewangan
bf3ab1984d spi: tegra210: quad: Fix fall through warning
There is switch-case where one case is falling to the
next case. This is creating the compilation warning.
Make this fall through as intentional by adding
compiler attribute as "fallthrough".

Bug 4052299

Change-Id: I0276a4a673284ffbdbc0ca18b650b3c51a4a095f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2880031
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-01 10:54:53 -07:00
Vishwaroop A
dd88969020 spi: tegra210-quad: fix combined sequence programming
Fix the failures observed in combined sequence programming
while validating qspi flash on orin platforms.

Change-Id: Ifd404eebfc1480f328c58930c95b30903f2d3269
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2869997
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-17 10:07:53 -07:00
Vishwaroop A
78ef37abb0 spi: tegra210-quad: enable qspi controller driver
Enable QSPI controller driver for kernel-OOT

Change based on below commits:

[UPSTREAM v5.16] 134a7237 spi: tegra210-quad: Put device into suspend on driver removal
[UPSTREAM v5.17] f89d2cc3 spi: tegra210-quad: use devm call for cdata memory
[UPSTREAM v5.18] 47c3e06e spi: tegra210-quad: Fix missin IRQ check in tegra qspi probe
[UPSTREAM v5.18] ac982578 spi: tegra210-quad: use device reset method
[UPSTREAM v5.18] ea23f0e1 spi: tegra210-quad: add new chips to compatible
[UPSTREAM v5.18] 75a1b44a spi: tegra210-quad: add acpi support
[UPSTREAM v5.18] 1b8342cc spi: tegra210-quad: combined sequence mode
[UPSTREAM v6.0]  b7613417 spi: tegra210-quad: Multi-cs support
[UPSTREAM v6.1]  8777dd9d spi: tegra210-quad: Fix combined sequence
[UPSTREAM PENDING] spi: tegra210-quad: Fix duplicate resource error
[UPSTREAM PENDING] spi: tegra210-quad: Use nbits in combined seq
[UPSTREAM PENDING] spi: tegra210-quad: combined seq for 4READ
[UPSTREAM PENDING] spi: tegra210-quad: native dma support
[UPSTREAM v6.1] spi: tegra210-quad: Don't initialise DMA if not supported
[UPSTREAM PENDING] spi: tegra210-quad: Fix cs change in cmd sequence
665a990fdbea6 spi: tegra210-quad: Fix an error message
6a8a8b51703c6 spi: tegra210-quad: Add support for hardware dummy cycles transfer
921fc1838fb03 spi: tegra210-quad: Add support for Tegra210 QSPI controller

Change-Id: I372ba5556b50457d41b1ba09364ed9c71659e520
Signed-off-by: Vishwaroop A <va@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2817463
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-30 10:44:08 -08:00
Jon Hunter
d28e28c6fe spi: aurix: Fix build for Linux v5.18
The Aurix SPI driver fails to build with Linux v5.18 because the return
type of the remove function is not correct. This was previously fixed
for the Linux v5.19 build, but the change in the upstream kernel
actually occurred in Linux v5.18.

Bug 3820317

Change-Id: I2588fe33af6877c1c5c61a2a1d9195248066bbd1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2792537
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-20 02:19:44 -07:00
Laxman Dewangan
d66b048819 spi: aurix: Modify .remove callback based on K5.19 kernel
The spi device remove callback is modified to return as
void type in K5.19. Modify the callback implementation
accordingly.

Bug 3733730

Change-Id: I4ac90af3a87c2f77e3626bff043a5fdb63b2d7c1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2755816
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-08-05 06:29:59 -07:00
Laxman Dewangan
6297198ef4 spi: aurix: get rid of usage of do_exit()
The function do_exit() is exiting from the thread so
it is more appropriate to use the function complete_and_exit().
This function is also chnaged to more appropriate name as
kthread_complete_and_exit() for the K5.17 and beyond.

Use appropriate function name based on the kernel version.

Bug 3604749

Change-Id: I3e72d99a414317b782da2170163519eb2f1cfff3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2730029
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
2022-06-23 18:13:47 -07:00
Laxman Dewangan
7772ebe04f spi: Add driver for Tegra SPI Aurix driver
Add SPI Aurix protocol driver which communicates to the Aurix based on
SPI communication.

Currently, the hv_pm_ctrl APIs are implemented as dummy till
virtual HV driver is available.

Bug 3583584

Change-Id: I5b786b566cbf77f5627d518f8c98cb1fdd55dfa8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2708696
GVS: Gerrit_Virtual_Submit
2022-05-07 15:20:44 -07:00