-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: entropy: Add SAM0 entropy driver #20059
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
Conversation
17e58ef to
a7c6fff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kconfig/devictree nits fixed.
ioannisg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question: is this driver compatible with the Atmel SAM0x SoCs? E.g. samd21?
|
The samd2x series does not contain a HWRNG. |
So, you name this as: SAM0 entropy driver, so I expect it to be supported in ATMEL SoCs under soc/arm/sam0. If this is not the case, I guess we could change the name of the driver. Or, am I missing something? |
|
SAMD5x, SAML2x, SAML1x and SAMD2x all share the same peripheral IP. This is part of a larger PR that adds support for SAMD5x/SAME5x in |
|
tbh It was justifiable when the driver was so simple, but now that the driver has grown in complexity, it feel like a bad idea. |
a7c6fff to
e46cbad
Compare
This adds a driver for the True Random Number Generator found in some Atmel SAM0 SoCs. The Code is based on the driver for the SAM TRNG, but uses different register and clock definitions. Signed-off-by: Benjamin Valentin <[email protected]>
e46cbad to
51930d9
Compare
|
I wonder: isn't the 0 in sam supposed to indicate cortex m0 (armv6)? Instead or cortex m3,4,7 (armv7)? Is your samd5x an armv7? if so it shouldn't really fit under sam0. Or we need to seriously reorg the atmel Soc directories? |
|
Yes historically samd2x was the first one of the 'new generation' of Atmel MCUs - based on Cortex-M0+. The Atmel SAM MCUs are based on ARM7 cores iirc. I don't think renaming would be worth the hassle. |
OK, so you say that the distinction between sam and sam0 is not the ARM architecture, but rather, the Atmel processor family (sam is the old and sam0 the more modern). Correct? |
|
Yes. Actually the Atmel SAM family is also based around Coretx-M* cores but the peripherals are different. E.g. SAM have different peripherals for SPI, I2C and UART whereas SAM0 uses universal SERCOM peripherals for that. When I added support for samd5x I just had to change how the peripherals are clocked, other than that I could use the existing sam0 drivers and things just forked for the most part, so I concluded it belongs to that family. |
I think i agree. It seems very similar to the sam driver - it is not worth the duplicate file, imho |
|
What's the latest on this PR? Based on the latest comments it sounds like a different approach will be taken. Would that be a separate PR or an update to this one? |
This adds a driver for the True Random Number Generator found in some
Atmel SAM0 SoCs.
The Code is based on the driver for the SAM TRNG, but uses different
register and clock definitions.
split off from #14685