Skip to content

Add support for cadence SPI #87382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

SrikanthGoud123
Copy link

Introduces the Cadence SPI IP driver and dt bindings. By adding support for master mode, the SPI controller enables the communications with variety of peripherals such as SPI-NOR flash memories, eeprom and Trusted Platform Module(TPM) devices and other peripherals. Additionally, the controller can operate in an external loopback test mode

Copy link

Hello @SrikanthGoud123, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Add devicetree binding for the Cadence SPI IP.

Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com>
Message-ID: <20250319100832.3986031-2-srikanth.boyapally@amd.com>
State: pending
mm_reg_t base;
void (*irq_config_func)(const struct device *dev);
uint8_t num_ss_bits;
uint32_t is_decoded_cs;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this 2 attributes to uint6_t, for better alignment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made changes as per you suggested

};

struct cdns_spi_data {
uint16_t slave;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move it at the end

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

cdns_spi_cs_cntrl(dev, true);

#ifdef CONFIG_CDNS_SPI_INTR
do {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case, fifo r/w should happen in the isr. Or else, here it's going to do a back & forth between isr/user thread etc etc... thus more overhead.

It should just enable the interrupt, and wait for completion.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tbursztyka
Thanks for the review.

changed the logic as per your suggestion.

Introduces the Cadence SPI IP driver. By adding support for master mode,
the SPI controller enables the communications with variety of peripherals
such as SPI-NOR flash memories, eeprom and Trusted Platform Module(TPM)
devices and other peripherals. Additionally, the controller can operate
in an external loopback test mode.

Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com>
Message-ID: <20250319100832.3986031-3-srikanth.boyapally@amd.com>
State: pending
@tbursztyka
Copy link
Collaborator

Just realized @XenuIsWatching has made a previous PR about the same hw, in #85973

You'll need to sync. My position would be : first come first served.

kedareswararao pushed a commit to Xilinx/zephyr-amd that referenced this pull request May 23, 2025
Add devicetree binding for the Cadence SPI IP.

Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com>
Message-ID: <20250319100832.3986031-2-srikanth.boyapally@amd.com>
Link: zephyrproject-rtos/zephyr#87382
State: waiting
kedareswararao pushed a commit to Xilinx/zephyr-amd that referenced this pull request May 23, 2025
Introduces the Cadence SPI IP driver. By adding support for master mode,
the SPI controller enables the communications with variety of peripherals
such as SPI-NOR flash memories, eeprom and Trusted Platform Module(TPM)
devices and other peripherals. Additionally, the controller can operate
in an external loopback test mode.

Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com>
Message-ID: <20250319100832.3986031-3-srikanth.boyapally@amd.com>
Link: zephyrproject-rtos/zephyr#87382
State: waiting
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label May 27, 2025
@github-actions github-actions bot closed this Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants