[26.04_linux-nvidia-bos] NVIDIA: SAUCE: usb: misc: add LSTP adapter support - #524
Draft
nirmoy wants to merge 9 commits into
Draft
[26.04_linux-nvidia-bos] NVIDIA: SAUCE: usb: misc: add LSTP adapter support#524nirmoy wants to merge 9 commits into
nirmoy wants to merge 9 commits into
Conversation
nirmoy
force-pushed
the
agent/lstp-driver-26.04-bos
branch
3 times, most recently
from
August 3, 2026 15:22
fdb866d to
266c382
Compare
Contributor
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ❌ Errors foundDetailsChecking 9 commits... Cherry-pick digest: ┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐ │ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 3c4975e4550f │ [SAUCE] usb: lstp: roll back failed spi startup │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 935813563a09 │ [SAUCE] usb: lstp: skip zero-length mmio commands │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 3522af643d28 │ [SAUCE] usb: lstp: preserve unread ipmi requests │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 65f9ea83cb08 │ [SAUCE] usb: lstp: recover chip select after errors │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ fd3afe6cd4be │ [SAUCE] usb: lstp: auto-bind empty spi firmware nodes │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 8ea1f1537bda │ [SAUCE] usb: lstp: advertise fixed spi settings │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 72fb4bee457d │ [SAUCE] usb: lstp: bind auto-created spi devices │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ b9d70b230046 │ [SAUCE] [config] enable usb_lstp as a module │ N/A │ N/A │ nirmoyd │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 44b2a45a733e │ [SAUCE] usb: misc: add lstp adapter support │ N/A │ N/A │ aambroze, nirmoyd │ └──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘ Lint: all checks passed. PR metadata: E: PR targets 26.04_linux-nvidia-bos but body has no https://bugs.launchpad.net/... link |
nirmoy
force-pushed
the
agent/lstp-driver-26.04-bos
branch
2 times, most recently
from
August 3, 2026 15:40
01fb73b to
5d52b11
Compare
nirmoy
force-pushed
the
agent/lstp-driver-26.04-bos
branch
2 times, most recently
from
August 3, 2026 18:14
c8318a3 to
c342480
Compare
Collaborator
Author
BaseOS Kernel ReviewSummaryBoro could not review 1 commit. Findings: Critical: 0, High: 2, Medium: 4, Low: 3 Review failures: 1 Latest watcher review: open review Generated test plan: open test plan Kernel deb build: successful (download debs, 4 files) Head: This comment is maintained by nv-pr-bot. It is updated when the GitHub watcher publishes a newer review. |
nirmoy
force-pushed
the
agent/lstp-driver-26.04-bos
branch
3 times, most recently
from
August 5, 2026 08:43
96b683a to
f4cb906
Compare
The Low-Speed Transport Protocol (LSTP) adapter exposes firmware-configured I2C, SPI, GPIO, UART, IPMI, and MMIO channels over a single USB interface. Add the driver as a downstream patch and integrate it with Kconfig, Kbuild, and MAINTAINERS. Adapt the GPIO, I2C, memory-allocation, and UART interfaces to the APIs available in this kernel. Use the configured I2C retry count and avoid a spurious zero-length write before a userspace SMBus block read. (backported from https://gitlab-master.nvidia.com/spt-firmware-taskforce/lstp/lstp_module) Signed-off-by: Adrian Ambrozewicz <aambrozewicz@nvidia.com> Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
nirmoy
force-pushed
the
agent/lstp-driver-26.04-bos
branch
from
August 5, 2026 11:27
f4cb906 to
0d63a60
Compare
Enable CONFIG_USB_LSTP=m for the amd64 and arm64 NVIDIA BOS flavours. Building lstp.ko through the kernel packaging pipeline also allows the module to be signed for Secure Boot. Enable CONFIG_USB_LSTP_SPI_SPIDEV so auto_bind_spidev defaults to true and LSTP SPI channels without firmware-described children create spidev devices. Keep separate IPMI POST-code routing disabled. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
nirmoy
force-pushed
the
agent/lstp-driver-26.04-bos
branch
from
August 5, 2026 15:34
0d63a60 to
b9d70b2
Compare
The generic spidev modalias is not present in the spidev device ID table, so dynamically created LSTP SPI devices remain unbound. Load spidev before creating the devices and set its name as a driver override before registration. Fail channel startup if a child cannot be created or bound. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
LSTP firmware supplies one clock rate for each SPI channel and supports only 8-bit words, but the controller currently accepts other settings and silently ignores them during transfers. Publish the firmware rate as both the minimum and maximum controller speed and restrict the word-size mask to 8 bits so the SPI core rejects unsupported requests. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
A channel fwnode may be present without describing any available SPI child devices. Treat that case like a missing fwnode so the auto_bind_spidev option creates the fallback devices it promises. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
A failed transfer can leave chip select asserted in the adapter. Send a best-effort zero-length write with the deassert flag before completing the failed message, while preserving the original transfer error. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Removing a FIFO record before checking the userspace buffer loses the request on a short read or copy fault. Serialize readers and retain one dequeued record until copy_to_user() succeeds. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Zero-length read and write calls must complete without issuing hardware operations. Return immediately after validating the file offset instead of sending empty LSTP commands. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Channel startup failures do not abort USB probe. If fallback spidev creation fails after controller registration, the controller and any children created before the failure otherwise remain registered. Group controller registration and child creation under devres so the complete SPI channel is rolled back on an error. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
f662fa18e05dlstp.kounderdrivers/usb/misc/CONFIG_USB_LSTP=mfor amd64 and arm64 NVIDIA BOS flavoursMotivation
The temporary DKMS delivery works for image enablement, but carrying LSTP in NV-Kernels lets the normal kernel packaging and signing pipeline produce a module that supports Secure Boot.
Platform software requires the LSTP SPI channels to expose spidev children, so
CONFIG_USB_LSTP_SPI_SPIDEV=yenables this behavior without a separate modprobe configuration file.This is the
26.04_linux-nvidia-boscompanion to standard-kernel PR #530.BugLink: https://jirasw.nvidia.com/browse/DGX-17400
Source and scope
The driver is synchronized through LSTP GitLab main commit
f662fa18e05d8c4b5a2b0bc83acc4e8687c9a9fb. The latest sync includes these kernel-source changes after the originalc3e97053446asnapshot:4f28fdedaf85: use the firmware I2C configuration for bus retry policyf662fa18e05d: fix combined userspace SMBus block readsOut-of-tree packaging, CI, README, specification PDFs, and other repository-local files are not imported.
Device-tree schemas remain omitted because the released copies still need kernel-tree
$idandmaintainersnormalization. They can follow with the upstream-oriented patch series; the schema-only update accompanying4f28fdedaf85is therefore not part of this PR.The source exposes USB vendor ID
0x0955. The previously tested DKMS snapshot also exposed0x0424; the LSTP owners should confirm whether that second alias is approved and required before this draft is marked ready.Validation
26.04_linux-nvidia-bostipgit diff --check: pass293704096353fd9a899984b967358332cf201272scripts/checkpatch.pl --strictfor the latest sync: 0 errors, 0 warnings, 0 checksCONFIG_USB_LSTP=mwith the required USB, I2C, SPI, GPIO, LED, and TTY dependencies enabledW=1against the PR's Linux 7.0 tree7.0.0-2015-nvidia-bos-64kmodinfo -n lstpselected/lib/modules/7.0.0-2015-nvidia-bos-64k/kernel/drivers/usb/misc/lstp/lstp.ko, and ranmodprobe lstpsuccessfullylsmodshowedlstp; dmesg recordedusbcore: registered new interface driver lstp; taint remained unchanged (12288before and after)CONFIG_USB_LSTP=mandCONFIG_USB_LSTP_SPI_SPIDEV=yfor amd64, arm64, and arm64-64k BOS flavoursThe arm64 runtime test predates the two I2C-only sync commits. A refreshed kernel package build and I2C functional test remain required. The BOS configuration already has
CONFIG_MODULE_SIG=yandCONFIG_MODULE_SIG_ALL=y; CI/package output will verify the production signature.