Commit Graph

7 Commits

Author SHA1 Message Date
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
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
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
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