-
Notifications
You must be signed in to change notification settings - Fork 8.2k
soc/samr21: Initial support #13494
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
soc/samr21: Initial support #13494
Conversation
|
All checks are passing now. Review history of this comment for details about previous failed status. |
Codecov Report
@@ Coverage Diff @@
## master #13494 +/- ##
==========================================
+ Coverage 51.96% 51.99% +0.03%
==========================================
Files 309 309
Lines 45576 45576
Branches 10554 10554
==========================================
+ Hits 23683 23699 +16
+ Misses 17083 17071 -12
+ Partials 4810 4806 -4
Continue to review full report at Codecov.
|
dbkinder
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.
a few doc changes ...
|
This PR looks good overall, thanks @benpicco, but it needs to be split in three parts:
The commit messages have to follow documentation guidelines Identifying Contribution Origin. The header files provided by Atmel often have mixed line endings. We should change them to the Unix '\n'. Otherwise the first commit shouldn't contain any modifications to the original files. |
dbkinder
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.
+1 for doc changes, thanks!
mnkp
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.
mnkp
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.
Power management system has been recently updated. As you probably have noticed by now this PR needs to be rebased on top of the latest master.
0eac4ef to
a5fe7b5
Compare
mnkp
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.
soc/arm/atmel_sam0/common/power.h
Outdated
| @@ -0,0 +1,35 @@ | |||
| /* | |||
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.
This file is no longer necessary and can be removed. Functions declarations are available via include/power.h.
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.
removed it.
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.
It looks like soc/arm/atmel_sam0/common/power.h is still present in this PR.
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.
oops, sorry - I hope I didn't miss anything else, but I think here I just used rm instead of git rm and forgot to commit it.
944b98d to
0a9091e
Compare
a47eae9 to
bb93263
Compare
mnkp
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.
@benpicco Sorry for a delay, I was busy. LGTM but some things have not yet been fixed. Maybe you didn't push all the local changes you did?
Also a minor thing, the "soc: atmel: auto-select peripherals on SAM0" could be squashed with "soc: atmel: add SAMR21" as it logically belongs there.
soc/arm/atmel_sam0/common/power.h
Outdated
| @@ -0,0 +1,35 @@ | |||
| /* | |||
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.
It looks like soc/arm/atmel_sam0/common/power.h is still present in this PR.
43bdc86 to
b28b2db
Compare
e1d887f to
bc66a08
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.
(at least gpio and usb, i2c?)
supported:
- gpio
- usb_device
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.
I'll add gpio & usb - i2c depends on #14128
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.
Ah turns out this makes CI build some more projects with the board!
The build failure should be fixed by #14832 then. I'd rather have this merged first than manually enabling the driver implementations to the board default config.
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.
It still fails!
#15584 should fix this 🤞
4f25db5 to
f14d077
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.
Maybe we should write it as
zephyr_sources_ifdef(
(CONFIG_SOC_SERIES_SAMD20 OR CONFIG_SOC_SERIES_SAMD21 OR
CONFIG_SOC_SERIES_SAMR21)
soc_samd2x.c)
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.
If I write it like that, soc_samd2x.c does not get build.
Atmel Software Framework (ASF) provides a set of low-level header files that give access to different hardware peripherals of Atmel's ICs. Origin: Atmel SAMR21 Series Device Support (1.1.72) License: Apache-2.0 URL: http://packs.download.atmel.com/Atmel.SAMR21_DFP.1.1.72.atpack Purpose: Introduction of ASF for the SAM0 series. Maintained-by: External Signed-off-by: Benjamin Valentin <[email protected]>
b8eb0d1 to
53cc42f
Compare
Adds Atmel SAMR21 soc which is based on SAMD21, but with a AT86RF233 radio connected internally via SPI. The AT86RF233 is not yet supprted by Zephyr at this point. This code is very much copy & paste from atmel_sam0/samd21 Signed-off-by: Benjamin Valentin <[email protected]>
Add the Atmel SAM R21 Xplained Pro Evaluation Kit to zephyr. So far, UART, SPI, I2C (depends on zephyrproject-rtos#14128), debug LED and user button have been tested. Signed-off-by: Benjamin Valentin <[email protected]>
Take ownership of external SDK files. Signed-off-by: Benjamin Valentin <[email protected]>
The Atmel SAMD21 (and therefore also the SAMR21) comes with the same RTC peripheral as the Atmel SAMD20. Enable it in dts_fixup.h and enable it in the dts for samr21_xpro. Signed-off-by: Benjamin Valentin <[email protected]>
The init routines are the same for SAMD20, SAMD21 and SAMR21, so move them into common/ to not have three copies of the same code. Signed-off-by: Benjamin Valentin <[email protected]>
The samr21 is an ARM Cortex-M0 part very simmilar to the samd21, but comes with a on-chip radio (AT86RF233) connected internally via SPI.
This adds support for the SoC family and the SAM R21 Xplained Pro eveluation board.
Most of it is copy & paste from
atmel_sam0/samd21.The AT86RF233 radio is not supported yet at this point.