earlgrey: Add SPI Device driver and SFDP support - #411
Open
anthonychen1251 wants to merge 4 commits into
Open
Conversation
- Implements the SpiDev driver using ureg RegisterBlock representation. - Provides configure_cmd_info for hardware opcode intercept slots (SFDP, JEDEC ID, Read, Program, Erase). - Configures intercept_en, jedec_cc, jedec_id, addr_mode, and SRAM egress buffer. - Provides set_sfdp, write_to_mbx, poll, retire_cmd, and read_addr_swap. - Adds single-process driver smoke test validating register and SRAM egress state. Signed-off-by: Anthony Chen <antchen@google.com>
…ation - Adds create_default_sfdp_table in util/sfdp generating standard JESD216 compliant SFDP headers and basic flash parameters table. - Re-exports SFDP generation in earlgrey_spi_device driver. - Adds unit test validating default SFDP table parsing with SfdpReader. Signed-off-by: Anthony Chen <antchen@google.com>
- Implements the spidev process in HWE firmware. - Configures SpiDev in Flash mode with Google JEDEC ID and standard JESD216 SFDP table in SRAM egress buffer. - Hooks up spidev process and logger_spidev IPC channel in system.json5 and logmgr.rs. - Adds spidev process to multi_process_app in BUILD.bazel. Signed-off-by: Anthony Chen <antchen@google.com>
- Adds host_spidev_check host harness using opentitanlib to query the
SPI device over the SPI interface (BOOTSTRAP):
- Validates Opcode 0x9F (Read JEDEC ID) returning 8x continuation
codes 0x7F, Google Manf ID 0x26, and Device ID 0x1731.
- Validates Opcode 0x5A (Read SFDP) returning JESD216 signature 'SFDP'
and basic flash parameter tables.
- Adds spidev_hyper340_test executing on CW340 targeting hwe_firmware.
Signed-off-by: Anthony Chen <antchen@google.com>
anthonychen1251
force-pushed
the
support-spi-device
branch
from
August 12, 2026 13:29
fc48bae to
58dcf2f
Compare
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.
This PR adds the OpenTitan SPI Device (
spi_device) driver into OpenPRoT, adds JESD216 SFDP table generation support, integrates thespidevservice process into the Earlgrey HWE firmware, and adds an end-to-end (E2E) integration test on FPGA usingopentitanlib.