Skip to content
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

dts: Add binding and nodes representing Nordic ECB peripheral #30930

Merged
merged 4 commits into from Jan 13, 2021

Conversation

anangl
Copy link
Member

@anangl anangl commented Dec 21, 2020

This PR adds binding for the Nordic ECB (AES electronic codebook mode encryption) peripheral and corresponding devicetree nodes for nRF SoCs that feature this peripheral. The crypto_nrf_ecb driver is converted so that it creates its instance basing on DT, and the CRYPTO_NRF_ECB_NAME Kconfig option is removed as no longer needed.

The first commit does an additional minor cleanup in one of the files modified by this PR.

@anangl anangl added area: Devicetree platform: nRF Nordic nRFx area: Devicetree Binding PR modifies or adds a Device Tree binding labels Dec 21, 2020
@anangl anangl requested a review from galak December 21, 2020 12:53
@github-actions github-actions bot added the area: Samples Samples label Dec 21, 2020
@anangl anangl marked this pull request as draft December 21, 2020 12:55
@anangl anangl marked this pull request as ready for review December 21, 2020 12:58
@anangl
Copy link
Member Author

anangl commented Jan 5, 2021

Rebased and updated accordingly (used NRF_DEFAULT_IRQ_PRIORITY instead of 1 in interrupts properties) after #20894 has been merged.

Copy link
Member

@ioannisg ioannisg left a comment

Choose a reason for hiding this comment

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

LGTM.
I left a suggestion for a comment to clarify why there's a dependency with the BT Controller

bool "nRF AES electronic codebook mode encryption"
depends on HAS_HW_NRF_ECB && !BT_CTLR
depends on $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_ECB))
depends on !BT_CTLR
Copy link
Member

Choose a reason for hiding this comment

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

@anangl should we have a comment explaining why !BT_CTRL is a dependency?

Copy link
Member

Choose a reason for hiding this comment

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

I know it was un-commented, already, but perhaps we could add now the clarification.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ioannisg I added a note that explains this dependency. Please check if it is acceptable.

Copy link
Member

Choose a reason for hiding this comment

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

Looks fine, thanks

Since MDK was updated and now it contains the definition of QDEC
peripheral for nRF52805, the DT node representing this peripheral
can be processed normally.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add binding for the Nordic ECB (AES electronic codebook mode
encryption) peripheral and corresponding devicetree nodes for
nRF SoCs that feature this peripheral.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Convert the driver so that it creates its instance basing on DT.
Remove no longer needed Kconfig option CRYPTO_NRF_ECB_NAME.
Also update accordingly the crypto sample.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add check that validates that the base addresses specified in DT nodes
representing the ECB peripheral match the addresses of that peripheral
defined in MDK.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
@anangl
Copy link
Member Author

anangl commented Jan 13, 2021

Rebased on master, to solve the problem with reported undefined Kconfig options being referenced (those from the recently added modules/audio/sof project that was not fetched by west before the rebase).

@ioannisg ioannisg merged commit 978a031 into zephyrproject-rtos:master Jan 13, 2021
@anangl anangl deleted the dts_ecb branch January 13, 2021 11:57
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.

None yet

6 participants